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

# Identifiers

> Understanding resource identifiers in the Voyant API

## Format

All resources in Voyant use **TypeIDs** - prefixed identifiers that indicate the entity type:

```
prod_01h8z3y4x2w1v0u9t8s7r6q5p4
└──┘ └─────────────────────────┘
prefix          suffix
```

The prefix tells you what kind of resource the ID refers to, making debugging and logging much easier.

## Common prefixes

| Entity            | Prefix  | Example                            |
| ----------------- | ------- | ---------------------------------- |
| Product           | `prod`  | `prod_01h8z3y4x2w1v0u9t8s7r6q5p4`  |
| Departure         | `dept`  | `dept_01h8z3y4x2w1v0u9t8s7r6q5p4`  |
| Booking           | `book`  | `book_01h8z3y4x2w1v0u9t8s7r6q5p4`  |
| Booking Passenger | `bkpx`  | `bkpx_01h8z3y4x2w1v0u9t8s7r6q5p4`  |
| Person            | `ppl`   | `ppl_01h8z3y4x2w1v0u9t8s7r6q5p4`   |
| Organization      | `org`   | `org_01h8z3y4x2w1v0u9t8s7r6q5p4`   |
| Invoice           | `inv`   | `inv_01h8z3y4x2w1v0u9t8s7r6q5p4`   |
| Payment           | `pay`   | `pay_01h8z3y4x2w1v0u9t8s7r6q5p4`   |
| Itinerary         | `itin`  | `itin_01h8z3y4x2w1v0u9t8s7r6q5p4`  |
| Collection        | `col`   | `col_01h8z3y4x2w1v0u9t8s7r6q5p4`   |
| Tag               | `tag`   | `tag_01h8z3y4x2w1v0u9t8s7r6q5p4`   |
| Quote             | `qte`   | `qte_01h8z3y4x2w1v0u9t8s7r6q5p4`   |
| Webhook           | `hksub` | `hksub_01h8z3y4x2w1v0u9t8s7r6q5p4` |

## Validation

The API validates that IDs have the correct prefix for each field:

```json theme={null}
// Valid - productId has prod_ prefix
{
  "productId": "prod_01h8z3y4x2w1v0u9t8s7r6q5p4",
  "departureId": "dept_01h9xm2n3p4q5r6s7t8v9w0x1y"
}

// Invalid - booking ID used where product ID expected
{
  "productId": "book_01h8z3y4x2w1v0u9t8s7r6q5p4",
  "departureId": "dept_01h9xm2n3p4q5r6s7t8v9w0x1y"
}
```

<Warning>
  Using an ID with the wrong prefix returns a `400 Bad Request` error.
</Warning>

## Properties

* **Globally unique**: IDs never collide across workspaces or entity types
* **Time-sortable**: IDs created later sort after earlier ones
* **Lowercase**: Always use lowercase when storing or comparing IDs

## Working with IDs

Store and transmit IDs as strings:

```javascript theme={null}
// Correct
const productId = "prod_01h8z3y4x2w1v0u9t8s7r6q5p4"

// Validate the prefix if needed
if (!productId.startsWith("prod_")) {
  throw new Error("Invalid product ID")
}
```

<Tip>
  Use the `created_at` field from API responses if you need creation timestamps - don't try to extract them from the ID.
</Tip>
