MOR API number pools get

From Kolmisoft Wiki
Revision as of 07:29, 16 December 2024 by Edvardas (talk | contribs) (→‎Parametres)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

MOR API for getting the list of number pools.




Usage

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



Parametres

Parameters that are included in hash:

  • u - username to login. Required.

Parameters that are NOT included in hash:

  • number_pool_id - Retrieve specific Number Pool by ID, if this parameter is not used, all Number Pools are retrieved based on the owner (from u param).
  • show_numbers - Show all Number Pool's Numbers, value must be "1"
    • Settings used when show_numbers=1:
      • number_limit_row_count - specifies how many numbers to include. Must be integer value higher than 0
      • number_limit_offset - specifies how many numbers to skip (not from the first, but to skip n entries). Must be an integer value higher than or equal to 0
  • user_ids - Shows assigned Users for Blacklist / Whitelist information,
  • allowed values: "all" - lists all users; id(s) separated by comma (example: "1,3,4")
  • hash – SHA1 hash constructed using API Secret Key ( More described in Constructing hash). Required.



Request

If API Secret Key = secret

You send:

HTML POST: http://<SERVER IP>/billing/api/number_pools_get?u=admin&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4



Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
 <page>
   <status>
     <number_pools>
       <number_pool>
         <id>1</id>
         <name>Test</name>
         <comment></comment>
         <owner_id>0</owner_id>
       </number_pool>
     </number_pools>
   </status>
 </page>