Difference between revisions of "MOR API tariff wholesale update"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 1: Line 1:
''This functionality is available from [[MOR 12 documentation | MOR 12]]''
''This functionality is available from [[MOR 12]]''





Revision as of 08:26, 26 April 2012

This functionality is available from MOR 12


MOR API Update or create new wholesale tariff






  • Call: /api/wholesale_tariff
  • Methods: POST
  • Params:
    • u - username to login. Required.
    • p - password to login. Required.
    • id - wholesale tariff id in MOR database. Optional.
    • name - tariff's name. Optional.
    • currency - tariff's currency code. Optional.

If tariff's id is is not supplied, new tariff will be created with supplied name and currency code

    • Success:
<response>
 <status>ok</status>
 <tariff_id> ID </tariff_id>
</response>
    • Error:
<response>
 <error>
   <message>error message</message>
 </error>
</response>

If tariff's id is is supplied, existing tariff will be updated with supplied name and currency code

    • Success:
<response>
 <status>ok</status>
</response>
    • Error if could not update tariff:
<response>
 <error>
   <message>error message</message>
 </error>
</response>
    • Error if tariff was not found

<error> Tariff not found</error>

    • In case incorrect hash would be supplied:
<error>Incorrect hash</error>                
    • In case incorrect login would be supplied:
<error>Bad login</error>