updateOrderDeliveryInformation

📘

Important

The Buy with Prime API is offered as a preview and might change as we receive feedback and iterate on the interfaces. We are sharing this early documentation to help you learn about the Buy with Prime API as we write and iterate on the content.

Overview

Update a BwP Order's delivery information. (Only enabled in Sandbox mode)

Response

Return type UpdateOrderDeliveryInformationResponse

Arguments

ArgumentDescription
input (UpdateOrderDeliveryInformationInput required)

Specifies the input fields to update the order delivery details.

Examples


Update Delivery Information State From Pending To In Transit

Request

mutation updateOrderDeliveryInformation { updateOrderDeliveryInformation( input: { orderId: "123-4567-8910", details: [ { id: "example-delivery-information-id", deliveryInformationState: { state: IN_TRANSIT, reason: CUSTOMER_REQUESTED }, deliveryInformationDetailsFor: { orderLineItems: [ { lineItemId: { lineItemId: "example-line-item-id-1" }, amount: { value: 1 } } ] } } ] } ) { order { id } } }

Response

{ "data": { "updateOrderDeliveryInformation": { "order": { "id": "123-4567-8910" } } } }

Update Delivery Information State From Pending To Cancelled

Request

mutation updateOrderDeliveryInformation { updateOrderDeliveryInformation( input: { orderId: "123-4567-8910", details: [ { id: "example-delivery-information-id", deliveryInformationState: { state: CANCELLED, reason: CUSTOMER_REQUESTED }, deliveryInformationDetailsFor: { orderLineItems: [ { lineItemId: { lineItemId: "example-line-item-id-1" }, amount: { value: 1 } } ] } } ] } ) { order { id } } }

Response

{ "data": { "updateOrderDeliveryInformation": { "order": { "id": "123-4567-8910" } } } }

Update Delivery Information State From In Transit To Delivered

Request

mutation updateOrderDeliveryInformation { updateOrderDeliveryInformation( input: { orderId: "123-4567-8910", details: [ { id: "example-delivery-information-id", deliveryInformationState: { state: DELIVERED, reason: CUSTOMER_REQUESTED }, deliveryInformationDetailsFor: { orderLineItems: [ { lineItemId: { lineItemId: "example-line-item-id-1" }, amount: { value: 1 } } ] } } ] } ) { order { id } } }

Response

{ "data": { "updateOrderDeliveryInformation": { "order": { "id": "123-4567-8910" } } } }

Update Delivery Information State From In Transit To Cancelled

Request

mutation updateOrderDeliveryInformation { updateOrderDeliveryInformation( input: { orderId: "123-4567-8910", details: [ { id: "example-delivery-information-id", deliveryInformationState: { state: CANCELLED, reason: CUSTOMER_REQUESTED }, deliveryInformationDetailsFor: { orderLineItems: [ { lineItemId: { lineItemId: "example-line-item-id-1" }, amount: { value: 1 } } ] } } ] } ) { order { id } } }

Response

{ "data": { "updateOrderDeliveryInformation": { "order": { "id": "123-4567-8910" } } } }


Did this page help you?