# Resources and identifiers

## The freight side

```
Customer order ──offered to──▶ Load (segment) ──has──▶ Stops ──carry──▶ Freight details
       │                             │
   Documents, quotes            Positions, notes, attachments
```

| Resource | Who creates it | Read it with | Identifier |
|---|---|---|---|
| **Order** | Customers and shippers (`POST .../orders`) | `GET .../orders`, `GET .../orders/{orderid}`, `GET .../orders/byNumber/{orderNumber}` | `orderid`: the `ID` field of an order from Get Orders. `orderNumber`: the `orderNumber` from Create Order Booking (`TripId` in Get Orders) |
| **Load** (segment) | The platform, when an order is tendered to a carrier | `GET .../loads`, `GET .../loads/{loadid}` | `loadid`: the `_id` of a load card. The same value is `segmentid` on `PUT .../segments/{segmentid}` |
| **Offer** | The platform, when a load is offered to a carrier | `GET .../offers` | `loadid` |
| **Stop** | Part of the order or load | Inside the load or order | `stopid`: the stop's `StopId`; use the stop's `DataGUID` as `_id` when updating stops in a booking |
| **Freight detail** | Part of the order | Inside the order | `DataGUID` |
| **Quote** | Customers (`POST .../quotes`) | `GET .../quotes/{quoteid}` | `quoteid` |
| **Invoice** | Customers (`POST .../invoices`, `PUT .../invoices/{id}`) | `GET .../invoices`, `GET .../invoices/{id}`, or the create and update responses (`_id`) | `{id}` is the invoice card id returned as `_id`. `BillToCardId` is a location `_id`; `OrderCardIds` are order card ids |
| **Position** | Telematics, or `POST .../loads/{loadid}/updategps` | `GET .../orders/{orderguid}/positions`, `GET .../tractors/{tractorguid}/positions` | `orderguid` is the order's `ID`; `tractorguid` is the tractor's `DataGUID` |
| **Document / note** | Carriers (`POST .../attachments/`, `POST .../notes/`) | `GET .../orders/{orderid}/documents` | `loadid` to add, `orderid` to list |

Two naming rules explain most confusion:

- **Order versus load.** An order is the customer's record; a load is the carrier's record for the same freight. Webhook object types follow the platform's names: registering on `order` means customer orders, registering on `segment` means carrier loads.
- **`loadid` equals `segmentid`.** Routes under `/loads/` and `/segments/` address the same card.

## The fleet side

| Resource | Routes | Identifier |
|---|---|---|
| **Tractor** | `GET .../tractors` (summary list), `GET .../tractors/{id}`, `GET .../tractors/byNumber/{tractorNumber}`, `POST`, `PUT`, `DELETE` | `id` and `tractorguid` are the tractor's `DataGUID`; `tractorNumber` is the fleet number |
| **Trailer** | `GET .../trailers/{id}`, `GET .../trailers/byNumber/{trailerNumber}`, `POST`, `PUT`, `DELETE` | `id` is the trailer's `dataGUID` |
| **Driver** | `GET .../drivers`, `GET .../drivers/{driverid}`, `GET .../drivers/hos/{date}` | `driverid` is the driver's `ID` |
| **Carrier** | `GET .../carriers` (summary list), `GET .../carriers/{carrierid}` | `carrierid` is the carrier's `ID` |
| **Location** | `GET .../locations`, `POST`, `PUT .../locations/{id}`, `DELETE .../locations/{id}`, `DELETE .../locations/{id}/roles/{role}` | `id` is the location's `_id` or `locationId` |
| **Performance event** | `GET .../tractors/{tractorguid}/Event` | per tractor |

## List shapes versus detail shapes

Lists and single-item reads are served by different parts of the platform and do not always share a shape:

- **Lists** from the platform's search index (`Get Orders`, `Get Loads`, `Get Tractors`, `Get Drivers`, `Get Carriers`) return PascalCase summaries, bare arrays, 100 per page.
- **Single-item reads and writes** on tractors, trailers and carriers return camelCase actor objects where fields with no value are omitted.
- **Raw card reads** (`Get Load Detail`, `Get Order Detail`, `Get Loads`) return the stored card document with its `carddata`.

Each operation's reference page shows its exact schema and an example.

## Reference data

Codes used in requests, such as equipment types, service types, reference types, note types and statuses, are configured per partner. Fetch them from the **Reference data** operations (`GET .../options/...`) and send the `Abbr` value.
