Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Info

All the below endpoints require the reseller to authenticate themselves with a resellerName and a resellerPassword. A response with {"status":3} is returned when the provided credentials are invalid.


Info

Status codes and their meaning: User and Reseller REST API Response Status Codes


Note

Parameter names are case sensitive.

Create user and customer account

Rest End-point

URL: /services/rest/customer-user/create

method: POST

Parameters

namedescriptionexample valuevalidation rules
contactNameUser's contact nameJohn Doenone
emailUser's e-mail.john@doe.comoptional, but if provided must be a valid e-mail
usernameusername of the user to be created.1212412@testResellerrequired, can't contain spaces. For the phone applications we will use customer@reseller as the username.
passwordPasswordpasswordrequired
customerName of customerexampleCustomerrequired, can't contain spaces. Customer with given name must not exist. For the phone applications we will use customer@reseller as the customer name, the same like for username.
resellerresellerNameName of resellerresellerNamerequired, can't contain spaces and '@'. Reseller with given name must exist
resellerPasswordReseller passwordpasswordrequired for authentication
phoneNumberPhone number to contact with user999444111optional, can contain only +, " " and digits, no other validation
applyFreeCreditsflag indicating whether we should add free credits to accountfalserequired, value must be either "true" or "false", case insensitive

...

Response

Reponse will be sent as a JSON with single value. Example:

Code Block
{"status":0}

Possible statuses

0, 1, 2, 3, 201, 220, 301, 400, 9999 

Create user account

Rest End-point

URL: /services/rest/user/create

method: POST

Parameters

namedescriptionexample valuevalidation rules
usernameusername of the user to be created.1212412@testResellerrequired, can't contain spaces
passwordPasswordpasswordrequired
resellerNameName of resellerresellerNamerequired, can't contain spaces and '@'. Reseller with given name must exist
resellerPasswordReseller passwordpasswordrequired for authentication
customerIdID of the customer5a4e96a030046095c7ef280fmust be a valid Mongo ObjectId, the customer with the given ID has to exist
emailUser's e-mail.john@doe.comrequired, must be a valid e-mail
phoneNumberPhone number to contact with user999444111required, can contain only +, " " and digits, no other validation
virtualNumberVirtual number999444111optional, can contain only +, " " and digits, no other validation
moPushPush notification type for MO messages{"type": "URL", "data": {"url": "http://push.example.com"}}

optional, if present - must be a valid JSON with a type field defining the notification type and an optional data field with details of the given notification type; the supported notification types are:

  • URL: {"type": "URL", "data": {"url": "http://push.example.com"}}
  • e-mail: {"type": "EMAIL", "data": {"to": "user@example.com", "subject": "Message subject", "body": "Message body"}}
  • SMPP: {"type": "SMPP"}
finalStatusPushPush notification type for final message statuses{"type": "SMPP"}same as for moPush, see above
swappingSourceAddressAllowedFlag indicating whether the source address can be swappedtrueoptional, value must be either "true" or "false", case insensitive, default: "false"


Response

Reponse will be sent as a JSON with single value. Example:

Code Block
{"status":0}

Possible statuses

0, 1, 2, 3, 201, 220, 301300, 400, 9999 Status codes and their meaning: User and Reseller REST API Response Status Codes

Create customer

Rest End-point

URL: /services/rest/customer/create

method: POST

Parameters

namedescriptionexample valuevalidation rules
namename of the customer to be createdtest-customerrequired, can't contain spaces. Customer with given name must not exist.
resellerNameName of resellerresellerNamerequired, can't contain spaces and '@'. Reseller with given name must exist
resellerPasswordReseller passwordpasswordrequired for authentication
integrationIdID of the integrationintegrationIdoptional string, default: ""
rotationAlgorithmRotation algoritgmMAX_ROTATIONoptional, if present - must be one of: CONVERSATIONMAX_ROTATION; default: MAX_ROTATION
billingTypeBilling typePRE_PAIDoptional, if present - must be one of: PRE_PAIDPOST_PAID; default: POST_PAID
moChargeMO charge42optional, if present - must be a valid integer; default: 0`


Response

Reponse will be sent as a JSON with single value. Example:

Code Block
{"status":0}

Possible statuses

0, 1, 2, 3, 301, 400, 9999