大家好,欢迎来到IT知识分享网。
threema.cn
自定义栏目
自定义栏目 – 新添自定义栏目
自定义字段POST请求的提交URL对于每个端点都保持不变(例如:“联系人端点为api/contacts,账单端点为api/voils等等)
在本例中,我们将使用与以下自定义字段类型相对应的以下表单数据:
custom_fields[invoice][1] = Input Typecustom_fields[invoice][2] = Numbercustom_fields[invoice][3] = Textareacustom_fields[invoice][4] = Radiocustom_fields[invoice][5] = Checkboxcustom_fields[invoice][6] = Multiselectcustom_fields[invoice][7] = Datecustom_fields[invoice][8] = Datetimecustom_fields[invoice][9] = Colorcustom_fields[invoice][10] = Link
POST 域名.com/N/A
参数
项目 |
类型 |
描述 |
custom_fields[customFieldType] |
string/array |
Custom Field Key should be same as field_name returned from Search custom field values’ information |
- 成功-响应:
HTTP/1.1 200 OK Same as Original request
- 出错-响应:
HTTP/1.1 404 Not FoundSame as Original request
自定义栏目 – 删除自定义栏目
要删除特定的自定义字段值,可以使用更新操作和自定义字段中的空值。
备注
当您删除任何记录时,相应的自定义字段数据将自动删除。
DELETE 域名.com/N/A
自定义栏目 – 获取自定义栏目信息
在每个可用端点(联系人、账单等)的初始GET请求期间,自定义字段的数据将与其他请求的信息一起返回,并带有各自的标签和值键。
GET 域名.com/N/A
- 成功-响应:
HTTP/1.1 200 OK { "id": "1", "sent": "0", "datesend": null, "clientid": "1", "deleted_customer_name": null, "number": "10", "prefix": "INV-", "number_format": "1", "datecreated": "2023-05-14 00:44:52", "date": "2023-08-28", "duedate": "2023-09-27", "currency": "1", "subtotal": "110.00", "total_tax": "0.00", "total": "110.00", "adjustment": "0.00", "addedfrom": "0", "hash": "4222d2f53404324ea73535d3c0f2c3f0", "status": "1", "clientnote": "", "adminnote": "", "last_overdue_reminder": null, "cancel_overdue_reminders": "1", "allowed_payment_modes": "a:2:{i:0;s:1:"1";i:1;s:1:"2";}", "token": null, "discount_percent": "0.00", "discount_total": "0.00", "discount_type": "", "recurring": "0", "recurring_type": null, "custom_recurring": "0", "cycles": "0", "total_cycles": "0", "is_recurring_from": null, "last_recurring_date": null, "terms": "", "sale_agent": "0", "billing_street": "billing address", "billing_city": "billing city name", "billing_state": "billing state name", "billing_zip": "billing zip code", "billing_country": "0", "shipping_street": "shipping address", "shipping_city": "city name", "shipping_state": "state name", "shipping_zip": "zip code", "shipping_country": "0", "include_shipping": "1", "show_shipping_on_invoice": "1", "show_quantity_as": "1", "project_id": "0", "subscription_id": "0", "short_link": null, "symbol": "#34;, "name": "USD", "decimal_separator": ".", "thousand_separator": ",", "placement": "before", "isdefault": "1", "currencyid": "1", "currency_name": "USD", "total_left_to_pay": "110.00", "items": [ { "id": "1", "rel_id": "1", "rel_type": "invoice", "description": "item description", "long_description": "item long description", "qty": "1.00", "rate": "10.00", "unit": "1", "item_order": "1", "customfields": [ { "label": "Input 1", "value": "test 12 item 1" }, { "label": "Number 1", "value": "10" }, { "label": "Textarea 1", "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry" }, { "label": "Select 1", "value": "Option 1" }, { "label": "Multiselect 1", "value": "Option 1, Option 2" }, { "label": "Checkbox 1", "value": "Option 1, Option 3" }, { "label": "Datepicker 1", "value": "2023-05-06" }, { "label": "Datetime Picker 1", "value": "2023-05-06 00:23:25" }, { "label": "Colorpicker 1", "value": "#ffffff" }, { "label": "Hyperlink 1", "value": "<a>Link</a>" } ] }, { "id": "2", "rel_id": "1", "rel_type": "invoice", "description": "updated item 2 description", "long_description": "updated item 2 logn description", "qty": "1.00", "rate": "100.00", "unit": "", "item_order": "2", "customfields": [ { "label": "Input 1", "value": "test 12 item 2" }, { "label": "Number 1", "value": "10" }, { "label": "Textarea 1", "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry" }, { "label": "Select 1", "value": "Option 1" }, { "label": "Multiselect 1", "value": "Option 1, Option 2" }, { "label": "Checkbox 1", "value": "Option 1, Option 3" }, { "label": "Datepicker 1", "value": "2023-05-06" }, { "label": "Datetime Picker 1", "value": "2023-05-06 00:23:25" }, { "label": "Colorpicker 1", "value": "#ffffff" }, { "label": "Hyperlink 1", "value": "<a>Link</a>" } ] } ], "attachments": [], "visible_attachments_to_customer_found": false, "client": { "userid": "1", "company": "updated company", "vat": "", "phonenumber": "", "country": "0", "city": "", "zip": "", "state": "", "address": "", "website": "", "datecreated": "2023-05-14 00:15:06", "active": "1", "leadid": null, "billing_street": "", "billing_city": "", "billing_state": "", "billing_zip": "", "billing_country": "0", "shipping_street": "", "shipping_city": "", "shipping_state": "", "shipping_zip": "", "shipping_country": "0", "longitude": null, "latitude": null, "default_language": "", "default_currency": "0", "show_primary_contact": "0", "stripe_id": null, "registration_confirmed": "1", "addedfrom": "0" }, "payments": [], "scheduled_email": null, "customfields": [ { "label": "Input 1", "value": "test 12" }, { "label": "Number 1", "value": "10" }, { "label": "Textarea 1", "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry" }, { "label": "Select 1", "value": "Option 1" }, { "label": "Multiselect 1", "value": "Option 1, Option 2" }, { "label": "Checkbox 1", "value": "Option 1, Option 3" }, { "label": "Datepicker 1", "value": "2023-05-06" }, { "label": "Datetime Picker 1", "value": "2023-05-06 00:23:25" }, { "label": "Colorpicker 1", "value": "#ffffff" }, { "label": "Hyperlink 1", "value": "<a>Link</a>" } ] }
- 出错-响应:
HTTP/1.1 404 Not FoundSame as Original request
自定义栏目 – 获取自定义栏目指
GET 域名.com/api/custom_fields/:FieldBelongsto/:id
请求头
项目 |
类型 |
描述 |
Authorization |
String |
Basic Access Authentication token. |
参数
项目 |
类型 |
描述 |
项目Belongsto |
string |
Belongs to Mandatory Field Belongs to.Allowed values: “Company”, “Leads”, “Customers”, “Contacts”, “Staff”, “Contracts”, “Tasks”, “Expenses”, “Invoice”, “Items”, “Note”, “Estimate”, “Contract”, “Proposal”, “Projects”, “Tickets” |
id (optional) |
Number |
Optional unique ID. |
成功 200
项目 |
类型 |
描述 |
Custom |
Object |
Custom Fields information with values. |
出错 4xx
Name |
类型 |
描述 |
status |
Boolean |
Request status. |
message |
String |
No data were found. |
- 成功-响应:
HTTP/1.1 200 OK[ { "field_name": "custom_fields[invoice][1]", "custom_field_id": "1", "label": "Input 1", "required": "0", "type": "input", "value": "input1 data" }, { "field_name": "custom_fields[invoice][2]", "custom_field_id": "2", "label": "Number 1", "required": "0", "type": "number", "value": "12" }, { "field_name": "custom_fields[invoice][3]", "custom_field_id": "3", "label": "Textarea 1", "required": "0", "type": "textarea", "value": "textarea content" }, { "field_name": "custom_fields[invoice][4]", "custom_field_id": "4", "label": "Select 1", "required": "0", "type": "select", "value": "["Option 1"]", "options": "["Option 1","Option 2","Option 3"]" }, { "field_name": "custom_fields[invoice][5]", "custom_field_id": "5", "label": "Multiselect 1", "required": "0", "type": "multiselect", "value": "["Option 1"," Option 2"]", "options": "["Option 1","Option 2","Option 3"]" }, { "field_name": "custom_fields[invoice][6]", "custom_field_id": "6", "label": "Checkbox 1", "required": "0", "type": "checkbox", "value": "["Option 1"," Option 2"]", "options": "["Option 1","Option 2","Option 3"]" }, { "field_name": "custom_fields[invoice][7]", "custom_field_id": "7", "label": "Datepicker 1", "required": "0", "type": "date_picker", "value": "2023-05-16" }, { "field_name": "custom_fields[invoice][8]", "custom_field_id": "8", "label": "Datetime Picker 1", "required": "0", "type": "date_picker_time", "value": "2023-05-25 23:06:00" }, { "field_name": "custom_fields[invoice][9]", "custom_field_id": "9", "label": "Colorpicker 1", "required": "0", "type": "colorpicker", "value": "#8f1b1b" }, { "field_name": "custom_fields[invoice][10]", "custom_field_id": "10", "label": "Hyperlink 1", "required": "0", "type": "link", "value": "<a href="https://bing.com" target="_blank">必应</a>" }]
- 出错-响应:
HTTP/1.1 404 Not Found{ "status": false, "message": "No data were found"}
自定义栏目 – 搜索自定义栏目信息
在每个可用端点(联系人、账单等)的初始SEARCH请求期间,自定义字段的数据将与其他请求的信息一起返回,并带有各自的标签和值键
GET 域名.com/N/A
- 成功-响应:
HTTP/1.1 200 OK [ { "id": "1", "sent": "0", "datesend": null, "clientid": "1", "deleted_customer_name": null, "number": "10", "prefix": "INV-", "number_format": "1", "datecreated": "2023-05-14 00:15:06", "date": "2023-08-28", "duedate": "2023-09-27", "currency": "1", "subtotal": "110.00", "total_tax": "0.00", "total": "110.00", "adjustment": "0.00", "addedfrom": "0", "hash": "4222d2f53404324ea73535d3c0f2c3f0", "status": "1", "clientnote": "", "adminnote": "", "last_overdue_reminder": null, "cancel_overdue_reminders": "1", "allowed_payment_modes": "a:2:{i:0;s:1:"1";i:1;s:1:"2";}", "token": null, "discount_percent": "0.00", "discount_total": "0.00", "discount_type": "", "recurring": "0", "recurring_type": null, "custom_recurring": "0", "cycles": "0", "total_cycles": "0", "is_recurring_from": null, "last_recurring_date": null, "terms": "", "sale_agent": "0", "billing_street": "", "billing_city": "", "billing_state": "", "billing_zip": "", "billing_country": "0", "shipping_street": "", "shipping_city": "", "shipping_state": "", "shipping_zip": "", "shipping_country": "0", "include_shipping": "1", "show_shipping_on_invoice": "1", "show_quantity_as": "1", "project_id": "0", "subscription_id": "0", "short_link": null, "userid": "1", "company": "updated company", "vat": "", "phonenumber": "", "country": "0", "city": "", "zip": "", "state": "", "address": "", "website": "", "active": "1", "leadid": null, "longitude": null, "latitude": null, "default_language": "", "default_currency": "0", "show_primary_contact": "0", "stripe_id": null, "registration_confirmed": "1", "invoiceid": "1", "customfields": [ { "label": "Input 1", "value": "test 12" }, { "label": "Number 1", "value": "10" }, { "label": "Textarea 1", "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry" }, { "label": "Select 1", "value": "Option 1" }, { "label": "Multiselect 1", "value": "Option 1, Option 2" }, { "label": "Checkbox 1", "value": "Option 1, Option 3" }, { "label": "Datepicker 1", "value": "2023-05-06" }, { "label": "Datetime Picker 1", "value": "2023-05-06 00:23:25" }, { "label": "Colorpicker 1", "value": "#ffffff" }, { "label": "Hyperlink 1", "value": "<a>Link</a>" } ] }, { "id": "2", "sent": "0", "datesend": null, "clientid": "1", "deleted_customer_name": null, "number": "4", "prefix": "INV-", "number_format": "1", "datecreated": "2023-05-14 00:15:06", "date": "2023-05-28", "duedate": "2023-06-27", "currency": "1", "subtotal": "110.00", "total_tax": "0.00", "total": "110.00", "adjustment": "0.00", "addedfrom": "0", "hash": "630f8cc7ed2e6a70c4113ab24041bdf5", "status": "6", "clientnote": "", "adminnote": "", "last_overdue_reminder": null, "cancel_overdue_reminders": "1", "allowed_payment_modes": "a:2:{i:0;s:1:"1";i:1;s:1:"2";}", "token": null, "discount_percent": "0.00", "discount_total": "0.00", "discount_type": "", "recurring": "0", "recurring_type": null, "custom_recurring": "0", "cycles": "0", "total_cycles": "0", "is_recurring_from": null, "last_recurring_date": null, "terms": "", "sale_agent": "0", "billing_street": "", "billing_city": "", "billing_state": "", "billing_zip": "", "billing_country": "0", "shipping_street": "", "shipping_city": "", "shipping_state": "", "shipping_zip": "", "shipping_country": "0", "include_shipping": "1", "show_shipping_on_invoice": "1", "show_quantity_as": "1", "project_id": "0", "subscription_id": "0", "short_link": null, "userid": "1", "company": "updated company", "vat": "", "phonenumber": "", "country": "0", "city": "", "zip": "", "state": "", "address": "", "website": "", "active": "1", "leadid": null, "longitude": null, "latitude": null, "default_language": "", "default_currency": "0", "show_primary_contact": "0", "stripe_id": null, "registration_confirmed": "1", "invoiceid": "2", "customfields": [ { "label": "Input 1", "value": "test 12" }, { "label": "Number 1", "value": "10" }, { "label": "Textarea 1", "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry" }, { "label": "Select 1", "value": "Option 1" }, { "label": "Multiselect 1", "value": "Option 1, Option 2" }, { "label": "Checkbox 1", "value": "Option 1, Option 3" }, { "label": "Datepicker 1", "value": "2023-05-06" }, { "label": "Datetime Picker 1", "value": "2023-05-06 00:23:25" }, { "label": "Colorpicker 1", "value": "#ffffff" }, { "label": "Hyperlink 1", "value": "<a>Link</a>" } ] } ]
- 出错-响应:
HTTP/1.1 404 Not FoundSame as Original request
自定义栏目 – 更新自定义栏目
对于每个端点,自定义字段的PUT请求的提交URL保持不变(例如,对于联系人端点为api/contacts,对于账单端点为api/invoits等)
在本例中,我们将使用与以下自定义字段类型相对应的以下表单数据:
custom_fields[invoice][1] = Input Typecustom_fields[invoice][2] = Numbercustom_fields[invoice][3] = Textareacustom_fields[invoice][4] = Radiocustom_fields[invoice][5] = Checkboxcustom_fields[invoice][6] = Multiselectcustom_fields[invoice][7] = Datecustom_fields[invoice][8] = Datetimecustom_fields[invoice][9] = Colorcustom_fields[invoice][10] = Link
PUT 域名.com/N/A
参数
项目 |
类型 |
描述 |
custom_fields[customFieldType] |
string/array |
Custom Field JSON should be same as below with field_name and custom_field_id returned from Search custom field values’ information |
- 成功-响应:
HTTP/1.1 200 OK Same as Original request
- 出错-响应:
HTTP/1.1 404 Not FoundSame as Original request
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/55171.html