API errors

Resource not found

GET /article/1
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Status: 404 Not Found
Content-Length: 45
Content-Type: application/json
{
  "error_code": 404,
  "message": "Page not found"
}

Invalid bearer token

GET /article/1
Accept: application/json
Authorization: Bearer 177a1598d208d6c303fa5ca1c774709250e21749
Status: 401 Unauthorized
Content-Length: 113
Content-Type: application/json
{
  "error_code": 401,
  "message": {
    "error": "invalid_grant",
    "error_description": "The access token provided is invalid"
  }
}

invalid format of the POST data

POST /contact
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Status: 415 Unsupported media type
Content-Length: 56
Content-Type: application/json
{
  "error_code": 415,
  "message": "Could not parse the data."
}

Input error of POST data

POST /contact
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
{
  "country_id": "wrong_input",
  "owner_id": 1,
  "contact_type_id": 1,
  "contact_group_ids": [
    1,
    2
  ]
}
Status: 422 Unprocessable Entity
Content-Length: 218
Content-Type: application/json
{
  "error_code": 422,
  "message": "The form could not be saved due to the following errors:",
  "errors": [
    "country_id: Diese Eingabe ist nicht korrekt.",
    "name_1: Dies ist ein Pflichtfeld.",
    "user_id: Dies ist ein Pflichtfeld."
  ]
}

Invalid sort parameter

GET /contact?order_by=subject
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Status: 400 Bad Request
Content-Length: 112
Content-Type: application/json
{
  "error_code": 400,
  "message": "The following order parameters could not have been applied: ",
  "errors": [
    "subject"
  ]
}

Invalid search parameter

POST /contact/search
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
[
  {
    "field": "name_3",
    "value": "Muster"
  }
]
Status: 400 Bad Request
Content-Length: 111
Content-Type: application/json
{
  "error_code": 400,
  "message": "The following search parameters could not have been applied:",
  "errors": [
    "name_3"
  ]
}

Insufficient user rights

GET /article/1
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Status: 403 Forbidden
Content-Length: 76
Content-Type: application/json
{
  "error_code": 403,
  "message": "You are not allowed to access this resource"
}

Maintenance

GET /article/1
Accept: application/json
Authorization: Bearer 677a1598d208d6c303fa5ca1c774709250e21749
Status: 503 Service Unavailable
Content-Length: 49
Content-Type: application/json
{
  "error_code": 503,
  "message": "Server Maintenance"
}