Approve a commission settlement run
POST
Freezes a draft settlement so it can no longer be recalculated or deleted, and makes it eligible for payout. The approved commission is then posted to the ledger as an expense against Commission Payable. Rejected if another approved run overlaps the period.
How to use it
- Review the draft with Get a commission settlement run; recalculate first if source data changed.
- Approve it. All lines become APPROVED and the run can no longer be recalculated or deleted.
- The commission expense is booked against Commission Payable on the next posting run (or Run accounting posting now).
- Pay people with Record a commission payout.
BearerAuthheader
AuthorizationBearer <JWT>id*stringID of the record (UUID).
Format
uuidX-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
OK
*/*- 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 settlement run with every person's commission line.
Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/commission/settlements/497f6eca-6276-4993-bfeb-53cbbbba6f08/approve' \ -H 'X-TenantID: your-tenant-code'Example Response
{ "status": "string", "message": "string", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "periodFrom": "2019-08-24", "periodTo": "2019-08-24", "status": "DRAFT", "totalCommission": 0, "totalPaid": 0, "notes": "string", "lines": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "userRef": "string", "planId": "b3f60ba2-c1fd-4b3a-a23d-8e876e0ef75d", "planName": "string", "rateStructure": "FLAT", "rateBp": 0, "collectedBase": 0, "returnsBase": 0, "netBase": 0, "commissionAmount": 0, "paidAmount": 0, "status": "DRAFT", "uncollectedCredit": 0, "sources": [ { "sourceType": "SALE_COLLECTION", "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052", "documentDate": "2019-08-24", "documentRef": "string", "grossAmount": 0, "baseAmount": 0 } ] } ], "createdAt": "2019-08-24T14:15:22Z", "createdBy": "string", "approvedAt": "2019-08-24T14:15:22Z", "approvedBy": "string" }}