Introduction
You can use Swagger or Postman to make the calls and test the APIs. Please make sure you are using the right environment as explained in Getting Started. If you are building a marketplace app, your app should be approved and live in the staging or production environments before you can test it.
Make sure you have got the correct credentials and they are included in the request's header. All API calls need to have the header set.
For simplicity, we have removed all the authentication headers in this documentation. And they are explained in the Credentials section.
All error responses are following the below structure:
{
"error": {
"code": "number",
"title": "string",
"message": "string",
"status": "number",
"reason": "string"
}
}
Property | Type | Description |
code | number | |
title | string | Title of the occurred error. |
message | string | A message which describes why the error has happened. |
status | number | HTTP status code. |
reason | string | Reason of the error (optional). |
{
"error": {
"code": 6,
"title": "ALREADY_EXISTS",
"message": "This document already exists",
"status": 409,
"reason": "pmsNumberIsDuplicate"
}
}
CANCELLED = 1
UNKNOWN = 2
INVALID_ARGUMENT = 3
DEADLINE_EXCEEDED = 4
NOT_FOUND = 5
ALREADY_EXISTS = 6
PERMISSION_DENIED = 7
RESOURCE_EXHAUSTED = 8
FAILED_PRECONDITION = 9
ABORTED = 10
OUT_OF_RANGE = 11
UNIMPLEMENTED = 12
INTERNAL = 13
UNAVAILABLE = 14
DATA_LOSS = 15
UNAUTHORIZED = 16
METHOD_NOT_ALLOWED = 17
NOT_ACCEPTABLE = 18
There are some errors that are common between all APIs.
When your provided authentication tokens are wrong, you will get the following error
{
"error": {
"code": 16,
"title": "UNAUTHORIZED",
"status": 401,
"message": "valid credential required",
"reason": "invalidCredentials"
}
}
When your provided data is wrong (you missed a required field or type of a field is not match with what the API expects) you will get a validation error.
{
"error": {
"code": 3,
"title": "INVALID_ARGUMENT",
"status": 400,
"message": "A message which describes the error."
}
}
Last modified 2yr ago