大家好,欢迎来到IT知识分享网。
客户
客户 – 新添客户
POST 域名.com/api/customers
请求头
项目 |
类型 |
描述 |
Authorization |
String |
Basic Access Authentication token. |
参数
项目 |
类型 |
描述 |
company |
String |
Mandatory Customer company. |
vat (optional) |
String |
Optional Vat. |
phonenumber (optional) |
String |
Optional Customer Phone. |
website (optional) |
String |
Optional Customer Website. |
groups_in (optional) |
Number[] |
Optional Customer groups. |
default_language (optional) |
String |
Optional Customer Default Language. |
default_currency (optional) |
String |
Optional default currency. |
address (optional) |
String |
Optional Customer address. |
city (optional) |
String |
Optional Customer City. |
state (optional) |
String |
Optional Customer state. |
zip (optional) |
String |
Optional Zip Code. |
partnership_type (optional) |
String |
Optional Customer partnership type. |
country (optional) |
String |
Optional country. |
billing_street (optional) |
String |
Optional Billing Address: Street. |
billing_city (optional) |
String |
Optional Billing Address: City. |
billing_state (optional) |
Number |
Optional Billing Address: State. |
billing_zip (optional) |
String |
Optional Billing Address: Zip. |
billing_country (optional) |
String |
Optional Billing Address: Country. |
shipping_street (optional) |
String |
Optional Shipping Address: Street. |
shipping_city (optional) |
String |
Optional Shipping Address: City. |
shipping_state (optional) |
String |
Optional Shipping Address: State. |
shipping_zip (optional) |
String |
Optional Shipping Address: Zip. |
shipping_country (optional) |
String |
Optional Shipping Address: Country. |
成功 200
项目 |
类型 |
描述 |
status |
Boolean |
Request status. |
message |
String |
Customer add successful. |
- 成功-响应:
HTTP/1.1 200 OK { "status": true, "message": "Customer add successful." }
出错 4xx
Name |
类型 |
描述 |
status |
Boolean |
Request status. |
message |
String |
Customer add fail. |
- 出错-响应:
HTTP/1.1 404 Not Found { "status": false, "message": "Customer add fail." }
客户 – 删除客户
DELETE 域名.com/api/delete/customers/:id
请求头
项目 |
类型 |
描述 |
Authorization |
String |
Basic Access Authentication token. |
参数
项目 |
类型 |
描述 |
id |
Number |
Customer unique ID. |
成功 200
项目 |
类型 |
描述 |
status |
String |
Request status. |
message |
String |
Customer Delete Successful. |
- 成功-响应:
HTTP/1.1 200 OK { "status": true, "message": "Customer Delete Successful." }
出错 4xx
Name |
类型 |
描述 |
status |
Boolean |
Request status. |
message |
String |
Customer Delete Fail. |
- 出错-响应:
HTTP/1.1 404 Not Found { "status": false, "message": "Customer Delete Fail." }
客户 – 获取客户信息
GET 域名.com/api/customers/:id
请求头
项目 |
类型 |
描述 |
Authorization |
String |
Basic Access Authentication token. |
参数
项目 |
类型 |
描述 |
id |
Number |
customer unique ID. |
成功 200
项目 |
类型 |
描述 |
customer |
Object |
information. |
- 成功-响应:
HTTP/1.1 200 OK { "id": "28", "name": "Test1", "description": null, "status": "1", "clientid": "11", "billing_type": "3", "start_date": "2023-04-19", "deadline": "2023-08-30", "customer_created": "2023-07-16", "date_finished": null, "progress": "0", "progress_from_tasks": "1", "customer_cost": "0.00", "customer_rate_per_hour": "0.00", "estimated_hours": "0.00", "addedfrom": "5", "rel_type": "customer", "potential_revenue": "0.00", "potential_margin": "0.00", "external": "E", ... }
出错 4xx
Name |
类型 |
描述 |
status |
Boolean |
Request status. |
message |
String |
No data were found. |
- 出错-响应:
HTTP/1.1 404 Not Found { "status": false, "message": "No data were found" }
客户 – 搜索客户信息
GET 域名.com/api/customers/search/:keysearch
请求头
项目 |
类型 |
描述 |
Authorization |
String |
Basic Access Authentication token. |
参数
项目 |
类型 |
描述 |
keysearch |
String |
Search Keywords. |
成功 200
项目 |
类型 |
描述 |
customer |
Object |
information. |
- 成功-响应:
HTTP/1.1 200 OK { "id": "28", "name": "Test1", "description": null, "status": "1", "clientid": "11", "billing_type": "3", "start_date": "2023-04-19", "deadline": "2023-08-30", "customer_created": "2023-07-16", "date_finished": null, "progress": "0", "progress_from_tasks": "1", "customer_cost": "0.00", "customer_rate_per_hour": "0.00", "estimated_hours": "0.00", "addedfrom": "5", "rel_type": "customer", "potential_revenue": "0.00", "potential_margin": "0.00", "external": "E", ... }
出错 4xx
Name |
类型 |
描述 |
status |
Boolean |
Request status. |
message |
String |
No data were found. |
- 出错-响应:
HTTP/1.1 404 Not Found { "status": false, "message": "No data were found" }
客户 – 更新
PUT 域名.com/api/customers/:id
请求头
项目 |
类型 |
描述 |
Authorization |
String |
Basic Access Authentication token. |
参数
项目 |
类型 |
描述 |
company |
String |
Mandatory Customer company. |
vat (optional) |
String |
Optional Vat. |
phonenumber (optional) |
String |
Optional Customer Phone. |
website (optional) |
String |
Optional Customer Website. |
groups_in (optional) |
Number[] |
Optional Customer groups. |
default_language (optional) |
String |
Optional Customer Default Language. |
default_currency (optional) |
String |
Optional default currency. |
address (optional) |
String |
Optional Customer address. |
city (optional) |
String |
Optional Customer City. |
state (optional) |
String |
Optional Customer state. |
zip (optional) |
String |
Optional Zip Code. |
country (optional) |
String |
Optional country. |
billing_street (optional) |
String |
Optional Billing Address: Street. |
billing_city (optional) |
String |
Optional Billing Address: City. |
billing_state (optional) |
Number |
Optional Billing Address: State. |
billing_zip (optional) |
String |
Optional Billing Address: Zip. |
billing_country (optional) |
String |
Optional Billing Address: Country. |
shipping_street (optional) |
String |
Optional Shipping Address: Street. |
shipping_city (optional) |
String |
Optional Shipping Address: City. |
shipping_state (optional) |
String |
Optional Shipping Address: State. |
shipping_zip (optional) |
String |
Optional Shipping Address: Zip. |
shipping_country (optional) |
String |
Optional Shipping Address: Country. |
成功 200
项目 |
类型 |
描述 |
status |
Boolean |
Request status. |
message |
String |
Customer Update Successful. |
- 成功-响应:
HTTP/1.1 200 OK { "status": true, "message": "Customer Update Successful." }
出错 4xx
Name |
类型 |
描述 |
status |
Boolean |
Request status. |
message |
String |
Customer Update Fail. |
- 出错-响应:
HTTP/1.1 404 Not Found { "status": false, "message": "Customer Update Fail." }
信息
注:关于API所有系统项目操作指导说明,可进入此地址查阅:https://docs.threema.cn
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/47646.html