# Record departure from a stop

> PUT /api/public/v1/loads/{id}/stops/{stopId}/departure, scope loads.write. Techvia TMS public API v1 reference.

Source: https://techvia.software/docs/tms/reference/loads/record-departure-from-a-stop/

`PUT /api/public/v1/loads/{id}/stops/{stopId}/departure`

**Scope:** `loads.write`. **MCP tool:** `record_stop_departure`. Rules and edge cases: [Loads guide](/docs/tms/guides/loads/).

## Parameters

| Name | In | Type | Required | Notes |
|---|---|---|---|---|
| `id` | path | string (uuid) | yes |  |
| `stopId` | path | string (uuid) | yes |  |

## Request body

Content type `application/json` (optional body). Limits and rules for each field are in the [Loads guide](/docs/tms/guides/loads/).

| Field | Type | Required | Notes |
|---|---|---|---|
| `at` | any (ISO 8601 date-time) | no |  |

## Responses

| Status | Meaning | Body |
|---|---|---|
| `200` | OK | `PublicLoad` |
| `404` | Not Found | `ProblemDetails` |
| `409` | Conflict | `ProblemDetails` |
| `422` | Unprocessable Entity | `ProblemDetails` |

### `200` body

| Field | Type | Notes |
|---|---|---|
| `id` | string (uuid) |  |
| `loadNumber` | string |  |
| `workOrderNumber` | string |  |
| `status` | enum LoadStatus | One of `PreBook`, `Open`, `Covered`, `AtPickup`, `EnRoute`, `AtDelivery`, `Delivered`, `Completed`, `Invoiced`, `Cancelled`, `TONU` |
| `type` | enum LoadType | One of `Spot`, `Dedicated`, `Contract` |
| `equipment` | string | One of `DryVan`, `Flatbed`, `Reefer`, `Tanker`, `StepDeck`, `Other`, `null` |
| `customer` | PublicLoadCustomer |  |
| `customer.id` | string (uuid) |  |
| `customer.name` | string |  |
| `dispatcherName` | string |  |
| `assignment` | PublicLoadAssignment |  |
| `assignment.mode` | enum AssignmentMode | One of `None`, `Driver`, `Carrier` |
| `assignment.driverNames` | string[] |  |
| `assignment.truck` | string |  |
| `assignment.trailer` | string |  |
| `assignment.carrierName` | string |  |
| `rowVersion` | integer |  |
| `stops` | PublicLoadStop[] |  |
| `stops[].id` | string (uuid) |  |
| `stops[].order` | integer |  |
| `stops[].type` | enum StopType | One of `Shipper`, `Consignee` |
| `stops[].facilityName` | string |  |
| `stops[].scheduledDate` | string (date-time) |  |
| `stops[].scheduledLocal` | string |  |
| `stops[].timeZoneId` | string |  |
| `stops[].appointmentConfirmed` | boolean |  |
| `stops[].commodity` | string |  |
| `stops[].quantity` | integer |  |
| `stops[].weightLbs` | number |  |
| `stops[].referenceNumber` | string |  |
| `stops[].notes` | string |  |
| `stops[].arrivedAt` | string (date-time) |  |
| `stops[].departedAt` | string (date-time) |  |
| `createdAt` | string (date-time) |  |
| `updatedAt` | string (date-time) |  |
| `isSample` | boolean |  |
| `notes` | PublicLoadNote[] |  |
| `notes[].id` | string (uuid) |  |
| `notes[].createdAt` | string (date-time) |  |
| `notes[].by` | string |  |
| `notes[].text` | string |  |
| `rate` | number |  |
| `finalRate` | number |  |
| `otherCharges` | PublicLoadCharge[] |  |
| `otherCharges[].id` | string (uuid) |  |
| `otherCharges[].type` | string |  |
| `otherCharges[].description` | string |  |
| `otherCharges[].amount` | number |  |
| `autoCharges` | PublicLoadCharge[] |  |
| `autoCharges[].id` | string (uuid) |  |
| `autoCharges[].type` | string |  |
| `autoCharges[].description` | string |  |
| `autoCharges[].amount` | number |  |

