Common Response Format

Most responses from the Customer API use a common format, with slight differences depending on whether the data returned is a JSON object or an array.

Response Body Parameters

Refer to the following table for parameters produced in response to the Customer API.

Body Parameter
Type
Description

id

Integer

Identity of entity modified, or 0 if unused.

details

Object or Array

Detailed response, or null if response is not success.

pageSize

Integer

Requested number of detail entries per page (fewer than pageSize items may be returned on the last page).

pageNumber

Integer

Requested page of data, if details is an array. Default is 1.

errors

Array

Details of errors that occurred.

errors.fieldName

String

Request item or step in handling the request that caused of the error.

errors.messageCode

String

Code identifying the error.

status

String

• “1” indicates success

• “0” indicates an error

Example Responses

Successful Response for an Object

{
    "id": 0,
    "details": {
        ... object content ...
    },
    "status": "1",
    "errors": []
}

Successful Response for an Array

{
    "id": 0,
    "details": [
        ... array content ...
    ],
    "pageSize": 10,
    "pageNumber": 1,
    "status": "1",
    "errors": []
}

Error Response

{
    "id": 0,
    "details": null,
    "status": "0",
    "errors": [
        {
            "fieldName": "...",
            "messageCode": "..."
        }
    ]
}

Last updated