Sandbox
Try any operation from its block with Try it: the answer is built in your browser from the documented examples, and nothing reaches BIRP.
Version v1.3, updated
Every operation block of the resource pages has a Try it button. It opens a panel where you build a request, see its code in four languages and send it. The answer is what the API would send, built in your browser from the examples of this documentation.
What the sandbox answers
A valid request gets the documented success response, with the fields you changed in it. Ids and times are made up for the answer; totals and VAT stay those of the example.
A request the contract refuses gets 422
validation_failed, with each field and its problem inerrors, as the API writes them.The documented errors come back too: 401 without the key, 404 for an id the examples do not have, and 422 for a write without
Idempotency-Key.Sending again with the same
Idempotency-Keyreturns the first answer withIdempotency-Replayed: true, as the API does.
The answer carries the headers of the API: X-Request-Id, the rate limit headers, and Location after a create.
What it never does
It sends nothing to BIRP. The first press of Try it loads the panel and the OpenAPI file of this version; after that, no request leaves your browser.
It keeps nothing. A product created in the sandbox does not exist in your next request, and closing the page forgets every request.
It checks no rule that needs the data of a company, such as a SKU already taken, the stock of a warehouse or the tax rules of a country.
Note. The sandbox needs no key: its Authorization header holds a fixed value that works only there. Never paste a real key into a web page.
From the sandbox to a real request
Build the request in the panel until the answer is the one you expect.
Copy the code of your language from the panel. It reads the key from the
BIRP_API_KEYenvironment variable.Create a key with the scopes the operation needs. See Create your first key.
Set
BIRP_API_KEYon the server that calls the API, then run the code.
Warning. A real write acts on the data of your company. An issued invoice takes a real number from your series and never changes again through the API.
Related
- first-key
- first-request
- scopes
- test-key-not-supported