CartonCloud
Guides

Responses

Success Status Codes

The following HTTP status codes are used for successful requests.

Status CodeDescriptionReason
200SuccessSuccessfully completed request
201CreatedThe entity was successfully created
204No ContentSuccessfully completed request with an empty body
228Created with issuesThe entity was created, but has issues that may need to be addressed

Error Status Codes

If there are any errors with the request, an error status code will be returned along with further details of the error in the response body as an array of JSON error objects.

Status CodeDescriptionReason
400Bad RequestRequest is invalid
401UnauthorizedAccess token or credentials are not valid
403ForbiddenNo permissions to access the resource
404Not FoundThe resource does not exist, is an invalid URL or unknown version
405Method Not AllowedInvalid method (GET, POST, PUT, etc.)
406Not AcceptableInvalid Accept-Version header provided
409ConflictOperation cannot be performed as the resource has been modified by another request
412Precondition FailedServer does not meet one of the preconditions provided in the request header fields
422Unprocessable EntityStructure of the request is valid, but data content is invalid or not compatible with the request
429Too Many RequestsRate limiting has been applied
500Internal Server ErrorAn issue with our server. Try again later.
503Service UnavailableTemporarily offline for maintenance. Try again later.

Error Response Data

General

Example Response JSON

JSONCode
[ { "message": "Request method 'PUT' not supported" } ]

Some errors will simply return a text description of the error encountered, but will still follow the same data structure.

PropertyDescription
messageA description of the error

Error codes issued in payload responses:

CodeDescription
10100Consignment not found
10200Multiple consignments found
10201Consignment is group child
10202Consignment not approved
10203Unable to allocate consignment
10204Consignment not allocated to run
10205Unable to update to In Warehouse
10206Driver not found
10207Consignment not allocated to Run and no Run given
10208Delivery Run not found
10209Unable to create Run Sheet
10210Run Sheet not found
10211Invalid request
10212Consignment already allocated
10213Cannot allocate Consignment
10214Consignment already In Warehouse
10300Storage Period cannot be created
10301Storage Period duplicate
10400Sale Order not found
10401Sale Order not Packing In Progress
10402Sale Order Rejected
10403Sale Order import error duplicate
10404Sale Order import error wrong Warehouse
10405Sale Order import error unauthorized Warehouse
10406Sale Order import error Customer does not exist
10443Product error
10444Product error expired
10445Product error expiry threshold
10446Product error warning threshold
10447Product error out of stock
10448Product error not enough stock
10449Product error Product not found
10450Product error Product deactivated
10451Product error Product qty is not number
10452Product error Product qty is negative
10453Product error Product qty is zero
10454Product error Product conversion failed
10455Product error invalid Unit Of Measure
10456Product error unable to parse
10457Product error too many products found
10458Product error qty not whole
10459Product error product code not specified
11000Customer not found
12000Purchase Order potentially undercharged storage

Validation

A request data validation error will return the error code 422 and the following response

Example Response JSON

JSONCode
[ { "field": "/name", "message": "Name cannot be empty." }, { "field": "/description", "message": "Description cannot be empty." } ]
JSONCode
[ { "field": "/references/customer", "message": "A Purchase Order with this Customer Reference already exists.", "type": "DUPLICATE", "details": { "duplicateId": "cd639009-1111-4a89-bf83-8907b8c9d09a" } } ]

An array of validation errors with the fields for which the error applies will be returned.

PropertyDescription
fieldThe property field for which the error applies as a JSON Pointer
messageA description of the validation error
type (optional)The specific type of error
details (optional)An array containing errors with extra info

Validation Error Type

TypeProperties of DetailsDescription
DUPLICATEduplicateIdThe id of duplicate existing record
Last modified on