An address for each order

A shop’s API might give order 42 the address /orders/42. An app can read it with GET /orders/42 or create a new order with POST /orders. GET and POST are standard HTTP actions; replies often use JSON.

These actions are called HTTP methods. Other methods, such as PUT, PATCH, and DELETE, describe different ways to change or remove a resource.

REST calls an order a resource: a thing the API handles. Consistent addresses and actions make the API easier to learn.

What the pattern tells you

REST describes a pattern for organising requests. Each API’s instructions say which information and actions it offers. APIs vary in how closely they follow the pattern.