Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/pages/rest/modules/custom-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,28 @@ curl -i -X POST \

If an order item has custom attributes, they will be returned as part of the order item object in responses to requests like `GET /V1/orders/items/{id}`.

The `POST /V1/orders/{orderId}/customAttributes` endpoint allows you to add or update custom attributes on already existing orders. The request body must include an array of `customAttributes`.

```curl
curl -i -X POST \
-H "Content-Type:application/json" \
-H "Authorization:Bearer <TOKEN>" \
-d \
'{
"customAttributes":[
{
"attribute_code": "attr_one",
"value": "value_one"
},
{
"attribute_code": "attr_two",
"value": "value_two"
}
]
}' \
'https://<COMMERCE_URL>/rest/all/V1/orders/{orderId}/customAttributes'
```

### Negotiable Quote

The `POST /V1/negotiableQuote/setCustomAttributes` endpoint allows you to set custom attributes on a negotiable quote. The request body must include the `quote_id` and an array of `custom_attributes`.
Expand Down
Loading