API
Türkçe

API reference · Authentication

Log in and get an ApiCode

Logs in with an API key and password and returns the ApiCode you send with every other request.

POST https://out.stockmount.com/api/User/DoLogin

You create the API key and password in the StockMount panel under Settings → API service settings. An account can have at most 2 keys. Only keys with active status can log in.

Send the returned ApiCode in the ApiCode field of the JSON body of every other request. It is an encrypted, opaque string and can contain +, / and =. Do not try to decode or modify it.

The session is valid for the period set in the system settings, counted from the last login with the same credentials (in minutes; default 1440 minutes = 24 hours). Service calls do not extend it. When it expires, requests return 00001 with "Your session has timed out, please refresh your ApiCode using 'DoLogin' service.". Then call DoLogin for a new ApiCode and retry the request.

If you call DoLogin again with the same credentials while the session is valid, the credentials are checked again, the same ApiCode is returned and the session period starts over. Every system that uses the same API key gets the same ApiCode. Store the ApiCode and reuse it; call DoLogin when you get 00001 or 00006, not before every request.

Each API key has its own session; logging in with one does not affect the ApiCode of another.

To log in, the account must be active and must have a valid package that gives API access: an unexpired paid or trial StockMount package, or an unexpired Out API service. If neither exists, the call returns 99988.

Wrong credentials, a passive account, a passive API key, a closed account and server maintenance all give the same result: 00001 with an empty ErrorMessage. The actual reason is not returned.

Request fields

Field Type Description
ApiKey required string The API key created in the panel.
ApiPassword required string The password of the API key.
DeveloperId string Optional. Free text that identifies your integration. It is stored with the session and used only for logging.

Response fields (Response)

Field Type Description
UserId integer Account ID.
Name string Account holder's first name.
Surname string Account holder's last name.
Email string Account e-mail address.
Username string Account username.
Avatar string Profile image. Can be empty.
PackageEndDate datetime Account package end date. ISO 8601 without a time zone offset (e.g. 2027-03-31T00:00:00), in Türkiye time. When a stored session is returned, this is the value from the first login.
ApiCode string Session code. Send it in the ApiCode field of every other request.

Error codes for this endpoint

CodeWhen
00003 A required field is missing. ErrorMessage names it: ApiKey or ApiPassword. An empty body ({}) returns the ApiKey error.
99988 The account has no valid package or Out API service that gives API access. Messages: "Package can not be validated! Type: 2. Please purchase API package." (no service), "Package can not be validated! Please purchase API package." (service expired), "Package can not be validated! Type: 3." (package data could not be read).
99999 Unexpected server error. ErrorMessage contains the technical error text.

For session errors (00001, 00006) and every other code see error codes.

Related endpoints

Example request

{
  "ApiKey": "3f9c2a7e5b1d4c08",
  "ApiPassword": "Xk82!pQz7mWv",
  "DeveloperId": "ornek-erp-connector"
}

Example response

{
  "Result": true,
  "Response": {
    "UserId": 104523,
    "Name": "Ayşe",
    "Surname": "Yılmaz",
    "Email": "ayse@ornekmagaza.com",
    "Username": "ornekmagaza",
    "Avatar": "",
    "PackageEndDate": "2027-03-31T00:00:00",
    "ApiCode": "q7XvT1kR9mN2bW4yL8pZ0cH5sJ3fG6dA+eU1iO7tY2rE9wQ4xV8nM0lK5jH3gF6d=="
  }
}

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.

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.