Update a Buy with Prime Order
Buy with Prime API is now available for early access
Sign up for early access to the Buy with Prime API using the 'Sign Up' button below. The API may change as Amazon receives feedback and iterates on it.
To update an order, call updateOrder
with an order identifier and an UpdateOrderInput
object that contains the changes you want to make.
Before you can update an order, you must have created the order. For details, see Create a Buy with Prime Order.
To help the shopper understand the state of an order, we recommend that you provide as many details about orders as possible.
Note: You can't delete or update the orderAlias
, orderLink
, or discount
fields of an order.
Trigger fulfillment for an existing order
This example shows how to trigger fulfillment for an order that you created with desiredExecutionState
set to NOT_STARTED
. To trigger fulfillment, you set desiredExecutionState
to STARTED
by using the updateOrder
mutation.
Request
// GraphQL mutation
mutation updateOrder($input: UpdateOrderInput!) {
updateOrder(input: $input) {
order {
id
}
}
}
// Mutation variables
{
"input": {
"orderId": "example-order-id",
"desiredExecutionState": "STARTED"
}
}
Response
{
"data": {
"updateOrder": {
"order": {
"id": "example-order-id"
}
}
}
}
Update order-level attributes
You can update order-level attributes by using the updateOrder
mutation. This example shows how to update order-level attributes such as the total price and taxes on the order.
Request
// GraphQL mutation
mutation updateOrder($input: UpdateOrderInput!) {
updateOrder(input: $input) {
order {
id
totalPrice {
value {
amount
currencyCode
}
}
taxes {
summary {
collectableTaxAmount {
amount
}
}
}
}
}
}
// Mutation variables
{
"input": {
"orderId": "example-order-id",
"totalPrice": {
"value": {
"amount": 20,
"currencyCode": "USD"
}
},
"taxes": {
"summary": {
"collectableTaxAmount": {
"amount": 12,
"currencyCode": "USD"
}
}
}
}
}
Response
{
"data": {
"updateOrder": {
"order": {
"id": "example-order-id",
"totalPrice": {
"value": {
"amount": 20,
"currencyCode": "USD"
}
},
"taxes": {
"summary": {
"collectableTaxAmount": {
"amount": 12
}
}
}
}
}
}
}
Update refund details for an order
For examples, see Update Refund Details.
Related topics
Updated about 2 months ago