Response Examples

Examples

Success

Example: get object by ID. Response has HTTP-header 200.

{
"status": "success",
"message": "",
"data": {
"id": 42,
"email": "john.smith@example.com",
"status": "Active",
"name": "John Smith",
"role": "affiliate_director",
"create_date": "2017-12-30 23:59:59",
"password": "*** hidden ***",
"sps_id": "1q2w3e4r5t6y"
}
}

Error

Example: Invalid input data to update object. Response after error has HTTP-header 500.

{
"status": "error",
"message": "Email field is required.",
"data": []
}

Forbidden

Example: Your item8 API key is invalid. Response has HTTP-header 403

{
"status": "forbidden",
"message": "You don't have access.",
"data": []
}

Not Found

Example: Controller or action not found. Response has HTTP-header 404

{
"status": "error",
"message": "Action not found.",
"data": []
}