Overview
In order to get information for many orders in a single request, you can consume the endpoint presented in this article. However, in order to do that, you must:
- Be authenticated user
For information on how you can authenticate, see Authentication
As soon as you do authentication and receive a valid token, it needs to be passed on the call for getting orders.
- You can provide page number and page size and some filtering information
Endpoint
Example for such endpoint for XX server:
https://xx.api.sellercloud.com/rest/api/orders?pageNumber=1&pageSize=1
For your server endpoint will be:
https://{your_server_id}.api.sellercloud.com/rest/api/orders?pageNumber=1&pageSize=1
Request
- Method Type: HttpGet
- Authorization: Use Bearer Token + token received from token authentication
- Header info: Content-Type: application/json
- Parameters:
| Parameters | Data Type | Description | Is Required |
| pageNumber | integer | Page number that will be retrieved.
If the page number is not set in the request, then only the 1st page will be pulled. |
No |
| pageSize | integer | Number of orders per page.
If not set in the request, then top 10 orders will be pulled. Maximum number of orders that can be pulled with a single call is 50. |
No |
| companyID | List | List of IDs of companies. | No |
| orderIDs | List | List of IDs of existing sales orders. | No |
| orderStatus | List | Accepted values are Cancelled, ShoppingCart, Completed, InProcess, ProblemOrder, OnHold, Quote, Void. | No |
| sku | string | ID of inventory. | no |
| createdOnFrom | DateTime | Minimum date of creation. | No |
| createdOnTo | DateTime | Maximum date of creation. | No |
| exported | integer | Filters orders based on their exported status. Possible values: All = -1, Yes = 1, No = 0 | No |
| hasParentOrder | integer | Filters orders based on whether they have parent order. Possible values: All = -1, Yes = 1, No = 0 | No |
| dateRange | List | Date range. For supported values, check here. | No |
| shipDateRange | List | Range of shipping date. For supported values, check here. | No |
| paymentDateRange | List | Range for payment date. For supported values, check here. | No |
| dropshipStatus | List | Dropship statuses. | No |
| DropshipPoNumbers | List | List of dropship purchase order IDs | No |
| paymentStatus | List | Acceptable values are ALL, NoPayment, Charged, PartialRefund, PartiallyPaid etc. You can filter by one or several payment statuses. | No |
| orderSourceOrderIDList | Array | Filter by a list of cahnnel order IDs. | No |
| channel | List | List of Channel IDs | No |
| orderSubType | string | Type of order: Sample, Charity, Prime etc. | No |
| shippingStatus | string | Possible values are Unknown, Unshipped, PartiallyShipped, FullyShipped, ReadyForPickup | No |
| trackingNumber | string | Tracking number | No |
| serialNumber | string | Serial number | No |
| lastUpdatedFrom | DateTime | Date of the last update | No |
| lastUpdatedTo | DateTime | Date of the last update | No |
| warehouseID | List | List of warehouse ID | No |
| companyGroupID | List | List of company group ID | No |
| keyword | string | A search term for performing a global search. | No |
| UpdatedFromDateRange | enum | Filter orders based on when they were last updated. This filter allows you to select specific ranges such as Last Month, Last 7 days, etc. See here for the possible values. | No |
| CreatedOnDateRange | enum | Filter orders based on when they were created. This filter allows you to select specific ranges such as Last Month, Last 7 days, etc. See here for the possible values. | No |
| ASIN | string | Order Item ASIN. | No |
| QBExported | enum | Accepted values are: All = -1, Yes = 1, No = 0 | No |
| UserID | list | List of integer for User IDs. | No |
| ShipFromDate | date | Filter orders based on their Ship Date. This is the earliest date filter. | No |
| ShipToDate | date | Filter orders based on their Ship Date. This is the latest date filter. | No |
| OrderFromDate | date | Filter orders based on their creation date. This is the latest date filter. | No |
| OrderToDate | date | Filter orders based on their placement date. This is the latest date filter. | No |
| PicklistID | string | Allows you to pull orders associated with a specific picklist. | No |
| ReplacementOrder | enum | Possible values are All = -1, Yes = 1, No = 0. | No |
| IsSettled | enum | True or False. | No |
| OrderBy | string | Possible values are OrderID, OrderDate, OrderStatus, ShipDate, ShippingStatus. | No |
| IsAscending | boolean | If you have provided the “Order By”, this parameter allows you to select whether results will be in ascending or descending order. | No |
| usersGroup | string | List of IDs for User Groups. |
Enumaration
Below is the list of acceptable values for the UpdatedFromDateRange and CreatedOnDateRange parameters:
- AllDates = 9
- Today = 1
- Last24Hours = 12
- Yesterday = 20
- Last3Days = 11
- Last7Days = 10
- ThisWeek = 2
- LastWeek = 3
- Last14Days = 101
- Last21Days = 35
- Last31Days = 4
- Last60Days = 5
- LastMonth = 22
- Last90DAys = 21
- Last120Days = 6
- Last180Days = 180
- Last12Months = 23
- ThisCalendarYear = 7
- PreviousCalendarYear = 8
- OlderThan1BusinessDay = 17
- OlderThan2BusinessDay = 18
- OlderThan3BusinessDay = 19
- OlderThan24Hours = 24
- Tomorrow = 25
- Next3Days = 26
- Next7Days = 27
- MonthToDate = 28
- OlderThan6Months = 29
- OlderThan5Days = 30
- OlderThan30Days = 31
- This_Month = 32
- OlderThan7Days = 33
- OlderThan14Days = 34
Response
- If the user is authenticated and provides a valid page number and page size, then the response will be Status Code 200 => OK and orders metadata in JSON format.
{
"Items": [
{
"ID": 0,
"OrderSourceOrderID": "string",
"OrderSource": 0,
"MarketingSourceID": 0,
"OrderSubType": 0,
"bExported": true,
"bRushOrder": true,
"IsGiftOrder": true,
"IsBlackListed": true,
"ShippingStatus": 0,
"PaymentStatus": 0,
"StatusCode": 0,
"Dropship": 0,
"FirstName": "string",
"LastName": "string",
"TimeOfOrder": "2024-08-19T10:44:20.543Z",
"GrandTotal": 0,
"CompanyName": "string",
"UserID": 0,
"SalesRepEmail": "string",
"SalesRepId": 0,
"ShipDate": "2024-08-19T10:44:20.543Z",
"ShippedByUserID": 0,
"OrderShippingPromiseDate": "2024-08-19T10:44:20.543Z",
"CreatedOn": "2024-08-19T10:44:20.543Z",
"DeliveryDate": "2024-08-19T10:44:20.543Z",
"HomeCountryCode": 0,
"Country": "string",
"LastUpdated": "2024-08-19T10:44:20.543Z",
"Payments": [
{
"ID": 0,
"TransactionReferenceNumber": "string",
"PaidAmount": 0,
"PaymentDate": "2024-08-19T10:44:20.543Z",
"PaymentType": 1,
"PaymentMethod": 1,
"PaymentStatus": 0
}
],
"DestinationState": "string",
"DestinationCountry": "string",
"ShippingAddress": {
"ClientID": 0,
"UserID": 0,
"HomePhoneExt": "string",
"PhoneNumberExt": "string",
"IsShippingAddress": true,
"IsBillingAddress": true,
"AddressClassification": 0,
"Notes": "string",
"HomePhone": "string",
"EmailAddress": "string",
"AddressStatus": 0,
"AddressSource": 0,
"ID": 0,
"FirstName": "string",
"MiddleInitial": "string",
"LastName": "string",
"CompanyName": "string",
"StreetLine1": "string",
"StreetLine2": "string",
"City": "string",
"StateName": "string",
"StateCode": "string",
"PostalCode": "string",
"CountryName": "string",
"CountryCode": "string",
"PhoneNumber": "string",
"FaxNumber": "string",
"WebSiteURL": "string"
},
"BillingAddress": {
"ClientID": 0,
"UserID": 0,
"HomePhoneExt": "string",
"PhoneNumberExt": "string",
"IsShippingAddress": true,
"IsBillingAddress": true,
"AddressClassification": 0,
"Notes": "string",
"HomePhone": "string",
"EmailAddress": "string",
"AddressStatus": 0,
"AddressSource": 0,
"ID": 0,
"FirstName": "string",
"MiddleInitial": "string",
"LastName": "string",
"CompanyName": "string",
"StreetLine1": "string",
"StreetLine2": "string",
"City": "string",
"StateName": "string",
"StateCode": "string",
"PostalCode": "string",
"CountryName": "string",
"CountryCode": "string",
"PhoneNumber": "string",
"FaxNumber": "string",
"WebSiteURL": "string"
},
"OrderSiteCode": 0,
"ClientID": 0,
"CompanyID": 0,
"EBaySellingManagerSalesRecordNumber": "string",
"CompletedOrderID": "string",
"OrderSourceUrl": "string",
"Items": [
{
"ID": 0,
"OrderID": 0,
"ProductID": "string",
"Qty": 0,
"DisplayName": "string",
"AdjustedSitePrice": 0,
"QtyReturned": 0,
"QtyShipped": 0,
"ID1": 0,
"OrderID1": 0,
"ProductID1": "string",
"Qty1": 0,
"DisplayName1": "string",
"OriginalBasePrice": 0,
"SitePrice": 0,
"AdjustedSitePrice1": 0,
"SiteCost": 0,
"TaxExempt": 0,
"TaxClass": 0,
"NonShipping": 0,
"ShipSeparately": 0,
"DropShipMode": 0,
"DropShipAddressID": 0,
"LineTotal": 0,
"LineTaxTotal": 0,
"StatusCode": 0,
"Weight": 0,
"Length": 0,
"Width": 0,
"Height": 0,
"MinimumQty": 0,
"DisplayDescription": "string",
"ImageURL": "string",
"ExtraInformation": "string",
"GiftWrap": 0,
"GiftWrapMessage": "string",
"GiftWrapAllowed": 0,
"InventoryKey": "string",
"ShippingCost": 0,
"QtyShipped1": 0,
"QtyReturned1": 0,
"ParentID": 0,
"ReferenceID": "string",
"eBayTransactionID": "string",
"OriginalOrderSourceID": "string",
"PostingFee": 0,
"FinalValueFee": 0,
"IsBackOrder": true,
"BackOrderAction": 0,
"BackOrderActionDate": "2024-08-19T10:44:20.543Z",
"BackOrderActionBy": 0,
"EstimatedTimeArrival": "2024-08-19T10:44:20.543Z",
"ReplacementSKU": "string",
"ListingError": 0,
"FeedBackID": "string",
"FeedBackReminderSent": "2024-08-19T10:44:20.543Z",
"BackOrderQty": 0,
"BackOrderDate": "2024-08-19T10:44:20.543Z",
"BackOrderBy": 0,
"EstimatedShipDate": "2024-08-19T10:44:20.543Z",
"NotifyCustomerService": true,
"NotifyCustomer": "string",
"DisputeID": "string",
"OriginalSKU": "string",
"IsSKUReplaced": true,
"InsuranceCost": 0,
"FeedbackLeft": true,
"FeedbackLeftOn": "2024-08-19T10:44:20.543Z",
"FeedBackLeftID": "string",
"IsDropShipped": true,
"DropShippedOn": "2024-08-19T10:44:20.543Z",
"DropShippedToVendor": 0,
"Notes": "string",
"ProductIDOriginal": "string",
"SalesRepId": 0,
"ShipFromWareHouseID": 0,
"ShipFromWarehouseName": "string",
"FeedBackFailureCount": 0,
"FeedBackLastFailureOn": "2024-08-19T10:44:20.543Z",
"FeedBackFailureMessage": "string",
"SourceOrderFileName": "string",
"eBayItemIDUnique": "string",
"eBayTransactionIDUnique": "string",
"DontCountInventory": true,
"ShippingTax": 0,
"GiftWrapTax": 0,
"DropShippedVendorOrderID": "string",
"GiftWrapType": "string",
"GiftWrapCharges": 0,
"ShippingCostForAccounting": 0,
"ReturnedToWarehouseID": 0,
"AverageCost": 0,
"LastCost": 0,
"CreditMemoID": 0,
"CreditMemoItemID": 0,
"HasBuyDotCoupon": true,
"BuyDotCouponAmount": 0,
"DiscountType": 0,
"DiscountAmount": 0,
"DiscountTotal": 0,
"QtyRequestedByOrderSource": 0,
"ProductRebateID": 0,
"ProductRebateValue": 0,
"Purchaser": 0,
"ShippingSourceOrderItemID": "string",
"SalesOutlet": "string",
"VariantID": 0,
"ShippingSourceWarehouseID": "string",
"ExportedProductID": "string",
"ExportedDocumentNumber": "string",
"BatchExportedGUID": "string",
"DeliveryDocumentNumber": "string",
"BatchExportDeliveryGUID": "string",
"SrcUpdatedForItemShipping": true,
"SrcUpdatedForItemShippingOn": "2024-08-19T10:44:20.543Z",
"ShipType": "string",
"DropShippedStatus": 0,
"BatchExportedJobID": 0,
"BatchExportedDateTime": "2024-08-19T10:44:20.543Z",
"ItemStatusCode": 0,
"ItemPaymentStatus": 0,
"ItemShippingStatus": 0,
"BatchExportDeliveryJobID": 0,
"BatchExportDeliveryDateTime": "2024-08-19T10:44:20.543Z",
"CancellationRequestSentToInnotrac": true,
"ShippingSourceCancellationQty": 0,
"TotalRefunded": 0,
"ReturnDocumentNumber": "string",
"BatchExportReturnGUID": "string",
"BatchExportReturnJobID": 0,
"BatchExportReturnDateTime": "2024-08-19T10:44:20.543Z",
"ProfitAndLossAdjustmentTotal": 0,
"SalesRecordNumber": "string",
"ShippingSourceOrderItemSKU": "string",
"QtyPerCase": 0,
"TotalCases": 0,
"PricePerCase": 0,
"QtyPicked": 0,
"ProductIDRequested": "string",
"WholesaleConfirmedQty": 0,
"WholesaleConfirmShipDate": "2024-08-19T10:44:20.543Z",
"WholesaleBackOrderQty": 0,
"WholesaleBackOrderShipDate": "2024-08-19T10:44:20.543Z",
"WholesaleRefuseQty": 0,
"KitItemsCount": 0,
"VatRate": 0,
"VATTotal": 0,
"AmazonShipmentID": "string",
"WarehouseBinCartSlotID": 0,
"SettlementID": 0,
"RoundNumber": 0,
"WarehouseBinCartID": 0,
"MainItemID": "string",
"LinkedToPOItemID": 0,
"OrderItemShipDate": "2024-08-19T10:44:20.543Z",
"ProductName": "string",
"InventoryAvailableQty": 0,
"LocationNotes": "string",
"ShadowOf": "string",
"DefaultVendorName": "string",
"BundleItems": [
{
"ID": 0,
"ParentID": 0,
"OrderItemId": 0,
"OrderID": 0,
"ProductID": "string",
"Qty": 0,
"QtyReturned": 0,
"IsPackageGenerated": true,
"IsBackOrder": true,
"BackOrderAction": 0,
"BackOrderActionDate": "2024-08-19T10:44:20.543Z",
"BackOrderActionBy": 0,
"BackOrderQty": 0,
"BackOrderDate": "2024-08-19T10:44:20.543Z",
"BackOrderBy": 0,
"TotalQty": 0,
"ReturnedToWarehouseID": 0,
"SiteCost": 0,
"LastCost": 0,
"AverageCost": 0,
"ProductRebateID": 0,
"ProductRebateValue": 0,
"ShippingSourceOrderItemID": "string",
"ShippingSourceWarehouseID": "string",
"QtyPicked": 0,
"ReplacementSKU": "string",
"IsSKUReplaced": true,
"WarehouseBinCartSlotID": 0,
"RoundNumber": 0,
"WarehouseBinCartID": 0,
"LinkedToPOItemID": 0,
"ProductName": "string"
}
]
}
],
"ShippingTotal": 0,
"ShippingCarrier": "string",
"ShippingService": "string",
"OrderDiscountsTotal": 0,
"ShippingDiscountsTotal": 0,
"Duties": 0,
"InsuranceTotal": 0,
"DeclaredValue": 0,
"HandlingFee": 0,
"PaymentDate": "2024-08-19T10:44:20.543Z",
"OrderCurrencyCode": 0,
"TrackingNumber": "string",
"AllTrackingNumbers": [
"string"
],
"InvoicePrinted": true,
"InvoicePrintedDate": "2024-08-19T10:44:20.543Z",
"CustomerServiceStatus": 0,
"TaxRate": 0,
"TaxTotal": 0,
"ShippingWeightTotalOz": 0,
"CustomerEmail": "string",
"ShippingState": "string",
"ShippingCountry": "string",
"FinalShippingFee": 0,
"FinalValueTotal": 0,
"ProductIDMostExpensiveInOrder": "string",
"EstimatedDeliveryDate": "2024-08-19T10:44:20.543Z",
"RequireSignatureConfirmation": true,
"RelatedOrders": [
{
"RelatedOrderID": 0,
"RelationshipType": 0,
"CreatedOn": "2024-08-19T10:44:20.543Z"
}
],
"RelatedPurchaseOrderID": 0
}
],
"TotalResults": 0
}
- If user is not authenticated, then response will be Status Code 401 => Not Valid Token
- On server response => Status Code 500 => Internal Server Error
Different status codes can be found in that section here: https://developer.sellercloud.com/dev-category/resources/
Demo in c#
string baseUri = "http://{server_id}.api.sellercloud.com/rest";
string url = $"{baseUri}/api/Orders?model.pageNumber=1&model.pageSize=50&model.createdOnFrom=2020/01/01&model.createdOnTo=2020/04/24";
string username = “{your_username}”;
string password = “{your_password}”;
IAuthenticationClient authenticationClient = new AuthenticationClient();
string token = authenticationClient.Login(baseUri, new LoginRequest(username, password));
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(“Bearer”, token);
var responseMessage = client.GetAsync(url).Result;
var content = responseMessage.Content
.ReadAsStringAsync()
.Result;
return JsonConvert.DeserializeObject<GetAllResponse>(content);
}
public class AuthenticationClient : IAuthenticationClient
{
public string Login(string baseUri, LoginRequest loginRequest)
{
using (var client = new HttpClient())
using (var request = new HttpRequestMessage(HttpMethod.Post, $"{baseUri}/api/token"))
{
var json = JsonConvert.SerializeObject(loginRequest);
using (var stringContent = new StringContent(json, Encoding.UTF8, "application/json"))
{
request.Content = stringContent;
var responseMessage = client.SendAsync(request).Result;
var content = responseMessage.Content
.ReadAsStringAsync()
.Result;
var response = JsonConvert.DeserializeObject(content);
return response.access_token;
}
}
}
}
public class LoginResponse
{
public string token_type { get; set; }
public string access_token { get; set; }
public DateTime? validFrom { get; set; }
public DateTime? validTo { get; set; }
}
public interface IAuthenticationClient
{
string Login(string baseUri, LoginRequest request);
}
public class LoginRequest
{
public LoginRequest(string username, string password)
{
this.Username = username;
this.Password = password;
}
public string Username { get; }
public string Password { get; }
}
