updateOrderReturns
Version 2024-11-01
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 returns. (Only enabled in Sandbox mode)
Response
Return type UpdateOrderReturnsResponse
Arguments
Argument | Description |
---|---|
input (UpdateOrderReturnsInput required) | Specifies the input fields to update the Order return details. |
orderIdentifier (OrderIdentifierInput required) | Identifier of the order to update |
Examples
Update Return Package As In Transit
Request
mutation updateOrderReturns {
updateOrderReturns(
orderIdentifier: {
orderId: "123-4567-8910"
}
input: {
returns: {
details: [
{
returnIdentifier: {
id: "example-return-identifier-id"
}
returnPackageDetails: [
{
id: "example-return-package-id",
state: IN_TRANSIT
}
]
}
]
}
}
) {
order {
id
}
}
}
Response
{
"data": {
"updateOrderReturns": {
"order": {
"id": "123-4567-8910"
}
}
}
}
Update Return Package As Failed
Request
mutation updateOrderReturns {
updateOrderReturns(
orderIdentifier: {
orderId: "123-4567-8910"
}
input: {
returns: {
details: [
{
returnIdentifier: {
id: "example-return-identifier-id"
}
returnPackageDetails: [
{
id: "example-return-package-id",
state: FAILED
}
]
}
]
}
}
) {
order {
id
}
}
}
Response
{
"data": {
"updateOrderReturns": {
"order": {
"id": "123-4567-8910"
}
}
}
}
Update Return Package As Dropped Off
Request
mutation updateOrderReturns {
updateOrderReturns(
orderIdentifier: {
orderId: "123-4567-8910"
}
input: {
returns: {
details: [
{
returnIdentifier: {
id: "example-return-identifier-id"
}
returnPackageDetails: [
{
id: "example-return-package-id",
state: DROPPED_OFF
}
]
}
]
}
}
) {
order {
id
}
}
}
Response
{
"data": {
"updateOrderReturns": {
"order": {
"id": "123-4567-8910"
}
}
}
}
Update Return Package As Delivered
Request
mutation updateOrderReturns {
updateOrderReturns(
orderIdentifier: {
orderId: "123-4567-8910"
}
input: {
returns: {
details: [
{
returnIdentifier: {
id: "example-return-identifier-id"
}
returnPackageDetails: [
{
id: "example-return-package-id",
state: DELIVERED
}
]
}
]
}
}
) {
order {
id
}
}
}
Response
{
"data": {
"updateOrderReturns": {
"order": {
"id": "123-4567-8910"
}
}
}
}
Update Return Line Item Grading Details
Request
mutation updateOrderReturns {
updateOrderReturns(
orderIdentifier: {
orderId: "123-4567-8910"
}
input: {
returns: {
details: [
{
returnIdentifier: {
id: "example-return-identifier-id"
}
returnLineItems: [
{
id: "example-return-line-item-id"
grading: {
gradingSummary: {
unitWiseCondition: [
{
condition: SELLABLE
amount: {
value: 1
}
}
]
}
}
}
]
}
]
}
}
) {
order {
id
}
}
}
Response
{
"data": {
"updateOrderReturns": {
"order": {
"id": "123-4567-8910"
}
}
}
}
Updated 2 days ago