Response structure

Modified on Wed, 6 May at 12:24 PM

The general API response can include the following fields:


FieldDescription
verExact API version that generated the response.
timedatetime of the response.
actionAction that must be performed with the data. It can be update, refresh, or testing.
errorGenerated error code, if one occurs.
schemaCustomer-specific configuration.
data_schemaNames of the fields in the data subarrays.
data_schema_infoDescriptive information about the tables and each field.
dataData matrix separated by tables.
image_packsURLs of image packs for download in offline mode.
offline_filesList of files related to the exported items. It only appears in action=refresh mode and if the connector has offline mode enabled.
page_countPage number. It is not shown if there is no pagination.
page_lengthNumber of items per page. It is not shown if there is no pagination.
next_pageURL 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article