mappingProduct

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 a mapping product

ℹ️

Required scope(s)

View & Edit Catalog Data

Response

Return type MappingProduct

Arguments

ArgumentDescription
identifier (ItemIdentifierInput)

DeprecatedUse productIdentifier instead

(Deprecated) Item identifiers to locate a product.

productIdentifier (MappingProductIdentifierInput)

Product identifiers to locate a product.

Examples


Query By Sku

Request

query mappingProduct {
    mappingProduct(identifier: {
        SKU: "test_sku1"
    }) {
        id
        productExternalId {
            value
        }
        productSku {
            value
        }
        productMsku {
            value
        }
        isPrimeIntended
        url
        image {
            displayReadyUrl
            sourceUrl
        }
        inventoryItem {
            inventoryItemId
            buyableQuantity {
                unit
                amount
            }
        }
    }
}

Response

{
  "data": {
    "mappingProduct": {
      "id": "ypdg9qn0i2cabc",
      "productExternalId": {
        "value": "test_external1"
      },
      "productSku": {
        "value": "test_sku1"
      },
      "productMsku": {
        "value": "test_msku1"
      },
      "isPrimeIntended": true,
      "url": "https://example.com/some-product",
      "image": {
        "displayReadyUrl": "https://example.com/some-product.jpg",
        "sourceUrl": "https://example.com/some-product.jpg"
      },
      "inventoryItem": {
        "inventoryItemId": "d6kv5mssadvabc",
        "buyableQuantity": {
          "unit": "UNIT",
          "amount": 0
        }
      }
    }
  }
}

Query By Msku

Request

query mappingProduct {
    mappingProduct(identifier: {
        mSKU: { value: "test_msku1" }
    }) {
        id
        productExternalId {
            value
        }
        productSku {
            value
        }
        productMsku {
            value
        }
        isPrimeIntended
        url
        image {
            displayReadyUrl
            sourceUrl
        }
        inventoryItem {
            inventoryItemId
            buyableQuantity {
                unit
                amount
            }
        }
    }
}

Response

{
  "data": {
    "mappingProduct": {
      "id": "ypdg9qn0i2cabc",
      "productExternalId": {
        "value": "test_external1"
      },
      "productSku": {
        "value": "test_sku1"
      },
      "productMsku": {
        "value": "test_msku1"
      },
      "isPrimeIntended": true,
      "url": "https://example.com/some-product",
      "image": {
        "displayReadyUrl": "https://example.com/some-product.jpg",
        "sourceUrl": "https://example.com/some-product.jpg"
      },
      "inventoryItem": {
        "inventoryItemId": "d6kv5mssadvabc",
        "buyableQuantity": {
          "unit": "UNIT",
          "amount": 0
        }
      }
    }
  }
}

Query By External Id

Request

query mappingProduct {
    mappingProduct(identifier: {
        ExternalId: "test_external1"
    }) {
        id
        productExternalId {
            value
        }
        productSku {
            value
        }
        productMsku {
            value
        }
        isPrimeIntended
        url
        image {
            displayReadyUrl
            sourceUrl
        }
        inventoryItem {
            inventoryItemId
            buyableQuantity {
                unit
                amount
            }
        }
    }
}

Response

{
  "data": {
    "mappingProduct": {
      "id": "ypdg9qn0i2cabc",
      "productExternalId": {
        "value": "test_external1"
      },
      "productSku": {
        "value": "test_sku1"
      },
      "productMsku": {
        "value": "test_msku1"
      },
      "isPrimeIntended": true,
      "url": "https://example.com/some-product",
      "image": {
        "displayReadyUrl": "https://example.com/some-product.jpg",
        "sourceUrl": "https://example.com/some-product.jpg"
      },
      "inventoryItem": {
        "inventoryItemId": "d6kv5mssadvabc",
        "buyableQuantity": {
          "unit": "UNIT",
          "amount": 0
        }
      }
    }
  }
}

Query By Item Id

Request

query mappingProduct {
    mappingProduct(identifier: {
        ID: "ypdg9qn0i2cabc"
    }) {
        id
        productExternalId {
            value
        }
        productSku {
            value
        }
        productMsku {
            value
        }
        isPrimeIntended
        url
        image {
            displayReadyUrl
            sourceUrl
        }
        inventoryItem {
            inventoryItemId
            buyableQuantity {
                unit
                amount
            }
        }
    }
}

Response

{
  "data": {
    "mappingProduct": {
      "id": "ypdg9qn0i2cabc",
      "productExternalId": {
        "value": "test_external1"
      },
      "productSku": {
        "value": "test_sku1"
      },
      "productMsku": {
        "value": "test_msku1"
      },
      "isPrimeIntended": true,
      "url": "https://example.com/some-product",
      "image": {
        "displayReadyUrl": "https://example.com/some-product.jpg",
        "sourceUrl": "https://example.com/some-product.jpg"
      },
      "inventoryItem": {
        "inventoryItemId": "d6kv5mssadvabc",
        "buyableQuantity": {
          "unit": "UNIT",
          "amount": 0
        }
      }
    }
  }
}