This section provides important information about the common structure of each endpoint response that you will get by invoking Fabrick Platform APIs.
Please remember that in the technical documentation of each endpoint you will find only the specific information related to the structure of the response payload element; the general response structure is implicitly assumed as documented in this section.
The reference to the response structure distinguishes among the API version to document each version response structure: please be sure to refer to the correct version number.
API Version 4.0
General Response Structure
{
"status": "",
"errors": [],
"payload": {}
}
The status field contains one of the following status codes:
OKIf the response contains payload.KOIf the response contains one or more errors.PENDINGIf the response requires further interaction.
errors array may contain info related to error handling (see below for details).The
payload object typically contains the response data.{
"status": "",
"errors": [],
"payload": {
"list": [...],
"pagination": {
"pageCount": 50,
"resultCount": 495,
"offset": 0,
"limit": 10
},
"segmentation": {
"segmentLength": 200,
"segmentId": "263687770H...1",
"nextSegmentId": "263687770H...2"
},
"sorting": {
"fieldName": "key1",
"type": "DESCENDING"
}
}
}
The payload.list array typically contains one or more result elements.The
payload.pagination object is optional and contains the following fields:pageCountThe total number of pages, assuming each page contains "limit" number of results.resultCountThe total number of results.offsetThe positional index of the first element provided in the response.limitThe number of elements provided in the response.
The payload.segmentation object is optional and contains the following fields:
segmentLengthThe number of elements of the current segment.segmentIdThe ID of the current segment.nextSegmentIdThe ID of the next response segment to be retrieved. Ifnullthere are no more segments to be retrieved.
payload.sorting object is optional and contains the following fields:fieldNameThe name of the response field to be used as sorting key.typeThe type of sorting for the sorting key:ASCis ascending;DESCis descending.
"errors": [{
"code" : "",
"description": "",
"params": ""
}]
The code field contains an error code; please refer to the section Error Handling for further details.The
description field contains a textual description of the response code.The
params field is a string optionally containing the name of the input parameter affected by the reported error.API Version 3.0
General Response Structure
{
"status": "",
"errors": [],
"payload": {}
}
The status field contains one of the following status codes:
OKIf the response contains payload.KOIf the response contains one or more errors.PENDINGIf the response requires further interaction.
The
errors array may contain info related to error handling (see last column of this row).The
payload object typically contains the response data."errors": [{
"code" : "",
"description": "",
"params": []
}]
The code field contains an error code; please refer to the section Error Handling for further details.The
description field contains a textual description of the response code.The
params field is an array of strings eventually containing the name(s) of the input parameters affected by the reported errors.API Version 2.1
General Response Structure
{
"status": {
"code": "",
"description": ""
},
"errors": [],
"payload": []
}
The status.code field contains one of the following status codes:
OKIf the response contains payload.KOIf the response contains one or more errors.PENDINGIf the response requires further interaction.
status.description field contains a textual description of the response code.The
errors array may contain info related to error handling (see last column of this row).The
payload array typically contains the response data.Not supported
Error Handling
"errors": [{
"code" : "",
"description": "",
"params": []
}]
The code field contains an error code; please refer to the section Error Handling for further details.The
description field contains a textual description of the response code.The
params field is an array of strings eventually containing the name(s) of the input parameters affected by the reported errors.API Version 2.0
General Response Structure
{
"status": {
"code": "",
"description": ""
},
"errors": [],
"payload": []
}
The status.code field contains one of the following status codes:
OKIf the response contains payload.KOIf the response contains one or more errors.PENDINGIf the response requires further interaction.
status.description field contains a textual description of the response code.The
errors array may contain info related to error handling (see last column of this row).The
payload array typically contains the response data.Error Handling
"errors": [{
"code" : "",
"description": "",
"params": []
}]
The code field contains an error code; please refer to the section Error Handling for further details.The
description field contains a textual description of the response code.The
params field is an array of strings eventually containing the name(s) of the input parameters affected by the reported errors.API Version 1.0
General Response Structure
{
"status": {
"code": "",
"description": ""
},
"error": {},
"payload": []
}
The status.code field contains one of the following status codes:
OKIf the response contains payload.KOIf the response contains an error.
status.description field contains a textual description of the response code.The
error object may contain info related to error handling (see last column of this row).The
payload array typically contains the response data.Lists, pagination, segmentation & sorting
Not supported
"error": {
"description": ""
}
The error.description field contains a textual description of the error.