updatePurchaseGroup

šŸ“˜

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 PurchaseGroup.

ā„¹ļø

Required scope(s)

View & Edit Catalog Data

Response

Return type UpdatePurchaseGroupResponse

Arguments

ArgumentDescription
input (UpdatePurchaseGroupInputĀ required)

Specifies the input fields required to update a purchase group.

Examples


Update Purchase Group

Request

mutation updatePurchaseGroup {
  updatePurchaseGroup(
    input: {
      representativeProductId: {
        productId: "01234567abcdef"
      }
      members: [
        {
          product: {
            productId: "ghijkl01234567"
          },
          memberAmount: {
            value: 3,
            unit: "UNIT"
          }
        },
        {
          product: {
            amazonSku: {
              value: "example-amazon-sku-3"
            }
          },
          memberAmount: {
            value: 1,
            unit: "UNIT"
          }
        },
        {
          product: {
            externalId: "example-external-id-4"
          },
          memberAmount: {
            value: 1,
            unit: "UNIT"
          }
        }
      ]
    }
  ) {
    id
  }
}

Response

{
  "data": {
    "updatePurchaseGroup": {
      "id": "01234567abcdef"
    }
  }
}


Did this page help you?