Skip to main content
POST
TypeScript

Autorisationer

Authorization
string
header
påkrævet

An Account API key, an App API key, an account access token, an account-scoped user token, or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

Scopes

shipment:create

Overskrifter

Idempotency-Key
string

A unique key that makes this request safe to retry. See Idempotent requests.

Maximum string length: 255
Eksempel:

"d9105228-4a08-46b1-8b91-42fed586d383"

Api-Version-Date
string

Pins the request to a dated API version.

Eksempel:

"2026-11-17"

Krop

application/json
payment_id
string
påkrævet

The payment to attach the shipment to, prefixed pay_.

Eksempel:

"pay_xxxxxxxxxxxxxx"

tracking_number
string
påkrævet

The carrier-assigned tracking number.

Eksempel:

"1Z999AA10123456784"

account_id
string

The unique identifier of the account, prefixed biz_.

Eksempel:

"biz_xxxxxxxxxxxxxx"

Svar

shipment created

account_id
string
påkrævet

The account that owns this shipment, prefixed biz_.

Eksempel:

"biz_xxxxxxxxxxxxxx"

carrier
string | null
påkrævet

The shipping carrier detected for this shipment. Null until a tracking update identifies it.

Eksempel:

"ups"

checkpoints
object[]
påkrævet
created_at
string
påkrævet

The datetime the shipment was created (ISO 8601).

Eksempel:

"2026-01-01T12:00:00.000Z"

id
string
påkrævet

Shipment ID, prefixed ship_.

Eksempel:

"ship_xxxxxxxxxxxxxx"

payment_id
string
påkrævet

The payment this shipment fulfills, prefixed pay_.

Eksempel:

"pay_xxxxxxxxxxxxxx"

status
enum<string>
påkrævet

The current delivery status of this shipment.

Tilgængelige muligheder:
unknown,
pre_transit,
in_transit,
out_for_delivery,
delivered,
available_for_pickup,
return_to_sender,
failure,
cancelled,
error
Eksempel:

"in_transit"

tracking_number
string
påkrævet

The carrier-assigned tracking number used to look up shipment progress.

Eksempel:

"1Z999AA10123456784"

tracking_url
string
påkrævet

A customer-facing URL to track this shipment's progress.

Eksempel:

"https://track.aftership.com/xxxxxxxxxxxxxxxxxx"

updated_at
string
påkrævet

The datetime the shipment was last updated (ISO 8601).

Eksempel:

"2026-01-01T12:00:00.000Z"