post{yourserver}/finishActivation

POST /finishActivation

Finish current operation

This request is sent by Onlinesim server to close current operation with a certain status (which depends on the result of operation).

By default, this request is sent when the operation time expires. The request may also be sent earlier in one of the following two cases:

  1. if an SMS from the requested service was successfully received and the client closes the operation manually;
  2. if an SMS from the requested service was not received and the client cancels the operation.

Receiving a request with status 1 is a signal that the number for some reason could not receive an SMS from the requested service. In essence, it is a signal that it is better not to issue this number for the specified service, as without additional checks the next operation is likely to fail. You can use this status as an indicator to check problematic "number + service" pairs and exclude them from issuance in the future. If you do not want to use this status, you can ignore it and continue to issue numbers for this service.

Parameters

header1
NameTypeDescription
Authorization*string

see more here

Request Body

Request payload from Onlinesim server

Content-Typeapplication/json
Schema
Bodyobject
actionstringRequired

Method name, in this case FINISH_ACTIVATION

Enum:FINISH_ACTIVATIONDefault:FINISH_ACTIVATION
activationIdintegerRequired

Operation ID (assigned by your server)

≥ 1
sumnumber

Sum credited to the partner’s balance for the provided service (in RUB)

statusintegerRequired

Status code of the operation, enum:

1 - The number could not receive an SMS from the requested service during three (or more) operations. Check if there are problems with this number and service, it may be worth excluding it from issuance in the future

3 - Successfully sold

4 - Cancelled, message was not delivered

5 - Refunded, in case of errors and message problems

Enum:1345
keystringRequired

API key of your Onlinesim partner's profile

Examples

Example payload of Onlinesim server FINISH_ACTIVATION request
{
  "action": "FINISH_ACTIVATION",
  "activationId": 75489,
  "status": 3,
  "key": "apikey"
}

Responses

200

The successful response of your server for FINISH_ACTIVATION request must be in following format:

Content-Typeapplication/json
Schema
Responseobject
statusstring

Request status (SUCCESS or ERROR)

Enum:SUCCESSERROR

Examples

Successful response example from your server
{
  "status": "SUCCESS"
}

Code Samples

Generating examples...