API
Türkçe

API reference · Products

List the categories of a source

Returns the category names used in a StockMount product source, with their IDs.

POST https://out.stockmount.com/api/Product/GetProductCategories
Product package required

Categories are free text. AddProduct and UpdateProduct create a category automatically when the Category value is a name the source does not have yet. The API never deletes categories, so the list can contain names that no product uses any more.

Product calls expect the category name, not its ID. ProductCategoryId is informational only; the ProductCategory filter of GetProducts also takes the name.

The list is sorted by name and is not paged. Send only source IDs returned by GetProductSources.

Accounts without an active Product package get error 70018; if the package cannot be verified, 99999 is returned.

Request fields

Field Type Description
ApiCode required string Session code returned by DoLogin.
ProductSourceId required integer ID of a StockMount-type source (GetProductSources). A value below 1 returns 00003 (ErrorMessage: ProductSourceId).

Response fields (Response)

Field Type Description
ProductCategoryId integer Category ID (informational).
Name string Category name. Use this name as Category in product calls.

Error codes for this endpoint

CodeWhen
70002 ProductSourceId is not a product source in your account (ErrorMessage: InvalidProductSource).
70018 Your account has no active Product package (ErrorMessage is Turkish: Ürün entegrasyonu için aktif Ürün Paketi gereklidir.).
99999 An unexpected error occurred. Also returned when the category list cannot be read.

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

Related endpoints

Example request

{
  "ApiCode": "API_CODE",
  "ProductSourceId": 1234
}

Example response

{
  "Result": true,
  "Response": [
    {
      "ProductCategoryId": 55102,
      "Name": "Pantolon"
    },
    {
      "ProductCategoryId": 55101,
      "Name": "Tişört"
    }
  ]
}

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.