Layer uses a standardized json structure across all endpoints. There are only 3 possible top level fields.Documentation Index
Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt
Use this file to discover all available pages before exploring further.
Data
Contains the requested data from the endpoint and can be either a JSON list or a JSON object.- Every top level object or item in an array will contain a
typefield indicating the entity type. datawill only be present if the result is successful, in which case there will be a2**status code and noerrorfield.
Errors
An array oferror objects. error objects will contain the following fields.
type: One of a fixed set of categories. Helpful for categorizing & processing errors.description: A human readable error description.error_enum: A stable, machine-readable identifier for programmatically handling specific error conditions. Only present for4**client errors—not included for5**server errors. Useerror_enuminstead of parsingdescription, as enum values remain stable across API versions while descriptions may change.meta: Optional additional information.
errors will be present only if the request is unsuccessful, in which case there will be a 4** or 5** status code and no data field.
Meta
An optional object that may be used to communicate metadata about the request. Example use cases include:- Idempotency
- Pagination
- Rate limits