Finish current operation
POST{yourserver}/finishActivation
This request is sent by the OnlineSIM server to close the current operation with a status that depends on its result.
By default, this request is sent when the operation time expires. It may also be sent earlier when the client closes the operation: after the SMS was received, or to cancel it without an SMS.
Status 1 is sent instead of 4 when the number has failed to receive an SMS from this service in three (or more) operations of your integration, including this one, or when the client reports the number as not working. It is a signal that the "number + service" pair will most likely fail again: you can use it to exclude the pair from issuance, or ignore it.
Request Body
Request payload from the OnlineSIM server
application/jsonschemaobject
FINISH_ACTIVATIONEnum:FINISH_ACTIVATIONExample:FINISH_ACTIVATIONGET_NUMBER)≥ 1Example:3554.51 - no SMS received, and the number has failed to receive an SMS from this service in three (or more) operations, or the client reported it as not working. Check the number and service, it may be worth excluding the pair from issuance
3 - successfully sold (an SMS was received)
4 - cancelled, no SMS was receivedEnum:134Example:3apikeyExamples
Closing a sold operation
{
"action": "FINISH_ACTIVATION",
"activationId": 75489,
"status": 3,
"key": "apikey"
}Closing an operation without an SMS
{
"action": "FINISH_ACTIVATION",
"activationId": 75490,
"status": 4,
"key": "apikey"
}Responses
200The answer of your server to FINISH_ACTIVATION. Only status: SUCCESS closes the operation; for statuses 3 and 4 the answer {"status": "ERROR", "error": "record not found"} is accepted as closed too.
application/jsonschemaobject
SUCCESS - the operation is closed on your side; anything else - the request will be repeatedEnum:SUCCESSERRORExample:SUCCESSrecord not found (unknown activationId) is accepted as closed for statuses 3 and 4Example:record not foundExamples
The operation is closed
{
"status": "SUCCESS"
}Unknown operation (accepted as closed for statuses 3 and 4)
{
"status": "ERROR",
"error": "record not found"
}