API reference · Orders
List orders
Returns a store's orders in one status, page by page.
https://out.stockmount.com/api/Integration/GetSales
StoreId and OrderStatus are always required. On top of that use one of three modes: (1) a StartDate + EndDate range, (2) ID-based incremental fetch with BiggestOrderDetailId or SmallestOrderDetailId, (3) change-based fetch with LastModificationTimeFrom. In modes (2) and (3) the dates are optional and the 7-day limit does not apply; if you still send dates they are applied as filters.
In date-range mode StartDate must be earlier than EndDate and the gap can be at most 7 days (exactly 7 is accepted). The filter applies to the order's OrderDate. Note: the server adds 1 day to EndDate and includes both bounds. For example StartDate=2026-11-01T00:00:00, EndDate=2026-11-02T00:00:00 returns orders from 1 Nov 00:00 to 3 Nov 00:00. If you scan with consecutive windows you can receive the same order twice; deduplicate by OrderId.
Send dates as ISO 8601 in Turkey time (UTC+3) without an offset, e.g. 2026-11-05T14:30:00. A trailing Z is ignored: the value is still treated as Turkey time. An explicit offset such as +03:00 is converted correctly. Do not use local formats like 05.11.2026; day and month can be swapped.
Time zones in the response are mixed. OrderDate, CargoDate, InvoiceTime, PackageTime and WayBillTime are converted to UTC and end with Z. LastModificationTime is not converted and is Turkey time without an offset. If you reuse a returned OrderDate as StartDate, convert it back to Turkey time first.
Empty dates are not returned as null. Empty CargoDate, InvoiceTime, PackageTime and WayBillTime come back as 1899-12-31T22:03:00Z (1900-01-01 Turkey time in UTC). Treat any date before 1900 as empty. Fields whose value is null (e.g. PaymentMethod, CompanyTitle) are omitted from the response.
Paging: PageIndex starts at 1; 0 or missing means 1. RowsByPage is orders per page (not lines); missing or 0 means 20, the maximum is 200. Larger values are silently capped at 200. Results are always sorted by OrderDate descending (newest first). TotalOrderCount is the total number of matching orders; page count = ceil(TotalOrderCount / RowsByPage). Paging is offset-based, so records can shift between pages if new orders arrive while you page.
The status filter works at line (order item) level. An order is returned only with its lines in the requested status; lines of the same order in other statuses are not in this response. To get every line, call once per status code or use GetOrder. Valid codes come from GetIntegrationOrderListingStatus and differ per marketplace. An unknown code is not an error; it returns an empty list.
With BiggestOrderDetailId you get orders that have at least one line whose OrderDetailId is greater than the value; SmallestOrderDetailId does the same for smaller IDs. These filters, InvoiceStatus and LastModificationTimeFrom/To only decide which orders are selected. A selected order comes back with all its lines in the requested status, so lines you already have can come again. Deduplicate by OrderDetailId.
LastModificationTimeFrom/To filter on the line's LastModificationTime (Turkey time, bounds included, values after year 2000). The value changes when the line status changes. Only LastModificationTimeFrom lifts the date requirement; if you send only LastModificationTimeTo, StartDate/EndDate are still required. Lines with an empty LastModificationTime never match this filter.
Validation errors use code 00003. ErrorMessage holds the field name (StoreId, OrderStatus) or a Turkish text: StartDate parametresi boş olamaz (StartDate is empty), EndDate parametresi boş olamaz (EndDate is empty), StartDate parametresi EndDate parametresinden büyük olamaz (StartDate is after EndDate; also returned when they are equal), EndDate parametresi ile StartDate parametresi farkı 7 günden fazla olamaz (range longer than 7 days).
For Amazon stores buyer and address fields are stored encrypted and decrypted before the response is sent. The request fields OrderId and LiveResult are ignored here. GetOrders is an old alias that does exactly the same; use GetSales in new integrations.
TotalNotInvoicedCount and TotalUnreadCount always return 0; do not use them.
Request fields
| Field | Type | Description |
|---|---|---|
ApiCode
required
|
string |
API code returned by DoLogin.
|
StoreId
required
|
integer |
Store ID (from GetStores).
|
OrderStatus
required
|
string |
Line status code. Get the codes for the store's marketplace from GetIntegrationOrderListingStatus (the Code field). Codes for StockMount stores are listed below.
|
StartDate
|
datetime |
Start of the OrderDate range, Turkey time without offset. Required in date-range mode.
|
EndDate
|
datetime |
End of the range. Must be after StartDate, at most 7 days later. The server adds 1 day to it. Required in date-range mode.
|
BiggestOrderDetailId
|
integer |
Returns orders with a line whose ID is greater than this (for incremental fetch, pass the largest OrderDetailId you have seen).
|
SmallestOrderDetailId
|
integer | Returns orders with a line whose ID is smaller than this. |
LastModificationTimeFrom
|
datetime |
Lines whose LastModificationTime is greater than or equal to this. When set, the date range is not required.
|
LastModificationTimeTo
|
datetime |
Lines whose LastModificationTime is less than or equal to this.
|
InvoiceStatus
|
integer |
Filter by invoice state. Default 0. Values not in the list behave like 0.
|
PageIndex
|
integer | Page number, starting at 1. Default 1. |
RowsByPage
|
integer | Orders per page. Default 20, maximum 200. |
Response fields (Response)
| Field | Type | Description |
|---|---|---|
TotalOrderCount
|
integer | Total number of matching orders across all pages. |
TotalNotInvoicedCount
|
integer |
Always 0.
|
TotalUnreadCount
|
integer |
Always 0.
|
Orders
|
object[] | Orders on this page. |
Orders[].
OrderId
|
integer |
StockMount order ID. Use it with GetOrder, SetOrderNotes and similar endpoints.
|
Orders[].
StoreId
|
integer | Store ID. |
Orders[].
IntegrationOrderCode
|
string | Order number on the marketplace. |
Orders[].
OrderDate
|
datetime |
Order date in UTC (with Z). An order placed at 14:30 Turkey time returns …T11:30:00Z.
|
Orders[].
OrderStatus
|
string | The status code you requested (line-level filter). |
Orders[].
OrderType
|
integer |
Order type.
|
Orders[].
Name
|
string | Buyer first name. |
Orders[].
Surname
|
string | Buyer last name. |
Orders[].
Fullname
|
string |
Company title for corporate buyers, otherwise the full name (falls back to Name). No separate CompanyTitle field is returned.
|
Orders[].
Nickname
|
string | Buyer's user name on the marketplace. |
Orders[].
PersonType
|
string |
Buyer type as a fixed Turkish text.
|
Orders[].
PersonalIdentification
|
string | Turkish national ID number. |
Orders[].
TaxAuthority
|
string | Tax office. |
Orders[].
TaxNumber
|
string | Tax number. |
Orders[].
Email
|
string | Buyer e-mail address. |
Orders[].
Telephone
|
string | Buyer phone number. |
Orders[].
Address
|
string | Billing address, postal code, district and city joined with spaces. |
Orders[].
District
|
string | District. |
Orders[].
City
|
string | City. |
Orders[].
PostalCode
|
string | Postal code. |
Orders[].
Country
|
string | Country. Can be empty. |
Orders[].
Notes
|
string |
Order note (written by SetOrderNotes).
|
Orders[].
Member
|
string | Raw membership info from the marketplace (e.g. an IdeaSoft JSON string). Usually empty. |
Orders[].
PaymentType
|
string | Payment type reported by the marketplace (e.g. ÇiçekSepeti, IdeaSoft, Pazarama). Usually empty. |
Orders[].
RowSalt
|
string | Internal field (encryption salt, Base64). Normally absent; ignore it if present. |
Orders[].
OrderDetails
|
object[] | Lines of the order in the requested status. |
Orders[].OrderDetails[].
OrderDetailId
|
integer | StockMount order line ID. Use this value in the other line endpoints. |
Orders[].OrderDetails[].
StoreId
|
integer | Store ID. |
Orders[].OrderDetails[].
IntegrationOrderDetailId
|
string |
The line's ID on the marketplace. Additional service lines may carry a synthetic value containing _, such as {orderNo}_Service.
|
Orders[].OrderDetails[].
ProductId
|
integer |
Matched StockMount product ID. 0 when the line is not matched to a product.
|
Orders[].OrderDetails[].
IntegrationProductCode
|
string |
The product's code on the marketplace. Additional service lines use fixed codes: 999999999999 service fee, 999999999998 instalment difference, 999999999997 commission, 999999999996 payment service fee, 999999999995 shipping fee, 999999999994 gift wrapping, 999999999993 account payment service fee.
|
Orders[].OrderDetails[].
ProductName
|
string | Product name on the marketplace; falls back to the matched StockMount product name. Omitted when both are empty. |
Orders[].OrderDetails[].
ProductCode
|
string |
Matched StockMount product code. Without a match: MerchantSku, then IntegrationProductCode.
|
Orders[].OrderDetails[].
ProductCode2
|
string | Second code of the StockMount product. Empty string when not set. |
Orders[].OrderDetails[].
Barcode
|
string | Barcode of the matched StockMount product. Empty string without a match. |
Orders[].OrderDetails[].
MerchantSku
|
string | Merchant SKU reported by the marketplace. |
Orders[].OrderDetails[].
ProductImage
|
string | First image of the matched StockMount product; otherwise the marketplace image URL. |
Orders[].OrderDetails[].
ProductUnit
|
string | Sales unit, when the marketplace provides one. |
Orders[].OrderDetails[].
ProductVariantCode
|
string | Variant code of the line. Empty string when not set. |
Orders[].OrderDetails[].
ProductVariantId
|
integer |
Always 0; do not use.
|
Orders[].OrderDetails[].
VariantProductCode
|
string | Code of the matched StockMount variant. Empty string when not matched. |
Orders[].OrderDetails[].
VariantProductBarcode
|
string | Barcode of the matched StockMount variant. Empty string when not matched. |
Orders[].OrderDetails[].
VariantPhrase
|
string |
Variant text from the marketplace (e.g. Color: Black, Size: M).
|
Orders[].OrderDetails[].
VariantName1
|
string | Name of variant attribute 1. |
Orders[].OrderDetails[].
VariantValue1
|
string | Value of variant attribute 1. |
Orders[].OrderDetails[].
VariantName2
|
string | Name of variant attribute 2. |
Orders[].OrderDetails[].
VariantValue2
|
string | Value of variant attribute 2. |
Orders[].OrderDetails[].
VariantName3
|
string | Name of variant attribute 3. |
Orders[].OrderDetails[].
VariantValue3
|
string | Value of variant attribute 3. |
Orders[].OrderDetails[].
Price
|
number |
Unit price. Line total = Price × RawQuantity (StockMount's own reports compute it this way).
|
Orders[].OrderDetails[].
Quantity
|
integer |
Quantity truncated to an integer. Use RawQuantity for fractional quantities.
|
Orders[].OrderDetails[].
RawQuantity
|
number | Exact (decimal) quantity. |
Orders[].OrderDetails[].
TaxRate
|
number |
VAT rate (e.g. 20). If the line is matched to a StockMount product whose rate is above 0, the product's rate is used; otherwise the rate the marketplace sent. Orders with OrderType = 2 always return the marketplace rate.
|
Orders[].OrderDetails[].
DetailType
|
integer |
Line type.
|
Orders[].OrderDetails[].
OrderStatus
|
string |
Status of this line. In GetSales it always equals the requested OrderStatus.
|
Orders[].OrderDetails[].
Invoiced
|
boolean |
true when the line is marked as invoiced.
|
Orders[].OrderDetails[].
InvoiceNumber
|
string | Invoice number. Empty string when not set. |
Orders[].OrderDetails[].
InvoiceTime
|
datetime |
Invoice date in UTC (with Z). When there is no value it returns 1899-12-31T22:03:00Z instead of null (1900-01-01 Turkey time converted to UTC).
|
Orders[].OrderDetails[].
PackageNumber
|
string |
Marketplace package number (e.g. the Trendyol package ID). Empty string when not set. Note: GetOrder returns the StockMount package number written by SetOrderDetailInvoiced in this field instead.
|
Orders[].OrderDetails[].
PackageTime
|
datetime |
Package date in UTC. When there is no value it returns 1899-12-31T22:03:00Z instead of null (1900-01-01 Turkey time converted to UTC).
|
Orders[].OrderDetails[].
WayBillNumber
|
string | Waybill number. Empty string when not set. |
Orders[].OrderDetails[].
WayBillTime
|
datetime |
Waybill date in UTC. When there is no value it returns 1899-12-31T22:03:00Z instead of null (1900-01-01 Turkey time converted to UTC).
|
Orders[].OrderDetails[].
Unread
|
boolean |
true when the line is flagged as unread in the StockMount panel.
|
Orders[].OrderDetails[].
SmUserSchemaId
|
integer |
Template (schema) ID of the matched StockMount product. 0 without a match.
|
Orders[].OrderDetails[].
SchemaName
|
string | Template name of the matched product. Empty string when not set. |
Orders[].OrderDetails[].
DeliveryTitle
|
string | Recipient name or title on the delivery address. |
Orders[].OrderDetails[].
Address
|
string | Delivery address, postal code, district and city joined with spaces. Can consist only of spaces when the line has no address. |
Orders[].OrderDetails[].
District
|
string | Delivery district. |
Orders[].OrderDetails[].
City
|
string | Delivery city. |
Orders[].OrderDetails[].
Country
|
string | Delivery country. Can be empty. |
Orders[].OrderDetails[].
PostalCode
|
string | Postal code of the order (not of the line). |
Orders[].OrderDetails[].
Telephone
|
string | Delivery phone number. |
Orders[].OrderDetails[].
CargoCompany
|
string | Shipping company name. |
Orders[].OrderDetails[].
CargoLabelCode
|
string | Shipment tracking / label code. Empty when no shipment info has been set for the line. |
Orders[].OrderDetails[].
CargoPayment
|
string |
Who pays for shipping; usually Seller, Buyer or Unknown.
|
Orders[].OrderDetails[].
CargoDate
|
datetime |
Date the shipment info was set, in UTC. When there is no value it returns 1899-12-31T22:03:00Z instead of null (1900-01-01 Turkey time converted to UTC).
|
Orders[].OrderDetails[].
ShipmentCampaignCode
|
string | Shipping campaign / shipment code from the marketplace. |
Orders[].OrderDetails[].
LastModificationTime
|
datetime |
Last modification time of the line. Unlike the other dates it is not converted to UTC: it is Turkey time without an offset (e.g. 2026-11-05T14:30:00).
|
Orders[].OrderDetails[].
RowSalt
|
string | Internal field (encryption salt, Base64). Normally absent; ignore it if present. |
Error codes for this endpoint
| Code | When |
|---|---|
10001 |
StoreId is not a store in your account (ErrorMessage: Invalid store.). |
99999 |
Database error or unexpected exception. |
For session errors (00001, 00006) and every other code see error codes.
Related endpoints
Example request
{
"ApiCode": "API_CODE",
"StoreId": 12345,
"OrderStatus": "New",
"StartDate": "2026-11-01T00:00:00",
"EndDate": "2026-11-04T00:00:00",
"InvoiceStatus": 0,
"PageIndex": 1,
"RowsByPage": 100
}
curl -X POST 'https://out.stockmount.com/api/Integration/GetSales' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE",
"StoreId": 12345,
"OrderStatus": "New",
"StartDate": "2026-11-01T00:00:00",
"EndDate": "2026-11-04T00:00:00",
"InvoiceStatus": 0,
"PageIndex": 1,
"RowsByPage": 100
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE",
"StoreId": 12345,
"OrderStatus": "New",
"StartDate": "2026-11-01T00:00:00",
"EndDate": "2026-11-04T00:00:00",
"InvoiceStatus": 0,
"PageIndex": 1,
"RowsByPage": 100
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/Integration/GetSales",
new StringContent(json, Encoding.UTF8, "application/json"));
var result = await response.Content.ReadAsStringAsync();
// Result == false ise ErrorCode ve ErrorMessage alanlarına bakın.
Console.WriteLine(result);
<?php
$body = <<<'JSON'
{
"ApiCode": "API_CODE",
"StoreId": 12345,
"OrderStatus": "New",
"StartDate": "2026-11-01T00:00:00",
"EndDate": "2026-11-04T00:00:00",
"InvoiceStatus": 0,
"PageIndex": 1,
"RowsByPage": 100
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/Integration/GetSales');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
if (!$result['Result']) {
echo $result['ErrorCode'] . ' ' . $result['ErrorMessage'];
}
import requests
payload = {
"ApiCode": "API_CODE",
"StoreId": 12345,
"OrderStatus": "New",
"StartDate": "2026-11-01T00:00:00",
"EndDate": "2026-11-04T00:00:00",
"InvoiceStatus": 0,
"PageIndex": 1,
"RowsByPage": 100
}
response = requests.post("https://out.stockmount.com/api/Integration/GetSales", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE",
"StoreId": 12345,
"OrderStatus": "New",
"StartDate": "2026-11-01T00:00:00",
"EndDate": "2026-11-04T00:00:00",
"InvoiceStatus": 0,
"PageIndex": 1,
"RowsByPage": 100
};
const response = await fetch("https://out.stockmount.com/api/Integration/GetSales", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
const result = await response.json();
if (!result.Result) {
console.error(result.ErrorCode, result.ErrorMessage);
}
Example response
{
"Result": true,
"Response": {
"TotalOrderCount": 1,
"TotalNotInvoicedCount": 0,
"TotalUnreadCount": 0,
"Orders": [
{
"OrderId": 4567890,
"StoreId": 12345,
"IntegrationOrderCode": "10293847",
"OrderDate": "2026-11-04T07:12:45Z",
"OrderStatus": "New",
"OrderType": 0,
"Name": "Ayşe",
"Surname": "Yılmaz",
"Fullname": "Ayşe Yılmaz",
"Nickname": "ayseyilmaz",
"PersonType": "Gerçek Kişi",
"PersonalIdentification": "11111111111",
"TaxAuthority": "",
"TaxNumber": "11111111111",
"Email": "ayse@example.com",
"Telephone": "05551112233",
"Address": "Örnek Mah. Deneme Sok. No:5 D:3 34710 Kadıköy İstanbul",
"District": "Kadıköy",
"City": "İstanbul",
"PostalCode": "34710",
"Country": "Türkiye",
"Notes": "",
"Member": "",
"PaymentType": "",
"OrderDetails": [
{
"OrderDetailId": 9876543,
"StoreId": 12345,
"IntegrationOrderDetailId": "3456789012",
"ProductId": 554433,
"IntegrationProductCode": "TSH-001-BLK-M",
"ProductName": "Basic Tişört Siyah M",
"ProductCode": "TSH-001",
"ProductCode2": "",
"Barcode": "8691234567890",
"MerchantSku": "TSH-001-BLK-M",
"ProductImage": "https://cdn.example.com/img/tsh-001.jpg",
"ProductUnit": "Adet",
"ProductVariantCode": "TSH-001-BLK-M",
"ProductVariantId": 0,
"VariantProductCode": "TSH-001-BLK-M",
"VariantProductBarcode": "8691234567890",
"VariantPhrase": "Renk: Siyah, Beden: M",
"VariantName1": "Renk",
"VariantValue1": "Siyah",
"VariantName2": "Beden",
"VariantValue2": "M",
"VariantName3": "",
"VariantValue3": "",
"Price": 249.9,
"Quantity": 2,
"RawQuantity": 2.0,
"TaxRate": 20.0,
"DetailType": 1,
"OrderStatus": "New",
"Invoiced": false,
"InvoiceNumber": "",
"InvoiceTime": "1899-12-31T22:03:00Z",
"PackageNumber": "",
"PackageTime": "1899-12-31T22:03:00Z",
"WayBillNumber": "",
"WayBillTime": "1899-12-31T22:03:00Z",
"Unread": true,
"SmUserSchemaId": 77,
"SchemaName": "Giyim",
"DeliveryTitle": "Ayşe Yılmaz",
"Address": "Örnek Mah. Deneme Sok. No:5 D:3 34710 Kadıköy İstanbul",
"District": "Kadıköy",
"City": "İstanbul",
"Country": "Türkiye",
"PostalCode": "34710",
"Telephone": "05551112233",
"CargoCompany": "",
"CargoLabelCode": "",
"CargoPayment": "Seller",
"CargoDate": "1899-12-31T22:03:00Z",
"ShipmentCampaignCode": "7330012345678",
"LastModificationTime": "2026-11-04T10:15:22"
}
]
}
]
}
}
Try it
The request goes straight from your browser to out.stockmount.com. The ApiCode is not stored by this site; it is kept only while this tab is open.
Get an ApiCode before sending requests.
Recent requests
Requests sent from this tab; click one to load its body again.