The Paddle API returns requested entities in a data object or array when a response body is present. In most cases, it also returns a meta object with information about the request, including pagination information for list operations.
Success responses return a 2xx response code.
When there's an error, the API returns an error object instead. Errors return a 4xx or 5xx response code.
List entities
When you successfully list entities, Paddle returns:
- A
dataarray that includes a paginated list of requested entities. - A
metaobject that includespaginationinformation.
The response code is 200.
Get an entity
When you successfully get an entity, Paddle returns:
- A
dataobject with the requested entity. - A
metaobject with information about the request.
The response code is 200.
Create an entity
When you successfully create an entity, Paddle returns:
- A
dataobject with the created entity. - A
metaobject with information about the request.
All the fields against the new entity are returned, including any generated or calculated fields. If you omitted optional fields, Paddle returns those with the default values.
The response code is 201.
Update an entity
The Paddle API generally uses the PATCH method to update entities.
When you successfully update an entity, Paddle returns:
- A
dataobject with the updated entity. - A
metaobject with information about the request.
All the fields against the updated entity are returned, including fields that you didn't change.
The response code is 200.
Delete an entity
Most entities can't be deleted. Instead, you can archive them.
For entities that can be deleted, no response is returned. The response code is 204.