Product setup

Build a complete product record from packaging and code attributes, then connect the supplier names, customer part numbers, documents, and lifecycle actions that keep the catalog useful.

Public API v1.39.1 supports a connected product setup flow and product code renaming. A workflow can resolve or create packaging, read the organization's product code attributes, create a product with typed assignments, maintain its supplier and customer-facing identities, rename its code while preserving connected history, and reconcile the saved catalog record before continuing.

Setup flow

  1. Call GET /me and confirm the matching product, product-family, and write-readiness capabilities.
  2. Resolve the product family, packaging, and code-attribute values the product needs.
  3. Create packaging when an exact reusable reference does not already exist.
  4. Preview and create the product with its complete attributeAssignments set.
  5. Rename the product code when needed, then add supplier relationships, aliases, and customer part numbers with the latest product updatedAt value.
  6. Follow the product detail's catalog.links to reconcile every saved relationship.
  7. Attach product documents or assign the current SDS when needed.

Endpoint map

JobEndpoints
Product familiesGET /product-families, GET /product-families/{id}, POST /product-families, PATCH /product-families/{id}
PackagingGET /reference/product-packaging, POST /product-packaging, GET /product-packaging/{id}
Code attributesGET /product-code-attributes, GET /product-code-attributes/{attributeId}/values
Products and assignmentsPOST /products, GET /products/{id}, PATCH /products/{id}, GET /products/{id}/attribute-assignments
Supplier relationshipsGET and POST /products/{id}/suppliers, DELETE /products/{id}/suppliers/{supplierId}
Product aliasesGET and POST /products/{id}/aliases, PATCH and DELETE /products/{id}/aliases/{aliasId}
Product-family aliasesGET /product-families/{id}/aliases. Create and maintain aliases on products.
Customer part numbersGET and POST /products/{id}/customer-part-numbers, PATCH and DELETE /products/{id}/customer-part-numbers/{customerId}
Product lifecyclePOST /products/{id}/archive, POST /products/{id}/unarchive

Product setup uses products:read and products:write together with the acting person's current Product access. A supplier relationship or supplier-specific alias also requires suppliers:read. A customer part number or customer-specific alias also requires customers:read.

Resolve or create packaging

Search the active packaging directory by text, exact name, or unit of measure. Continue with meta.nextCursor as cursor, keeping the first page’s filters and limit unchanged.

curl "$SHELFCYCLE_API_BASE_URL/reference/product-packaging?name=55%20gallon%20drum&limit=25" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

When the product needs a new packaging reference, preview the exact definition and then create it with the same body and Idempotency-Key.

curl "$SHELFCYCLE_API_BASE_URL/product-packaging?dryRun=true" \
  -X POST \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: catalog:55-gallon-steel-drum" \
  -d '{
    "name": "55 gallon steel drum",
    "unitOfMeasure": "GALLON",
    "shape": "cylindrical",
    "tareWeightLbs": "42",
    "capacity": "55",
    "material": "steel"
  }'

Execution returns the packaging id, saved physical details, archive state, updatedAt, and idempotencyStatus. Use GET /product-packaging/{id} for exact readback.

Resolve code attributes

Use Attribute vocabulary to create, rename, remove, and arrange code or family attribute definitions, and to maintain their accepted values. Vocabulary writes use product-attributes:write and current Product update permission; they are separate from the Product write scope used to save assignments.

Family POST and PATCH can save catalogAttributeAssignments using catalog attribute/value IDs. A supplied array replaces the complete family assignment set, [] clears it, and omission preserves it. A BOOLEAN assignment explicitly sends true or false. The response repeats the accepted set only when supplied. Read back through GET /product-families/{id}/attribute-assignments with products:read; meta.ownerUpdatedAt reports the family version. Individual products use the product-code assignments below.

List the available attribute definitions, then list the accepted values for each SELECT or MULTISELECT definition.

curl "$SHELFCYCLE_API_BASE_URL/product-code-attributes?limit=50" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"
curl "$SHELFCYCLE_API_BASE_URL/product-code-attributes/grade-attribute-id/values?limit=50" \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

