Skip to content

Create a price adjustment

POST
/v1/pricing/adjustments

Create a new price adjustment for the authenticated company. Server- controlled fields (companyId, id, created, changed) are ignored if supplied — companyId is always forced from the bearer token, and you must instead set it inside each targets[].urn. Coupons (type: "coupon") require conditions.code, which is normalized to trimmed-uppercase; a duplicate active code in the same company returns 409. At least one targets[] entry is required.

Placeholder schema for PriceAdjustment. Add it to the schemaMap in scripts/create-content/api-docs.mjs for a richer definition.

object
Example
{
"name": "TESTCN",
"type": "coupon",
"category": "discount-coupon",
"origin": "coupon",
"application": "at-checkout",
"stacking": "replace-within-category",
"effectBase": "list-price",
"targets": [
{
"urn": "urn:1:company_123abc:cohost-falcon:event/eAQjEyR65DixOfM5nRCN",
"eventId": "eAQjEyR65DixOfM5nRCN",
"companyId": "company_123abc"
},
{
"urn": "urn:1:company_123abc:cohost-falcon:event/797SyJMwQornlWKARQRd",
"eventId": "797SyJMwQornlWKARQRd",
"companyId": "company_123abc"
}
],
"conditions": {
"code": "TESTCN"
},
"effect": {
"kind": "percentage_off",
"percent": 10
},
"status": "active"
}

Price adjustment created

object
status
string
Example
ok
data

Placeholder schema for PriceAdjustment. Add it to the schemaMap in scripts/create-content/api-docs.mjs for a richer definition.

object

Validation failed — the body did not satisfy the schema

object
status
string
Example
error
message
string
Example
An error occurred
error
string

Unauthorized — a valid bearer token is required

object
status
string
Example
error
message
string
Example
An error occurred
error
string

Conflict — the coupon code is already taken by an active adjustment

object
status
string
Example
error
message
string
Example
An error occurred
error
string

Internal server error

object
status
string
Example
error
message
string
Example
An error occurred
error
string