MOR API provider create

From Kolmisoft Wiki
Revision as of 10:16, 18 July 2022 by Dmitrij (talk | contribs) (Created page with "=Description= MOR API for creating providers. <br><br> =Usage= * From '''MOR X17''' call: '''/api/provider_create''' * Methods: POST, GET(if allowed, not recomended) <br><br> ===Parametres=== * u - username to login. '''Required'''. * hash – SHA1 hash constructed using '''API Secret Key''' ( More described in Constructing hash). '''Required'''. * name - Provider's name, must be unique '''Required'''....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

MOR API for creating providers.




Usage

  • From MOR X17 call: /api/provider_create
  • Methods: POST, GET(if allowed, not recomended)



Parametres

  • u - username to login. Required.
  • hash – SHA1 hash constructed using API Secret Key ( More described in Constructing hash). Required.
  • name - Provider's name, must be unique Required.
  • tech - Technology to use, can be any from (providertypes.name) (dahdi, SIP, IAX2, H323) Required.
  • tariff_id - Tariff to use, can be any Provider Tariff (tariffs.purpose == 'provider') Required.
  • server_ids - Asterisk Servers, must be in following format "1,3,4", if this parameter is not used, all Asterisk Servers are automatically assigned



Request

If API Secret Key = secret

You send:

HTML POST: http://<SERVER IP>/billing/api/provider_create?u=admin&name=ApiProvider&tech=SIP&tariff_id=1&server_ids=1&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4

* Note that username (u) is not included in the hash

Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
<page>
 <status>
   <success>Provider created</success>
   <provider_id>7</provider_id>
 </status>
</page>


See also