Update metadata
The Update metadata request will replace the current metadata.
Please Note
Please note that this operation cannot be performed if the purchase is completed.
Update metadata request​
- Request
- Response
- Error
PUT /checkouts/1eec44b5-66d3-4058-a31f-3444229fb727/metadata HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
Content-Type: application/json
{
"myCustomKey": 1234,
"myComplexObject": {
"firstKey": true,
"CasingIsKept": [1, 2, 3]
}
}
{
"id": "f5f4e86d-95b1-4c1a-8ad0-1d5907236bd7",
"data": null,
"error": null
}
/*
Example error. More errors available below.
*/
{
"id": "862336bb-86a5-418b-b6ff-5547398d5c6b",
"data": null,
"error": {
"code": 423,
"message": "The resource requested is currently locked for modification. Try again.",
"errors": [
{
"reason": "Resource_Locked",
"message": "The resource requested is currently locked for modification. Try again."
}
]
}
}
Request Properties​
Request headers
Header | Required | Explanation |
---|---|---|
Authorization | Yes | Instructions on how to generate the authorization header value can be found here. |
Request Body properties
Each key in the object must be a string but the value can be any valid JSON value. Providing an empty body will remove any existing metadata.
Important error responses​
Error code | Error Reason | Cause |
---|---|---|
400 | Validation_Error | Metadata object could not be parsed as a valid JSON object. |
423 | Resource_Locked | Another modifying request is currently being executed for the Checkout session. Retry by sending the request again. |
900 | Purchase_Commitment_Found | The customer has clicked the Complete Purchase button and the Checkout is therefore locked for modifications. |
900 | Purchase_Completed | Purchase is already complete. |