Skip to main content

shippingPrice

Overview

Get the shipping price for a destination city. Useful during checkout to estimate delivery cost.

  • Type: GraphQL Query
  • Endpoint: https://subdomain.com
  • Authentication: Authorization: Bearer <TOKEN> (if required by your setup)

Query

query GetShippingPrice($city: ID!) {
getShippingPrice(city: $city) {
success
message
data {
price
}
}
}

Variables

{
"city": "<CITY_ID>"
}

Examples

curl -X POST \
https://subdomain.com\
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
--data-binary @- << 'EOF'
{
"query": "query GetShippingPrice($city: ID!) { getShippingPrice(city: $city) { success message data { price } } }",
"variables": { "city": "<CITY_ID>" }
}
EOF

Notes

  • Replace <CITY_ID> with a valid destination city ID.
  • If your checkout flow requires additional context (e.g., weight, courier), ensure the backend uses defaults or add a mutation that sets those before this query.