Schema

This document describes the information that the API returns.

All response that the API returns will be in JSON format and will have the following base shape:

{
    "self": <url>, 
    "meta": {...}, 
    "links": {...}, 
    "rel": <string>,
    "spec": <url>,
}

Entities

An entity represents an item on the database, this could be a brand, a model, a size, a user, etc. It refers to an individual thing.

Entities have the same base attributes described above but have these defined values:

{
    "rel": "entity",
    "meta": {
        "collection": <url>
    },
    "body": {...}
}

Collections

Collections refer to lists of entities, this is where you will be able to browse and navigate to a given entity.

On top of the base attributes they will have these characteristics:

{
    "rel": "collection",
    "meta": {
        "page_total": <int>, 
        "paginated": <bool>, 
        "next": <url>, 
        "current": <url>, 
        "collection_total": <int>, 
        "prev": <url>

    },
    "collection": [...]
}

Edit