post FINISH_ACTIVATION (RENT)

https://{yourserver.com}/finishActivationRent
v1 rent

This request is sent by Onlinesim server to close current rent operation with a specific 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 rental operation ahead of time; 2) if an SMS from the requested service was not received and the operation is closed after the protective interval expires (20 minutes from the moment the operation was created).

IMPORTANT NOTE! You can either create a new endpoint for the rent only or use your existing FINISH_ACTIVATION endpoint 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.

IMPORTANT NOTE! Your server must sent successful rent operation closing response within 10 seconds of the request. Otherwise current request will be cancelled and a new request will be sent.

IMPORTANT NOTE! Please do not close operations on your side until you receive our FINISH_ACTIVATION request. Closing operations manually may lead to status desynchronization and incorrect processing of subsequent requests.

Parameters

Authorization
Required

see more here

In: header
Schema:
  • string
    Example: "Bearer apikey"

Global params

Request Body

Request payload from Onlinesim server
Content Type:
application/json
  • Schema
  • Examples
  • object
    Example: {"action":"FINISH_ACTIVATION","activationId":355,"status":3,"key":"string","service":"rent","sum":870}
    Properties:
    • action
      string
      Required
      Method name, in this case `FINISH_ACTIVATION`
      Example: "FINISH_ACTIVATION"
      Enum: FINISH_ACTIVATION
    • activationId
      integer
      Required
      Operation ID (assigned by your server)
      Example: 355
      >= 1
    • status
      integer
      Required

      Status 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 sold 4 - Cancelled, message was not delivered 5 - Refunded, in case of errors and message problems

      Example: 3
      Enum: 1 3 4
    • key
      string
      Required
      API key of your Onlinesim partner's profile
      Example: "string"
    • service
      string
      Required
      Service name, in this case `rent`
      Example: "rent"
      Enum: rent
    • sum
      number
      Total 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

The response of your server for `FINISH_ACTIVATION` request must be in following format:
Content Type:
application/json
  • Schema
  • Examples
  • object
    Example: {"status":"SUCCESS"}
    Properties:
    • status
      string
      Request status (`SUCCESS` or `ERROR`)
      Example: "SUCCESS"
      Enum: SUCCESS ERROR