Getting started
The address of the API, your key, your webhook, and the checklist from the first slip to an invoice.
The address of the API
| Environment | Address |
|---|---|
| Staging | https://api-stg.grailnetwork.com |
Staging is the test environment. Its cards and money are not real. See Testing.
1. Get your key
Grail Network's staff make your partner and its API key, and give you the key once. Every request carries it. See Authentication.
2. Read your partner record
GET /partner/me{
"data": {
"id": "019a8b00-1111-7222-8333-444455556666",
"name": "Card Vault",
"code": "CVT",
"webhookUrl": null,
"takeBackNoticeHours": 72,
"priceAdjustment": { "min": "-0.10", "max": "0.10" }
}
}codeis the first part of each of your slip codes.takeBackNoticeHoursis the notice of a take-back. See Take-backs.priceAdjustmentis the range of the price adjustment. See Prices.
3. Set your webhook
PUT /partner/webhook{ "url": "https://partner.example/webhooks/grail" }The answer holds your webhook secret once, when you had none:
{
"data": {
"url": "https://partner.example/webhooks/grail",
"secretMadeAt": "2026-11-25T10:00:00.000Z",
"secret": "whsec_..."
}
}- The address must be
https://, with at most 2,000 characters, and must name a public host. GET /partner/webhookreads the address. It never shows the secret again.POST /partner/webhook/secretmakes a new secret, and shows it once. The old secret stops at once.PUT /partner/webhookwith{ "url": null }removes the address and the secret. Grail Network then sends you no webhook.
See Webhooks.
The checklist
- Make a reference for a submission, with its check character. Print the slip code on the slip. See The slip's check character and Slips and parcels.
- Send the parcel to Grail Network's warehouse.
- Wait for the webhook
intake.ended. Read the result of the intake and its cards. See Intakes. - Set a price adjustment on each card. A card with a market price and an adjustment goes on sale. See Prices.
- Follow each card's state. See Items.
- Read your report lines after your last cursor, and credit each line once. See Report lines and statements.
- Check each closed day with its statement. See Money.