TS Commerce Developers

Real Time Shippings API

Current version: v1.1 beta

The Real Time Shipping API allows applications to create an end-point that will be queried by Storeden via POST to obtain a list of shipments to be proposed to the customer.
An example of the answer to be provided is available here: File Example.

List Realtime Shippings Available

GET
/realtimeshippings/list.json
List Realtime Shippings Request

$storeden = new Storeden\Storeden($config);
$webhook_list = $storeden->get('/realtimeshippings/list.json');
					
List Realtime Shippings Response

[
	{
		"id": "5d7954c616f46aa22f7b23c6",
		"name": "UPS Carrier",
		"url": "https://shipping-rate-service.tld/api/storeden.json",
		"instance": "569772b116f46aff081f4858"
	},
	...
]
						

Create real time shipping endpoint

POST
/realtimeshippings/realtimeshipping.json

Create a new endpoint that will be called by Storeden to get the list of shipments to offer to the buyer.

PARAMETERS LIST
url required (string) A valid endpoint url. Must be in https.
name required (string) Your real time shipping name
Create real time shipping Request

$data = array();
$data['url'] = 'https://shipping-rate-service.tld/api/storeden.json';
$data['name'] = 'UPS Carrier';

$storeden = new Storeden\Storeden($config);
$webhook_list = $storeden->post('/realtimeshippings/realtimeshipping.json', $data);
					
Create real time shipping Response

{
	"id": "5d7954c616f46aa22f7b23c6",
	"name": "UPS Carrier",
	"url": "https://shipping-rate-service.tld/api/storeden.json",
	"instance": "569772b116f46aff081f4858"
}
					

Remove real time shipping endpoint

DELETE
/realtimeshippings/realtimeshipping.json
PARAMETERS LIST
id required (StoredenID) Real Time Shipping id you want to remove
Remove real time shipping Request

$data = array();
$data['id'] = '5d7954c616f46aa22f7b23c6';

$storeden = new Storeden\Storeden($config);
$webhook_list = $storeden->delete('/realtimeshippings/realtimeshipping.json', $data);
					
Remove real time shipping Response

{
    "ok": 1,
    "err": null,
    "errmsg": null,
    "nRemoved": 1
}