# Update Order

Updates the `external_reference_id` of an Order owned by your account. No other attribute
of an Order can be changed.

## Request

HTTP Method: `PATCH`

URI Path: `/v3/orders/{id}`

Note

For all returned data attributes, see [Order Object](order-object.html).

### URI Query Parameters

| Name | Type | Is Required? | Description |
| --- | --- | --- | --- |
| id | `string` | Yes | Unique ID identifier of the Order. |

### Request Body Object Attributes

| Name | Type | Nullable | Is Required? | Description |
| --- | --- | --- | --- | --- |
| external\_reference\_id | `string` | True | No | Optional identifier for the order in the customer's external system. Maximum length is 100 characters. Send `null` to remove it. |

## Example

[[DIDWW-API-EXAMPLE-START]]

http

```
 1PATCH /v3/orders/9eeaab6c-b758-41b8-af86-8978a86603a2 HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Authorization: Bearer [access token]
 6
 7{
 8  "data": {
 9    "id": "9eeaab6c-b758-41b8-af86-8978a86603a2",
10    "type": "orders",
11    "attributes": {
12      "external_reference_id": "po-2026-0042"
13    }
14  }
15}
```

curl

```
1curl -i -X PATCH https://api.didww.com/v3/orders/9eeaab6c-b758-41b8-af86-8978a86603a2 -H "Accept: application/vnd.api+json" -H "Content-Type: application/vnd.api+json" -H "Authorization: Bearer [access token]" --data-raw '{"data": {"attributes": {"external_reference_id": "po-2026-0042"}, "id": "9eeaab6c-b758-41b8-af86-8978a86603a2", "type": "orders"}}'
```

response

```
 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5  "data": {
 6    "id": "9eeaab6c-b758-41b8-af86-8978a86603a2",
 7    "type": "orders",
 8    "attributes": {
 9      "amount": "10.0",
10      "status": "completed",
11      "created_at": "2026-10-22T09:15:42.118Z",
12      "description": "DID",
13      "reference": "FZH-374899",
14      "external_reference_id": "po-2026-0042",
15      "items": [
16        {
17          "type": "did_order_items",
18          "attributes": {
19            "qty": 1,
20            "nrc": "5.0",
21            "mrc": "5.0",
22            "prorated_mrc": false,
23            "billed_from": "2026-10-22",
24            "billed_to": "2026-11-21",
25            "setup_price": "5.0",
26            "monthly_price": "5.0",
27            "did_group_id": "2ef40a84-dfd4-45bb-8519-b4a7ebb74453"
28          }
29        }
30      ],
31      "callback_method": null,
32      "callback_url": null
33    }
34  },
35  "meta": {
36    "api_version": "2026-11-19"
37  }
38}
```

[[DIDWW-API-EXAMPLE-END]]

## Other Responses

| Code | Success | Description |
| --- | --- | --- |
| 404 | No | [Not Found](../../../specification/errors/index.html#api-not-found) |
| 422 | No | [Validation Error Object](../../../specification/errors/index.html#api-validation-error-object). `external_reference_id` is longer than 100 characters. |
| 400 | No | [Bad Request](../../../specification/errors/index.html#api-bad-request) |
| 401 | No | [Unauthorized](../../authentication.html#authentication-v35) |
| 403 | No | The customer is in read-only mode. Also returned when the access token carries the `read` scope, which does not cover this method (title `Insufficient scope`, `WWW-Authenticate: Bearer error="insufficient_scope"`). See [Scopes](../../authentication.html#authentication-scopes-v35). |
| 429 | No | The request budget of the account for the current window is spent (`too_many_requests`). `Retry-After` gives the number of seconds to wait. |
