API
Türkçe

API reference · Products

Update product price (by ProductId)

Updates the prices of the product found by ProductId and, optionally, of its variants.

POST https://out.stockmount.com/api/Product/UpdateProductPrice
Changes data Product package required

Each call updates a single product; you cannot send several products in one call. You can update several variants of that product in the same call with Variants.

The product is identified only by ProductId. To update by product code, use the ByCode endpoint.

Price, MarketPrice and Price2–Price5 are overwritten on every call with the values in the request; any field you omit becomes 0. Send every price you use each time.

Each item in Variants is matched to the product's variants by ProductVariantId, or by variant Code when no ID is given. A matched variant gets its Price and Price2–Price5 replaced by the request values (omitted ones become 0). Variants not in the list are not touched. A variant-level CurrencyId is not read; the product-level CurrencyId is used.

This endpoint does not validate prices: 0, negative values, or a MarketPrice lower than Price are accepted. Such problems surface as errors during marketplace synchronization, not in this call.

This endpoint does not change stock or name; Quantity and Name are ignored.

The price is written to the product in StockMount first. If any price actually changed, a price update is queued for each active marketplace listing of the product. Marketplaces are updated by background jobs, not during this call. If an update of the same kind is already pending, no duplicate is queued.

If the product is not found or does not belong to your account, the response is Result: false with ErrorCode: "70005" and ErrorMessage: "ProductNotFound". Database errors return ErrorCode 99999.

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 The API code returned by User/DoLogin.
ProductId required integer StockMount product ID. The product must belong to your account. Code is ignored by this endpoint.
Price number Sale price of the product. Stored with 2 decimal places. If omitted, 0 is written.
MarketPrice number Market (list) price. If omitted, 0 is written.
Price2 number Product additional price 2. If omitted, 0 is written.
Price3 number Product additional price 3. If omitted, 0 is written.
Price4 number Product additional price 4. If omitted, 0 is written.
Price5 number Product additional price 5. If omitted, 0 is written.
CurrencyId integer Currency ID (GetCurrencies). If greater than 0, the currency of the product and of the updated variants is set to this value. If omitted or 0, the currency is unchanged.
Variants object[] Variants to update. Only listed variants change; entries that do not match are skipped without an error.
Variants[]. ProductVariantId integer Variant ID. If omitted or 0, the variant is matched by Code.
Variants[]. Code string Variant code. Used for matching when ProductVariantId is not set.
Variants[]. Price number Variant sale price. If omitted, 0 is written.
Variants[]. Price2 number Variant additional price 2. If omitted, 0 is written.
Variants[]. Price3 number Variant additional price 3. If omitted, 0 is written.
Variants[]. Price4 number Variant additional price 4. If omitted, 0 is written.
Variants[]. Price5 number Variant additional price 5. If omitted, 0 is written.

Response fields (Response)

Field Type Description
ProductId integer ID of the updated product.
Variants object[] Variants updated by this call. Empty array if you sent no variants.
Variants[]. Code string Variant code.
Variants[]. ProductVariantId integer Variant ID.

Error codes for this endpoint

CodeWhen
70005 The product was not found or does not belong to your account (ErrorMessage: ProductNotFound).
00003 ProductId is missing or less than 1 (ErrorMessage: "ProductId").
70018 Your account has no active Product package.
99999 An unexpected server error occurred.

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

Related endpoints

Example request

{
  "ApiCode": "API_CODE",
  "ProductId": 184522,
  "Price": 349.9,
  "MarketPrice": 449.9,
  "Price2": 329.9,
  "Price3": 0,
  "Price4": 0,
  "Price5": 0,
  "Variants": [
    {
      "ProductVariantId": 9120344,
      "Price": 349.9,
      "Price2": 329.9
    },
    {
      "Code": "TSHIRT-RED-L",
      "Price": 359.9,
      "Price2": 339.9
    }
  ]
}

Example response

{
  "Result": true,
  "Response": {
    "ProductId": 184522,
    "Variants": [
      {
        "Code": "TSHIRT-RED-M",
        "ProductVariantId": 9120344
      },
      {
        "Code": "TSHIRT-RED-L",
        "ProductVariantId": 9120345
      }
    ]
  }
}

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.