Get All Orders

Overview

In order to get information for many orders in a single request, then 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 TT server:

https://tt.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

Information about expected request parameters can be found on swagger UI https://tt/api.sellercloud.com/rest/swagger.

  • 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

Number of page

yes

pageSize

integer

Number of orders per page

yes

companyID

List<integer>

List of ID of companies

No

orderIDs

List<integer>

List of ID of sales orders.

No

orderStatus

List<string>

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

dateRange

List<string>

Date range. For supported values check swagger.

No

shipDateRange

List<string>

Range of shipping date. For supported values check swagger.

No

paymentDateRange

List<string>

Range for payment date. For supported values check swagger.

No

dropshipStatus

List<string>

Dropship statuses.

No

paymentStatus

List<string>

ALL, NoPayment, Charged, PartialRefund, PartiallyPaid etc.

No

orderSourceOrderIDList

Array<string>

No

channel

string

Channel: Amazon, eBay etc.

No

orderSubType

string

Type of order: Sample, Charity, Prime etc.

No

shippingStatus

string

Unknown, Unshipped, PartiallyShipped, FullyShipped, ReadyForPickup

No

lastUpdatedFrom

DateTime

Date of the last update

No

lastUpdatedTo

DateTime

Date of the last update

No

warehouseID

List<int>

List of warehouse ID

No

Response

  • If user is authenticated and provides a valid page number and page size, then response will be Status Code 200 => OK and orders metadata in JSON format
{ 
"Items": [
{
public int ID {get; set;}

public string OrderSourceOrderID { get; set; }

public OrderSource OrderSource { get; set; }

public OrderSubTypeType OrderSubType { get; set; }

public bool bRushOrder { get; set; }

public bool IsGiftOrder { get; set; }

public int ShippingStatus { get; set; }

public int PaymentStatus { get; set; }

public int StatusCode { get; set; }

public DropShipStatusType Dropship { get; set; }

public string FirstName { get; set; }

public string LastName { get; set; }

public DateTime TimeOfOrder { get; set; }

public decimal GrandTotal { get; set; }

public string CompanyName { get; set; }

public string CompanyNameAbbreviation { get; set; }

public int UserID { get; set; }

public DateTime? ShipDate { get; set; }

public DateTime? OrderShippingPromiseDate { get; set; }

public int HomeCountryCode { get; set; }

public string Country { get; set; }

public string AmazonMarketPlaceID { get; set; }

public DateTime LastUpdated { get; set; }

public string AmazonMarketplace {get; set;}

public string DestinationState {get; set;}

public string DestinationCountry {get; set;}

public string ShippingAddress { get; set; }

public Address Address { get; set; }

public CountryCodeType OrderSiteCode { get; set; }

public int ClientID { get; set; }

public int CompanyID { get; set; }

public string EBaySellingManagerSalesRecordNumber { get; set; }

public string CompletedOrderID { get; set; }

public string OrderSourceUrl { get; set; }

public IEnumerable<OrderItemDto> Items { get; set; }

public decimal ShippingTotal { get; set; }

public string ShippingCarrier { get; set; }

public string ShippingService { get; set; }

public decimal OrderDiscountsTotal { get; set; }

public decimal ShippingDiscountsTotal { get; set; }

public decimal? InsuranceTotal { get; set; }

public float? DeclaredValue { get; set; }

public float HandlingFee { get; set; }

public DateTime? PaymentDate { get; set; }

public CurrencyCodeType OrderCurrencyCode { get; set; }

public string TrackingNumber { get; set; }

public bool InvoicePrinted { get; set; }

public DateTime? InvoicePrintedDate { get; set; }

public int? CustomerServiceStatus { get; set; }

public float? TaxRate { get; set; }

public int? ShippingWeightTotalOz { get; set; }

public string CustomerEmail { get; set; }
}],
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/category/pqa1htn09q-resources


How did we do?