Environments

Note on Environments

Even though suppliers allow two different environments(production and sandbox) we use the same api (opens in a new tab) to handle both environments.

The values for the environments are:

  • PROD for production
  • STAGING for sandbox

In the case of send_po(purchase-orders) we need to specify the environment in the request body.

{
  "environment": "STAGING",
  ...
}

For the rest of the endpoints we use a param in the query. For example:

Staging(sandbox)

https://api.psrestful.com/v2.0.0/suppliers/PCNA/sellable-products?environment=STAGING

Production

https://api.psrestful.com/v2.0.0/suppliers/PCNA/sellable-products?environment=PROD

NOTE: The environment param is case sensitive. If not environment is providec PROD is the default value.