Errors are RFC 7807 problem details; see [Errors](/docs/tms/concepts/errors/).

**Example request**

**curl**

```bash
curl -X PUT "https://tms-api.techvia.software/api/public/v1/loads/$ID/stops/$STOP_ID/departure" \
  -H "Authorization: Bearer $TMS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "at": "2026-12-01T11:30:00"
  }'
```

**JavaScript**

```js
const id = '...'; // from a list or read call
const stopId = '...'; // from a list or read call
const res = await fetch(`https://tms-api.techvia.software/api/public/v1/loads/${id}/stops/${stopId}/departure`, {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.TMS_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "at": "2026-12-01T11:30:00"
  }),
});
if (!res.ok) throw new Error(await res.text());
console.log(await res.json());
```

**Python**

```python

id = "..."  # from a list or read call
stopId = "..."  # from a list or read call
res = requests.request(
    "PUT",
    f"https://tms-api.techvia.software/api/public/v1/loads/{id}/stops/{stopId}/departure",
    headers={"Authorization": f"Bearer {os.environ['TMS_KEY']}"},
    json={
      "at": "2026-12-01T11:30:00"
    },
)
res.raise_for_status()
print(res.json())
```

**Example response** `200`

```json
{
  "id": "01a20943-75ec-7d91-9309-8c400cddd516",
  "loadNumber": "LD-2026-000123",
  "workOrderNumber": "WO-4471",
  "status": "Covered",
  "type": "Spot",
  "equipment": "Reefer",
  "customer": {
    "id": "01a20943-75ec-78ad-9764-7a1d1cc95684",
    "name": "Acme Foods"
  },
  "dispatcherName": "Dana Ruiz",
  "assignment": {
    "mode": "Driver",
    "driverNames": [
      "Sam Lee"
    ],
    "truck": "T-101",
    "trailer": "R-22",
    "carrierName": null
  },
  "rowVersion": 826,
  "stops": [
    {
      "id": "01a20943-7611-7d01-9309-8c400cddd601",
      "order": 1,
      "type": "Shipper",
      "facilityName": "Acme DC Dallas",
      "scheduledDate": "2026-12-01T15:00:00+00:00",
      "scheduledLocal": "2026-12-01T09:00:00-06:00",
      "timeZoneId": "America/Chicago",
      "appointmentConfirmed": true,
      "commodity": "Produce",
      "quantity": 22,
      "weightLbs": 38000,
      "referenceNumber": "PO-88123",
      "notes": "Check in at gate 4",
      "arrivedAt": "2026-12-01T15:05:00+00:00",
      "departedAt": "2026-12-01T17:30:00+00:00"
    },
    {
      "id": "01a20943-7611-7d01-9309-8c400cddd602",
      "order": 2,
      "type": "Consignee",
      "facilityName": "FreshMart Phoenix",
      "scheduledDate": "2026-12-02T16:00:00+00:00",
      "scheduledLocal": "2026-12-02T09:00:00-07:00",
      "timeZoneId": "America/Phoenix",
      "appointmentConfirmed": false,
      "commodity": null,
      "quantity": null,
      "weightLbs": null,
      "referenceNumber": null,
      "notes": null,
      "arrivedAt": null,
      "departedAt": null
    }
  ],
  "createdAt": "2026-11-23T16:35:45.886322+00:00",
  "updatedAt": "2026-12-01T17:40:12.204118+00:00",
  "isSample": false,
  "notes": [
    {
      "id": "01a20943-7700-7a00-9309-8c400cddd700",
      "createdAt": "2026-12-01T16:10:00+00:00",
      "by": "API key: Claude",
      "text": "Driver called: 30 min late"
    }
  ]
}
```

<p class="ep-caption">Illustrative values. <code>departedAt</code> is UTC (11:30 in Chicago). With <code>billing.read</code> or <code>loads.rates</code> also the billing fields, detention in <code>autoCharges</code>.</p>
