Hi @Bryan-Square
I have few question related to Update Order if you can please read below and answer that would be really appreciated:
Update Order requires ‘version’ as when I don’t send it, it returns the following error:
{
"errors": [
{
"code": "BAD_REQUEST",
"detail": "Missing required parameter.",
"field": "order.version",
"category": "INVALID_REQUEST_ERROR"
}
]
}
How to get find the ‘version’ of an order created using Payment Link?
Also, when i randomly put version ‘1’ then I receive the following error back and I get the version number from the error details.
{
"errors": [
{
"code": "VERSION_MISMATCH",
"detail": "Supplied version 1 does not match the current version 7 of order AzlCrafSsgqjLxOJDfhGiqLOEyPZY.",
"field": "order.version",
"category": "INVALID_REQUEST_ERROR"
}
]
}
After using the correct version, I just want to update the order pickup_at time and notes. Sent the following request:
{
"order": {
"location_id": "LH891R7KHMSRQ",
"fulfillments": [
{
"pickup_details": {
"pickup_at": "2024-04-15T21:56:19.378Z",
"note": "DOORDASH driver will come to pickup."
}
}
],
"version": 7
},
"idempotency_key": "c101f037-7915-4962-b85b-b3c31b41421a"
}
Returns the following error:
{
"errors": [
{
"code": "ARRAY_LENGTH_TOO_LONG",
"detail": "Orders cannot be created with more than one fulfillment.",
"field": "order.fulfillments",
"category": "INVALID_REQUEST_ERROR"
}
]
}
Can you please tell me how to update an order with a new pickup_at time?