Skip to main content

Close orders

When the guest leaves the restaurant and the order is closed on your side, you have to send us the updated instance by calling our specific endpoint (add the link). Please use for the orderUuid parameter the value of our identifier sent in the previous call to open the order.

URL:

  • Production environment: PUT https://api.thefork.io/pos/v1/orders/{orderUuid}

HEADER:

  • X-Api-Key : API key generated in the previous steps
  • Content-Type: application/json
ORDER_UUID='orderId'

curl --request PUT \
--url https://api.thefork.io/pos/v1/orders/"${ORDER_UUID}" \
--header 'X-Api-Key: ${API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
"locale": "en_GB",
"currency": "EUR",
"totalAmount": 7600,
"lines": [
{
"label": "Still Water",
"category": "Drinks",
"totalPrice": 600,
"quantity": 3
},
{
"label": "Nebbiolo Bottle",
"category": "Beverages",
"totalPrice": 2500,
"quantity": 1
},
{
"label": "Agnolotti del Plin",
"category": "First Dishes",
"totalPrice": 3000,
"quantity": 2
},
{
"label": "Lasagne al Ragù",
"category": "First Dishes",
"totalPrice": 1500,
"quantity": 1
}
]
}'

Please note that the totalPrice and totalAmount values are multiplied by 100.

In case of success, TheFork will return an empty response with the 204 status code.

tip

If your POS handles the “split the bill” use case, we require to receive only one order (with the total)