generateReversalOffers
Version 2024-01-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
Returns reversal offers for given items.
Required scope(s)
View Product Return Policy, View Catalog Data
Response
Return type ReversalOffers
Arguments
Argument | Description |
---|---|
reversalOffersInput (ReversalOffersInput required) | Represents the request information for reversal offers. |
Examples
Query Generate Reversal Offers With Valid Items
Request
query generateReversalOffers {
generateReversalOffers(
reversalOffersInput: {
items: [
{ id: { mSKU: { marketplaceId: "US", value: "B08J4FX127" } } }
{ id: { SKU: "titan-sku-2" } }
]
}
) {
id
expiresAt
reversalOfferGroups {
item {
id {
__typename
value
... on MskuReversalItemIdentifier {
marketplaceId
}
}
}
summary {
title
description
}
}
}
}
Response
{
"data": {
"generateReversalOffers": {
"id": "0c2ff0a6-7645-4f64-a065-4a2baa2e2714",
"expiresAt": "2024-02-07T19:20:14.701259Z",
"reversalOfferGroups": [
{
"item": {
"id": {
"__typename": "MskuReversalItemIdentifier",
"value": "B08J4FX127",
"marketplaceId": "US"
}
},
"summary": {
"title": "The Item is non-returnable",
"description": "The Item is non-returnable"
}
},
{
"item": {
"id": {
"__typename": "SkuReversalItemIdentifier",
"value": "titan-sku-2"
}
},
"summary": {
"title": "The Item is non-returnable",
"description": "The Item is non-returnable"
}
}
]
}
}
}
Query Generate Reversal Offers With Valid And Invalid Item
Request
query generateReversalOffers {
generateReversalOffers(
reversalOffersInput: {
items: [
{ id: { mSKU: { marketplaceId: "US", value: "B08J4FX12" } } }
{ id: { SKU: "titan-sku-3" } }
]
}
) {
id
expiresAt
reversalOfferGroups {
item {
id {
__typename
value
... on MskuReversalItemIdentifier {
marketplaceId
}
}
}
summary {
title
description
}
}
}
}
Response
{
"errors": [
{
"message": "Item B08J4FX12 missing from the catalog",
"locations": [
{
"line": 2,
"column": 5
}
],
"path": [
"generateReversalOffers"
],
"extensions": {
"classification": {
"errorType": "ValidationException",
"errorCode": 400,
"type": "ValidationError",
"code": "ItemDoesNotExist",
"details": {
"itemId": {
"type": "MSKU",
"value": "B08J4FX12",
"marketplaceId": "US"
}
}
}
}
}
],
"data": {
"generateReversalOffers": {
"id": "228bc4b0-77e8-4269-ae9b-a3fd30c43f29",
"expiresAt": "2024-02-07T19:24:28.572312Z",
"reversalOfferGroups": [
{
"item": {
"id": {
"__typename": "SkuReversalItemIdentifier",
"value": "titan-sku-3"
}
},
"summary": {
"title": "Eligible for Return",
"description": "This item can be returned in its original condition for a full refund within 30 Days of receipt."
}
}
]
}
}
}
Query Generate Reversal Offers With Invalid Items
Request
query generateReversalOffers {
generateReversalOffers(
reversalOffersInput: {
items: [
{ id: { mSKU: { marketplaceId: "US", value: "B08J4FX12" } } }
{ id: { SKU: "titan-sku-6" } }
]
}
) {
id
expiresAt
reversalOfferGroups {
item {
id {
__typename
value
... on MskuReversalItemIdentifier {
marketplaceId
}
}
}
summary {
title
description
}
}
}
}
Response
{
"errors": [
{
"message": "Item B08J4FX12 missing from the catalog",
"locations": [
{
"line": 2,
"column": 5
}
],
"path": [
"generateReversalOffers"
],
"extensions": {
"classification": {
"errorType": "ValidationException",
"errorCode": 400,
"type": "ValidationError",
"code": "ItemDoesNotExist",
"details": {
"itemId": {
"type": "MSKU",
"value": "B08J4FX12",
"marketplaceId": "US"
}
}
}
}
},
{
"message": "Item titan-sku-6 missing from the catalog",
"locations": [
{
"line": 2,
"column": 5
}
],
"path": [
"generateReversalOffers"
],
"extensions": {
"classification": {
"errorType": "ValidationException",
"errorCode": 400,
"type": "ValidationError",
"code": "ItemDoesNotExist",
"details": {
"itemId": {
"type": "SKU",
"value": "titan-sku-6",
"marketplaceId": null
}
}
}
}
}
],
"data": null
}
Updated 2 days ago