Each definition reports its type as SELECT, MULTISELECT, FREE_TEXT, or BOOLEAN. Build each assignment with the matching value field:

[
  { "attributeId": "grade-attribute-id", "optionIds": ["technical-grade-option-id"] },
  { "attributeId": "market-attribute-id", "optionIds": ["industrial-option-id", "coatings-option-id"] },
  { "attributeId": "color-attribute-id", "textValue": "Clear" },
  { "attributeId": "kosher-attribute-id", "booleanValue": true }
]

Create a complete product

Include attributeAssignments in the product create body so the accepted product identity and its assignments are saved together.

curl "$SHELFCYCLE_API_BASE_URL/products?dryRun=true" \
  -X POST \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: source-catalog:ipa-55-drum" \
  -d '{
    "code": "IPA-55-DRUM",
    "externalId": "source-product-913",
    "productFamilyId": "product-family-id",
    "packagingId": "packaging-id",
    "packagingType": "FIXED",
    "supplierType": "VARIABLE",
    "qty": "55",
    "casNumber": "67-63-0",
    "unNumber": "1219",
    "properShippingName": "Isopropanol",
    "hazardClass": ["3"],
    "packingGroup": "II",
    "attributeAssignments": [
      { "attributeId": "grade-attribute-id", "optionIds": ["technical-grade-option-id"] },
      { "attributeId": "color-attribute-id", "textValue": "Clear" }
    ]
  }'

Inspect data.status, checks, and duplicateCandidates. When the preview is ready, remove dryRun=true and submit the same body and key. The response returns the normalized accepted attributeAssignments set, including for a key that can write the product but cannot separately read it.

For an update, fetch the product first and send its latest updatedAt as If-Match. If attributeAssignments is present, it replaces the complete assignment set. Omit the field to preserve the current assignments, or send [] to clear them.

Import product codes together

POST /products/batch imports 1–50 product codes with existing products:write and current Product create permission. Use a unique clientItemId for each row and a body of up to 2 MiB. Every fresh row carries the same required code, productFamilyId, packagingId, and positive qty as a single product create, plus supported optional fields such as attributeAssignments.

The batch also accepts an optional packagingProfile with any nonblank packageType, such as BOTTLE, CARTON, or your team's other package types. Include all four nullable fields: containerPackagingId, status, topStyle, and lining. Stock packaging must use EACH. Set containerPackagingId to null for any profile type when the container is not yet known, or select any active packaging in the organization, regardless of its unit or capacity. Package type, status, and top style reuse the organization's existing spelling when case or spacing matches, or accept new text; lining is free text. The product, attributes, and profile save together for that row. These profile fields belong to the batch route; single-product POST/PATCH keep their existing inputs.

Replace these fictional UUIDs with the resolved family and EACH stock packaging IDs. This example imports a bottle profile before its container is selected:

curl "$SHELFCYCLE_API_BASE_URL/products/batch?dryRun=true" \
  -X POST \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [{
      "clientItemId": "catalog-bottle-001",
      "payload": {
        "code": "BOTTLE-001",
        "productFamilyId": "11111111-1111-4111-8111-111111111111",
        "packagingId": "22222222-2222-4222-8222-222222222222",
        "qty": "1",
        "netUnitWeightLbs": "0.5",
        "packagingProfile": {
          "packageType": "BOTTLE",
          "containerPackagingId": null,
          "status": null,
          "topStyle": null,
          "lining": null
        }
      }
    }]
  }'

Preview returns data.results in input order with status: "ready" or "failed", saves nothing, and needs no Idempotency-Key. A malformed envelope, missing code, or repeated clientItemId rejects the whole request; invalid fresh-product content fails only its row. Repeated product codes in one batch are allowed.

After reviewing the preview, remove dryRun=true and add a stable key such as Idempotency-Key: catalog:bottle-import-001. Execution returns counts and ordered results. A successful row contains data.id, code, and resultAction: "created" or "existing". An exact existing code returns the saved product only when the caller can read product detail; otherwise that row fails with Product already exists. on code, without an ID. Existing products are kept unchanged, including their profile and attributes; this endpoint does not apply the other submitted fields to them.

