tanqoryExtWebhookDeliveryAttempt
- Query
- Apps and platform
One attempt of one of the caller's webhooks (to read its body); null when it is not one, is gone, or the switch is off.
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
id | ID! | Required |
Returns
TanqoryExtWebhookDeliveryAttempt One attempt to send a webhook, or one test send.
| Field | Type | Description |
|---|---|---|
attempt | Int! | 1 for the first attempt of a delivery, 2 for its first retry, and so on; 1 for a test. |
body | String | The body as the webhook sends it from the same event (what its creator may see, its fields and format), or the sample a test sent. Null when the event is no longer kept or the webhook may not send it now. |
createdAt | DateTime! | |
durationMs | Int | How long the request took, in milliseconds; null when nothing was sent. |
error | String | Why it failed or was not sent, in short; null when delivered. |
eventId | String | The X-Tanqory-Event-Id of the event it carried; null for a test sent with the sample body. |
id | ID! | |
nextRetryAt | DateTime | When the next attempt is due (outcome RETRYING). |
outcome | TanqoryExtWebhookAttemptOutcome! | |
responseStatusCode | Int | The HTTP status the endpoint answered; null when it did not answer (timeout, refused address) or nothing was sent. |
test | Boolean! | Whether it was a test send (X-Tanqory-Test: true). |
webhookId | String! | The X-Tanqory-Webhook-Id it was sent with: the delivery's id (the same for every retry), or the test's own. |
Example request
A starting point: required arguments as variables and a few fields of the result. Replace the placeholders.
Set STORE_ID and TANQORY_ACCESS_TOKEN in your environment first (Make your first API call).
curl -X POST "https://api.tanqory.com/admin/2026-10/stores/$STORE_ID/graphql" \
-H "Authorization: Bearer $TANQORY_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
--data '{"query":"query TanqoryExtWebhookDeliveryAttempt($id: ID!) {\n tanqoryExtWebhookDeliveryAttempt(id: $id) {\n attempt\n body\n createdAt\n durationMs\n error\n eventId\n id\n nextRetryAt\n outcome\n responseStatusCode\n }\n}","variables":{"id":"gid://tanqory/Type/id"}}'// Node.js 18 or later (fetch is built in). Save as request.mjs and run: node request.mjs
const query = `query TanqoryExtWebhookDeliveryAttempt(\$id: ID!) {
tanqoryExtWebhookDeliveryAttempt(id: \$id) {
attempt
body
createdAt
durationMs
error
eventId
id
nextRetryAt
outcome
responseStatusCode
}
}`;
const variables = {
"id": "gid://tanqory/Type/id"
};
const res = await fetch(`https://api.tanqory.com/admin/2026-10/stores/${process.env.STORE_ID}/graphql`, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.TANQORY_ACCESS_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({ query, variables }),
});
console.log(res.status, JSON.stringify(await res.json(), null, 2));# Python 3, standard library only. Save as request.py and run: python3 request.py
import json, os, urllib.request
query = """query TanqoryExtWebhookDeliveryAttempt($id: ID!) {
tanqoryExtWebhookDeliveryAttempt(id: $id) {
attempt
body
createdAt
durationMs
error
eventId
id
nextRetryAt
outcome
responseStatusCode
}
}"""
variables = json.loads("""{
"id": "gid://tanqory/Type/id"
}""")
req = urllib.request.Request(
"https://api.tanqory.com/admin/2026-10/stores/" + os.environ["STORE_ID"] + "/graphql",
data=json.dumps({"query": query, "variables": variables}).encode(),
headers={
"Authorization": "Bearer " + os.environ["TANQORY_ACCESS_TOKEN"],
"Content-Type": "application/json",
},
)
with urllib.request.urlopen(req) as res:
print(res.status, json.dumps(json.load(res), indent=2))