API
Türkçe

API reference · Messages

List messages

Returns a store's messages from the marketplace by type, newest first, 20 at a time.

POST 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.
1
Inbox
2
Sent
3
Deleted inbox
4
Deleted sent
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.
1
Inbox
2
Sent
3
Deleted inbox
4
Deleted sent
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

CodeWhen
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
}

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.

Use ↑ ↓ to move, Enter to open, Esc to close.

Connect to the Out API

DoLogin is called and the returned ApiCode is kept in this tab. Your API password is never sent to this site.