Skip to main content
When a request succeeds, the Bachs API returns the resource directly with a 2xx status code. Objects are returned flat, without a wrapper. List endpoints return an items array alongside a pagination object. For error responses, see Errors.

Status codes

Single object

A retrieve, create, or update returns the object at the top level. Read its fields directly, with no wrapper to unpack.
A POST returns 201 with every field of the new object, including any the server generated (id, created_at) or filled with defaults.

List

Every list endpoint returns the same shape: an items array of objects and a pagination object. The array is always named items, never the resource name.
Each entry in items is the same object shape returned by that resource’s retrieve endpoint. See Pagination for how to page through results.

Delete

A successful DELETE returns 204 No Content with an empty body. There is nothing to parse. Treat the 204 status itself as confirmation.

Request ID

Every response, success or error, includes an x-request-id header. Log it, and include it when you contact support. See Errors for details.