API reference · Orders
Change line status
Updates the status of order lines in StockMount-type stores in bulk.
https://out.stockmount.com/api/Integration/SetOrderDetailStatus
Works only for StockMount-type stores (IntegrationId 9999) and sends nothing to any marketplace. Lines of marketplace stores return an error.
Lines are processed one by one. Response is a list with one result per line: Result, ErrorCode, ErrorMessage and Response holding the line's OrderDetailId. The top-level Result is true only if every line succeeded; on partial failure the top-level ErrorCode is empty, so check the list.
OrderStatus is not validated (max 50 characters). Use StockMount status codes for consistency. When the status actually changes, the line's LastModificationTime is updated, so changes can be tracked with GetSales + LastModificationTimeFrom.
Only the line status changes, not the order-level status. GetOrder therefore keeps showing the old order-level status; GetSales and GetOrderDetailStatus show the line status.
Request fields
| Field | Type | Description |
|---|---|---|
ApiCode
required
|
string |
API code returned by DoLogin.
|
OrderDetails
required
|
object[] | Lines to update. |
OrderDetails[].
OrderDetailId
required
|
integer | StockMount order line ID. |
OrderDetails[].
StoreId
required
|
integer | Store ID of the line (StockMount-type store). |
OrderDetails[].
OrderStatus
required
|
string |
New status code.
|
Response fields (Response)
| Field | Type | Description |
|---|---|---|
Result
|
boolean |
true when this line was updated.
|
ErrorCode
|
string |
Line error code: 00003 for validation/store errors, 99999 otherwise.
|
ErrorMessage
|
string |
Line error: OrderDetail.StoreId, OrderDetail.OrderDetailId, OrderDetail.OrderStatus, InvalidStore, Store has to be StockMount store!, or NotExisted when the line is not found. Empty when the line belongs to another user.
|
Response
|
integer |
The OrderDetailId from the request.
|
Error codes for this endpoint
| Code | When |
|---|---|
99999 |
Unexpected error for the whole request. Per-line errors are in the Response list. |
For session errors (00001, 00006) and every other code see error codes.
Related endpoints
Example request
{
"ApiCode": "API_CODE",
"OrderDetails": [
{
"OrderDetailId": 9877001,
"StoreId": 67890,
"OrderStatus": "Shipped"
},
{
"OrderDetailId": 9877002,
"StoreId": 67890,
"OrderStatus": "Shipped"
}
]
}
curl -X POST 'https://out.stockmount.com/api/Integration/SetOrderDetailStatus' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE",
"OrderDetails": [
{
"OrderDetailId": 9877001,
"StoreId": 67890,
"OrderStatus": "Shipped"
},
{
"OrderDetailId": 9877002,
"StoreId": 67890,
"OrderStatus": "Shipped"
}
]
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE",
"OrderDetails": [
{
"OrderDetailId": 9877001,
"StoreId": 67890,
"OrderStatus": "Shipped"
},
{
"OrderDetailId": 9877002,
"StoreId": 67890,
"OrderStatus": "Shipped"
}
]
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/Integration/SetOrderDetailStatus",
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",
"OrderDetails": [
{
"OrderDetailId": 9877001,
"StoreId": 67890,
"OrderStatus": "Shipped"
},
{
"OrderDetailId": 9877002,
"StoreId": 67890,
"OrderStatus": "Shipped"
}
]
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/Integration/SetOrderDetailStatus');
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",
"OrderDetails": [
{
"OrderDetailId": 9877001,
"StoreId": 67890,
"OrderStatus": "Shipped"
},
{
"OrderDetailId": 9877002,
"StoreId": 67890,
"OrderStatus": "Shipped"
}
]
}
response = requests.post("https://out.stockmount.com/api/Integration/SetOrderDetailStatus", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE",
"OrderDetails": [
{
"OrderDetailId": 9877001,
"StoreId": 67890,
"OrderStatus": "Shipped"
},
{
"OrderDetailId": 9877002,
"StoreId": 67890,
"OrderStatus": "Shipped"
}
]
};
const response = await fetch("https://out.stockmount.com/api/Integration/SetOrderDetailStatus", {
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": false,
"Response": [
{
"Result": true,
"Response": 9877001
},
{
"Result": false,
"ErrorCode": "99999",
"ErrorMessage": "NotExisted",
"Response": 9877002
}
]
}
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.
This endpoint changes real data in your account.
Recent requests
Requests sent from this tab; click one to load its body again.