Home

Search the wiki

»

API Documentation


Mobile Payment

Intouch REST Resource: Groups

RSS
This page describes the groups portion of the Intouch REST API.

Table of Contents [Hide/Show]


Endpoints

URIMethodReturnsNotes
/groupsGETArray of groupsGet all groups.
/groupsPOSTA single group, with new GroupId.Create a new group. You need to supply the group information as either XML or json.
/groups/{id}GETA single groupRetrieve the information about a single group defined by the identifier.
/groups/{id}PUTStatus code 200, no contentUpdate a group based on the identifier. You need to supply the group information as either XML or json.
/groups/{id}DELETEStatus code 200, no contentDelete a group based on the identifier.
/groups/{id}/contactsGETArray of contactsGet all contacts in a group.
/groups/{id}/contacts/{contactId}PUTStatus code 200, no contentUse this to add an existing contacts to a group. New contacts are created using the contacts resource.
/groups/{id}/contacts/{contactId}DELETEStatus code 200, no contentUse this to remove a contacts from a group. The contact itself is not deleted by this operation.
/groups/{id}/contacts/search/{text}GETArray of contactsUsed to search for contacts in a specific group. Searches in fields firstname, lastname, description, description2, description3, email, and phonenumber. You can provide multiple search terms, separated by space (%20). Contacts will then need to match on all provided terms.

Data contract

When getting or sending group data to the server with POST or PUT you have the option of using either XML or JSON.

JSON

Sample data, returned by requesting resource /groups/234:

{
    "Description": "High value contacts"
    "GroupId": 234,
    "IsPrivate": false,
    "Name": "Group A",
}

Sample data, returned by requesting resource /groups/234/contacts which contains a single contact:

[{
    "CPAAccepted":false,
    "ContactId":60550,
    "CreatedDate":"\/Date(1229070868890+0100)\/",
    "Description":"a note",
    "Description2":null,
    "Description3":null,
    "Email":null,
    "Firstname":"Blaise",
    "IsPrivate":false,
    "Lastname":"Pascal",
    "PhoneNumber":"97555597"
}]

XML

Sample data, returned by requesting resource /groups:

<?xml version="1.0" encoding="utf-8"?>
<Group xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PSWinCom.Intouch.API.Resources">
  <Description>High value contacts</Description>
  <GroupId>234</GroupId>
  <IsPrivate>false</IsPrivate>
  <Name>Group A</Name>
</Group>


Sample data, returned by requesting resource /groups/234/contacts which contains a single contact:

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfContact xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/PSWinCom.Intouch.API.Resources">
  <Contact>
    <CPAAccepted>false</CPAAccepted>
    <ContactId>60550</ContactId>
    <CreatedDate>2008-12-12T09:34:28.89</CreatedDate>
    <Description>a note</Description>
    <Description2
      i:nil="true" />
    <Description3
      i:nil="true" />
    <Email
      i:nil="true" />
    <Firstname>Blaise</Firstname>
    <IsPrivate>false</IsPrivate>
    <Lastname>Pascal</Lastname>
    <PhoneNumber>97555597</PhoneNumber>
  </Contact>
</ArrayOfContact>

See also

Gateway interfaces: | XML | HTTP | SMTP | SOAP | SFTP BatchLoader
Intouch interfaces: REST | Syncopy

© Copyright Link Mobility ASA.





GuestLogin