post FINISH_ACTIVATION (RENT)
https://{yourserver.com}/finishActivationRentThis request is sent by Onlinesim server to close current rent operation with a specific status (which depends on the result of operation).
Request can be sent upon operation closing, when operation was closed prematurely (if SMS has been received), when operation has been cancelled or whithin the 20-minute interval (if SMS hasn't been received).
IMPORTANT NOTE! You can either create a new endpoint for the rent only or use your existing
FINISH_ACTIVATIONendpoint for single-service activations (v1). However in the latter case you need to modify it so your server could process the closing of rental operations correctly. Your server must sent successful rent operation closing response within 10 seconds of the request. Otherwise current request will be cancelled (a new request will be sent).
Parameters
Global params
Request Body
- Schema
- Examples
- objectExample:
{"action":"FINISH_ACTIVATION","activationId":355,"status":3,"key":"string","service":"rent","sum":870}Properties:actionstringRequiredMethod name, in this case `FINISH_ACTIVATION`Example:"FINISH_ACTIVATION"Enum:FINISH_ACTIVATIONactivationIdintegerRequiredOperation ID (assigned by your server)Example:355>= 1statusintegerRequiredStatus code of the operation, enum:
1- This number was not ordered for the current service (i.e., when you try to push SMS for "single-service activation" service, while number has active "rent" operation)3- Successfully sold4- Cancelled, message was not delivered5- Refunded, in case of errors and message problemsExample:3Enum:134keystringRequiredAPI key of your Onlinesim partner's profileExample:"string"servicestringRequiredService name, in this case `rent`Example:"rent"Enum:rentsumnumberRequiredTotal service price that includes all rental periods, in RUB (this sum will be credited to your Onlinesim account after successful rental operation)Example:870
Responses
200
- Schema
- Examples
- objectExample:
{"status":"SUCCESS"}Properties:statusstringRequest status (`SUCCESS` or `ERROR`)Example:"SUCCESS"Enum:SUCCESSERROR