Grants read their own orders
What changed
- A build grant reads its own orders.
GET /v1/orders/:idwith a build grant used to answer403. It now returns the order when a build grant from your application built it for that same person, in the same environment. Any other order is a404, the same answer as an order that does not exist. See GET /v1/orders/:id. - whoami lists each scope once. With your application secret,
GET /v1/whoamireturnedorder_statusbesideorder:status.scopesis now["order:preview", "order:build", "order:status", "places"]. See GET /v1/whoami. - A fired test webhook names its order.
POST /v1/sandbox/webhooks/firewith anorderIdsends that sandbox order's real id, store, item count and total, still with"test": true. The response now carriesorder: the id, state and store the event described. See Fire a test webhook. - How long a build takes. The Carts page now gives typical build times and how to poll: every 2 to 3 seconds, and stop holding the person after about 4 minutes. See How long a build takes.
Why it matters
Code that builds and confirms with a build grant can now follow the order with that same grant, instead of switching to your application secret.
What to do
Nothing is required. To follow an order, call GET /v1/orders/:id with the build grant that built it.
Breaking changes
None. If your code looked for the bare order_status string in scopes, look for order:status instead.