This article describes how to use the Shipments API v1.0 in OrderCup. 


In order to access the Shipments API, you will need an API token, which can be generated from your OrderCup Account as follows:


Get API Token


Generate the API token, which needs to be sent with each request to the shipments API endpoint


1. Log into OrderCup account



2. Go to Settings ⇒ Accounts ⇒ API Token & click Request Token button






3. Once you click “Request Token” button, you should see a token generated similar to the one shown below.




4 Use this token for all future requests to the Shipments API Endpoints & send it in the Authorization Header parameter as specified below


5. If you have already generated the token and want to update that for any reason,, just click the Update Token button again,


API Token with each Request


The API Token needs to be sent as a Authorization Header in each request, an example curl request is as follows

curl -X GET "https://ship.ordercup.com/api/v1/shipments?store_id=12" -H "accept: application/json" -H "Authorization: api_token"


Available API Requests


Once you have the API Token, you can request all the 3 available Shipment API requests: 


1. List of Stores: https://ship.ordercup.com/api/v1/stores


Returns a list of actives stores and store information including Store ID, Store Name, URL.


2. List of shipments: https://ship.ordercup.com/api/v1/shipments


Returns shipments for the criteria specified.


3. Shipment Details: https://ship.ordercup.com/api/v1/shipments/id

Returns the shipment details for the specified shipment.


The detailed API documentation with sample requests is available at https://documenter.getpostman.com/view/22464908/2s93m344Pq#43f62949-aa3f-49a7-8d52-5766cbd7b229




Release Notes

  1. The from & to date_time values need to be in GMT
  2. The ship_date & created_at in the API response are in GMT
  3. The from & to date_time filters specified for the get shipments call query the ship_date column i.e. all the shipments with ship_date in between from & to date_time will be returned

    1.  NOTE: created_at and ship_date are NOT the same columns

  4. If the date range is not specified with the request, the shipments data of last 1 day will be returned

  5. The maximum difference between from date_time & to date_time is 72 hours

  6. The endpoint is currently HTTP, however we are working on the same and it should be HTTPS enabled soon