The WeShipYou API is organized around REST. It has predictable, resource-oriented URLs, accepts JSON request bodies, returns JSON responses and uses standard HTTP status codes and verbs.
Test and live
Try your integration against the Sandbox server (sandbox.weshipyou.com) first: nothing you do there reaches a real carrier or moves real money. The Live server (weshipyou.com) is real: labels bought there are charged to your wallet.
The API works on one object per request; there are no bulk updates.
OpenAPI
This reference is generated from an OpenAPI 3.1 document. Download it from /docs/api/openapi.json and import it into Postman or any OpenAPI tool.
Cross-origin requests
The API supports CORS for every origin, so you can call it from a browser. Never put an access token in code that other people can read.
Authentication
The API authenticates every request with a JSON Web Token (JWT). There are no API keys.
- Call
POST /authenticationwith your WeShipYou username (or email) and password. If two-factor authentication is on for your user, also send the current 6-digit code from your authenticator app astwoFactorToken. - Send the
accessTokenyou receive on every other request, in the headerAuthorization: Bearer <accessToken>. - The token expires at
exp(a Unix timestamp in the response). Log in again to get a new one.
A request without a valid token answers 401 NotAuthenticated. A request for an account you are not a member of answers 403 Forbidden or 404 NotFound.
- JWT
- HTTP bearer · JWT
The access token from
POST /authentication(valid until itsexp), sent asAuthorization: Bearer <accessToken>.Send it as Authorization: Bearer <token>