# Hypermedia as the Engine of Application State
source: https://developer.mastercard.com/straight-through-processing/documentation/code-and-formats/hypermedia/index.md

The STP API is a Representational state transfer (REST) API, which sends requests and receives responses in JavaScript Object Notation (JSON) format. The STP API is also a Hypermedia as the Engine of Application State (HATEOAS) RESTful API.

This means the API is designed according to the same patterns and principles of the World Wide Web. The API uses hyperlinks to interconnect related resources. For example, a payment is connected to its target supplier by a link that points to that supplier.

It is assumed that the client application is aware of the semantics of the HTTP protocol:

* Understand how create, read, update, and delete (CRUD) operations are mapped to HTTP verbs.
* Understand and respond correctly to different HTTP status codes. For example, follow the URL returned in an HTTP 302 Found redirection response.
* Capable of understanding and following relation links.
* Resources are identified uniquely by their URLs.

[HAL Specification](http://stateless.co/hal_specification.html)

### Link relations {#link-relations}

The responses that the API returns are encoded according to the Hypertext Application Language (HAL) specification, which defines how link relations should be encoded within JSON message payloads. For details on the specification, refer to:

|  Relation  |                                             Description                                              |
|------------|------------------------------------------------------------------------------------------------------|
| self       | Actual URL of the resource.                                                                          |
| collection | Link to the parent collection resource containing all resources of the same type as the current one. |
| provider   | Link to the resource representing a payment provider associated with the current resource.           |
| supplier   | Link to the resource representing a supplier associated with the current resource.                   |
| payment    | Link to the resource representing a payment associated with the current resource.                    |
| status     | Link to the resource representing the status of the current resource.                                |

