MOR API phonebook record create

From Kolmisoft Wiki
Revision as of 09:35, 16 July 2014 by Tester2 (talk | contribs) (Created page with '=Description= <!---This functionality is available from MOR x4---> MOR API Phonebook create <br><br> =Usage= * Call: /api/phonebook_record_create * Methods: POST, GET(if all…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

MOR API Phonebook create

Usage

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



Parametres

  • u - username for authentication. Required.
  • hash - SHA1 hash constructed using user_id, number, name, speeddial and API_Secret_Key ( More described in Constructing hash). Required.
  • user_id - id of the user you want to create Phonebook for. Required.
  • number - number of a record. Required.
  • name - name of a record. Required.
  • speeddial - speeddial of a record. Required.



Request

We have user_id = 2, name=phonebook, number=920355666, speeddial=666 and API Secret Key = 456789

We send:

HTML POST: http://<SERVER_IP>/billing/api/phonebook_record_create?u=username&user_id=2&name=phonebook&number=920355666&speeddial=666&hash=1272cf77ba94153d59c87f699906e726277ff240


NOTE that username and password are not included in hash

Returns

Success

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




Errors

  • <error>Speed Dial name must be provided</error>
  • <error>Speed Dial should have at least two digits</error>
  • <error>Record number should have at least one digit</error>
  • <error>Speed Dial must be numeric</error> - speed dial must be made from numbers.
  • <error>Record number must be numeric</error> - record number must be made from numbers.
  • <error>Speed dial must be unique</error> - this user already has same speeddial. NOTE: end user can have the same speeddial as Global record has and also can have same speeddials as other users. Admin cannot create same speed dials as other users already have.
  • <error>User was not found</error> - there is no such user or belongs to somebody else. Use correct user id.
  • <error>Incorrect hash</error> - hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • <error>Access Denied</error> - user with UNIQUEHASH not found or params id not send. Enter correct id.



See also