Home

Search the wiki

»

API Documentation


Mobile Payment

Sample HTTP requests for Intouch REST API v2

RSS
Overview

This page documents a few sample requests for implementing the Intouch Rest API v2

Table of Contents [Hide/Show]


Authentication

The request samples are based on using a Base64 encoded string of the following login credentials:
Logindomain: sampleaccount
Username: myuser
Password: mypassword




Create Contact

Request

POST https://intouchapi.pswin.com/2/contacts HTTP/1.1
Content-Type: application/json
Authorization: Basic bXl1c2VyQHNhbXBsZWFjY291bnQ6bXlwYXNzd29yZA==
Host: intouchapi.pswin.com
Content-Length: 241

{"Firstname":"Ola",
"Lastname":"Nordmann",
"PhoneNumber":"99495153",
"Email":"ola@nordmann.no",
"Description":"Ansatt i PSWinCom",
"Description2":"Avdelingsleder",
"Description3":"Bergen",
"CPAAccepted":false,
"IsPrivate":false
}

Response

Note that API returns HTTP code 201 for successfull creation of row, along with Location header with Uri to the new contact.

HTTP/1.1 201 Created
Server: nginx
Date: Tue, 02 Sep 2014 07:19:06 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 7
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
Location: http://intouchapi.pswin.com/2/contacts/155
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET


155




Assign contact as a member of an existing group

Request

PUT https://intouchapi.pswin.com/2/groups/12/contacts/155 HTTP/1.1
Content-Type: application/json
Authorization: Basic bXl1c2VyQHNhbXBsZWFjY291bnQ6bXlwYXNzd29yZA====
Host: intouchapi.pswin.com
Content-Length: 0


Response

Note that API gives response code 204 after successfull change by using HTTP PUT.

HTTP/1.1 204 No Content
Server: nginx
Date: Tue, 02 Sep 2014 07:30:17 GMT
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
Expires: -1
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET


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

© Copyright Link Mobility ASA.





GuestLogin