Difference between revisions of "MOR API did close"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '=Description= MOR API Changes DID status to Closed. <br><br> =Usage= * Call: /api/did_close * Methods: POST, GET(if allowed, not recomended) <br><b…')
 
 
Line 31: Line 31:
       <success>DID successfully closed</success>
       <success>DID successfully closed</success>
   </status>
   </status>
  <did_details>
      <id>1</id>
  </did_details>
  </page>
  </page>
<br><br>
<br><br>

Latest revision as of 08:42, 18 March 2019

Description

MOR API Changes DID status to Closed.

Usage

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



Parametres (in this order only)



Request

We want close DID which dids_id = 1.

We send:

HTML POST: http://<SERVER_IP>/billing/api/did_close?u=admin&dids_id=1&hash=bc2f114099d16656d37e45fd9e8744cb9386d462

NOTE: only dids_id used for hash generation

Returns

Success

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




Errors

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

Error messages:

  • Incorrect hash – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • Access Denied – Only Admin, Accountant or Reseller may use API.
  • DID is assigned to Dial Plan.
  • DID is not assigned to Device.
  • DID was not found.
  • DID is already closed.