API
Türkçe

API reference · Messages

Reply to a message

Answers a buyer question on the marketplace and stores the answer in StockMount as a sent message.

POST https://out.stockmount.com/api/Integration/SendUserMessage
Changes data

The supported integration is N11 (IntegrationId 2). Only an existing product question can be answered; you cannot start a new conversation. Send the question's Code in UserMessageCode; it must be numeric.

After sending, the answer is stored as a sent message (type 2) with a code in the form {questionCode}_ANSWER_{n}. The answered question is closed.

If SetMessageRead is true, the question given by UserMessageId is also marked as read.

Also send Subject and From. If they are missing, the answer may reach N11 but cannot be stored in StockMount and the call returns 99999; in that case check the answer on N11 before retrying.

A successful response does not guarantee that N11 accepted the answer: the request to N11 is started but its result is not awaited. Errors on the N11 side are not reported by this endpoint.

Any IntegrationId other than 1 and 2 returns 99999 with an empty ErrorMessage. 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 question belongs to.
IntegrationId required integer The store's integration ID. 2 for N11.
UserMessageCode required string Code of the question to answer (N11 question ID, numeric). Required for N11.
Message required string Answer text.
To required string Buyer's username (the question's From value). Stored as the recipient.
From string Value stored as the sender (e.g. your store name). If omitted, storing fails.
Subject string Subject to store (e.g. the question's Subject). If omitted, storing fails.
SetMessageRead boolean Optional. If true, the question is also marked as read. Default false.
UserMessageId integer UserMessageId of the question being answered. Used when SetMessageRead is true.

Response fields (Response)

On success the Response field is empty; read the outcome from Result.

Error codes for this endpoint

CodeWhen
10001 StoreId is not a store in your account (ErrorMessage: Invalid store.).
00003 A required field is missing. ErrorMessage: StoreId, IntegrationId, Message, To, or MessageCode when UserMessageCode is empty for N11.
99999 IntegrationId is not supported (ErrorMessage empty), the store has no N11 API credentials (ErrorMessage empty), UserMessageCode is not numeric, the answer could not be stored in StockMount, 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,
  "UserMessageCode": "301245678",
  "UserMessageId": 88119,
  "To": "alici_123",
  "From": "ornekmagaza",
  "Subject": "Ürün sorusu",
  "Message": "Merhaba, ürün stoktadır.",
  "SetMessageRead": true
}

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.

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.