Proxy Renewal - Step 1
Proxy Renewal
The method is used to calculate the cost of renewal. To calculate the cost, you need to pass the proxy type and proxy ID
Request for getting available renewal options:
URL
https://api.belurk.com/proxy/create-renewal
Sending Method
POST
CURL
- 1.curl --location 'https://api.belurk.com/proxy/create-renewal'
- 2.--header 'Content-Type: application/json'
- 3.--header 'x-api-token: {{API_TOKEN}}'
- 4.--data '{
- 5. "proxy_type": "ipv6",
- 6. "selected_proxy": [
- 7. 10001,
- 8. 10002
- 9. ]
- 10.}'
Response in case of successful retrieval of options
Response Status: HTTP 200 OK
- 1.{
- 2. "data": {
- 3. "amount": 0,
- 4. "count": 10,
- 5. "periods": [
- 6. {
- 7. "label": "1 день",
- 8. "key": "1_day"
- 9. },
- 10. {
- 11. "label": "3 дня",
- 12. "key": "3_day"
- 13. },
- 14. {
- 15. "label": "1 неделя",
- 16. "key": "1_week"
- 17. },
- 18. {
- 19. "label": "2 недели",
- 20. "key": "2_week"
- 21. },
- 22. {
- 23. "label": "1 месяц",
- 24. "key": "1_month"
- 25. },
- 26. {
- 27. "label": "2 месяца",
- 28. "key": "2_month"
- 29. },
- 30. {
- 31. "label": "3 месяца",
- 32. "key": "3_month"
- 33. }
- 34. ]
- 35. }
- 36.}
Failure Response
Response Status: HTTP 404 Not Found
- 1.{
- 2. "data": null
- 3. "error": "По заданному фильтру ничего не найдено"
- 4.}
Request for calculating the cost:
After receiving information about available renewal tariffs, you need to pass a value from the proposed renewal options to calculate the cost
CURL
- 1.curl --location 'https://api.belurk.com/proxy/create-renewal'
- 2.--header 'Content-Type: application/json'
- 3.--header 'x-api-token: {{API_TOKEN}}'
- 4.--data '{
- 5. "period": "1_month",
- 6. "proxy_type": "ipv6",
- 7. "selected_proxy": [
- 8. 10001,
- 9. 10002
- 10. ]
- 11.}'
Response in case of successful cost calculation
Response Status: HTTP 200 OK
- 1.{
- 2. "data": {
- 3. "amount": 21, //renewal amount
- 4. "count": 10,
- 5. "periods": [
- 6. {
- 7. "label": "1 день",
- 8. "key": "1_day"
- 9. },
- 10. {
- 11. "label": "3 дня",
- 12. "key": "3_day"
- 13. },
- 14. {
- 15. "label": "1 неделя",
- 16. "key": "1_week"
- 17. },
- 18. {
- 19. "label": "2 недели",
- 20. "key": "2_week"
- 21. },
- 22. {
- 23. "label": "1 месяц",
- 24. "key": "1_month"
- 25. },
- 26. {
- 27. "label": "2 месяца",
- 28. "key": "2_month"
- 29. },
- 30. {
- 31. "label": "3 месяца",
- 32. "key": "3_month"
- 33. }
- 34. ]
- 35. }
- 36.}