-
Notifications
You must be signed in to change notification settings - Fork 5
Draft improvements from assistant conversations: shipment vs. container field placement #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -115,11 +115,20 @@ For events that do include the related records, the fields most integrations pul | |||||
| | --- | --- | | ||||||
| | Event timestamp | Object with `type: "transport_event"` → `attributes.timestamp` | | ||||||
| | Estimated timestamp (ETA events) | Object with `type: "estimated_event"` or `type: "transport_event"` → `attributes.timestamp` (or `attributes.estimated_timestamp` on legacy `estimated_event` payloads) | | ||||||
| | Container ID | Object with `type: "container"` → `id` | | ||||||
| | Container number | Object with `type: "container"` → `attributes.number` | | ||||||
| | `pod_full_out_at`, `pod_arrived_at`, `pod_discharged_at`, `empty_terminated_at`, `pickup_lfd`, `available_for_pickup` | Object with `type: "container"` → `attributes.<field>` | | ||||||
| | Shipment ID | Object with `type: "shipment"` → `id` | | ||||||
| | Bill of lading number | Object with `type: "shipment"` → `attributes.bill_of_lading_number` | | ||||||
| | Reference numbers (`ref_numbers`) | Object with `type: "shipment"` → `attributes.ref_numbers` | | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When webhook consumers use this extraction table, they will read
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: docs/api-docs/webhooks/payloads.mdx
Line: 123
Comment:
**Reference Numbers Read From Shipment**
When webhook consumers use this extraction table, they will read `ref_numbers` from the included shipment object. The schema places `ref_numbers` on container attributes, so integrations built from this row can miss reference numbers that are present on the container.
```suggestion
| Reference numbers (`ref_numbers`) | Object with `type: "container"` → `attributes.ref_numbers` |
```
How can I resolve this? If you propose a fix, please make it concise. |
||||||
| | `pod_eta_at`, `pod_original_eta_at`, `destination_eta_at`, `pod_ata_at` | Object with `type: "shipment"` → `attributes.<field>` | | ||||||
| | Voyage number | Object with `type: "transport_event"` → `attributes.voyage_number` | | ||||||
| | Location UN/LOCODE | Object with `type: "transport_event"` → `attributes.location_locode` | | ||||||
|
|
||||||
| <Tip> | ||||||
| ETA fields (`pod_eta_at`, `pod_original_eta_at`, `destination_eta_at`) and identifiers like `bill_of_lading_number` live on the **shipment**, not the container. If you only see container fields in a payload, look for the object with `type: "shipment"` in `included`. For a full mapping, see [Which object holds which field?](/api-docs/getting-started/list-shipments-and-containers#which-object-holds-which-field). | ||||||
| </Tip> | ||||||
|
|
||||||
| ## Container update changesets | ||||||
|
|
||||||
| For `container.updated` events, the event resource includes a `changeset` object. Each key is a changed field. The value is a two-item array: `[previous_value, current_value]`. | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a developer follows this row to fetch
ref_numbers, they will query the shipment endpoint even though the schema placesref_numberson container attributes. That leaves the documented lookup path returning no reference numbers for the field this table is meant to locate.Prompt To Fix With AI