MOR API lcr update

From Kolmisoft Wiki
Revision as of 14:46, 27 January 2023 by Dmitrij (talk | contribs) (Created page with "=Description= MOR API LCR Update <br><br> =Usage= * Call: /api/lcr_update * Methods: POST, GET(if allowed, not recomended) <br><br> ===Parameters=== Parameters which are '''included''' into hash: * '''u''' - username for authentication. '''Required'''. * '''lcr_id''' - LCR ID '''Required'''. '''Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key''' <br><br> Parameters which are...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

MOR API LCR Update

Usage

  • Call: /api/lcr_update
  • Methods: POST, GET(if allowed, not recomended)



Parameters

Parameters which are included into hash:

  • u - username for authentication. Required.
  • lcr_id - LCR ID Required.

Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key

Parameters which are not included into hash:

  • hash - SHA1 hash constructed using parameters which are listed above. Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key ( More described in Constructing hash). Required.
  • name - name of LCR
  • order - order of the LCR. Possible values are: price priority percent quality
  • allow_loss_calls - Allow Loss Calls. Possible values are 0 1
  • no_failover - Use only the first Provider in the row. Possible values are 0 1
  • minimal_rate_margin_percent - minimal rate margin percent
  • first_provider_percent_limit - first provider percent limit
  • quality_routing_id - quality routing id



Request

We have u = admin, lcr_id = 2

We send:

HTML POST: http://<SERVER_IP>/billing/api/lcr_update?u=admin&lcr_id=2&name=test2&hash=6e79d4a82f68102f43be11d873177f47817f84df



Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
<page>
 <status>
   <success>LCR successfully updated</success>
 </status>
</page>

Errors

  • <error>You are not authorized to use this functionality</error>
  • <error>Access Denied</error>
  • <error>No LCRs found</error>
    • <message>problem message</message>

Example:

<?xml version="1.0" encoding="UTF-8"?>
<page>
  <error>Error message</error>
</page>



See also