All Versions

Version 1
Version 2


Page tree

Supplier API v2

Skip to end of metadata
Go to start of metadata

This section contains general information about how client and server errors are reported by the API. Most client errors will provide helpful information to aide in your error handling and troubleshooting.

See also: Error Responses

Table of Contents

Error Responses

HTTP Status Codes

Calls to the endpoints which result in an error, or which are not able to successfully find, create, or update the specified resource will return an appropriate HTTP Status Code from the following list.

 Where indicated, an Error Response will be included.  

HTTP Status CodeResponseUsage
400: Bad Request(tick)The expected JSON body is missing or invalid, or the request is missing required parameters.
401: Unauthorized(tick)A secure resource has been requested, but the proper Authentication headers have not been provided.
403: Forbidden(tick)A secure resource has been requested but the provided credentials have insufficient privileges to view it.
404: Not Found(tick)A non-existent resource has been requested, or data in the request body specifies a missing or invalid object.
405: Not Allowed(tick)The request method (verb) is not permitted for the specified resource
406: Not Acceptable(error)The Accept header does not specify a supported media type for the response
415: Unsupported Media Type(tick)The request has specified an unsupported Content-Type, or the request body is improperly encoded based on the specified Content-Type.
422: Unprocessable Entity(tick)The request cannot be processed because there provided input did not pass validations. Additional details will be provided in errorMessage and failedValidations.
5xx: Server Error(error)Errors of this type indicate an internal problem. They will not contain the standard error body described for the other types of errors. 5xx errors may be generated by any of the various layers of our infrastructure and may or may not provide additional details in the form of other headers or a response body. Do not expect any consistency with these types of errors, other than the status code itself.

Response Headers

Any error response which includes a response body as indicated above will include the following header.

Header NameDescription
Content-Type
MIME type of the response body if one is present. This will be one of the media types specified in the Accept header of the request. Default if not specified is application/json.

 

Some status codes may also include additional headers as indicated below.

HTTP Status CodeAdditional HeaderDescription
401: UnauthorizedWWW-AuthenticateAs required by RFC7235, this header returns an acceptable challenge to indicate that Basic Auth is required: Basic realm="cmix"

 

Response Body

When appropriate, the response will contain a body which will contain an Error object. 

Read more about Error Responses.

 

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.