Retry an uncertain response or 503 products_batch_interrupted with the identical body, order, IDs, and key. Saved results replay and pending rows continue; a completed retry reports idempotencyStatus: "replayed". A changed body with the same key conflicts. Put corrected failed rows in a new request with a new key. GET /me uses the existing products.create availability for both create routes. See Idempotency.

Rename a product code

API v1.39.1 lets an existing product take a new unique code while its connected sales, purchasing, inventory, pricing, cost, and accounting history stays attached to the same product.

Preview the rename with the current product timestamp:

curl "$SHELFCYCLE_API_BASE_URL/products/product-id?dryRun=true" \
  -X PATCH \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
  -H "Content-Type: application/json" \
  -H 'If-Match: "2026-09-13T14:30:00.000Z"' \
  -d '{ "code": "IPA-55-DRUM-NEW" }'

When the preview is ready, remove dryRun=true and send the same update with the latest updatedAt. Product codes are unique across active and archived products; a matching code returns duplicate_product. Other structural product changes continue to follow their existing readiness checks.

The response returns the renamed product and its next updatedAt. Read GET /products/{id} to confirm the new code before continuing with another catalog change.

Add catalog relationships

Every relationship write starts from the latest owner updatedAt. Use the new timestamp returned by one relationship change before applying the next.

Connect a supplier

curl "$SHELFCYCLE_API_BASE_URL/products/product-id/suppliers" \
  -X POST \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "If-Match: 2026-09-10T14:30:00.000Z" \
  -d '{ "supplierId": "supplier-id" }'

An exact repeat reports changed: false. This relationship makes the supplier available for the product; Current Source selection remains under GET and PUT /products/{id}/current-cost-source.

Add the names each relationship uses

Product aliases, also called synonyms, can be organization-wide, customer-specific, supplier-specific, or specific to a customer and supplier together. Create and maintain them through product alias endpoints. Product-family alias reads remain available; family alias writes return 400 family_aliases_not_supported.

curl "$SHELFCYCLE_API_BASE_URL/products/product-id/aliases" \
  -X POST \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: source-catalog:product-id:ipa" \
  -H "If-Match: 2026-09-10T14:31:00.000Z" \
  -d '{
    "value": "IPA",
    "context": { "type": "global" }
  }'

Customer and supplier contexts use { "type": "customer", "customerId": "customer-id" } or { "type": "supplier", "supplierId": "supplier-id" }. A combined context uses { "type": "customer-supplier", "customerId": "customer-id", "supplierId": "supplier-id" } with both matching read scopes and current access. An alias can change its display value and document selection through PATCH; changing its owner or context uses remove and create.

Choose documents for a synonym

Use replaceOnDocumentTypes on product alias POST or PATCH to select where the synonym replaces the product code. API v1.66.2 adds PICK_LIST, WAREHOUSE_RELEASE, RECEIVING_COPY, WORK_ORDER_WORKSHEET, and WORK_ORDER_ORDER_CONFIRMATION to the existing choices, for 20 eligible destinations. The field applies to global and party-specific synonyms.

This POST body creates a synonym for the five added documents. Use the existing alias create headers and your intended value and context:

{
  "value": "Customer product name",
  "context": { "type": "global" },
  "replaceOnDocumentTypes": [
    "PICK_LIST",
    "WAREHOUSE_RELEASE",
    "RECEIVING_COPY",
    "WORK_ORDER_WORKSHEET",
    "WORK_ORDER_ORDER_CONFIRMATION"
  ]
}

Send the complete intended document list when changing a selection. Alias PATCH also requires value; retain the display value from the current read when changing documents only, and use the latest product updatedAt in If-Match. Omit both selection fields to preserve current memberships.

As a shortcut, replaceProductCodeOnDocuments: true selects all 20 current destinations and false clears them. Send either this boolean or replaceOnDocumentTypes, never both. Read responses return the explicit list; the boolean is true only when every current destination is selected. Existing synonyms keep their saved selections when new document types become available. A prior complete selection can therefore return false while retaining its original documents. Read and extend the explicit list to add the new choices deliberately.

