Skip to content
HooprB2B

Core concepts

Response format

Every response — success or failure — uses the same envelope: a data field and an error field.

The envelope

{
  "data": { },
  "error": {
    "code": 0,
    "message": "OK"
  }
}
  • error.code is 0 on success and 1 on failure.
  • On errors, error.message is a human-readable description.
  • On errors, error.type is a stable machine code (e.g. invalid_client, playlist_restricted) you can branch on safely.

Paginated lists

List endpoints wrap their results in a consistent pagination object inside data:

{
  "data": {
    "totalRecords": 1280,
    "totalPages": 64,
    "currentPage": 1,
    "pageSize": 20,
    "items": [ ]
  },
  "error": { "code": 0, "message": "OK" }
}

Every list shares this shape

All list endpoints return the same totalRecords / totalPages / currentPage / pageSize / items structure. See Pagination & filtering for the parameters, and Errors for the failure shape.