Skip to content
gist.link ↗

createShipment

Mutation Shipping API — POST https://shipping.api.gist.link/graphql

Persist a shipment and fetch rates from every eligible carrier.

shipping:mutation:createShipment

The calling IAM key must hold this permission (or a wildcard that covers it: shipping:mutation:* or shipping:*) and the access token must have been minted with audience=shipping. See Permissions.

type Mutation {
createShipment(input: CreateShipmentInput!): Shipment!
}
Argument Type Required Description
input CreateShipmentInput! Yes —

Shipment! — see the Shipping types reference.

Terminal window
curl https://shipping.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation CreateShipment($input: CreateShipmentInput!) { createShipment(input: $input) { uuid sourceApp sourceRef status createdAt } }",
"variables": {
"input": {
"fromLocationUuid": "01a01234-abcd-7000-9000-0123456789ab",
"from": {
"line1": "example",
"city": "example",
"country": "example"
},
"toCrmAddressUuid": "01a01234-abcd-7000-9000-0123456789ab"
}
}
}
JSON