Contents

Prices and stock

The two most frequent updates, per product or in bulk by variant SKU (up to 1,000 lines). Only the price lists and locations you send change. Stock is owned by Nucleo Commerce: here you set only the initial quantity of a variant at a location that has none yet; afterwards it changes in Commerce. Reads (GET /products) always return the quantity Commerce last reported.

Base URL, authentication and conventions of this API are on the Catalog API page.

put/products/{product}/prices

Set prices of a product

Requires a read and write key.

One line per variant and price list (up to 500). Price lists not sent do not change.

PUT https://api-catalog.nucleoplatform.com/api/catalog/v1/products/{product}/prices
Authentication: Bearer token
Rate limit: 600 requests per 1m, per key (default; the catalog owner can set 1–6,000)

Path parameters

  • productstringrequired

    Product id or SKU.

    Example: TEE-001

Headers

  • Idempotency-Keystring

    Any string of 1–255 printable ASCII characters, unique per change you mean (a UUID is fine). Sending the same request again with the same key within 48 hours returns the first answer without doing the work again (header Idempotent-Replayed: true). The same key with a different request is a 409 idempotency_key_reused; while the first request is still running, 409 idempotency_key_in_progress with Retry-After: 1. Answers 429 and 5xx are not stored: retry them with the same key. Webhook secrets are never stored: a replayed webhook creation or rotation answers with secret: null.

    max length 255
    Example: 2b5c0d2e-7d2a-4f6e-9a51-0c8a1e7f3b44

Request bodyapplication/json

  • pricesarray of object & PriceInputrequired
    min items 1max items 500
    Attributes of each item
    • variant_skustringrequired

      SKU of a variant of this product.

    • price_liststringrequired

      Price list code (GET /price-lists).

    • pricenumberrequired
      min 0max 99999999.9999
    • sale_pricenumber | null

      Discounted price on that list.

      min 0max 99999999.9999

Responses

  • 200All variants of the product as they are now, and what happened.
    • dataarray of Variantrequired
      Attributes of each item
      • idinteger
      • skustring
      • barcodestring | null
      • optionsobject

        The options that tell variants apart: attribute code → option code ({"size": "m"}). Option codes are normalised, so a size sent as M comes back as m.

      • coststring | null

        Purchase or production cost of this variant, as a string with two decimals ("12.50"); null when none is set. No currency is stored with it.

      • weightnumber | null
      • weight_unitstring | null
      • pricesarray of object
        Attributes of each item
        • price_liststring
        • currencystring | null
        • pricestring | null
          Example: 19.90
        • sale_pricestring | null

          Price after the sale running today on this list (a sale price list in Pricing), or the discounted price set on the row; null when neither applies.

      • stockarray of object

        Read only after creation: the quantity Nucleo Commerce last reported for each location.

        Attributes of each item
        • locationstring
        • availableinteger
        • on_handinteger
    • resultWriteResultrequired
      Child attributes
      • statusstringrequired

        partial: some variants or attribute values could not be written (see errors), the rest was. An attribute outside the product's attribute set is one of them. skipped: nothing to write (only empty values). An attribute the catalog doesn't know is a 400, not a skip.

        One ofcreatedupdatedpartialskipped
      • errorsarray of objectrequired
        Attributes of each item
        • variant_skustring | null
        • messagestring
      • notesarray of stringrequired

        Fields not written and why.

  • 400The request must change: validation_failed (see details, one list of messages per field), invalid_json, invalid_cursor, product_not_written, variant_not_written, not_written, image_not_downloadable.
    • errorobjectrequired
      Child attributes
      • codestringrequired

        Stable machine-readable code. Branch on it, not on the message.

      • messagestringrequired
      • request_idstringrequired

        Same as the X-Request-Id header. Quote it to support.

      • detailsobject
  • 404product_not_found, variant_not_found, image_not_found, import_not_found, webhook_not_found, channel_not_found, locale_not_found, or not_found for a path that does not exist.
    • errorobjectrequired
      Child attributes
      • codestringrequired

        Stable machine-readable code. Branch on it, not on the message.

      • messagestringrequired
      • request_idstringrequired

        Same as the X-Request-Id header. Quote it to support.

      • detailsobject
