MOR API phonebook record create

From Kolmisoft Wiki

Jump to: navigation, search


[edit] Description

MOR API Phonebook create

[edit] Usage

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

[edit] 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.

[edit] 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

[edit] Returns


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


  • <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.

[edit] See also

Personal tools


Try M2