Shop

Change a order (JSON Merge Patch)

patch/orders/{id}

Request

  • Base URL
    https://gorest.co.in/public/v3
  • URL
    https://gorest.co.in/public/v3/orders/{id}
  • Auth
    HTTP bearer

Headers

If-Matchstring

The strong ETag the change is based on, from a read without include or from the last write; when the item changed since, the answer is 412. A weak ETag never matches.

Prefer'return=minimal' | 'return=representation'

return=minimal for an answer with no body, return=representation (the default) for the full item (RFC 7240).

Request body

status'paid' | 'fulfilled' | 'cancelled' | 'refunded' required

Response

The changed order.

cart_idstring uuid nullable

The cart it was placed from; null once that cart is deleted.

created_atstring date-time
currencystring
idstring uuid required
read_onlyboolean

True for sample data (the seed); it cannot be changed.

status'pending' | 'paid' | 'fulfilled' | 'cancelled' | 'refunded'

pending to paid or cancelled; paid to fulfilled or refunded; fulfilled to refunded. A cancel puts the stock back.

total_minorinteger

The sum of the lines.

updated_atstring date-time
user_idstring uuid nullable

The cart's user; null once that user is deleted.

Example response

{
  "user": {
    "email": "aarav.sharma@example.com",
    "name": "Aarav Sharma"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.