Custom Collection Elements API
Bu içerik henüz dilinizde mevcut değil.
Custom Collection Elements API
Заголовок раздела «Custom Collection Elements API»List custom collection elements
Заголовок раздела «List custom collection elements»List all custom collection elements for an account:
GET /custom_collection_elementsResponse
Заголовок раздела «Response»Status: 200 OK[ { "id": 2, "sourceID": null, "custom_collection": "collection_2", "reference": "item_1", "name": "Item 1", "description": "1st item", "created_at": "2016-12-23T05:09:03-06:00", "updated_at": "2016-12-23T05:09:03-06:00" }, { "id": 3, "sourceID": null, "custom_collection": "collection_2", "reference": "item_2", "name": "Item 2", "description": "Another item", "created_at": "2016-12-23T05:09:03-06:00", "updated_at": "2016-12-23T05:09:03-06:00" }]The response contains these fields by default. Filtering and pagination are available to reduce/limit the collection of custom collection elements.
Predefined Filters
Заголовок раздела «Predefined Filters»The following predefined filters are available:
/custom_collection_elements/disabled: List all disabled custom collection elements/custom_collection_elements/enabled: List all enabled custom collection elements
Collection Fields
Заголовок раздела «Collection Fields»By default the following fields will appear in collections of custom collection elements:
id
sourceID
custom_collection
reference
name
description
created_at
updated_at
Obtain a different set of fields using the ?fields=parameter .
Filtering
Заголовок раздела «Filtering»Filtering is available for the following fields :
id
custom_collection
source
sourceID
disabled
reference
name
created_at
updated_at
Sorting
Заголовок раздела «Sorting»By default a collection of custom collection elements is sorted
ascending
by
id
.
The following fields are accepted by the ?sort=parameter :
id
sourceID
custom_collection
reference
created_at
updated_at
Get a single custom collection element
Заголовок раздела «Get a single custom collection element»GET /custom_collection_elements/:idResponse
Заголовок раздела «Response»Status: 200 OK{ "attachments": [], "created_at": "2016-12-23T05:09:03-06:00", "custom_collection": "collection_2", "description": "1st item", "disabled": false, "id": 2, "information": "The primary element", "localized_description": "1st item", "localized_name": "Item 1", "name": "Item 1", "reference": "item_1", "source": null, "sourceID": null, "updated_at": "2016-12-23T05:09:03-06:00"}The response contains these fields .
Create a custom collection element
Заголовок раздела «Create a custom collection element»POST /custom_collection_elementsWhen creating a new custom collection element these fields are available.
Response
Заголовок раздела «Response»Status: 201 Created{ "id": "...", "...": "..."}The response contains all fields of the created custom collection and is similar to the response in Get a single custom collection element
Update a custom collection element
Заголовок раздела «Update a custom collection element»PATCH /custom_collection_elements/:idWhen updating a custom collection element these fields are available.
Response
Заголовок раздела «Response»Status: 200 OK{ "id": "...", "...": "..."}The response contains all fields of the updated custom collection element and is similar to the response in Get a single custom collection element
attachments
Readonly aggregated Attachments
created_at
Readonly datetime — The date and time at which the custom collection element was created.
custom_collection
Readonly reference to Custom Collection — The Custom collection the custom collection belongs to.
description
Optional string (max 255) — The Description field is used to enter a very short description of the custom collection element.
disabled
Optional
boolean
, default:
false
— The Disabled box is checked when the custom collection element may not be selected in suggest boxes for custom fields.
id
Readonly integer — The unique ID of the custom collection.
information
Optional text (max 64KB) — The Information field is used to add any additional information about the custom collection element that might prove useful.
information_attachments
Writeonly attachments The attachments used in the Information field.
localized_description
Readonly
text
(max 64KB)
— Translated Description in the current
language
, defaults to
description
in case no translation is provided.
localized_name
Readonly
string
(max 80)
— Translated Name in the current
language
, defaults to
name
in case no translation is provided.
name
Required string (max 128) — The Name field is used to enter the name of the custom collection element. Ideally the name of a custom collection element consists of a single word.
picture_uri
Optional string — The hyperlink to the image file for the custom collection element.
reference
Optional string (max 128) — The Reference field defaults to the Name field value, written in lower case characters and with all spaces replaced by the underscore character. This reference can be used in automation rules.
source
Optional string (max 30) - See source
sourceID
Optional string (max 128) - See source
updated_at
Readonly
datetime
— The date and time of the last update of the custom collection element. If the custom collection element has no updates it contains the
created_at
value.