createCatalogFeed

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

Create a CatalogFeed. Each catalog feed represents a bulk data import operation on Buy with Prime products.

ℹ️

Required scope(s)

Create and View Catalog Batches

Response

Return type CreateCatalogFeedResponse

Arguments

ArgumentDescription
input (CreateCatalogFeedInput required)

Specifies the input fields to create a CatalogFeed.

Examples


Create Catalog Feed

Request

mutation createCatalogFeed {
    createCatalogFeed(input: {
        dataProvider: {
            uploadedFile: {
                fileId: "66d8bef0-726e-4c17-a8f1-87640116e9b2"
            }
        },
        configuration: {
            overwriteExistingProducts: false
        }
    }) {
        id
    }
}

Response

{
  "data": {
    "createCatalogFeed": {
      "id": "9as7gsadfgsdg7"
    }
  }
}

Conflict Exception

Request

mutation createCatalogFeed {
    createCatalogFeed(input: {
        dataProvider: {
            uploadedFile: {
                fileId: "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
            }
        },
        configuration: {
            overwriteExistingProducts: false
        }
    }) {
        id
    }
}

Response

{
  "errors": [
    {
      "message": "Only one ongoing Catalog Feed is supported at a time. Please wait for your existing Catalog Feed to finish processing.",
      "locations": [
        {
          "line": 2,
          "column": 5
        }
      ],
      "path": [
        "createCatalogFeed"
      ],
      "extensions": {
        "classification": {
          "type": "ThrottlingError",
          "errorType": "ThrottlingException",
          "errorCode": 429
        }
      }
    }
  ],
  "data": {
    "createCatalogFeed": null
  }
}