Skip to main content
PATCH
/
house-discounts
/
{id}
Update a house-scoped discount row
curl --request PATCH \
  --url https://api.interchange.io/api/v2/storefront/house-discounts/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "discountPercent": 20,
  "notes": "<string>"
}
'
{
  "id": "17",
  "storefrontId": "1234",
  "houseDomain": "<string>",
  "discountPercent": 123,
  "notes": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "createdBy": "<string>"
}

Authorizations

Authorization
string
header
required

API key or access token

Path Parameters

id
integer
required

Surrogate id of the house-discount row.

Required range: x <= 9007199254740991
Example:

17

Body

application/json

Partial update for a house-discount row. The house_domain scope is immutable — delete and recreate to change it.

discountPercent
number

Discount percent off the storefront quote for buys whose advertiser resolves to this house. 0–100. The larger of this and any buyer-specific discount wins; the quote is floored at the wholesale cost.

Required range: 0 <= x <= 100
Example:

20

notes
string | null
Maximum string length: 2000

Response

Update a house-scoped discount row

A single house-scoped buyer-discount row.

id
string
required

Surrogate id (BIGINT serialized as string).

Example:

"17"

storefrontId
string
required

Storefront the row belongs to (BIGINT serialized as string).

Example:

"1234"

houseDomain
string
required
discountPercent
number
required
notes
string | null
required
createdAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
updatedAt
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
createdBy
string | null
required