API reference · Messages
Get the conversation with a buyer
Returns the messages received from and sent to one buyer in a store, in a single list.
https://out.stockmount.com/api/Integration/GetAllUserMessage
Two queries are merged: incoming messages (type 1) whose From matches User, and sent messages (type 2) whose To matches User. Deleted messages are not included.
Each query returns at most 20 messages, so the response has at most 40 messages, newest first. There is no paging. MessageCount is the sum of the total counts of both queries.
User is matched with a full-text search, not exact equality; similar usernames can also match. MessageTypeId, BiggestIntegrationMessageId and SmallestIntegrationMessageId are ignored on this endpoint.
Messages are imported only for N11 and GittiGidiyor stores. A StoreId that belongs to another account returns an empty list.
Request fields
| Field | Type | Description |
|---|---|---|
ApiCode
required
|
string |
Session code returned by DoLogin.
|
StoreId
required
|
integer |
Store ID (GetStores).
|
User
required
|
string |
Buyer's marketplace username (the From/To value in messages).
|
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 is missing/0 or User is empty. ErrorMessage contains the field name (StoreId or User). |
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,
"User": "alici_123"
}
curl -X POST 'https://out.stockmount.com/api/Integration/GetAllUserMessage' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE",
"StoreId": 1234,
"User": "alici_123"
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE",
"StoreId": 1234,
"User": "alici_123"
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/Integration/GetAllUserMessage",
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,
"User": "alici_123"
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/Integration/GetAllUserMessage');
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,
"User": "alici_123"
}
response = requests.post("https://out.stockmount.com/api/Integration/GetAllUserMessage", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE",
"StoreId": 1234,
"User": "alici_123"
};
const response = await fetch("https://out.stockmount.com/api/Integration/GetAllUserMessage", {
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": 2,
"Messages": [
{
"UserMessageId": 88131,
"Code": "301245678_ANSWER_14",
"Subject": "Ürün sorusu",
"From": "ornekmagaza",
"To": "alici_123",
"MessageTypeId": 2,
"Avatar": "",
"Body": "Merhaba, ürün stoktadır.",
"Time": "2026-11-05T09:10:14Z",
"Unread": false,
"Surname": "",
"Name": "Mehmet K."
},
{
"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.