Get Orders
Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)
Date | Version | Name | Applied changes |
---|---|---|---|
22/11/2022 | 1.0 | Bogomil Pavlov | Initial Version |
Get new orders and modified order will be controlled by single cron since we can filter the order by updated date. The first run of the cron should look for order in the last 90 days and every next run to overlap with 60 minutes the date of the last run.
Sales Tax Group | Marketplace VAT Group | Internal VAT Group |
---|---|---|
Orders >Total Sales Tax | Orders > Total Marketplace VAT | Orders > Total VAT |
Orders >Total Shipping Sales Tax | Orders > Total Shipping Marketplace VAT | Orders > Total Shipping VAT |
Product In Order > Item Sales Tax Price | Product in Order > Marketplace VAT Item Price | Product In Order > Vat Item Price |
Product In Order > Sales Tax Percent | Product in Order > Marketplace VAT Percent | Product In Order > Vat Percent |
Product In Order > Item Shipping Cost Sales Tax | Product in Order > Marketplace VAT Item Shipping Cost | Product In Order > Vat Item Shipping Cost |
Search orders using a set of filters
Try it
Use this method to retrieve a list of orders using a set of filters.
You may filter your search by adding the following criteria in your request body:
- A list of order status
- An order reference
- A business order
- A shipping country
- A supply mode
- A sales channel identifier
- A time range using min/max criteria on the orders’ creation or last update dates
You may also sort your search by date using the following fields:
- Shipping date
- Created date
- Last updated date
To ensure a faster answer, the number of items retrieved per page is limited to a 100 items.
API Call:GET https://api.octopia-io.net/seller/v2/orders
API Docs:https://developer.octopia-io.net/api-details#api=api-rest-seller-v2&operation=get-orders
Request parameters
Name | Required | Type | Description |
---|---|---|---|
pageIndex | No | integer |
Format - int32. Page number to fetch |
pageSize | No | integer |
Format - int32. Item per page to fetch |
updatedAtMin | No | string |
Format - date-time (as-time in RFC3339). Gets or sets the updated at start. |
updatedAtMax | No | string |
Format - date-time (as-time in RFC3339). Gets or sets the updated at start. |
Sample Request: GET https://api.octopia-io.net/seller/v2/orders?pageIndex=1&pageSize=100&updatedAtMin=2022-11-15T22:00:00.000Z&updatedAtMax=2022-11-22T22:00:00.000Z
Sample Response:
{
"itemsPerPage": 50,
"items": [{
"orderId": "SCID01210525142759UT8E",
"reference": "2105251416839",
"businessOrder": true,
"salesChannel": {
"id": "SCID01",
"name": "MY SALES CHANNEL"
},
"seller": {
"id": "98797"
},
"customer": {
"reference": "CUST37764GF3"
},
"purchasedAt": "2021-05-25T13:28:37Z",
"updatedAt": "2021-06-07T11:32:59Z",
"createdAt": "2021-05-25T14:27:59Z",
"status": "Cancelled",
"payment": {
"Method": "Card"
},
"currencyCode": "Eur",
"billingAddress": {
"civility": "Mr",
"firstName": "Thomas",
"lastName": "Schmidt",
"companyName": "Die Kleine Fabrik",
"companyRegistrationNumberType": "DUNS",
"companyRegistrationNumber": "123456789",
"companyVatNumber": "DE09999999XX",
"addressLine1": "Mauerstrasse 31",
"addressLine2": "Gebaeude A2",
"addressLine3": "Wohnung 213",
"postalCode": "10117",
"city": "Berlin",
"stateOrRegion": " ",
"countryCode": "De"
},
"totalPrice": {
"offerPrice": 130.97,
"sellingPrice": 130.97
},
"statusEvents": [{
"date": "2022-06-14T22:00:59Z",
"status": "Cancelled"
}],
"lines": [{
"orderLineId": "1RT2",
"status": "Cancelled",
"quantity": 3,
"totalPrice": {
"offerPrice": 130.97,
"sellingPrice": 130.97
},
"offerPrice": {
"unitSalesPrice": 41.99,
"shippingCost": 5,
"commission": {
"amountWithVat": 80,
"rate": 20
},
"taxes": [{
"code": "VAT",
"target": "shippingFees",
"amount": 0,
"rate": 0
}]
},
"sellingPrice": {
"unitSalesPrice": 41.99,
"shippingCost": 5,
"taxes": [{
"code": "VAT",
"target": "shippingFees",
"amount": 0,
"rate": 0
}]
},
"offer": {
"id": "XooAzb123_98797_6_SCID01",
"supplyMode": "Fulfillment",
"productId": "XooAzb123",
"productTitle": "Nintendo Switch Lite Gray Console",
"sellerProductId": "98797_abc123",
"condition": "New"
},
"delivery": {
"mode": "Standard",
"promisedAtMin": "2021-05-28T13:28:37.814Z",
"promisedAtMax": "2021-06-28T13:28:37.814Z",
"shippedAtMin": "2021-06-01T13:28:37.814Z",
"shippedAtMax": "2021-05-27T13:28:37.814Z"
},
"shippingAddress": {
"civility": "Mr",
"firstName": "Thomas",
"lastName": "Schmidt",
"companyName": "Die Kleine Fabrik",
"addressLine1": "Mauerstrasse 31",
"addressLine2": "Gebaeude A2",
"addressLine3": "Wohnung 213",
"postalCode": "10117",
"city": "Berlin",
"stateOrRegion": " ",
"countryCode": "De",
"phone": "0611223344",
"email": "a@a.aa",
"latitude": 0,
"longitude": 0
},
"cancellationDetails": {
"requestedBy": "Seller",
"reason": "Seller-refusal"
},
"parcels": [{
"number": "12QDS0",
"carrierName": "DHL",
"trackingUrl": "https://DHL.com/tracking?id=12QDS0",
"trackingId": "deabfa7c-e6ef-4832-bcee-444398f23e0c"
}],
"statusEvents": [{
"date": "2021-05-28T13:28:37Z",
"status": "Cancelled"
}],
"productAttributes": {}
}]
}]
}
Response Mapping:
Cdiscount Field | Hemi Field | Comment | ||||
---|---|---|---|---|---|---|
itemsPerPage |
||||||
items |
||||||
orderId |
||||||
reference |
||||||
businessOrder |
||||||
salesChannel |
||||||
id |
||||||
name |
||||||
seller |
||||||
id |
||||||
customer |
||||||
reference |
||||||
purchasedAt |
||||||
updatedAt |
||||||
createdAt |
||||||
status |
||||||
payment |
||||||
Method |
||||||
currencyCode |
||||||
billingAddress |
||||||
civility |
||||||
firstName |
||||||
lastName |
||||||
companyName |
||||||
companyRegistrationNumberType |
||||||
companyRegistrationNumber |
||||||
companyVatNumber |
||||||
addressLine1 |
||||||
addressLine2 |
||||||
addressLine3 |
||||||
postalCode |
||||||
city |
||||||
stateOrRegion |
||||||
countryCode |
||||||
totalPrice |
||||||
offerPrice |
||||||
sellingPrice |
||||||
statusEvents |
||||||
date |
||||||
status |
||||||
lines |
||||||
orderLineId |
||||||
status |
||||||
quantity |
||||||
totalPrice |
||||||
offerPrice |
||||||
sellingPrice |
||||||
offerPrice |
||||||
unitSalesPrice |
||||||
shippingCost |
||||||
commission |
||||||
amountWithVat |
||||||
rate |
||||||
taxes |
||||||
code |
||||||
target |
||||||
amount |
||||||
rate |
||||||
sellingPrice |
||||||
unitSalesPrice |
||||||
shippingCost |
||||||
taxes |
||||||
code |
||||||
target |
||||||
amount |
||||||
rate |
||||||
offer |
||||||
id |
||||||
supplyMode |
||||||
productId |
||||||
productTitle |
||||||
sellerProductId |
||||||
condition |
||||||
delivery |
||||||
mode |
||||||
promisedAtMin |
||||||
promisedAtMax |
||||||
shippedAtMin |
||||||
shippedAtMax |
||||||
shippingAddress |
||||||
civility |
||||||
firstName |
||||||
lastName |
||||||
companyName |
||||||
addressLine1 |
||||||
addressLine2 |
||||||
addressLine3 |
||||||
postalCode |
||||||
city |
||||||
stateOrRegion |
||||||
countryCode |
||||||
phone |
||||||
email |
||||||
latitude |
||||||
longitude |
||||||
cancellationDetails |
||||||
requestedBy |
||||||
reason |
||||||
parcels |
||||||
number |
||||||
carrierName |
||||||
trackingUrl |
||||||
trackingId |
||||||
statusEvents |
||||||
date |
||||||
status |
||||||
productAttributes |
Order Status Mapping
Cdiscount Status | Hemi Status | Comment |
---|---|---|
WaitingAcceptance | if you chose to validate yourself your orders, you will first have to validate or refuse to fulfill the order | |
Refused | you refused to fulfill the order | |
Accepted | you validated your order and the information will be forwarded to the sales channel | |
inPreparation | this status is only available on orders with a "fulfillment" or "xdock" supply mode. It informs you your order is being prepared by the warehouse | |
Shipped | it indicates the order has been collected by the carrier and is on its way to your customer | |
Delivered | the order has been delivered to your customer (please note that this status is not available yet) | |
CancelRequest | a cancelation request has been made on the order and is being processed by the system - it may be rejected, in which case the order state will be reset to its previous state | |
Cancelled | an order may be refunded at any time during its lifecycle, resulting into a "cancelled" status. A cancelation may be triggered because of logistic troubles, upon customer request raised through a discussion (see Discussion Management) or by the sales channel's Customer Services Department. |
Hemi Status Transitions
Hemi Status | Transition | Comment |
---|---|---|
Pending | From “Pending“ we can move to any other Hemi Status | Pending status is indicating that something need to happen on the order like clear debit, waiting acceptance etc. |
Incomplete | From “Incomplete” we can move to | |
”Ready For Shipping”, “Shipped“, “Cancelled“ | Incomplete status is used when we have something missing on the order, like address, items etc. | |
Ready For Shipping | From ”Ready For Shipping” we can move to “Shipped“ or “Cancelled“ only | Ready For Shipping indicates the order can be shipped successfully have all required information stored and payment cleared |
Shipped | From “Shipped“ we can move to “Cancelled“ | Shipped indicating that the order has been dispatched. |
Cancelled | “Cancelled“ is our final status. | Cancelled is the Hemi final status and we cannot revert back or move forward. |