Skip to content
gist.link ↗

invoiceShippingSuggestion

Query Pay API — POST https://pay.api.gist.link/graphql

Suggested ship-to for an invoice: its stored shipping address, else the customer’s CRM contact default shipping address, else its CRM company’s (CRM is the suite’s only address book). Best-effort; null when nothing usable. Any org member.

pay:query:invoiceShippingSuggestion

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

type Query {
invoiceShippingSuggestion(invoiceId: String!): ShippingAddress
}
Argument Type Required Description
invoiceId String! Yes —

ShippingAddress — see the Pay types reference.

Terminal window
curl https://pay.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query InvoiceShippingSuggestion($invoiceId: String!) { invoiceShippingSuggestion(invoiceId: $invoiceId) { name company line1 line2 city region postalCode country } }",
"variables": {
"invoiceId": "example"
}
}
JSON