> ## 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.

# Can I use my own IDs instead of Blend IDs?

> Yes. Blend accepts your external_id for patients and orders, and your sku or product_code for products.

You do not have to store Blend UUIDs to use the Blend API. Almost every path parameter and product reference accepts your own identifier as an alternative, so your system can stay the source of truth for IDs. Set `external_id` when you create a patient or an order, map your `sku` and `product_code` onto Blend products during onboarding, and you can address Blend resources entirely in your own vocabulary.

## What each resource accepts

| Resource | Blend identifier | Your identifier | Also accepted                               |
| -------- | ---------------- | --------------- | ------------------------------------------- |
| Patient  | `id` (UUID)      | `external_id`   | —                                           |
| Order    | `id` (UUID)      | `external_id`   | `order_number` (e.g. `ORD250312003548IAU4`) |
| Product  | `id` (UUID)      | `sku`           | `product_code` (prescription products only) |

## Fetch an order by your own ID

```bash theme={null}
curl https://api.byblend.com/api/v1/orders/my-system-128318AA2 \
  -H "Authorization: Bearer {access_token}"
```

The same path position accepts a Blend UUID or the human-friendly order number — you don't need separate code paths for each.

## Set your IDs at creation time

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

<Note>
  A patient's `external_id` is also used for prescription matching. When you send an electronic prescription referencing `external_id`, Blend links it to the right patient without a name-and-date-of-birth lookup — which is the most reliable matching path available. See [how Blend matches prescriptions to patients](/overview#prescription-to-patient).
</Note>

<Warning>
  `sku` and `product_code` are not interchangeable. Non-prescription products and order materials can be referenced by Blend `id` or `sku` only; `product_code` is available for **prescription products**.
</Warning>

<Tip>
  You can set or change `external_id` on an existing order with `PATCH /orders/{order_id}` — useful when your own record is created after the order reaches Blend. External IDs are editable in the Blend Dashboard.
</Tip>

<CardGroup cols={2}>
  <Card title="Get an order's details" icon="prescription-bottle" href="/api-reference/orders/get-an-orders-details">
    Accepts UUID, order number, or external ID
  </Card>

  <Card title="Get a patient's details" icon="user" href="/api-reference/patients/get-a-patients-details">
    Accepts UUID or external ID
  </Card>

  <Card title="Update a prescription product" icon="pills" href="/api-reference/products-and-materials/update-a-prescription-product">
    Set your sku and product\_code
  </Card>
</CardGroup>
