# Organization Structure

Canonical URL: https://api-docs.test-printeers.com/guides/organization-structure

Learn how your organization is structured with accounts, stores, and brands.

## Overview

Printeers uses a hierarchical structure to organize your business:

```
Organization
├── Account
│   ├── Store
│   │   └── Orders
│   └── Store
│       └── Orders
└── Account
    └── Store
        └── Orders

Brands (organization-wide)
```

## Organization

An **Organization** is the top-level entity representing your company. Your API secret key is scoped to the organization, giving you access to all accounts and stores within it.

Retrieve your organization details:

```bash
curl -i https://api.test-printeers.com/v2/organization \
  -H "X-Printeers-Secret-Key: YOUR_SECRET_KEY"
```

## Accounts

An **Account** represents a billing entity within your organization. Each account:

- Has its own balance and invoicing.
- Can have zero or more stores attached.
- Can have different payment terms.
- Can be tied to a different legal entity and billing address.

List all accounts in your organization:

```bash
curl -i https://api.test-printeers.com/v2/accounts \
  -H "X-Printeers-Secret-Key: YOUR_SECRET_KEY"
```

Most organizations have a single account, but larger organizations may use multiple accounts to separate billing for different business units or regions.

## Stores

A **Store** is where orders are created. Each store:

- Is attached to exactly one account for billing purposes.
- Has an integration type (`api`, `shopify`, etc.).
- Can only create orders via API if its integration type is `api`.
- Can be moved to a different account if needed.

List all stores:

```bash
curl -i https://api.test-printeers.com/v2/stores \
  -H "X-Printeers-Secret-Key: YOUR_SECRET_KEY"
```

When an order is created, the products and shipping costs are billed to the account the store is attached to.

## Brands

A **Brand** represents a customer-facing identity used on shipping labels and tracking website. Brands are organization-wide and can be used across any store. Each store has a default brand that is used when an order doesn't specify one.

Each brand includes:

- Brand name
- Logo
- Primary and secondary colors
- Customer service contact information

List all brands:

```bash
curl -i https://api.test-printeers.com/v2/brands \
  -H "X-Printeers-Secret-Key: YOUR_SECRET_KEY"
```

When creating an order, you can specify a brand to customize the shipment tracking page for your customers.

## Orders

An **Order** contains one or more orderlines, each representing a product to be printed (or simply picked) and shipped. Orders:

- Belong to a store (and by extension, an account).
- Can optionally use a brand for white-label fulfillment.
- Are shipped as one shipment.

Retrieve order details:

```bash
curl -i https://api.test-printeers.com/v2/orders/ORDER_REFERENCE \
  -H "X-Printeers-Secret-Key: YOUR_SECRET_KEY"
```

## References

All entities use unique reference strings in the format `Entity_xxxx`:

- `Account_xyz789...`
- `Store_def456...`
- `Brand_gh1012...`
- `Order_jkl345...`

References are:

- **Globally unique**: No two entities share the same reference, even across different organizations or environments. A reference from the test environment will never collide with one from production.
- **Stable**: Once assigned, a reference never changes. You can safely store references in your system for later use.
- **Future-proof**: References introduced in V2 will continue to work in future major versions (V3 and beyond).

## Managing Your Organization

Organization structure (accounts, stores, brands) is managed through the [Printeers Dashboard](https://dashboard.printeers.com), not via the API. The API provides read-only access to this information.
