Hypermedia as the engine of application state (HATEOAS)

We implement HATEOAS throughout our API to help you:

View additional information about a resource

If a resource has a relationship with other resources in our API, we provide HATEOAS links to the other resources in our response.

Example

If you retrieve the details of a payment, we include a links object that contains links to any referenced refunds or reversals that are related to the payment. The following example response contains links to two refunds related to the payment.
"links": [
{
"rel": "refund",
"method": "get",
"href": "https://api.payroc.com/v1/refunds/CD3HN88U9F"
},
{
"rel": "refund",
"method": "get",
"href": "https://api.payroc.com/v1/refunds/FPU8P48WN8"
}
]

Navigate a list of records using pagination

If a GET request returns a large number of results, we send the results as a paginated list. To help you navigate through the results, we include HATEOAS links so that you can navigate through the results.

Example

The following example response contains a links object with HATEOAS links to the next page and previous page of a paginated list of payments.
{
"links": [
{
"rel": "next",
"method": "get",
"href": "<https://api.payroc.com/v1/payments?processingTerminalId=1001&limit=2&after=CW4BA4MUH0>"
},
{
"rel": "previous",
"method": "get",
"href": "<https://api.payroc.com/v1/payments?processingTerminalId=1001&limit=2&before=IFA1T74OBS>"
}
]
}