This endpoint allow you to manage you orders inside your Seven Senders account.
Endpoint
https://api.sevensenders.com/v2/docs.html#/Order/postOrderCollection
Headers
Parameter | Mandatory | Description |
API-KEY | YES | Your authorization key to access Seven Senders API |
Methods
DELETE
Filters
Parameter | Mandatory | Type | Default Value | Description |
filters[language] | NO | string | - | What is the language of the customer for this order or the language for the shop_order_url defined |
filters[shop_order_date_from] | YES | date: dd.mm.yyyy hh:mm:ss | - | Date range when the order was created inside your system (inclusive) |
filters[shop_order_date_to] | YES | date: dd.mm.yyyy hh:mm:ss | - | Date range when the order was created inside your system (inclusive) |
filters[shop_order_url] | NO | string | - | From which website the order come from |
Status codes
Status code | Description |
---|---|
204 | No content. Successfully deleted |
400 | Bad Request. Verify your parameters |
401 | Unauthorized |
404 | Not found |
Request
Curl example
curl -X "DELETE" -d "shop_order_date_from=2017-08-10T05:45:00+0000&shop_order_date_to=2017-09-10T05:45:00+0000" -H "Accept:\ application/json" -H "Content-type:\ application/x-www-form-urlencoded" -H "API-KEY:\ <API-KEY>" http://api.sevensenders.com/v2/orders.json
Response
Response headers
204 success status: 204 date: Wed, 30 Aug 2017 07:31:43 GMT cache-control: no-cache, private server: nginx
GET
Filters
Parameter | Mandatory | Type | Default Value | Description |
limit | NO | number | 20 | How many orders to return |
offset | NO | number | - | Offset from which to start listing orders |
order_by | NO | array of fields | - | Order by fields |
shop_order_id | NO | string | - | The order reference inside your system |
id | NO | number | - | Order id inside Seven Senders system |
shop_order_date | NO | date: dd.mm.yyyy hh:mm:ss | - | Date when the order was created inside your system |
Request
Curl example
curl -X "GET" -H "Accept:\ application/json" -H "Content-type:\ application/x-www-form-urlencoded" -H "API-KEY:\ <API-KEY>" http://api.sevensenders.com/v2/orders.json?limit=20
Response
The API will respond with an array of orders, each element inside the array has the following properties
Field | Type | Example | Description |
id | number | 123456789 | Order id inside Seven Senders system |
shop_order_id | string | "order123456" | The order reference inside your system |
shop_order_url | url | "https://www.7s.com" | From which website the order come from |
shop_order_date | date: dd.mm.yyyy hh:mm:ss | "2017-08-10T05:45:00+0000" | Date when the order was created inside your system |
boarding_complete | boolean | true | Are all shipments for the order been imported inside your Seven Senders account ? |
shipments | array of shipment object | See shipment object | List of all shipments linked to the order |
states_history | array of state object | See state object | List of all past state of the order |
state | string | "completed" | The current state of the order |
language | string | "en" | What is the language of the customer for this order or the language for the shop_order_url defined |
order_tags | array of tag object | See tag object | List of tags that add more context to the order |
promised_delivery_date | date: dd.mm.yyyy hh:mm:ss | "2017-08-19T05:45:00+0000" | At which date did you promise the customer to deliver his/her order |
tracking_page_url | url | "https://hasselhoff.tracking.7senders.com/#/order/order123456" | Deprecated - Tracking Page url where the customer can see his/her order/shipment |
Order object
Field | Type | Example | Description |
id | number | 123456789 | Order id inside Seven Senders system |
shop_order_id | string | "order123456" | The order reference inside your system |
shop_order_url | url | "https://www.7s.com" | From which website the order come from |
shop_order_date | date: dd.mm.yyyy hh:mm:ss | "2017-08-10T05:45:00+0000" | Date when the order was created inside your system |
minimum_numbers_of_shipments | number | 1 | The expected number of shipments for this order |
boarding_complete | boolean | false | Are all shipments for the order been imported inside your Seven Senders account ? |
shipments | array of shipment object | See shipment object | List of all shipments linked to the order |
states_history | array of state object | See state object | List of all past state of the order |
order_tags | array of tag object | See tag object | List of all tags for the order |
promised_delivery_date | date: dd.mm.yyyy hh:mm:ss | "2017-08-19T05:45:00+0000" | At which date did you promise the customer to deliver his/her order |
language | string | "de" | What is the language of the customer for this order or the language for the shop_order_url defined |
daysFromStatusChanged | number | 3 | Number of days from the last status change |
Shipment object
Field | Type | Example | Description |
shop_order_id | string | "order123456" | The order reference inside your system |
carrier_service | string | "standard" | The service level provided by the carrier |
warehouse_address | string | "Kochhannstrasse 38 10249 Berlin" | Your warehouse address |
id | number | 987654321 | The shipment id inside Seven Senders system |
tracking_code | string | "trackingNumber123" | The tracking number given by the carrier for the shipment |
customer_first_name | string | "David" | Customer first name |
customer_last_name | string | "Hasselhoff" | Customer last name |
customer_name | string | "David Hasselhoff" | Fusion of the customer first and last name |
customer_email | email address | "david.hasselhoff@sevensenders.com" | Customer email address |
customer_address | string | "Schwedter Str. 36 A" | Customer address |
customer_address_zip_code | string | "10435" | Customer ZIP code |
customer_address_city | string | "Berlin" | Customer city |
customer_phone | string | "+4917680102975" | Customer phone number |
return_parcel | boolean | false | Is this shipment a return or not ? |
pickup_point_selected | boolean | false | Is the customer address a pick point address ? |
weight | number | 1.12 | Shipment weight in kg |
planned_pickup_datetime | date: dd.mm.yyyy hh:mm:ss | "2017-08-19T15:47:00+0000" | The date and time when the carrier is supposed to pick up the shipment at your warehouse |
comment | string | "There are many children out there that wish to meet me." | Customer comment regarding the shipment delivery |
carrier | object | Carrier object | Information regarding the carrier responsible for delivering the shipment |
carrier.name | string | "dhl" | Carrier name |
carrier.country | object | Country object | Carrier country information |
carrier.country.name | string | "Germany" | Country name |
carrier.country.iso2 | string | "de" | Country ISO 2 code |
customer_address_country | object | Customer address country object | Country information for the customer address |
customer_address_country.name | string | "Germany" | Country name |
customer_address_country.iso2 | string | "de" | Country ISO 2 code |
warehouse | object | Warehouse object | Warehouse information that handled the shipment |
warehouse.name | string | "warehouse" | Warehouse name |
warehouse.country | object | Country object | Warehouse country information |
warehouse.country.name | string | "Germany" | Country name |
warehouse.country.iso2 | string | "de" | Country ISO 2 code |
reference_number | string | "referenceNumber123456" | Reference number for the shipment. This information is used when the carrier doesn't provide a tracking number at the beginning (like BRT carrier in Italy). It is normally your internal reference for this shipment inside your IT system. |
customer_company | string | "Seven Senders" | Customer company name for the delivery |
shipment_status_history | array of status object | See status object | List of all past status of the shipment |
State object
Field | Type | Example | Description |
id | number | 102030456 | Id for the state change |
order | object | See order object | Order information |
name | string | "shipped" | State name |
datetime | date: dd.mm.yyyy hh:mm:ss | "2017-08-19T15:47:00+0000" | Date and time when the order state changed |
location | string | "Kochhannstrasse 38 10249 Berlin" | Where did the order state changed |
Status object
Field | Type | Example | Description |
date_time | date: dd.mm.yyyy hh:mm:ss | "2017-08-16T09:01:00+0000" | Date and time when the shipment status changed |
name | string | "Delivered" | Status name |
location | string | "Kochhannstrasse 38 10249 Berlin" | Where did the shipment status changed |
Tag object
Field | Type | Example | Description |
name | string | "tag1" | Tag name |
content | string | "VIP" | Tag content |
Response
Response to a GET orders call
[ { "id": 4262108, "shop_order_id": "1", "shop_order_url": "https://www.7s.com", "shop_order_date": "2017-08-10T05:45:00+0000", "boarding_complete": true, "shipments": [ { "shop_order_id": "1", "carrier_service": "standard", "warehouse_address": "Kochhannstrasse 38 10249 Berlin", "id": 4401379, "tracking_code": "trackingCode1", "customer_first_name": "David", "customer_last_name": "Hasselhoff", "customer_name": "David Hasselhoff", "customer_email": "david.hasselhoff@sevensenders.com", "customer_address": "Hohenschönhauser Str. 22 10369 Berlin", "customer_address_zip_code": "10369", "customer_address_city": null, "customer_phone": "+4917680102975", "return_parcel": false, "pickup_point_selected": false, "weight": 1, "planned_pickup_datetime": "2017-08-19T15:47:00+0000", "comment": "Please be careful!", "carrier": { "name": "dhl", "country": { "name": "Germany", "iso2": "de" } }, "customer_address_country": { "name": "Germany", "iso2": "de" }, "warehouse": { "name": "warehouse", "country": null }, "shipment_tag": [], "reference_number": null, "customer_company": null, "shipment_status_history": [ { "date_time": "2017-08-16T09:01:00+0000", "name": "Delivered", "location": "" }, { "date_time": "2017-08-19T15:47:00+0000", "name": "Pickup", "location": "" } ] } ], "states_history": [ { "id": 10970506, "order": null, "name": "shipped", "datetime": "2017-08-19T15:47:00+0000", "location": null }, { "id": 10970567, "order": null, "name": "completed", "datetime": "2017-08-16T09:01:00+0000", "location": null }, { "id": 10970463, "order": null, "name": "new", "datetime": "2017-08-10T05:45:00+0000", "location": null } ], "state": "completed", "language": "en", "order_tags": [ { "name": "tag1", "content": "Baywatch" } ], "promised_delivery_date": "2017-08-19T05:45:00+0000", "tracking_page_url": "https://jfourna.tracking.7senders.com/#/order/1" }, { "id": 4262110, "shop_order_id": "2", "shop_order_url": "https://www.7s.com", "shop_order_date": "2017-08-10T05:45:00+0000", "boarding_complete": true, "shipments": [ { "shop_order_id": "2", "carrier_service": "standard", "warehouse_address": "Kochhannstrasse 38 10249 Berlin", "id": 4401381, "tracking_code": "trackingCode2", "customer_first_name": "David", "customer_last_name": "Hasselhoff", "customer_name": "David Hasselhoff", "customer_email": "david.hasselhoff@sevensenders.com", "customer_address": "Hohenschönhauser Str. 22 10369 Berlin", "customer_address_zip_code": "10369", "customer_address_city": null, "customer_phone": "+4917680102975", "return_parcel": false, "pickup_point_selected": false, "weight": 1, "planned_pickup_datetime": "2017-08-19T15:47:00+0000", "comment": "Please be careful!", "carrier": { "name": "dhl", "country": { "name": "Germany", "iso2": "de" } }, "customer_address_country": { "name": "Germany", "iso2": "de" }, "warehouse": { "name": "warehouse", "country": null }, "shipment_tag": [], "reference_number": null, "customer_company": null, "shipment_status_history": [ { "date_time": "2017-08-16T09:01:00+0000", "name": "Delivered", "location": "" }, { "date_time": "2017-08-19T15:47:00+0000", "name": "Pickup", "location": "" } ] } ], "states_history": [ { "id": 10970515, "order": null, "name": "shipped", "datetime": "2017-08-19T15:47:00+0000", "location": null }, { "id": 10970574, "order": null, "name": "completed", "datetime": "2017-08-16T09:01:00+0000", "location": null }, { "id": 10970474, "order": null, "name": "new", "datetime": "2017-08-10T05:45:00+0000", "location": null } ], "state": "completed", "language": "de", "order_tags": [ { "name": "tag1", "content": "Baywatch" } ], "promised_delivery_date": "2017-08-19T05:45:00+0000", "tracking_page_url": "https://hasselhoff.tracking.7senders.com/#/order/2" }, { "id": 4318018, "shop_order_id": "3", "shop_order_url": "https://www.7s.com", "shop_order_date": "2017-08-10T05:45:00+0000", "boarding_complete": false, "shipments": [], "states_history": [ { "id": 11135091, "order": null, "name": "new", "datetime": "2017-08-10T05:45:00+0000", "location": null } ], "state": "new", "language": "de", "order_tags": [ { "name": "tag1", "content": "Baywatch" } ], "promised_delivery_date": "2017-08-19T05:45:00+0000", "tracking_page_url": "https://hasselhoff.tracking.7senders.com/#/order/3" } ]
POST
Parameters
Parameter | Mandatory | Type | Example | Description |
boarding_complete | NO | boolean | 0 | Are all shipments for the order been imported inside your Seven Senders account ? |
language | RECOMMENDED | string | "en" | What is the language of the customer for this order or the language for the shop_order_url defined If you want to send mails/sms notifications to your customer, we recommend that you provide this information on each order The reason is that a notification can only be send if the shop_order_url and the Language are defined on the order. |
order_tags | NO | object | See tag part | Tags/Properties to allow you to segment your orders |
promised_delivery_date | RECOMMENDED | date: dd.mm.yyyy hh:mm:ss | "2017-08-15T16:53:07+01:00" | At which date did you promise the customer to deliver his/her order |
shop_order_date | YES | date: dd.mm.yyyy hh:mm:ss | "2017-08-15T16:53:07+01:00" | Date when the order was created inside your system |
shop_order_id | YES | string | "order123456" | The order reference inside your system |
shop_order_url | RECOMMENDED | url | "https://www.7s.com" | From which website the order come from |
Request
Curl example
curl -X "POST" -d "shop_order_id=123456789&shop_order_date=2017-08-15T16:53:07+01:00&order_tags={\"product\":+\"nikeAir\",+\"price\":+100}&shop_order_url=https://www.7s.com&boarding_complete=0&language=en&promised_delivery_date=2017-08-20T16:53:07+01:00" -H "Accept:\ application/json" -H "Content-type:\ application/x-www-form-urlencoded" -H "API-KEY:\ <API-KEY>" http://api.sevensenders.com/v2/orders.json
Response
Response headers
201 success status: 201 date: Wed, 30 Aug 2017 07:27:25 GMT cache-control: no-cache, private server: nginx location: /v2/orders/4417096 content-type: application/json