General API Response Structure

ver

Exact version of the API which generated the response.

time

Datetime value of the response.

action

Action to be performed with the data (update = update modifications, refresh = refresh all data, testing = indicates that an authentication test response is being received).

error

Variable that will contain, if it occurs, the error code generated. The errors are detailed in the section 'API error codes'.

schema

Specific client configuration.

data_schema

Indicates the field names of the data sub-matrices.

data_schema_info

Saves descriptive information of the tables and each field.

data

Data matrix separated in tables

image_packs

URLs of image packages (generated from the main sections) to be downloaded for offline mode.

offline_files

List of related fields in exported items. Only available when "action"= "refresh" and if the connector has the offline mode active.

page_count

Page number. (Not shown in the absence of  pagination)

page_length

Amount of items per page. (Not shown in the absence of  pagination)

next_page

URL of the call to the next page. If the last page has been reached this field will be empty. (Not shown in the absence of  pagination)

The data of the sub-matrices contained in “data” will have a first status parameter to indicate if a record is new, updated or deleted. Its format will be: STATUS = M / D (M = modify, D = deleted). Example:

“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 lang suffix}”,
            “sanitized”: “{field name to be used in the database}”,
            “sizes”: [
                “{extension}”: {“'width”:  {width}, “height”: {width} },
            ...
        ]
    }, ...
], ...
] ,
“data”: [
    “{table name}”: [
        [ “M”, 123, “section 1”, … ]

All the fields in the tables contained in [data] have the same mapping format except for the fields of type image and file which both have an array structure with the following parameters:

{n} = [ ← 'n' field related with an image or file

Gallery element 1:

[
    STATUS (M = modified , U=unmodified),
    ID (unique file identifier in md5 format),
    File URL (if it’s an image that belongs to one of the resized images),
    File URL (if it’s an image that belongs to one of the resized images),
    …
],

Gallery element 2:

[ … ],
...

]

], ...

] ,