Request
curl -X PUT https://api-catalog.nucleoplatform.com/api/catalog/v1/products/TEE-001/prices \
  -H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
  -H 'Idempotency-Key: 2b5c0d2e-7d2a-4f6e-9a51-0c8a1e7f3b44' \
  -H 'Content-Type: application/json' \
  -d '{
  "prices": [
    {
      "variant_sku": "TEE-001-M",
      "price_list": "eu",
      "price": 19.9,
      "sale_price": 15
    },
    {
      "variant_sku": "TEE-001-L",
      "price_list": "eu",
      "price": 19.9
    }
  ]
}'
Response
{
  "data": [
    {
      "id": 1,
      "sku": "string",
      "barcode": "string",
      "options": {},
      "cost": "string",
      "weight": 1.5,
      "weight_unit": "string",
      "prices": [
        {
          "price_list": "string",
          "currency": "string",
          "price": "19.90",
          "sale_price": "string"
        }
      ],
      "stock": [
        {
          "location": "string",
          "available": 1,
          "on_hand": 1
        }
      ]
    }
  ],
  "result": {
    "status": "created",
    "errors": [
      {
        "variant_sku": "string",
        "message": "string"
      }
    ],
    "notes": [
      "string"
    ]
  }
}
put/products/{product}/stock

Set the initial stock of a product

Requires a read and write key.

The initial stock of new variants: one line per variant and location (up to 500). A line for a variant and location that already have stock is refused (400): Nucleo Commerce owns it and it changes in Commerce › Inventory.

PUT https://api-catalog.nucleoplatform.com/api/catalog/v1/products/{product}/stock
Authentication: Bearer token
Rate limit: 600 requests per 1m, per key (default; the catalog owner can set 1–6,000)

Path parameters

  • productstringrequired

    Product id or SKU.

    Example: TEE-001

Headers

  • Idempotency-Keystring

    Any string of 1–255 printable ASCII characters, unique per change you mean (a UUID is fine). Sending the same request again with the same key within 48 hours returns the first answer without doing the work again (header Idempotent-Replayed: true). The same key with a different request is a 409 idempotency_key_reused; while the first request is still running, 409 idempotency_key_in_progress with Retry-After: 1. Answers 429 and 5xx are not stored: retry them with the same key. Webhook secrets are never stored: a replayed webhook creation or rotation answers with secret: null.

    max length 255
    Example: 2b5c0d2e-7d2a-4f6e-9a51-0c8a1e7f3b44

Request bodyapplication/json

  • stockarray of object & StockInputrequired
    min items 1max items 500
    Attributes of each item
    • variant_skustringrequired
    • locationstringrequired

      Location code (GET /locations).

    • availableintegerrequired

      Initial quantity at that location: only where the variant has no stock yet.

Responses

  • 200All variants of the product as they are now, and what happened.
    • dataarray of Variantrequired
      Attributes of each item
      • idinteger
      • skustring
      • barcodestring | null
      • optionsobject

        The options that tell variants apart: attribute code → option code ({"size": "m"}). Option codes are normalised, so a size sent as M comes back as m.

      • coststring | null

        Purchase or production cost of this variant, as a string with two decimals ("12.50"); null when none is set. No currency is stored with it.

      • weightnumber | null
      • weight_unitstring | null
      • pricesarray of object
        Attributes of each item
        • price_liststring
        • currencystring | null
        • pricestring | null
          Example: 19.90
        • sale_pricestring | null

          Price after the sale running today on this list (a sale price list in Pricing), or the discounted price set on the row; null when neither applies.

      • stockarray of object

        Read only after creation: the quantity Nucleo Commerce last reported for each location.

        Attributes of each item
        • locationstring
        • availableinteger
        • on_handinteger
    • resultWriteResultrequired
      Child attributes
      • statusstringrequired

        partial: some variants or attribute values could not be written (see errors), the rest was. An attribute outside the product's attribute set is one of them. skipped: nothing to write (only empty values). An attribute the catalog doesn't know is a 400, not a skip.

        One ofcreatedupdatedpartialskipped
      • errorsarray of objectrequired
        Attributes of each item
        • variant_skustring | null
        • messagestring
      • notesarray of stringrequired

        Fields not written and why.

  • 400The request must change: validation_failed (see details, one list of messages per field), invalid_json, invalid_cursor, product_not_written, variant_not_written, not_written, image_not_downloadable.
    • errorobjectrequired
      Child attributes
      • codestringrequired

        Stable machine-readable code. Branch on it, not on the message.

      • messagestringrequired
      • request_idstringrequired

        Same as the X-Request-Id header. Quote it to support.

      • detailsobject
  • 404product_not_found, variant_not_found, image_not_found, import_not_found, webhook_not_found, channel_not_found, locale_not_found, or not_found for a path that does not exist.
    • errorobjectrequired
      Child attributes
      • codestringrequired

        Stable machine-readable code. Branch on it, not on the message.

      • messagestringrequired
      • request_idstringrequired

        Same as the X-Request-Id header. Quote it to support.

      • detailsobject
