Standard Response Format
An API response format defines how data is structured (defines how every response looks), response consist of JSON structure in all responses.
Response Format
{
    "success": true|false,
    "message": "Message",
    "meta": {...} or null,
    "data": {...} or null,
    "errors": {...} or null,
    "docs": "http ... /docs"
}
            
  • success:

    Indicates whether the request was successful (true or false).

  • message

    A descriptive message about the request status (string).

  • meta:

    Additional metadata related to the request (array or null), appears only in case of data list requests. See the following paragraph below (Meat Fields Description)

  • data:

    The response data (array or null).

  • errors:

    Detailed error information when response is false, appears only in case of an error. (array or null).

  • docs:

    Documentation link for the API (web pages).

Meat Fields Format
Metadata containing pagination information, as described below, in a JSON format.
{
    "meta": {
        "current_page": 1,
        "last_page": 5,
        "total": 42,
        "per_page": 10,
        "count": 10,
        "has_more": true
    }
}
            
Condition:Meta appears only in case of data list requests.
  • current_page:

    Current page number.

  • last_page:

    Total number of pages.

  • total:

    Total number of recordes in database.

  • per_page:

    The number of records to retrieve per a single page.

  • count:

    The total number of recordes retrieved by the query, in last page can be less than the per_page value.

  • has_more:

    Indicates whether there are more pages to retrieve.