Response Format

How Fera APIs respond to your requests.

Responses are always made in JSON.

List response format

List requests come back with the result set array in the data attribute and any pagination or non-data things in the meta attribute like this:

{
  data: [],
  meta: {
    total_count: 123,
    page_size: 10,
    page_count: 13,
    page: 1 // Etc... (see Pagination section)
  }

See the Pagination section for more detail on the meta attribute as it differs depending on whether you're using page/count pagination (default - shown above), or offset/limit pagination.

Delete response format

Deletion responses come as 204 No Content statuses if successful and no content is returned.

Create response format

Creation responses come back with 201 Created status if successful and the resulting model data in the body of the response like this:

{
  rating: 4,
  heading: "Love this store!",
  body: "Wow, what a wonderful experience I had shopping here. I'd highly recommend it!",
  // Etc...
}

Update response format

Update responses come back with the 202 Accepted status if successful.

Similar to the creation responses, they also return back the entire model's data (not just the updated attributes).

Dates/times are in ISO8601 format

All dates are returned in ISO8601 Date/Time format and always in UTC.

Example: 2021-05-04T21:23:08.934Z