and responses are formatted. ✽ • It reduces both the number of requests and the amount of data transmitted between clients and servers. ✽ • Following shared conventions, you can increase productivity, take advantage of generalized tooling, and focus on what matters: your application. ✽ • Strong ecosystem in developer community. ✽
Level Document Structure data: the document’s “primary data” ✽ errors: an array of error objects ✽ meta: a meta object that contains non-standard meta-information. ✽ jsonapi: an object describing the server’s implementation. ✽ links: a links object related to the primary data. ✽ included: an array of resource objects that are related to the primary data and/or each other (“included resources”). ✽ A document MUST contain at least one of the following top-level members:
members: Resource Objects id: the document’s “primary data” ✽ type: an array of error objects ✽ In addition, a resource object MAY contain any of these top-level members: attributes: an attributes object representing some of the resource’s data ✽ relationships: a relationships object describing relationships between the resource and other JSON:API resources. ✽ meta: a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship. links: a links object containing links related to the resource. ✽ ✽
resources returned in a response to a subset (“page”) of the whole set available. The following keys MUST be used for pagination links: first: the first page of data ✽ last: the last page of data ✽ next: the next page of data prev: the previous page of data ✽ ✽