Skip to main content
PUT
/
v1
/
crm
/
partners
/
{partnerId}
/
pricing-rules
/
{pricingRuleId}
Update a Pricing Rule
curl --request PUT \
  --url https://api.example.com/v1/crm/partners/{partnerId}/pricing-rules/{pricingRuleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "pricingItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "locked": false,
  "percent": 123,
  "perItem": 123,
  "cost": 123,
  "billMonths": [],
  "split": 123,
  "bonusAmount": 123,
  "triggerAmount": 123,
  "bonusCalculate": 123,
  "residual": 123,
  "startDate": "2023-12-25",
  "endDate": "2023-12-25"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "pricingItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "locked": true,
  "percent": 123,
  "perItem": 123,
  "cost": 123,
  "billMonths": [],
  "split": 123,
  "bonusAmount": 123,
  "triggerAmount": 123,
  "bonusCalculate": 123,
  "residual": 123,
  "startDate": "2023-12-25",
  "endDate": "2023-12-25",
  "createdAt": "<string>",
  "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updatedAt": "<string>",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "item": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "key": "<string>",
    "name": "<string>",
    "description": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Enter token in following format: Bearer

Path Parameters

partnerId
string
required
pricingRuleId
string
required

Body

application/json
parentType
enum<string>
Available options:
variant,
template,
package
parentId
string<uuid> | null
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
pricingItemId
string<uuid> | null
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
locked
boolean
default:false
percent
number | null
perItem
number | null
cost
number | null
billType
enum<string> | null
Available options:
once,
monthly,
annually,
custom
billMonths
enum<string>[] | null
Available options:
January,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
split
number | null
bonusAmount
number | null
bonusTrigger
enum<string> | null
Available options:
active,
approve
triggerAmount
number | null
bonusType
enum<string> | null
Available options:
none,
fixed,
calculated
bonusCalculate
number | null
triggerCalcDays
enum<string> | null
Available options:
30,
60,
90
residual
number | null
startDate
string<date> | null
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])))$
endDate
string<date> | null
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])))$

Response

The updated pricing rule.

id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
parentType
enum<string>
required
Available options:
variant,
template,
package
parentId
string<uuid> | null
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
pricingItemId
string<uuid> | null
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
locked
boolean
required
percent
number | null
required
perItem
number | null
required
cost
number | null
required
billType
enum<string> | null
required
Available options:
once,
monthly,
annually,
custom
billMonths
enum<string>[] | null
required
Available options:
January,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
split
number | null
required
bonusAmount
number | null
required
bonusTrigger
enum<string> | null
required
Available options:
active,
approve
triggerAmount
number | null
required
bonusType
enum<string> | null
required
Available options:
none,
fixed,
calculated
bonusCalculate
number | null
required
triggerCalcDays
enum<string> | null
required
Available options:
30,
60,
90
residual
number | null
required
startDate
string<date> | null
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])))$
endDate
string<date> | null
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])))$
createdAt
string
required
createdBy
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
updatedAt
string
required
updatedBy
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
item
object