Skip to main content
PUT
/
stores
/
{storeId}
/
products
/
{productId}
/
affiliateDiscount
Update product affiliate discount
curl --request PUT \
  --url https://api.komerza.com/stores/{storeId}/products/{productId}/affiliateDiscount \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "affiliateDiscountMode": 0,
  "customAffiliateDiscountPercentage": 50
}
'
{
  "success": true,
  "message": "<string>",
  "code": "<string>",
  "data": "<unknown>"
}

Authorizations

Authorization
string
header
required

Your API key goes here

Path Parameters

storeId
string<uuid>
required

The ID of the store.

productId
string<uuid>
required

The ID of the product to update.

Body

application/json

The Komerza.Common.Forms.Products.UpdateProductAffiliateDiscountForm with new configuration.

Form for updating a product's affiliate discount configuration

affiliateDiscountMode
enum<integer>
required

Defines how affiliate discounts should be applied to a product.

Available options:
0,
1,
2
customAffiliateDiscountPercentage
integer<int32> | null

Custom affiliate discount percentage (0-100) when AffiliateDiscountMode is set to Custom. If null or when mode is not Custom, this value is ignored and the affiliate's PercentageOff is used.

Required range: 0 <= x <= 100

Response

The object was successfully updated.

Represents a default generic response for API endpoints.

success
boolean
required

Indicates whether the operation or response was successful.

message
string | null

A descriptive message providing additional context or information about the response.

code
string | null

The error code (if there was an error) to use when referencing the error

data
any | null

Represents the data associated with a response.