API reference · Messages
Mark a message as read
Marks a message as read in StockMount.
https://out.stockmount.com/api/Integration/SetMessageRead
The supported integration is N11 (IntegrationId 2). The message is marked as read only in StockMount; nothing is sent to N11.
Any IntegrationId other than 1 (GittiGidiyor) and 2 (N11) returns 99999 with an empty ErrorMessage.
Specify the message with UserMessageId. The response is successful (Result: true) even if the message is not found; check Unread in GetUserMessages to confirm.
A successful response has no Response field.
Request fields
| Field | Type | Description |
|---|---|---|
ApiCode
required
|
string |
Session code returned by DoLogin.
|
StoreId
required
|
integer | ID of the store the message belongs to. |
IntegrationId
required
|
integer | The store's integration ID. 2 for N11. |
UserMessageId
|
integer |
UserMessageId of the message to mark as read. Not validated; if omitted, no message changes but the response is still successful.
|
Response fields (Response)
On success the Response field is empty; read the outcome from Result.
Error codes for this endpoint
| Code | When |
|---|---|
00003 |
StoreId or IntegrationId is missing or 0. ErrorMessage contains the field name. |
99999 |
IntegrationId is not supported (other than 1 and 2; ErrorMessage empty) or a server error occurred. |
For session errors (00001, 00006) and every other code see error codes.
Related endpoints
Example request
{
"ApiCode": "API_CODE",
"StoreId": 1234,
"IntegrationId": 2,
"UserMessageId": 88119
}
curl -X POST 'https://out.stockmount.com/api/Integration/SetMessageRead' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE",
"StoreId": 1234,
"IntegrationId": 2,
"UserMessageId": 88119
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE",
"StoreId": 1234,
"IntegrationId": 2,
"UserMessageId": 88119
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/Integration/SetMessageRead",
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": 1234,
"IntegrationId": 2,
"UserMessageId": 88119
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/Integration/SetMessageRead');
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": 1234,
"IntegrationId": 2,
"UserMessageId": 88119
}
response = requests.post("https://out.stockmount.com/api/Integration/SetMessageRead", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE",
"StoreId": 1234,
"IntegrationId": 2,
"UserMessageId": 88119
};
const response = await fetch("https://out.stockmount.com/api/Integration/SetMessageRead", {
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
}
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.