Request
curl -X PUT https://api-catalog.nucleoplatform.com/api/catalog/v1/products/TEE-001/stock \
  -H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
  -H 'Idempotency-Key: 2b5c0d2e-7d2a-4f6e-9a51-0c8a1e7f3b44' \
  -H 'Content-Type: application/json' \
  -d '{
  "stock": [
    {
      "variant_sku": "TEE-001-M",
      "location": "main",
      "available": 12
    }
  ]
}'
Response
{
  "data": [
    {
      "id": 1,
      "sku": "string",
      "barcode": "string",
      "options": {},
      "cost": "string",
      "weight": 1.5,
      "weight_unit": "string",
      "prices": [
        {
          "price_list": "string",
          "currency": "string",
          "price": "19.90",
          "sale_price": "string"
        }
      ],
      "stock": [
        {
          "location": "string",
          "available": 1,
          "on_hand": 1
        }
      ]
    }
  ],
  "result": {
    "status": "created",
    "errors": [
      {
        "variant_sku": "string",
        "message": "string"
      }
    ],
    "notes": [
      "string"
    ]
  }
}
put/prices

Set prices in bulk

Requires a read and write key.

Up to 1,000 lines, each for one variant SKU of any product. The answer has one result per line, in order.

PUT https://api-catalog.nucleoplatform.com/api/catalog/v1/prices
Authentication: Bearer token
Rate limit: 600 requests per 1m, per key (default; the catalog owner can set 1–6,000)

Headers

  • Idempotency-Keystring

    Any string of 1–255 printable ASCII characters, unique per change you mean (a UUID is fine). Sending the same request again with the same key within 48 hours returns the first answer without doing the work again (header Idempotent-Replayed: true). The same key with a different request is a 409 idempotency_key_reused; while the first request is still running, 409 idempotency_key_in_progress with Retry-After: 1. Answers 429 and 5xx are not stored: retry them with the same key. Webhook secrets are never stored: a replayed webhook creation or rotation answers with secret: null.

    max length 255
    Example: 2b5c0d2e-7d2a-4f6e-9a51-0c8a1e7f3b44

Request bodyapplication/json

  • pricesarray of object & PriceInputrequired
    min items 1max items 1000
    Attributes of each item
    • skustringrequired

      Variant SKU.

    • price_liststringrequired

      Price list code (GET /price-lists).

    • pricenumberrequired
      min 0max 99999999.9999
    • sale_pricenumber | null

      Discounted price on that list.

      min 0max 99999999.9999

Responses

  • 200One result per line, in the order sent.
    • dataarray of ItemResultrequired
      Attributes of each item
      • indexintegerrequired

        Position in the request, from 0.

      • skustring | nullrequired
      • product_idinteger | null
      • statusstringrequired

        invalid: not written because the input is wrong. failed: nothing could be written.

        One ofcreatedupdatedpartialskippedfailedinvalid
      • errorsarray of objectrequired
        Attributes of each item
        • fieldstring

          For invalid, the field in error.

        • variant_skustring | null
        • messagestring
      • notesarray of stringrequired
  • 400The request must change: validation_failed (see details, one list of messages per field), invalid_json, invalid_cursor, product_not_written, variant_not_written, not_written, image_not_downloadable.
    • errorobjectrequired
      Child attributes
      • codestringrequired

        Stable machine-readable code. Branch on it, not on the message.

      • messagestringrequired
      • request_idstringrequired

        Same as the X-Request-Id header. Quote it to support.

      • detailsobject
  • 403read_only_key: this key cannot write.
    • errorobjectrequired
      Child attributes
      • codestringrequired

        Stable machine-readable code. Branch on it, not on the message.

      • messagestringrequired
      • request_idstringrequired

        Same as the X-Request-Id header. Quote it to support.

      • detailsobject
