The general API response can include the following fields:
| Field | Description |
|---|---|
ver | Exact API version that generated the response. |
time | datetime of the response. |
action | Action that must be performed with the data. It can be update, refresh, or testing. |
error | Generated error code, if one occurs. |
schema | Customer-specific configuration. |
data_schema | Names of the fields in the data subarrays. |
data_schema_info | Descriptive information about the tables and each field. |
data | Data matrix separated by tables. |
image_packs | URLs of image packs for download in offline mode. |
offline_files | List of files related to the exported items. It only appears in action=refresh mode and if the connector has offline mode enabled. |
page_count | Page number. It is not shown if there is no pagination. |
page_length | Number of items per page. It is not shown if there is no pagination. |
next_page | URL of the next page. If you are already on the last page, this field appears empty. |
Data structure inside data
The subarrays inside data include a first status parameter to indicate whether a record is new, updated, or deleted. The format is STATUS = M/D, where M means modify and D means delete.
“data_schema”: [
“{table name}”: [ 0: “STATUS”, 1: “ID”, 2: “name”, … ],
...
] ,
“data_schema_info”: [
“{table name}”: [
“{field name}”: {
“type”: “{string|numeric|list|boolean|datetime|image|file}”,
“origin”: “{database|formula|template|channel}”,
“language_code”: “{en|es|fr|...}”,
“basename”: “{field name without language suffix}”,
“sanitized”: “{field name prepared for database use}”,
“sizes”: [
“{extension}”: { “width”: {horizontal size}, “height”: {vertical size} }
]
}
]
] ,
“data”: [
“{table name}”: [
[ “M”, 123, “section 1”, … ]
]
]Image and file fields
All fields in the tables contained in data follow the same assignment logic, except image and file fields. These use an array structure with specific information for each gallery element.
{n} = [
Gallery element 1:
[
STATUS (M = modified, U = unmodified),
ID (unique file identifier in md5 format),
File URL,
File URL for another crop,
…
],
Gallery element 2:
[ … ],
...
]
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article