Intouch REST Resource: User

Modified on Mon, 02 Aug 2021 09:48 by CM — Categorized as: Intouch

This page describes the user portion of the Intouch REST API.


Endpoints

URIMethodNotes
/userGETGet the current user.

Data contract


You can get the data as either JSON or XML. Here are some examples of how the response might look like.

JSON

{
  "AllowedFunctions":[
    "SEND_SMS",
    "SEND_WAP",
    "EDIT_GROUP",
    "EDIT_CONTACT",
    "READ_SMS",
    "ALLOW_API"],
  "AllowedSenderIds":[
    "Intouch Demo",
    "PSWinCom 2",
    "Intouch"],
  "Organization":
  {
    "Description":"Some description",
    "Description1Alias":"Room",
    "Description2Alias":"Email",
    "Description3Alias":"Notes",
    "Edition":"Business",
    "Name":"ACME Inc"
  },
  "Settings":[
    {"Name":"SENDER_ID","Value":"Audundfdgh"},
    {"Name":"NUMBER_PREFIX","Value":"47"},
    {"Name":"NUMBER_LENGTH","Value":"10"},
    {"Name":"SENDER_EMAIL","Value":"foo@acme.com"},
    {"Name":"FREE_SENDER_ID","Value":"False"},
    {"Name":"ALLOW_PRIVATE_MESSAGES","Value":"False"},
    {"Name":"DEFAULT_ROWS_PER_PAGE","Value":"20"},
    {"Name":"CUSTOM_REPORTS_FOLDER","Value":"DefaultOrg"},
    {"Name":"MAX_TARIFF","Value":"100"}]
}

XML

<?xml version="1.0" encoding="utf-8"?>
<User xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PSWinCom.Intouch.API.Resources">
  <AllowedFunctions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>SEND_SMS</d2p1:string>
    <d2p1:string>SEND_WAP</d2p1:string>
    <d2p1:string>EDIT_GROUP</d2p1:string>
    <d2p1:string>EDIT_CONTACT</d2p1:string>
    <d2p1:string>READ_SMS</d2p1:string>
    <d2p1:string>ALLOW_API</d2p1:string>
  </AllowedFunctions>
  <AllowedSenderIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>Intouch Demo</d2p1:string>
    <d2p1:string>PSWinCom 2</d2p1:string>
    <d2p1:string>Intouch</d2p1:string>
  </AllowedSenderIds>
  <Organization>
    <Description>Some description</Description>
    <Description1Alias>Room</Description1Alias>
    <Description2Alias>Email</Description2Alias>
    <Description3Alias>Note</Description3Alias>
    <Edition>Business</Edition>
    <Name>ACME Inc</Name>
  </Organization>
  <Settings>
    <Setting>
      <Name>SENDER_ID</Name>
      <Value>Audundfdgh</Value>
    </Setting>
    <Setting>
      <Name>NUMBER_PREFIX</Name>
      <Value>47</Value>
    </Setting>
    <Setting>
      <Name>NUMBER_LENGTH</Name>
      <Value>10</Value>
    </Setting>
    <Setting>
      <Name>SENDER_EMAIL</Name>
      <Value>foo@acme.com</Value>
    </Setting>
    <Setting>
      <Name>FREE_SENDER_ID</Name>
      <Value>False</Value>
    </Setting>
    <Setting>
      <Name>ALLOW_PRIVATE_MESSAGES</Name>
      <Value>False</Value>
    </Setting>
    <Setting>
      <Name>DEFAULT_ROWS_PER_PAGE</Name>
      <Value>20</Value>
    </Setting>
    <Setting>
      <Name>CUSTOM_REPORTS_FOLDER</Name>
      <Value>DefaultOrg</Value>
    </Setting>
    <Setting>
      <Name>MAX_TARIFF</Name>
      <Value>100</Value>
    </Setting>
  </Settings>
</User>


Sample code

The following is a quick example implemented in the Ruby programming language of how one can easily retrieve and use the user information. For more complete examples see the example clients section on the Intouch REST API page.