curl -X GET "https://api.stateset.com/api/v1/orders?limit=20&offset=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
curl -X GET "https://api.stateset.com/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-G \
--data-urlencode "status_in=processing,shipped" \
--data-urlencode "created_after=2024-01-01T00:00:00Z" \
--data-urlencode "total_amount_gte=50.00" \
--data-urlencode "shipping_country=US" \
--data-urlencode "include=line_items,customer" \
--data-urlencode "sort=total_amount" \
--data-urlencode "order=desc" \
--data-urlencode "limit=50"
curl -X GET "https://api.stateset.com/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
--data-urlencode "search=john@example.com" \
--data-urlencode "status=delivered" \
--data-urlencode "created_after=2024-01-01" \
--data-urlencode "created_before=2024-01-31"
curl -X GET "https://api.stateset.com/api/v1/orders?cursor=eyJpZCI6Im9yZF8xMjM0NSIsImNyZWF0ZWRfYXQiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9&limit=25" \
-H "Authorization: Bearer YOUR_API_KEY"
query ($limit: Int!, $offset: Int!, $sort: String!, $order: String!) {
orders(limit: $limit, offset: $offset, sort: $sort, order: $order) {
id
name
order_number
created_date
updated_date
order_status
imported_status
delivery_date
ordered_by
delivery_address
notes
imported_date
customer_number
customer_name
import
customer_email
source
buyer_email
buyer_message
cancel_order_sla_time
cancel_reason
cancellation_initiator
fulfillment_type
delivery_type
is_cod
is_replacement_order
seller_note
status
tracking_number
warehouse_id
order_line_items {
id
wholesale_order_id
product_name
quantity
created_date
updated_date
unit
product_id
brand
stock_code
size
status
sale_price
seller_discount
seller_sku
sku_id
sku_image
sku_name
sku_type
original_price
}
}
total_count
}
const orders = await stateset.orders.list({
limit: 20,
offset: 0,
sort: 'created_at',
order: 'desc'
});
const orders = await stateset.orders.list({
status_in: ['processing', 'shipped'],
created_after: '2024-01-01T00:00:00Z',
total_amount_gte: 50.00,
shipping_country: 'US',
include: ['line_items', 'customer'],
sort: 'total_amount',
order: 'desc',
limit: 50
});
// Paginate through all orders
async function getAllOrders(filters = {}) {
const allOrders = [];
let hasMore = true;
let offset = 0;
const limit = 100;
while (hasMore) {
const response = await stateset.orders.list({
...filters,
limit,
offset
});
allOrders.push(...response.orders);
hasMore = response.orders.length === limit;
offset += limit;
// Add delay to respect rate limits
if (hasMore) {
await new Promise(resolve => setTimeout(resolve, 100));
}
}
return allOrders;
}
// Usage
const allProcessingOrders = await getAllOrders({
status: 'processing',
created_after: '2024-01-01'
});
// More efficient for large datasets
async function getOrdersWithCursor(filters = {}) {
const allOrders = [];
let cursor = null;
do {
const response = await stateset.orders.list({
...filters,
cursor,
limit: 100
});
allOrders.push(...response.orders);
cursor = response.next_cursor;
} while (cursor);
return allOrders;
}
// Filter orders dynamically based on user input
class OrderFilter {
constructor(client) {
this.client = client;
this.cache = new Map();
}
async searchOrders(query) {
const cacheKey = JSON.stringify(query);
if (this.cache.has(cacheKey)) {
return this.cache.get(cacheKey);
}
const filters = this.buildFilters(query);
const orders = await this.client.orders.list(filters);
// Cache for 5 minutes
this.cache.set(cacheKey, orders);
setTimeout(() => this.cache.delete(cacheKey), 300000);
return orders;
}
buildFilters(query) {
const filters = { limit: 50 };
if (query.search) {
filters.search = query.search;
}
if (query.status && query.status.length > 0) {
filters.status_in = query.status;
}
if (query.dateRange) {
filters.created_after = query.dateRange.start;
filters.created_before = query.dateRange.end;
}
if (query.amountRange) {
if (query.amountRange.min) filters.total_amount_gte = query.amountRange.min;
if (query.amountRange.max) filters.total_amount_lte = query.amountRange.max;
}
if (query.location) {
filters.shipping_country = query.location.country;
if (query.location.state) filters.shipping_state = query.location.state;
}
return filters;
}
}
orders = stateset.orders.list(
limit=10,
offset=0,
sort='created_date',
order='desc'
)
orders, err := stateset.Orders.List(&stateset.OrderListParams{
Limit: 10,
Offset: 0,
Sort: "created_date",
Order: "desc",
})
orders = Stateset::Order.list(
limit: 10,
offset: 0,
sort: 'created_date',
order: 'desc'
)
OrderListParams params = new OrderListParams.Builder()
.setLimit(10)
.setOffset(0)
.setSort("created_date")
.setOrder("desc")
.build();
OrderCollection orders = Order.list(params);
var orderListOptions = new OrderListOptions
{
Limit = 10,
Offset = 0,
Sort = "created_date",
Order = "desc"
};
var orders = Order.List(orderListOptions);
$orders = $stateset->orders->list([
'limit' => 10,
'offset' => 0,
'sort' => 'created_date',
'order' => 'desc'
]);
GET /v1/orders?limit=10&offset=0&sort=created_date&order=desc HTTP/1.1
Host: api.stateset.com
Content-Type: application/json
Authorization: Bearer <token>
{
"orders": [
{
"id": "ord_1NXWPnCo6bFb1KQto6C8OWvE",
"name": "Example Order 1",
"order_number": "ORD-12345",
"created_date": "2023-08-23T10:00:00Z",
"updated_date": "2023-08-23T11:00:00Z",
"order_status": "Processing",
"imported_status": "Completed",
"delivery_date": "2023-08-30T14:00:00Z",
"ordered_by": "John Doe",
"delivery_address": "123 Main St, Anytown, AN 12345",
"notes": "Please handle with care",
"imported_date": "2023-08-23T09:00:00Z",
"customer_number": "CUST-6789",
"customer_name": "John Doe",
"import": true,
"customer_email": "john.doe@example.com",
"source": "Online Store",
"buyer_email": "john.doe@example.com",
"buyer_message": "Looking forward to receiving the order!",
"cancel_order_sla_time": null,
"cancel_reason": null,
"cancellation_initiator": null,
"fulfillment_type": "Standard",
"delivery_type": "Home Delivery",
"is_cod": false,
"is_replacement_order": false,
"seller_note": "Thank you for your order",
"status": "Processing",
"tracking_number": "TRACK-98765",
"warehouse_id": "wh_2MXYQoDp7cGc2LRup7D9PXvF",
"order_line_items": [
{
"id": "oli_3OYZRpEq8dHd3MSvq8E0QYwG",
"wholesale_order_id": "ord_1NXWPnCo6bFb1KQto6C8OWvE",
"product_name": "Example Product",
"quantity": "2",
"created_date": "2023-08-23T10:05:00Z",
"updated_date": "2023-08-23T10:05:00Z",
"unit": "piece",
"product_id": "prod_4PZaSqFr9eIe4NTwr9F1RZxH",
"brand": "Example Brand",
"stock_code": "EX-1234",
"size": "Medium",
"status": "In Stock",
"sale_price": 2999,
"seller_discount": 500,
"seller_sku": "SKU-5678",
"sku_id": "sku_6QAbTrGs0fJf5OUxs0G2SZyI",
"sku_image": "https://example.com/images/product.jpg",
"sku_name": "Example Product - Medium",
"sku_type": "Standard",
"original_price": 3499
}
]
}
],
"total_count": 1,
"has_more": false,
"next_cursor": null,
"filters_applied": {
"status": "processing",
"created_after": "2024-01-01T00:00:00Z"
},
"pagination": {
"current_page": 1,
"per_page": 20,
"total_pages": 1
}
}
List Orders
Retrieve orders with advanced filtering, pagination, and sorting capabilities
GET
/
api
/
v1
/
orders
curl -X GET "https://api.stateset.com/api/v1/orders?limit=20&offset=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
curl -X GET "https://api.stateset.com/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-G \
--data-urlencode "status_in=processing,shipped" \
--data-urlencode "created_after=2024-01-01T00:00:00Z" \
--data-urlencode "total_amount_gte=50.00" \
--data-urlencode "shipping_country=US" \
--data-urlencode "include=line_items,customer" \
--data-urlencode "sort=total_amount" \
--data-urlencode "order=desc" \
--data-urlencode "limit=50"
curl -X GET "https://api.stateset.com/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
--data-urlencode "search=john@example.com" \
--data-urlencode "status=delivered" \
--data-urlencode "created_after=2024-01-01" \
--data-urlencode "created_before=2024-01-31"
curl -X GET "https://api.stateset.com/api/v1/orders?cursor=eyJpZCI6Im9yZF8xMjM0NSIsImNyZWF0ZWRfYXQiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9&limit=25" \
-H "Authorization: Bearer YOUR_API_KEY"
query ($limit: Int!, $offset: Int!, $sort: String!, $order: String!) {
orders(limit: $limit, offset: $offset, sort: $sort, order: $order) {
id
name
order_number
created_date
updated_date
order_status
imported_status
delivery_date
ordered_by
delivery_address
notes
imported_date
customer_number
customer_name
import
customer_email
source
buyer_email
buyer_message
cancel_order_sla_time
cancel_reason
cancellation_initiator
fulfillment_type
delivery_type
is_cod
is_replacement_order
seller_note
status
tracking_number
warehouse_id
order_line_items {
id
wholesale_order_id
product_name
quantity
created_date
updated_date
unit
product_id
brand
stock_code
size
status
sale_price
seller_discount
seller_sku
sku_id
sku_image
sku_name
sku_type
original_price
}
}
total_count
}
const orders = await stateset.orders.list({
limit: 20,
offset: 0,
sort: 'created_at',
order: 'desc'
});
const orders = await stateset.orders.list({
status_in: ['processing', 'shipped'],
created_after: '2024-01-01T00:00:00Z',
total_amount_gte: 50.00,
shipping_country: 'US',
include: ['line_items', 'customer'],
sort: 'total_amount',
order: 'desc',
limit: 50
});
// Paginate through all orders
async function getAllOrders(filters = {}) {
const allOrders = [];
let hasMore = true;
let offset = 0;
const limit = 100;
while (hasMore) {
const response = await stateset.orders.list({
...filters,
limit,
offset
});
allOrders.push(...response.orders);
hasMore = response.orders.length === limit;
offset += limit;
// Add delay to respect rate limits
if (hasMore) {
await new Promise(resolve => setTimeout(resolve, 100));
}
}
return allOrders;
}
// Usage
const allProcessingOrders = await getAllOrders({
status: 'processing',
created_after: '2024-01-01'
});
// More efficient for large datasets
async function getOrdersWithCursor(filters = {}) {
const allOrders = [];
let cursor = null;
do {
const response = await stateset.orders.list({
...filters,
cursor,
limit: 100
});
allOrders.push(...response.orders);
cursor = response.next_cursor;
} while (cursor);
return allOrders;
}
// Filter orders dynamically based on user input
class OrderFilter {
constructor(client) {
this.client = client;
this.cache = new Map();
}
async searchOrders(query) {
const cacheKey = JSON.stringify(query);
if (this.cache.has(cacheKey)) {
return this.cache.get(cacheKey);
}
const filters = this.buildFilters(query);
const orders = await this.client.orders.list(filters);
// Cache for 5 minutes
this.cache.set(cacheKey, orders);
setTimeout(() => this.cache.delete(cacheKey), 300000);
return orders;
}
buildFilters(query) {
const filters = { limit: 50 };
if (query.search) {
filters.search = query.search;
}
if (query.status && query.status.length > 0) {
filters.status_in = query.status;
}
if (query.dateRange) {
filters.created_after = query.dateRange.start;
filters.created_before = query.dateRange.end;
}
if (query.amountRange) {
if (query.amountRange.min) filters.total_amount_gte = query.amountRange.min;
if (query.amountRange.max) filters.total_amount_lte = query.amountRange.max;
}
if (query.location) {
filters.shipping_country = query.location.country;
if (query.location.state) filters.shipping_state = query.location.state;
}
return filters;
}
}
orders = stateset.orders.list(
limit=10,
offset=0,
sort='created_date',
order='desc'
)
orders, err := stateset.Orders.List(&stateset.OrderListParams{
Limit: 10,
Offset: 0,
Sort: "created_date",
Order: "desc",
})
orders = Stateset::Order.list(
limit: 10,
offset: 0,
sort: 'created_date',
order: 'desc'
)
OrderListParams params = new OrderListParams.Builder()
.setLimit(10)
.setOffset(0)
.setSort("created_date")
.setOrder("desc")
.build();
OrderCollection orders = Order.list(params);
var orderListOptions = new OrderListOptions
{
Limit = 10,
Offset = 0,
Sort = "created_date",
Order = "desc"
};
var orders = Order.List(orderListOptions);
$orders = $stateset->orders->list([
'limit' => 10,
'offset' => 0,
'sort' => 'created_date',
'order' => 'desc'
]);
GET /v1/orders?limit=10&offset=0&sort=created_date&order=desc HTTP/1.1
Host: api.stateset.com
Content-Type: application/json
Authorization: Bearer <token>
{
"orders": [
{
"id": "ord_1NXWPnCo6bFb1KQto6C8OWvE",
"name": "Example Order 1",
"order_number": "ORD-12345",
"created_date": "2023-08-23T10:00:00Z",
"updated_date": "2023-08-23T11:00:00Z",
"order_status": "Processing",
"imported_status": "Completed",
"delivery_date": "2023-08-30T14:00:00Z",
"ordered_by": "John Doe",
"delivery_address": "123 Main St, Anytown, AN 12345",
"notes": "Please handle with care",
"imported_date": "2023-08-23T09:00:00Z",
"customer_number": "CUST-6789",
"customer_name": "John Doe",
"import": true,
"customer_email": "john.doe@example.com",
"source": "Online Store",
"buyer_email": "john.doe@example.com",
"buyer_message": "Looking forward to receiving the order!",
"cancel_order_sla_time": null,
"cancel_reason": null,
"cancellation_initiator": null,
"fulfillment_type": "Standard",
"delivery_type": "Home Delivery",
"is_cod": false,
"is_replacement_order": false,
"seller_note": "Thank you for your order",
"status": "Processing",
"tracking_number": "TRACK-98765",
"warehouse_id": "wh_2MXYQoDp7cGc2LRup7D9PXvF",
"order_line_items": [
{
"id": "oli_3OYZRpEq8dHd3MSvq8E0QYwG",
"wholesale_order_id": "ord_1NXWPnCo6bFb1KQto6C8OWvE",
"product_name": "Example Product",
"quantity": "2",
"created_date": "2023-08-23T10:05:00Z",
"updated_date": "2023-08-23T10:05:00Z",
"unit": "piece",
"product_id": "prod_4PZaSqFr9eIe4NTwr9F1RZxH",
"brand": "Example Brand",
"stock_code": "EX-1234",
"size": "Medium",
"status": "In Stock",
"sale_price": 2999,
"seller_discount": 500,
"seller_sku": "SKU-5678",
"sku_id": "sku_6QAbTrGs0fJf5OUxs0G2SZyI",
"sku_image": "https://example.com/images/product.jpg",
"sku_name": "Example Product - Medium",
"sku_type": "Standard",
"original_price": 3499
}
]
}
],
"total_count": 1,
"has_more": false,
"next_cursor": null,
"filters_applied": {
"status": "processing",
"created_after": "2024-01-01T00:00:00Z"
},
"pagination": {
"current_page": 1,
"per_page": 20,
"total_pages": 1
}
}
This endpoint supports comprehensive filtering, pagination, and sorting. Use query parameters to efficiently retrieve the exact orders you need.
Pagination Parameters
integer
default:"20"
Maximum number of orders to return per page. Range: 1-100.
integer
default:"0"
Number of orders to skip. Use for pagination.
string
Cursor-based pagination token. More efficient for large datasets.
Sorting Parameters
string
default:"created_at"
Sort field. Options:
created_at, updated_at, order_number, total_amount, status, customer_emailstring
default:"desc"
Sort direction. Options:
asc, descFilter Parameters
Status Filters
string
Filter by order status. Options:
pending, processing, shipped, delivered, cancelled, refundedarray
Filter by multiple statuses. Example:
status_in=pending,processingDate Filters
string
Orders created after this date (ISO 8601 format:
2024-01-01T00:00:00Z)string
Orders created before this date (ISO 8601 format:
2024-12-31T23:59:59Z)string
Orders updated after this date
string
Orders shipped after this date
Customer Filters
string
Filter by exact customer email
string
Filter by customer ID
string
Filter by customer tier. Options:
bronze, silver, gold, platinumFinancial Filters
number
Orders with total amount greater than or equal to this value
number
Orders with total amount less than or equal to this value
string
Filter by currency code (ISO 4217). Example:
USD, EUR, GBPLocation Filters
string
Filter by shipping country code (ISO 3166-1). Example:
US, CA, GBstring
Filter by shipping state/province
string
Filter by fulfillment center ID
Product Filters
string
Filter orders containing specific SKU
string
Filter orders containing products from specific category
Source Filters
string
Filter by order source. Options:
website, mobile_app, marketplace, phone, retailstring
Filter by sales channel
Search
string
Full-text search across order number, customer name, email, and product names
Advanced Filters
boolean
Filter orders that have associated returns
boolean
Filter gift orders
string
Filter by fraud risk level. Options:
low, medium, highstring
Filter by order priority. Options:
low, normal, high, urgentInclude Parameters
array
Include related data. Options:
line_items, customer, shipping_address, billing_address, payments, returns, fulfillmentsResponse
array
An array of order objects.
Show Order Object
Show Order Object
string
This is the id of the order.
string
This is the name of the order.
string
This is the order number.
string
This is the date the order was created.
string
This is the date the order was last updated.
string
This is the status of the order.
string
This is the imported status of the order.
string
This is the delivery date of the order.
string
This is the person who ordered.
string
This is the delivery address for the order.
string
These are additional notes for the order.
string
This is the date the order was imported.
string
This is the customer number associated with the order.
string
This is the name of the customer.
boolean
This indicates if the order was imported.
string
This is the email of the customer.
string
This is the source of the order.
string
This is the email of the buyer.
string
This is a message from the buyer.
string
This is the SLA time for cancelling the order.
string
This is the reason for cancellation, if applicable.
string
This is who initiated the cancellation, if applicable.
string
This is the type of fulfillment for the order.
string
This is the type of delivery for the order.
boolean
This indicates if the order is cash on delivery.
boolean
This indicates if this is a replacement order.
string
This is a note from the seller.
string
This is the current status of the order.
string
This is the tracking number for the order.
string
This is the id of the warehouse handling the order.
array
These are the line items associated with the order.
Show Order Line Item Object
Show Order Line Item Object
string
This is the id of the order line item.
string
This is the id of the associated wholesale order.
string
This is the name of the product.
string
This is the quantity of the product ordered.
string
This is the date the line item was created.
string
This is the date the line item was last updated.
string
This is the unit of measurement for the product.
string
This is the id of the product.
string
This is the brand of the product.
string
This is the stock code of the product.
string
This is the size of the product.
string
This is the status of the line item.
integer
This is the sale price of the product.
integer
This is the discount offered by the seller.
string
This is the seller’s SKU for the product.
string
This is the SKU id of the product.
string
This is the image URL for the product SKU.
string
This is the name of the product SKU.
string
This is the type of the product SKU.
integer
This is the original price of the product.
integer
The total number of orders matching the query parameters.
curl -X GET "https://api.stateset.com/api/v1/orders?limit=20&offset=0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
curl -X GET "https://api.stateset.com/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-G \
--data-urlencode "status_in=processing,shipped" \
--data-urlencode "created_after=2024-01-01T00:00:00Z" \
--data-urlencode "total_amount_gte=50.00" \
--data-urlencode "shipping_country=US" \
--data-urlencode "include=line_items,customer" \
--data-urlencode "sort=total_amount" \
--data-urlencode "order=desc" \
--data-urlencode "limit=50"
curl -X GET "https://api.stateset.com/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY" \
-G \
--data-urlencode "search=john@example.com" \
--data-urlencode "status=delivered" \
--data-urlencode "created_after=2024-01-01" \
--data-urlencode "created_before=2024-01-31"
curl -X GET "https://api.stateset.com/api/v1/orders?cursor=eyJpZCI6Im9yZF8xMjM0NSIsImNyZWF0ZWRfYXQiOiIyMDI0LTAxLTE1VDEwOjMwOjAwWiJ9&limit=25" \
-H "Authorization: Bearer YOUR_API_KEY"
query ($limit: Int!, $offset: Int!, $sort: String!, $order: String!) {
orders(limit: $limit, offset: $offset, sort: $sort, order: $order) {
id
name
order_number
created_date
updated_date
order_status
imported_status
delivery_date
ordered_by
delivery_address
notes
imported_date
customer_number
customer_name
import
customer_email
source
buyer_email
buyer_message
cancel_order_sla_time
cancel_reason
cancellation_initiator
fulfillment_type
delivery_type
is_cod
is_replacement_order
seller_note
status
tracking_number
warehouse_id
order_line_items {
id
wholesale_order_id
product_name
quantity
created_date
updated_date
unit
product_id
brand
stock_code
size
status
sale_price
seller_discount
seller_sku
sku_id
sku_image
sku_name
sku_type
original_price
}
}
total_count
}
const orders = await stateset.orders.list({
limit: 20,
offset: 0,
sort: 'created_at',
order: 'desc'
});
const orders = await stateset.orders.list({
status_in: ['processing', 'shipped'],
created_after: '2024-01-01T00:00:00Z',
total_amount_gte: 50.00,
shipping_country: 'US',
include: ['line_items', 'customer'],
sort: 'total_amount',
order: 'desc',
limit: 50
});
// Paginate through all orders
async function getAllOrders(filters = {}) {
const allOrders = [];
let hasMore = true;
let offset = 0;
const limit = 100;
while (hasMore) {
const response = await stateset.orders.list({
...filters,
limit,
offset
});
allOrders.push(...response.orders);
hasMore = response.orders.length === limit;
offset += limit;
// Add delay to respect rate limits
if (hasMore) {
await new Promise(resolve => setTimeout(resolve, 100));
}
}
return allOrders;
}
// Usage
const allProcessingOrders = await getAllOrders({
status: 'processing',
created_after: '2024-01-01'
});
// More efficient for large datasets
async function getOrdersWithCursor(filters = {}) {
const allOrders = [];
let cursor = null;
do {
const response = await stateset.orders.list({
...filters,
cursor,
limit: 100
});
allOrders.push(...response.orders);
cursor = response.next_cursor;
} while (cursor);
return allOrders;
}
// Filter orders dynamically based on user input
class OrderFilter {
constructor(client) {
this.client = client;
this.cache = new Map();
}
async searchOrders(query) {
const cacheKey = JSON.stringify(query);
if (this.cache.has(cacheKey)) {
return this.cache.get(cacheKey);
}
const filters = this.buildFilters(query);
const orders = await this.client.orders.list(filters);
// Cache for 5 minutes
this.cache.set(cacheKey, orders);
setTimeout(() => this.cache.delete(cacheKey), 300000);
return orders;
}
buildFilters(query) {
const filters = { limit: 50 };
if (query.search) {
filters.search = query.search;
}
if (query.status && query.status.length > 0) {
filters.status_in = query.status;
}
if (query.dateRange) {
filters.created_after = query.dateRange.start;
filters.created_before = query.dateRange.end;
}
if (query.amountRange) {
if (query.amountRange.min) filters.total_amount_gte = query.amountRange.min;
if (query.amountRange.max) filters.total_amount_lte = query.amountRange.max;
}
if (query.location) {
filters.shipping_country = query.location.country;
if (query.location.state) filters.shipping_state = query.location.state;
}
return filters;
}
}
orders = stateset.orders.list(
limit=10,
offset=0,
sort='created_date',
order='desc'
)
orders, err := stateset.Orders.List(&stateset.OrderListParams{
Limit: 10,
Offset: 0,
Sort: "created_date",
Order: "desc",
})
orders = Stateset::Order.list(
limit: 10,
offset: 0,
sort: 'created_date',
order: 'desc'
)
OrderListParams params = new OrderListParams.Builder()
.setLimit(10)
.setOffset(0)
.setSort("created_date")
.setOrder("desc")
.build();
OrderCollection orders = Order.list(params);
var orderListOptions = new OrderListOptions
{
Limit = 10,
Offset = 0,
Sort = "created_date",
Order = "desc"
};
var orders = Order.List(orderListOptions);
$orders = $stateset->orders->list([
'limit' => 10,
'offset' => 0,
'sort' => 'created_date',
'order' => 'desc'
]);
GET /v1/orders?limit=10&offset=0&sort=created_date&order=desc HTTP/1.1
Host: api.stateset.com
Content-Type: application/json
Authorization: Bearer <token>
{
"orders": [
{
"id": "ord_1NXWPnCo6bFb1KQto6C8OWvE",
"name": "Example Order 1",
"order_number": "ORD-12345",
"created_date": "2023-08-23T10:00:00Z",
"updated_date": "2023-08-23T11:00:00Z",
"order_status": "Processing",
"imported_status": "Completed",
"delivery_date": "2023-08-30T14:00:00Z",
"ordered_by": "John Doe",
"delivery_address": "123 Main St, Anytown, AN 12345",
"notes": "Please handle with care",
"imported_date": "2023-08-23T09:00:00Z",
"customer_number": "CUST-6789",
"customer_name": "John Doe",
"import": true,
"customer_email": "john.doe@example.com",
"source": "Online Store",
"buyer_email": "john.doe@example.com",
"buyer_message": "Looking forward to receiving the order!",
"cancel_order_sla_time": null,
"cancel_reason": null,
"cancellation_initiator": null,
"fulfillment_type": "Standard",
"delivery_type": "Home Delivery",
"is_cod": false,
"is_replacement_order": false,
"seller_note": "Thank you for your order",
"status": "Processing",
"tracking_number": "TRACK-98765",
"warehouse_id": "wh_2MXYQoDp7cGc2LRup7D9PXvF",
"order_line_items": [
{
"id": "oli_3OYZRpEq8dHd3MSvq8E0QYwG",
"wholesale_order_id": "ord_1NXWPnCo6bFb1KQto6C8OWvE",
"product_name": "Example Product",
"quantity": "2",
"created_date": "2023-08-23T10:05:00Z",
"updated_date": "2023-08-23T10:05:00Z",
"unit": "piece",
"product_id": "prod_4PZaSqFr9eIe4NTwr9F1RZxH",
"brand": "Example Brand",
"stock_code": "EX-1234",
"size": "Medium",
"status": "In Stock",
"sale_price": 2999,
"seller_discount": 500,
"seller_sku": "SKU-5678",
"sku_id": "sku_6QAbTrGs0fJf5OUxs0G2SZyI",
"sku_image": "https://example.com/images/product.jpg",
"sku_name": "Example Product - Medium",
"sku_type": "Standard",
"original_price": 3499
}
]
}
],
"total_count": 1,
"has_more": false,
"next_cursor": null,
"filters_applied": {
"status": "processing",
"created_after": "2024-01-01T00:00:00Z"
},
"pagination": {
"current_page": 1,
"per_page": 20,
"total_pages": 1
}
}
⌘I