# Correct the contact or delivery address of an order that has not shipped

`PATCH /shop/orders/{id}` · Rivier · shop

Correct the contact or delivery address of an order that has not shipped.

- Scope: shop:write
- Mcp: rivier_shop_order_update
- Sdk: shop.order.update
- Cli: shop order update
- Events: shop.order.updated

## Parameters

- `id` (path, required), string

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "contact": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "email": {
          "type": "string",
          "format": "email",
          "maxLength": 254
        },
        "phone": {
          "type": "string",
          "pattern": "^\\+?[0-9 ()-]{6,20}$"
        }
      },
      "additionalProperties": false
    },
    "shippingAddress": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 160
        },
        "line1": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        },
        "line2": {
          "type": "string",
          "maxLength": 200
        },
        "city": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "region": {
          "type": "string",
          "maxLength": 40,
          "default": ""
        },
        "postalCode": {
          "type": "string",
          "minLength": 1,
          "maxLength": 20
        },
        "country": {
          "type": "string",
          "pattern": "^[A-Z]{2}$"
        }
      },
      "required": [
        "line1",
        "city",
        "postalCode",
        "country"
      ],
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
```

## Responses

- `200`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X PATCH 'https://api.rivier.ai/shop/orders/{id}' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "contact": {
    "name": "string",
    "email": "name@example.com",
    "phone": "string"
  },
  "shippingAddress": {
    "line1": "string",
    "city": "string",
    "postalCode": "string",
    "country": "string"
  }
}'
```
