Assign a person to a commission plan
Links a salesperson (userRef, their username) to the plan for an effective date range, optionally with a personal rate override on flat plans. Rejected if the person already has an overlapping active assignment.
How to use it
- Get the plan ID from List commission plans and the salesperson's username from List users.
- Send userRef, effectiveFrom, optional effectiveTo and, on FLAT plans only, an optional rateOverrideBp.
- Rejected if the person already has an active assignment overlapping those dates; remove that one first.
- The person is included in settlement runs whose period overlaps the assignment.
BearerAuthAuthorizationBearer <JWT>planId*stringID of the commission plan to assign the person to, from List commission plans.
uuidX-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
application/json- body
userRef*stringUsername of the salesperson to assign, as shown by List users. Required.
rateOverrideBp?|Optional personal rate in basis points, 0 to 10000 (250 = 2.50%). Only allowed on FLAT plans.
int32effectiveFrom*stringFirst date the assignment applies (YYYY-MM-DD).
dateeffectiveTo?|Optional last date (YYYY-MM-DD), not before effectiveFrom. Omit for open-ended.
dateOK
*/*- response
status*stringOutcome of the request: SUCCESS when it worked; errors return an error status with the reason in message.
message*stringShort human-readable message describing the outcome.
data?The plan assignment as it now stands.
curl -X POST 'https://beta.iotoms.com/api/v1/commission/plans/497f6eca-6276-4993-bfeb-53cbbbba6f08/assignments' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{ "userRef": "string", "effectiveFrom": "2019-08-24"}'{ "status": "string", "message": "string", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "planId": "b3f60ba2-c1fd-4b3a-a23d-8e876e0ef75d", "planName": "string", "userRef": "string", "rateOverrideBp": 0, "effectiveRateBp": 0, "effectiveFrom": "2019-08-24", "effectiveTo": "2019-08-24", "active": true }}