Sign Customiser

Products

get_integration_product

read

Get integration product

Copy page

Read one product in full, and resolve the option ids its design captured back to the customiser configuration.

Overview

Reads one synchronised product of the connected Store: its title, price and comparison price in integer minor units, currency, dimensions, authored units, image and artwork references. With include selections it also returns the Store-local option ids the design used, each carrying a stable integer value alongside the merchant-editable display name. It requires the products:read scope and has no side effects.

Permission

Requires theproducts:readpermission. A connection without it answersinsufficient_scopenaming the permission to approve.

Annotations

readOnlyHinttrue
destructiveHintfalse
idempotentHinttrue
openWorldHintfalse

Prerequisites

  • A product id from list_integration_products.
  • A merchant has connected this store and approved the products:read scope.

Arguments

product_idintegerrequired

The product id, from list_integration_products.

includearray of string

Add selections to return the option ids the design captured alongside the product.

Result

One product object, and with include selections one selections object. Both are single records; neither grows with the size of the store.

request_idstringalways present
storeobjectalways present
store.idintegeralways present
store.namestringalways present
productobjectalways present

The product record, with the field names the public API publishes. Dual-unit fields are present when the Store has that API capability.

product.idinteger
product.customiser_idinteger or null
product.titlestring or null
product.descriptionstring or null
product.price_amountinteger or null
product.compare_at_amountinteger or null
product.currencystring or null
product.image_urlstring or null
product.width_cmnumber or null
product.width_innumber or null
product.height_cmnumber or null
product.height_innumber or null
product.length_cmnumber or null
product.length_innumber or null
product.authored_unitsobject
product.authored_units.width_cmstring

One of: centimetres, inches

product.authored_units.height_cmstring

One of: centimetres, inches

product.authored_units.length_cmstring

One of: centimetres, inches

product.artworkobject or null
product.created_atstring or null
product.updated_atstring or null
selectionsobject

The option ids captured for the design, present only when include contained selections. A selection the product did not use, or that no longer resolves against its customiser, is null.

selections.letter_typeobject or null
selections.sizeobject or null
selections.size.valueinteger
selections.size.display_namestring or null
selections.size.width_cmnumber or null
selections.size.width_innumber or null
selections.size.height_cmnumber or null
selections.size.height_innumber or null
selections.size.length_cmnumber or null
selections.size.length_innumber or null
selections.size.border_margin_cmnumber or null
selections.size.border_margin_innumber or null
selections.size.authored_unitsobject
selections.supportobject or null
selections.support_finishobject or null
selections.jacketobject or null
selections.mountingobject or null
selections.mounting_colourobject or null
selections.backlightobject or null
selections.materialobject or null
selections.coloursarray of object
selections.fontsarray of object

Error cases

insufficient_scope

The connection was approved without products:read.

resource_not_found

No product with that id belongs to this store. Call list_integration_products to rediscover a valid id.

Read a product with its captured selections

tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_integration_product",
    "arguments": {
      "product_id": 731,
      "include": [
        "selections"
      ]
    }
  }
}
result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "structuredContent": {
      "request_id": "req_01jz9x2k7c8f3m5n6p7q8r9s0t",
      "store": {
        "id": 12,
        "name": "Demo Signs"
      },
      "product": {
        "id": 731,
        "customiser_id": 42,
        "title": "Custom neon sign",
        "price_amount": 12900,
        "currency": "AUD",
        "width_cm": 80.5,
        "height_cm": 31.5
      },
      "selections": {
        "letter_type": {
          "value": 18,
          "display_name": "Front and halo lit"
        },
        "colours": [
          {
            "value": 12,
            "display_name": "Warm white"
          }
        ]
      }
    }
  }
}

A product id from another store (error)

tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_integration_product",
    "arguments": {
      "product_id": 987654
    }
  }
}
result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "isError": true,
    "structuredContent": {
      "error": {
        "code": "resource_not_found",
        "title": "Resource not found",
        "detail": "The requested resource does not exist or does not belong to the authenticated store.",
        "recovery": "The identifier does not exist in this store. Use the matching list tool to rediscover a valid id."
      }
    }
  }
}