> For the complete documentation index, see [llms.txt](https://docs.shipide.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shipide.com/shipments.md).

# Shipments

## List shipments

> Requires the shipments:read scope.

```json
{"openapi":"3.1.0","info":{"title":"Shipide API","version":"1.0.0"},"servers":[{"url":"https://portal.shipide.com/api/v1"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"shipide_test_... or shipide_live_...","description":"Create scoped API keys in Portal > Account > Developer."}},"schemas":{"Shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":200},"from":{"$ref":"#/components/schemas/Address"},"to":{"$ref":"#/components/schemas/Address"},"parcel":{"$ref":"#/components/schemas/Parcel"},"order_id":{"type":"string","description":"Opaque Shipide resource ID."},"metadata":{"type":"object","additionalProperties":true,"description":"Maximum 4096 characters when serialized."},"id":{"type":"string","description":"Opaque Shipide resource ID."},"object":{"const":"shipment"},"status":{"enum":["draft","label_created","voided"]},"livemode":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"label_id":{"type":"string","description":"Opaque Shipide resource ID."},"tracking_number":{"type":"string"}},"required":["id","object","reference","from","to","parcel","status","livemode","created_at"]},"Address":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"company":{"type":"string","minLength":1,"maxLength":200},"street1":{"type":"string","minLength":1,"maxLength":200},"street2":{"type":"string","minLength":1,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":200},"state":{"type":"string","minLength":1,"maxLength":200},"postal_code":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","minLength":1,"maxLength":200}},"required":["name","street1","city","postal_code","country"],"additionalProperties":false},"Parcel":{"type":"object","properties":{"weight_kg":{"type":"number","exclusiveMinimum":0,"maximum":1000},"length_cm":{"type":"number","exclusiveMinimum":0,"maximum":1000},"width_cm":{"type":"number","exclusiveMinimum":0,"maximum":1000},"height_cm":{"type":"number","exclusiveMinimum":0,"maximum":1000}},"required":["weight_kg","length_cm","width_cm","height_cm"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","request_id"]}},"required":["error"]}}},"paths":{"/shipments":{"get":{"operationId":"listShipments","summary":"List shipments","description":"Requires the shipments:read scope.","tags":["shipments"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"after","in":"query","description":"Use next_cursor from the previous page. ID order, not chronological order.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}},"Idempotency-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"Present when returning a stored response."}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Shipment"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}}}},"400":{"description":"400 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"401 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"403 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"404 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"409 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"413 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"415 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"422 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"429 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"500 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"503 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Create shipment

> Requires the shipments:write scope.

```json
{"openapi":"3.1.0","info":{"title":"Shipide API","version":"1.0.0"},"servers":[{"url":"https://portal.shipide.com/api/v1"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"shipide_test_... or shipide_live_...","description":"Create scoped API keys in Portal > Account > Developer."}},"schemas":{"Shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":200},"from":{"$ref":"#/components/schemas/Address"},"to":{"$ref":"#/components/schemas/Address"},"parcel":{"$ref":"#/components/schemas/Parcel"},"order_id":{"type":"string","description":"Opaque Shipide resource ID."},"metadata":{"type":"object","additionalProperties":true,"description":"Maximum 4096 characters when serialized."},"id":{"type":"string","description":"Opaque Shipide resource ID."},"object":{"const":"shipment"},"status":{"enum":["draft","label_created","voided"]},"livemode":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"label_id":{"type":"string","description":"Opaque Shipide resource ID."},"tracking_number":{"type":"string"}},"required":["id","object","reference","from","to","parcel","status","livemode","created_at"]},"Address":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"company":{"type":"string","minLength":1,"maxLength":200},"street1":{"type":"string","minLength":1,"maxLength":200},"street2":{"type":"string","minLength":1,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":200},"state":{"type":"string","minLength":1,"maxLength":200},"postal_code":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","minLength":1,"maxLength":200}},"required":["name","street1","city","postal_code","country"],"additionalProperties":false},"Parcel":{"type":"object","properties":{"weight_kg":{"type":"number","exclusiveMinimum":0,"maximum":1000},"length_cm":{"type":"number","exclusiveMinimum":0,"maximum":1000},"width_cm":{"type":"number","exclusiveMinimum":0,"maximum":1000},"height_cm":{"type":"number","exclusiveMinimum":0,"maximum":1000}},"required":["weight_kg","length_cm","width_cm","height_cm"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","request_id"]}},"required":["error"]},"ShipmentInput":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":200},"from":{"$ref":"#/components/schemas/Address"},"to":{"$ref":"#/components/schemas/Address"},"parcel":{"$ref":"#/components/schemas/Parcel"},"order_id":{"type":"string","description":"Opaque Shipide resource ID."},"metadata":{"type":"object","additionalProperties":true,"description":"Maximum 4096 characters when serialized."}},"required":["reference","from","to","parcel"],"additionalProperties":false}}},"paths":{"/shipments":{"post":{"operationId":"createShipment","summary":"Create shipment","description":"Requires the shipments:write scope.","tags":["shipments"],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Persist a unique key per logical operation. Retry the identical request with the same key. Successful keys do not currently expire.","schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"201":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}},"Idempotency-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"Present when returning a stored response."}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Shipment"}},"required":["data"]}}}},"400":{"description":"400 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"401 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"403 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"404 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"409 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"413 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"415 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"422 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"429 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"500 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"503 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentInput"}}}}}}}}
```

## Retrieve shipment

> Requires the shipments:read scope.

```json
{"openapi":"3.1.0","info":{"title":"Shipide API","version":"1.0.0"},"servers":[{"url":"https://portal.shipide.com/api/v1"}],"security":[{"ApiKey":[]}],"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"shipide_test_... or shipide_live_...","description":"Create scoped API keys in Portal > Account > Developer."}},"schemas":{"Shipment":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":200},"from":{"$ref":"#/components/schemas/Address"},"to":{"$ref":"#/components/schemas/Address"},"parcel":{"$ref":"#/components/schemas/Parcel"},"order_id":{"type":"string","description":"Opaque Shipide resource ID."},"metadata":{"type":"object","additionalProperties":true,"description":"Maximum 4096 characters when serialized."},"id":{"type":"string","description":"Opaque Shipide resource ID."},"object":{"const":"shipment"},"status":{"enum":["draft","label_created","voided"]},"livemode":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"label_id":{"type":"string","description":"Opaque Shipide resource ID."},"tracking_number":{"type":"string"}},"required":["id","object","reference","from","to","parcel","status","livemode","created_at"]},"Address":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"company":{"type":"string","minLength":1,"maxLength":200},"street1":{"type":"string","minLength":1,"maxLength":200},"street2":{"type":"string","minLength":1,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":200},"state":{"type":"string","minLength":1,"maxLength":200},"postal_code":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2},"email":{"type":"string","minLength":1,"maxLength":200},"phone":{"type":"string","minLength":1,"maxLength":200}},"required":["name","street1","city","postal_code","country"],"additionalProperties":false},"Parcel":{"type":"object","properties":{"weight_kg":{"type":"number","exclusiveMinimum":0,"maximum":1000},"length_cm":{"type":"number","exclusiveMinimum":0,"maximum":1000},"width_cm":{"type":"number","exclusiveMinimum":0,"maximum":1000},"height_cm":{"type":"number","exclusiveMinimum":0,"maximum":1000}},"required":["weight_kg","length_cm","width_cm","height_cm"],"additionalProperties":false},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","request_id"]}},"required":["error"]}}},"paths":{"/shipments/{id}":{"get":{"operationId":"getShipment","summary":"Retrieve shipment","description":"Requires the shipments:read scope.","tags":["shipments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Opaque Shipide resource ID."}}],"responses":{"200":{"description":"Success","headers":{"X-Request-Id":{"schema":{"type":"string"}},"Idempotency-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"Present when returning a stored response."}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Shipment"}},"required":["data"]}}}},"400":{"description":"400 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"401 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"403 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"404 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"409 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"413 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"415 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"422 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"429 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"500 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"503 API error; inspect error.code and error.message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.shipide.com/shipments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
