Authorize contract
XML: AuthorizeCustomerContract · JSON: POST /contracts/{id}/authorize
Confirms the contract with the PIN code from the SMS. In the sandbox the correct PIN is 1234, three attempts: a wrong one returns 422 CONTRACT_NOT_AUTHORIZED (XML — ResultCode=240), after the third it is CONTRACT_AUTH_ATTEMPTS_EXCEEDED (242), and even the right one is no longer accepted.
| Field | Type | Req. | Description |
|---|---|---|---|
ContractID | guid | Yes | Contract ID from “Create contract” |
PinCode | string(16) | Yes | PIN code from the SMS |
JSON API v3
Request and response (JSON)
// POST /api/v3/projects/1001/contracts/{contract_id}/authorize
{
"pin_code": "1234"
}
// 200 OK
{
"success": true,
"data": {
"contract_id": "16449203-0000-009b-a125-351b7bfbd207",
"status": "active"
}
}