Getting started

Get shipping fast with our API

Use the Shipwire API to deliver a world-class e-commerce experience customized to your business needs. Our technology lets you create flows which are both tightly integrated and highly automated.


With the Shipwire API you can:

Get started now by getting a sandbox Shipwire account!

The sandbox

You can start testing your Shipwire integration right away with our sandbox environment.


To use the sandbox, first register with Shipwire. Then, point your HTTP requests to the desired /api/v3/ endpoint using the sandbox path api.beta.shipwire.com (e.g. https://api.beta.shipwire.com/api/v3/orders). When you are ready to make your application available to your interface users, who may make password change requests, just change your application to point to the production host at api.shipwire.com. VoilĂ !


Requesting orders to the sandbox host

GET /api/v3/orders HTTP/1.1
Host: api.beta.shipwire.com
Authorization: Basic TG9vayBhdCB0aGF0OyBEdWNrcy4uLm9uIGEgbGFrZSEK


Requesting orders to the production host

GET /api/v3/orders HTTP/1.1
Host: api.shipwire.com
Authorization: Basic c3RlcGhlbi5tYWVkZXJAc2hpcHdpcmUuZ32tOnRlc3QK


Note: A Shipwire sandbox account created on beta.shipwire.com is completely separate from a Shipwire production account created on shipwire.com. Please see the table below:


Type Shipwire Account Login API URL
Production shipwire.com https://api.shipwire.com/
Sandbox beta.shipwire.com https://api.beta.shipwire.com/


Adding money to your sandbox account

Adding money to your sandbox account is useful if you would like to “ship” an order so you can test pulling a tracking number from the API, etc.

To do this, log in to your sandbox account and go to My Account > Add Money. Enter the dollar amount you would like to add, choose the Credit card payment option, and then enter the following Visa test card number: 4111111111111111 with any future expiration date and any 3 digit code for CCID.

Click “Apply Amount” and the amount will be added to your account and available for immediate use.

Note: If you only see the PayPal payment option, you will need to receive some inventory (virtually) at a Shipwire warehouse first. To do this, go to Inventory > Send Inventory, pick a Shipwire warehouse (not Shipwire Anywhere), and fill out the rest of the details to submit. “Send” a very small quantity of items – such as a quantity of 3 of one SKU. If you send too much, your account will not be eligible for paying by credit card. Once submitted, please click the “Mark as Received” button.

Authentication

Shipwire API authenticates clients using HTTP (Basic) access authentication. Under this scheme, the authorization string is generated with a base64-encoding of your Shipwire username:password string. This is your username, followed by a colon (:), followed by your password. To ensure your API connections aren’t tied to the same username accounts as your users, Shipwire recommends creating distinct API users.

To authenticate your API calls, just include your encoded string in the Authorization header. For example, to authenticate your request when accessing the /orders resource, send an HTTP message like the following:

GET /api/v3/orders HTTP/1.1
Host: api.beta.shipwire.com
Authorization: Basic TG9vayBhdCB0aGF0OyBEdWNrcy4uLm9uIGEgbGFrZSEK


If your request is authenticated by the server, it will reply with the appropriate data for the request you made. Otherwise, it will reply with a 403 Forbidden status.


Note: Shipwire’s API protects merchant and customer information by encrypting communication through SSL. As such, all Shipwire API endpoints use the HTTPS protocol.

Testing your connection

You can quickly test your connection using an HTTP client. In the following screenshot we use the Advanced REST Client App for Google Chrome to send a GET request to the /orders resource and test the authorization string with Shipwire. When successful, you will receive a 200 OK status message.

Getting help

If you run into trouble using Shipwire API, check the response messages for error descriptions and possible solutions.


Shipwire API relies on standard HTTP status codes:


Status Category Description
2xx Success The action was successfully received, understood, and accepted.
4xx Client Error The request contains bad syntax or cannot be fulfilled. This means there is a problem with the request. The problem must be resolved before re-submitting the request.
5xx Server Error The server failed to fulfill an apparently valid request. This means there is a temporary problem. The request should be re-submitted.


Note: Shipwire API uses status codes to indicate some kinds of errors (e.g. 401 and 403 for authentication issues), but many kinds of errors and warnings will be returned with 2xx status codes and the status of the request can be found in the response body. Be sure your application checks the response body in addition to the status code for all POST and PUT operations.


If you need additional assistance, visit our support page or contact us.

Forgot your password?