Skip to content
This repository has been archived by the owner on Aug 4, 2018. It is now read-only.

API Responses

Fingercomp edited this page Nov 22, 2016 · 3 revisions

There are three types of responses the API can send.

No content response

No body is sent. Check the status code.

Exception response

This response is sent on user (4xx) or server (5xx) error.

{"success": false,
 "title": "This is the name of the error (e.g., Bad Request)",
 "message": "The technical details of the error.",
 "explanation": "The human-readable explanation of the general meaning of the error.",
 "code": 404,  // The HTTP status code of the error
 "version": "...",  // The API version
 "logged_in": true}

Success response

This is sent on 2xx responses.

{"success": true,
 "title": "The is the name of the status code (e.g., Created).",
 "data": ["The actual payload"],
 "code": 200,  // The HTTP status code of the error
 "version": "...",  // The API version
 "logged_in": false}

Changes

Changes

Version Changes
3.0.0 Added unified responses.