Request to add/edit/delete subscribers of the base

Request to add/edit/delete subscribers of the base

POST http://lk.mysmpp.ru/xml/phones.php

Headers

Name
Type
Description

Content-type*

String

text/xml; charset=utf-8;

Request Body

Name
Type
Description

login.value*

String

Your login in the system

base.id_base*

Int

Base number in the system

token.value*

String

You can use a secret key instead of login and password. To obtain it, please contact your manager

password.value*

String

Your password in the system

base.phone.surname

String

Subscriber's last name

base.phone.name

String

Subscriber Name

base.phone.operator

String

Operator. If not set, it is automatically determined.

base.phone.region

String

Region. If not set, it is determined automatically

base.phone.phone*

Int

The phone number of the subscriber. If a subscriber with this number already exists, it will be edited

base.phone.addition_1

String

Second additional field

base.phone.addition_1

String

First additional field

base.phone.male

String

Gender:

"f"-female

"m" - male

base.phone.date_birth

Int

Date of birth

base.phone.patronymic

String

Subscriber's patronymic

base.phone.action

String

In case it is necessary to delete "delete"

base.phone.number_phone

Int

Phone number in the system

<?xml version="1.0" encoding="utf-8" ?>
<response>
     <base id_base="1234">
          <phone phone="79612242243" number_phone="1"/>insert</phone>
          <phone phone="79612242244" number_phone="2" />edit</phone>
          <phone phone="79612242243" number_phone="5"/>delete</phone>
          <phone phone="79612242244" number_phone="6" />not_found</phone>
     </base>

</response>

Deciphering parameters in query responses

Parameter
Data type
Description

base.id_base

Int

Base number in the system

base.phone.phone

Int

Subscriber's phone number

base.phone.number_phone

Int

Phone number in the system

error

String

The error text can take the following values:

  • Incorrect XML document format

  • Incorrect login or password

  • POST data is missing

Example XML request

<?xml version="1.0" encoding="utf-8" ?>
<request>
     <security>
          <login value="login" />
          <password value="password" />
     </security>
     <base id_base="1234">
          <phone phone="79612242243" region="Novosibirsk " operator="Vimpelcom" name="Konstantin" surname="Ermolaev" patronymic="Aleksandrovich" date_birth="1984-08-21" male="male" addition_1="Firstadditionalfield" addition_2="second" number_phone="1"/>
          <phone phone="79612242244" region="Novosibirsk " operator="Vimpelcom" name="Konstantin" surname="Ermolaev" patronymic="Aleksandrovich" date_birth="1984-08-21" male="male" male="male" addition_1="First additional field" addition_2="second" number_phone="2" />
          ...
          <phone phone="79612242243" action="delete" number_phone="5"/>
          <phone phone="7961224242244" action="delete" number_phone="6"/>
     </base>
</request>

Last updated