Environments

Note on Environments

Several suppliers run two environments, production and sandbox. PSRESTful uses the same API for both.

The values for the environments are:

  • PROD for production
  • STAGING for sandbox

For purchase orders (POST /v1.0.0/suppliers/{SUPPLIER_CODE}/purchase-orders/), set 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 value is case sensitive. If no environment is provided, PROD is the default.

⚠️

The PROD default applies to purchase orders too. A purchase order sent without "environment": "STAGING" goes to the supplier’s production service as a real order. Always send STAGING while you test.