Add a customer part number

curl "$SHELFCYCLE_API_BASE_URL/products/product-id/customer-part-numbers" \
  -X POST \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "If-Match: 2026-09-10T14:32:00.000Z" \
  -d '{
    "customerId": "customer-id",
    "partNo": "CUST-IPA-55"
  }'

An exact repeat reports no change. Update the value through PATCH /products/{id}/customer-part-numbers/{customerId}.

Reconcile the saved catalog

GET /products/{id} returns a catalog block with the product family ID and external ID, packaging ID, archive state, and links to the relationship collections available to the current key.

{
  "catalog": {
    "family": { "id": "product-family-id", "externalId": "family-ipa" },
    "packaging": { "id": "packaging-id" },
    "archived": false,
    "links": {
      "attributeAssignments": { "available": true, "method": "GET", "path": "/api/v1/products/product-id/attribute-assignments" },
      "suppliers": { "available": true, "method": "GET", "path": "/api/v1/products/product-id/suppliers" },
      "aliases": { "available": true, "method": "GET", "path": "/api/v1/products/product-id/aliases" },
      "customerPartNumbers": { "available": true, "method": "GET", "path": "/api/v1/products/product-id/customer-part-numbers" }
    }
  }
}

Follow the available links and continue each collection with its returned cursor until hasMore is false. Supplier rows show whether a relationship is the selected Current Source. Assignment rows preserve the definition type and selected value identity. Alias and part-number rows retain their customer or supplier context.

Archive or restore a product

Preview the named action with dryRun=true, then apply it with the latest product timestamp in If-Match.

curl "$SHELFCYCLE_API_BASE_URL/products/product-id/archive?dryRun=true" \
  -X POST \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY"

The preview reports the current timestamp and any stock or inbound quantity that needs attention. Execution returns archived, changed, and the next updatedAt value. Restore uses the matching /unarchive endpoint. See Archive and restore for the shared lifecycle flow.

Manage approved suppliers

Use GET /products/{id}/approved-suppliers to read approvals and revocations for one product. It needs products:read and suppliers:read, with current Product and Supplier viewing access. Rows include the supplier, active, approvedAt, and revokedAt. Follow meta.nextCursor when another page is available. Ordinary links on /products/{id}/suppliers are separate from approvals.

Approve with POST /products/{id}/approved-suppliers and a supplierId UUID. Revoke with DELETE /products/{id}/approved-suppliers/{supplierId}. Both use products:write, suppliers:read, current Product update and Supplier viewing access, and the latest product updatedAt as If-Match.

curl "$SHELFCYCLE_API_BASE_URL/products/$PRODUCT_ID/approved-suppliers?dryRun=true" \
  -X POST \
  -H "Authorization: Bearer $SHELFCYCLE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "If-Match: $PRODUCT_UPDATED_AT" \
  -d "$(jq -n --arg supplierId "$SUPPLIER_ID" '{supplierId:$supplierId}')"

Either write can be previewed with dryRun=true. After execution use the returned updatedAt for the next product edit. Read the list to verify the resulting approval state. An already active approval or a revoke with no active approval returns 200 with changed: false when the request meets the access and version requirements. Revocation preserves the approval record in history. With no active approvals, the approval list does not restrict suppliers.

An unknown product returns 404 not_found. Use an active product for writes, as execution also returns 404 not_found for an archived product. Approval requires an active supplier. An unknown or archived supplier produces a blocked readiness check in preview and 404 not_found on execution. Revocation checks for an active approval on the product, including when the supplier is unknown.

Documents and SDS

Use the Attached documents guide to upload product files and classify them as safety or technical data sheets. Select an attached sheet with PUT /products/{id}/sds-selection, or assign an upload directly through PUT /products/{id}/sds. Use the latest product updatedAt as If-Match for changes.

Information

Keep each returned product timestamp with the completed step. It is the starting point for the next catalog relationship, document, or lifecycle change.