How do API keys and webhooks work in priceq?
Updated
Team and account, 9 articles
Both live in Settings and both are meant for a developer. An API key lets your own system fetch your products, links and prices, and push your catalogue in. A webhook works the other way round: priceq calls an address of yours when something happens. The full technical reference is at /developers.
API keys
Only an admin sees the API keys section. To make a key:
- Type what the key is for in the name field.
- Click Create key.
- Copy the key straight away. The box says Copy this key now, because we cannot show it again: priceq keeps only a scrambled version of it.
A key gives access to data, not to administration. It cannot cancel your subscription, run the full data export or create more keys. Your organisation can have up to 10 active keys at once.
Each key appears in the list by its first characters, with the date it was created and the last time it was used. Click Revoke to switch a key off. From that moment every call with that key is refused, and the key disappears from the list. A lost key cannot be recovered: revoke it and create a new one.
Webhooks
Everyone can see the Webhooks section, but adding, pausing or deleting a webhook takes the Supervisor or Admin role. See Roles and what they can do.
Click Add webhook, fill in the Endpoint URL and pick at least one event under Send on. The address must start with https:// and be reachable from the internet. Then click Create.
You can send on these events:
- Alert triggered
- Product added
- Product archived
- MSRP changed
- Scan completed
- Catalogue sync finished
After you create the webhook, priceq shows its signing secret once. Copy it right away. Your system uses it to check that a call really comes from priceq; /developers explains how.
When a delivery fails
Each row ends in a menu with Pause, Resume, Delete and the delivery log. Each delivery there reads queued, succeeded or given up.
When your server is down, too slow or returns a server error, priceq tries again: five attempts in total, spread over about twenty minutes. When your server answers with a client error such as 404, priceq stops at once, because trying again would give the same answer.
Which alerts can trigger a webhook is explained in What triggers each alert.
Cannot find it? Mail us. We answer ourselves, then write the article. [email protected]