Upgrade to ChromeUpgrade to FirefoxUpgrade to Internet ExplorerUpgrade to Safari

API Documentation

This page contains information on all the API endpoints for Pwinty. If anything isn't clear- please just get in touch and we'll help out

URLs

All testing and development should be done against the sandbox API . This is an environment where you can create, and submit orders without incurring any costs

Sandbox API URL:

https://sandbox.pwinty.com/v2.2

Live API URL:

https://api.pwinty.com/v2.2

General Notes

Request format

Requests should be made using either JSON or HTTP form data.
The Content-type header should be set accordingly to either Content-type: application/json or application/x-www-form-urlencoded

Response Format

Please note that responses are formatted according to the accept http header. At present, we recommend that you supply an value of accept: application/json at this time. We can and do provide responses in XML but the schema isn't presently stable.

HTTPS only

All request should be made over HTTPS. Connections cannot be made via HTTP. Please note that support for SSL 3.0 has been disabled owing to the POODLE vulnerability. We recommend using TLS 1.0 or better.

Error Handling

Errors are returned using standard HTTP status codes. Pwinty will return an empty version of the expected item, with an errorMessage parameter (this makes deserialization easier in some languages).

Standard API errors

Code Description
400 Bad or missing input parameter- see error for more details
403 Forbidden. The request is not valid for the resource in its current state
404 Resource not found

Error code format

All errors (hopefully!) should come back with a standard JSON object in the response, containing an error message. For example if you make a call to /v2.2/Catalogue

{
    "errorMessage": "This is a sample error message",
    "country":null,
    "countryCode": null,
    "items": null,
    "qualityLevel": null,
    "shippingRates": null
}      
         

Authentication

Pwinty uses custom HTTP headers for Authentication

Header Description
X-Pwinty-MerchantId Your MerchantId- you received this when signing up
X-Pwinty-REST-API-Key Your API key- again you received this when signing up

All requests should include these two HTTP headers