Skip to main content
POST
TypeScript

Yetkilendirmeler

Authorization
string
header
gerekli

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

Başlıklar

Idempotency-Key
string

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

Maximum string length: 255
Örnek:

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

Api-Version-Date
string

Pins the request to a dated API version.

Örnek:

"2026-11-17"

Gövde

application/json
payment_id
string
gerekli

The payment to attach the shipment to, prefixed pay_.

Örnek:

"pay_xxxxxxxxxxxxxx"

tracking_number
string
gerekli

The carrier-assigned tracking number.

Örnek:

"1Z999AA10123456784"

account_id
string

The unique identifier of the account, prefixed biz_.

Örnek:

"biz_xxxxxxxxxxxxxx"

Yanıt

shipment created

account_id
string
gerekli

The account that owns this shipment, prefixed biz_.

Örnek:

"biz_xxxxxxxxxxxxxx"

carrier
string | null
gerekli

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

Örnek:

"ups"

checkpoints
object[]
gerekli
created_at
string
gerekli

The datetime the shipment was created (ISO 8601).

Örnek:

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

id
string
gerekli

Shipment ID, prefixed ship_.

Örnek:

"ship_xxxxxxxxxxxxxx"

payment_id
string
gerekli

The payment this shipment fulfills, prefixed pay_.

Örnek:

"pay_xxxxxxxxxxxxxx"

status
enum<string>
gerekli

The current delivery status of this shipment.

Mevcut seçenekler:
unknown,
pre_transit,
in_transit,
out_for_delivery,
delivered,
available_for_pickup,
return_to_sender,
failure,
cancelled,
error
Örnek:

"in_transit"

tracking_number
string
gerekli

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

Örnek:

"1Z999AA10123456784"

tracking_url
string
gerekli

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

Örnek:

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

updated_at
string
gerekli

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

Örnek:

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