A store for tests
The plan belongs to the account, so the API works in every store of an account whose plan includes it, the free trial too. A token sees only the store it was issued in: the integration moves between the development and the production store by changing the token, and the address of the API stays the same.
Set it up
- In your Saleya account, create another store, for example
Acme (dev), and set it up like the production store — country, currency, time zone — so that money and dates behave the same. - Add a few categories, products and a location, or create them through the API itself.
- In the new store, open Settings → API and webhooks, create an app with the same scopes as in production and issue a token.
- Call
GET /storewith the new token and check the name: requests now go to the development store.
What is real in it
A development store is a real store without customers:
- its orders, payments and invoices are real documents of that store — do not connect the payment and tax accounts of the business to it;
- its team gets the notifications of its orders, like in any store;
- its requests count against its own limits, not those of the production store;
- webhooks need a public
httpsaddress: point them to a tunnel to your machine, becauselocalhostand private addresses are rejected.
When the tests are over, delete the store in the account: its apps and tokens stop working with it.