Request
curl -X PUT https://api-catalog.nucleoplatform.com/api/catalog/v1/prices \
  -H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
  -H 'Idempotency-Key: 2b5c0d2e-7d2a-4f6e-9a51-0c8a1e7f3b44' \
  -H 'Content-Type: application/json' \
  -d '{
  "prices": [
    {
      "sku": "TEE-001-M",
      "price_list": "eu",
      "price": 21,
      "sale_price": null
    },
    {
      "sku": "TEE-002-S",
      "price_list": "us",
      "price": 25
    }
  ]
}'
Response
{
  "data": [
    {
      "index": 1,
      "sku": "string",
      "product_id": 1,
      "status": "created",
      "errors": [
        {
          "field": "string",
          "variant_sku": "string",
          "message": "string"
        }
      ],
      "notes": [
        "string"
      ]
    }
  ]
}
put/stock

Set initial stock in bulk

Requires a read and write key.

Up to 1,000 lines, each for one variant SKU and one location. The answer has one result per line, in order. Only the initial quantity: a line for a variant and location that already have stock comes back invalid, because Nucleo Commerce owns that stock and it changes in Commerce › Inventory.

PUT https://api-catalog.nucleoplatform.com/api/catalog/v1/stock
Authentication: Bearer token
Rate limit: 600 requests per 1m, per key (default; the catalog owner can set 1–6,000)

Headers

  • Idempotency-Keystring

    Any string of 1–255 printable ASCII characters, unique per change you mean (a UUID is fine). Sending the same request again with the same key within 48 hours returns the first answer without doing the work again (header Idempotent-Replayed: true). The same key with a different request is a 409 idempotency_key_reused; while the first request is still running, 409 idempotency_key_in_progress with Retry-After: 1. Answers 429 and 5xx are not stored: retry them with the same key. Webhook secrets are never stored: a replayed webhook creation or rotation answers with secret: null.

    max length 255
    Example: 2b5c0d2e-7d2a-4f6e-9a51-0c8a1e7f3b44

Request bodyapplication/json

  • stockarray of object & StockInputrequired
    min items 1max items 1000
    Attributes of each item
    • skustringrequired

      Variant SKU.

    • locationstringrequired

      Location code (GET /locations).

    • availableintegerrequired

      Initial quantity at that location: only where the variant has no stock yet.

Responses

  • 200One result per line, in the order sent.
    • dataarray of ItemResultrequired
      Attributes of each item
      • indexintegerrequired

        Position in the request, from 0.

      • skustring | nullrequired
      • product_idinteger | null
      • statusstringrequired

        invalid: not written because the input is wrong. failed: nothing could be written.

        One ofcreatedupdatedpartialskippedfailedinvalid
      • errorsarray of objectrequired
        Attributes of each item
        • fieldstring

          For invalid, the field in error.

        • variant_skustring | null
        • messagestring
      • notesarray of stringrequired
  • 400The request must change: validation_failed (see details, one list of messages per field), invalid_json, invalid_cursor, product_not_written, variant_not_written, not_written, image_not_downloadable.
    • errorobjectrequired
      Child attributes
      • codestringrequired

        Stable machine-readable code. Branch on it, not on the message.

      • messagestringrequired
      • request_idstringrequired

        Same as the X-Request-Id header. Quote it to support.

      • detailsobject
  • 403read_only_key: this key cannot write.
    • errorobjectrequired
      Child attributes
      • codestringrequired

        Stable machine-readable code. Branch on it, not on the message.

      • messagestringrequired
      • request_idstringrequired

        Same as the X-Request-Id header. Quote it to support.

      • detailsobject
Request
curl -X PUT https://api-catalog.nucleoplatform.com/api/catalog/v1/stock \
  -H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
  -H 'Idempotency-Key: 2b5c0d2e-7d2a-4f6e-9a51-0c8a1e7f3b44' \
  -H 'Content-Type: application/json' \
  -d '{
  "stock": [
    {
      "sku": "TEE-001-M",
      "location": "main",
      "available": 12
    },
    {
      "sku": "TEE-001-L",
      "location": "main",
      "available": 0
    }
  ]
}'
Response
{
  "data": [
    {
      "index": 1,
      "sku": "string",
      "product_id": 1,
      "status": "created",
      "errors": [
        {
          "field": "string",
          "variant_sku": "string",
          "message": "string"
        }
      ],
      "notes": [
        "string"
      ]
    }
  ]
}