> ## Documentation Index
> Fetch the complete documentation index at: https://docs.byblend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How do I reference my own products in Blend?

> Use the Blend product id, your own sku, or — for prescription products only — your product_code. Map these during onboarding and your system never has to store Blend UUIDs.

Every product reference in the Blend API accepts three forms of identifier, and you choose which to use:

* **`id`** — the Blend product UUID
* **`sku`** — your own inventory identifier
* **`product_code`** — your own code, **prescription products only**

Map `sku` and `product_code` onto your Blend products during onboarding and your integration can speak entirely in your own vocabulary.

## Which identifier goes where

| Product type              | `id` | `sku` | `product_code` |
| ------------------------- | :--: | :---: | :------------: |
| Prescription products     |  Yes |  Yes  |       Yes      |
| Non-prescription products |  Yes |  Yes  |       No       |
| Order materials           |  Yes |  Yes  |       No       |

<Warning>
  `product_code` is available on **prescription products only**. Referencing a non-prescription product or an order material by `product_code` will not resolve — use `sku`.
</Warning>

## In an order

```json theme={null}
{
  "patient": { "external_id": "clinic-pt-4471" },
  "products": {
    "prescription": [
      { "product_code": "HC-RAPA31", "quantity": 1 }
    ],
    "non_prescription": [
      { "sku": "SHARPS-SM", "quantity": 1 }
    ],
    "order_material": [
      { "sku": "COLDPACK-2", "quantity": 1 }
    ]
  }
}
```

Send exactly one identifier per line item — `id`, `sku`, or `product_code`, not several.

## In a prescription

`product_code` is a shorthand helper to assist with matching from SCRIPT XML. Blend looks for `product_code` (and `sku`, product `id`, and `name`) in the `<ProductCode>`, `<DrugDescription>`, and `<Note>` XML fields.

```json theme={null}
"medication": {
  "product_code": "HC-RAPA31",
  "drug_name": "Rapamycin",
  "quantity": 30,
  "units": "C48480"
}
```

<Note>
  Getting `product_code` right is the highest-leverage mapping you can do. It's the top of Blend's product-matching order and eliminates the guesswork of drug-name and description parsing — see [how matching works](/guides/prescription-matching).
</Note>

## Setting the mapping

```bash theme={null}
curl -X PATCH https://api.byblend.com/api/v1/products/prescription/98cae3a3-996c-4bf5-9143-0ab6d98bc1d0 \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "sku": "MY-SKU-1234567890",
    "product_code": "SUPERSPRAY15"
  }'
```

This is a partial update — send only what's changing. Non-prescription products and order materials have their own equivalent endpoints.

## Listing what's available

```bash theme={null}
# Everything, in separate arrays by type
curl https://api.byblend.com/api/v1/products \
  -H "Authorization: Bearer {access_token}"

# Just one type
curl "https://api.byblend.com/api/v1/products?type=prescription" \
  -H "Authorization: Bearer {access_token}"
```

`type` accepts `prescription`, `non_prescription`, or `order_material`. There are also dedicated endpoints per type.

<Tip>
  Blend sets up your initial catalog and maps it to your EMR or inventory system during onboarding — you shouldn't need to map products one at a time to get started. Your product catalog is viewable in the Blend Dashboard under Products.
</Tip>

<CardGroup cols={2}>
  <Card title="Get products" icon="pills" href="/api-reference/products-and-materials/get-products">
    All types, or filter with `type=`
  </Card>

  <Card title="Update a prescription product" icon="pen" href="/api-reference/products-and-materials/update-a-prescription-product">
    Set `sku` and `product_code`
  </Card>

  <Card title="Get prescription products" icon="prescription" href="/api-reference/products-and-materials/get-prescription-products">
    Just prescription products
  </Card>

  <Card title="Search products" icon="magnifying-glass" href="/api-reference/search/search-products">
    By name or SKU
  </Card>
</CardGroup>
