Sections in this category

Error responses

  • Updated

If an API request fails, an error response message in JSON format is returned.

The body of the response contains the array of objects (errors) with the following properties:

Property Type Description

status

string

HTTP status code, corresponding to the error.

title

string

A short, human-readable summary of the problem.

code

string

Error code.


An error response may contain an additional data that helps to investigate the source of the problem. For example, a 400 error response includes an additional meta object with the property, indicating where the error has occurred.

The following error responses are common to multiple Monetize API endpoints:

400 Bad request. The server could not understand the request due to the invalid syntax.

Example value

{
"errors": [
{
"status": "400",
"title": "ProgramStatus must be one of the following values: ACTIVE, INACTIVE",
"code": "1000",
"meta": {
"property": "programStatus"
}
},

...

]
}


401 Unauthorized.
The client must authenticate itself to get the requested resource.

Example value

{
"errors": [
{
"status": "401",
"title": "Unauthorized",
"code": "0401"
}
]
}


403 Forbidden.
The client does not have access rights to the content.

Example value

{
"errors": [
{
"status": "403",
"title": "Forbidden",
"code": "0403"
}
]
}


404
Not Found. The server cannot find the requested resource because the requested URI is invalid, or the requested resource does not exist.

Example value

{
"errors": [
{
"status": "404",
"title": "Cannot GET /v1/product/monetize-api/v1/nonexistent",
"code": "0404"
}
]
}


500 Internal Server Error.
The server has encountered a situation it doesn't know how to handle.

Example value

{
"errors": [
{
"status": "500",
"title": "Internal Server Error",
"code": "0500"
}
]
}


503 Service Unavailable.
The server is currently unable to handle the request due to a temporary overload or maintenance of the server.

Example value

{
"errors": [
{
"status": "503",
"title": "Service Unavailable",
"code": "0503"
}
]
}

Was this article helpful?

0 out of 0 found this helpful