Skip to content
gist.link ↗

cartCreate

Mutation Shop API — POST https://shop.api.gist.link/graphql

Create a new empty cart for a store. PUBLIC.

shop:mutation:cartCreate

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

type Mutation {
cartCreate(storeId: String!, currency: String): Cart!
}
Argument Type Required Description
storeId String! Yes —
currency String No —

Cart! — see the Shop types reference.

Terminal window
curl https://shop.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "mutation CartCreate($storeId: String!, $currency: String) { cartCreate(storeId: $storeId, currency: $currency) { id uuid currency created_at updated_at } }",
"variables": {
"storeId": "example",
"currency": "example"
}
}
JSON