API reference · Messages
List messages
Returns a store's messages from the marketplace by type, newest first, 20 at a time.
https://out.stockmount.com/api/Integration/GetUserMessages
Messages are records imported from the marketplace into StockMount. In code, message import exists only for N11 (IntegrationId 2) and GittiGidiyor (1) stores; for other stores the list is empty.
Each call returns at most 20 messages, newest first by Time. The page size cannot be changed.
Paging is by ID. For older messages, send the smallest UserMessageId you have as SmallestIntegrationMessageId; messages with a smaller ID are returned. For new messages, send the largest UserMessageId you know as BiggestIntegrationMessageId; messages with a larger ID are returned. Both fields can be combined.
Note: if you send only BiggestIntegrationMessageId and there are more than 20 new messages, you get the newest 20 and the ones in between are skipped. Keep BiggestIntegrationMessageId and send the smallest ID from the last batch as SmallestIntegrationMessageId to continue backwards.
MessageCount is the total number of messages matching the filter. A StoreId that belongs to another account is not an error; it returns an empty list.
Integration/GetUserMessage is an alias that does the same thing.
Request fields
| Field | Type | Description |
|---|---|---|
ApiCode
required
|
string |
Session code returned by DoLogin.
|
StoreId
required
|
integer |
ID of the store whose messages you want (GetStores).
|
MessageTypeId
required
|
integer |
Message type.
|
SmallestIntegrationMessageId
|
integer |
Optional. Returns only messages whose UserMessageId is smaller (older) than this.
|
BiggestIntegrationMessageId
|
integer |
Optional. Returns only messages whose UserMessageId is larger (newer) than this.
|
Response fields (Response)
| Field | Type | Description |
|---|---|---|
MessageCount
|
integer | Total number of messages matching the filter (not the number returned). |
Messages
|
object[] | Messages, newest first. |
Messages[].
UserMessageId
|
integer |
StockMount message ID. Used for paging and SetMessageRead.
|
Messages[].
Code
|
string |
Message code on the marketplace. For N11 questions it is the question ID; send it as UserMessageCode when replying.
|
Messages[].
Subject
|
string | Message subject. |
Messages[].
From
|
string | Sender (for incoming messages, the buyer's marketplace username). |
Messages[].
To
|
string | Recipient. |
Messages[].
MessageTypeId
|
integer |
Message type.
|
Messages[].
Avatar
|
string | Buyer's image. Usually empty. |
Messages[].
Body
|
string | Message text. |
Messages[].
Time
|
datetime |
Message time in UTC, ISO 8601 (e.g. 2026-11-05T08:42:10Z).
|
Messages[].
Unread
|
boolean |
true: the message is unread.
|
Messages[].
Surname
|
string | Buyer's last name. Can be empty. |
Messages[].
Name
|
string | Buyer's first name. If no first and last name are stored, the full name from the message is returned. |
Error codes for this endpoint
| Code | When |
|---|---|
00003 |
StoreId or MessageTypeId is missing or 0. ErrorMessage contains the field name. |
99999 |
An unexpected server-side error occurred (e.g. a database error). On this endpoint ErrorMessage is usually empty. |
For session errors (00001, 00006) and every other code see error codes.
Related endpoints
Example request
{
"ApiCode": "API_CODE",
"StoreId": 1234,
"MessageTypeId": 1,
"SmallestIntegrationMessageId": 88120
}
curl -X POST 'https://out.stockmount.com/api/Integration/GetUserMessages' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE",
"StoreId": 1234,
"MessageTypeId": 1,
"SmallestIntegrationMessageId": 88120
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE",
"StoreId": 1234,
"MessageTypeId": 1,
"SmallestIntegrationMessageId": 88120
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/Integration/GetUserMessages",
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,
"MessageTypeId": 1,
"SmallestIntegrationMessageId": 88120
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/Integration/GetUserMessages');
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,
"MessageTypeId": 1,
"SmallestIntegrationMessageId": 88120
}
response = requests.post("https://out.stockmount.com/api/Integration/GetUserMessages", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE",
"StoreId": 1234,
"MessageTypeId": 1,
"SmallestIntegrationMessageId": 88120
};
const response = await fetch("https://out.stockmount.com/api/Integration/GetUserMessages", {
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": {
"MessageCount": 57,
"Messages": [
{
"UserMessageId": 88119,
"Code": "301245678",
"Subject": "Ürün sorusu",
"From": "alici_123",
"To": "ornekmagaza",
"MessageTypeId": 1,
"Avatar": "",
"Body": "Bu ürün stokta var mı?",
"Time": "2026-11-05T08:42:10Z",
"Unread": true,
"Surname": "",
"Name": "Mehmet K."
}
]
}
}
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.