List Realtime Shippings Available
GET
/realtimeshippings/list.json
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.
GET
/realtimeshippings/list.json
$storeden = new Storeden\Storeden($config);
$webhook_list = $storeden->get('/realtimeshippings/list.json');
[
{
"id": "5d7954c616f46aa22f7b23c6",
"name": "UPS Carrier",
"url": "https://shipping-rate-service.tld/api/storeden.json",
"instance": "569772b116f46aff081f4858"
},
...
]
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.
url required (string) | A valid endpoint url. Must be in https. |
name required (string) | Your real time shipping name |
$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);
{
"id": "5d7954c616f46aa22f7b23c6",
"name": "UPS Carrier",
"url": "https://shipping-rate-service.tld/api/storeden.json",
"instance": "569772b116f46aff081f4858"
}
DELETE
/realtimeshippings/realtimeshipping.json
id required (StoredenID) | Real Time Shipping id you want to remove |
$data = array();
$data['id'] = '5d7954c616f46aa22f7b23c6';
$storeden = new Storeden\Storeden($config);
$webhook_list = $storeden->delete('/realtimeshippings/realtimeshipping.json', $data);
{
"ok": 1,
"err": null,
"errmsg": null,
"nRemoved": 1
}