a) Login Services

b) User Login

For user services, you need to login as a user of tamigo, providing the email and password for authentication. The response returned from the service contains the SessionToken key. Use this token in subsequent calls to the service to authenticate yourself.

Request (JSON)

POST /Login/
HTTP/1.1
Content-Type: application/json

{"Email": "[email protected]",
  "Password": "password",
  "DefaultCompanyId": "3e7131b4-d2e7-44ab-a4bf-5ecbcceff011"}

 

Note: The DefaultCompanyId is an optional parameter. If you leave the DefaultCompanyId blank, the service log ins to the default department.

 

Request (XML)

<Login xmlns="http://schemas.datacontract.org/2004/07/Tamigo.Services.Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Email>[Email]</Email>
 <Password>[Password]</Password>
</Login>

 

Response (JSON)

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"DefaultDepartmentId":"1ca845e9-28f4-5f79-9517-6d0eac942564",
"DefaultDepartmentName":"Ny Bistro",
"DefaultCompanyId":"1fc5e5e9-28f4-42e6-9917-6faf8c98da64",
"DefaultCompanyName":"Ny Bistro",
"Email":"[email protected]",
"Password":"",
"Role":"Planner",
"SessionToken":"1fcbace9-28f4-4e76-9917-6f0ebc98da64"}

 

Response (XML)

<Login xmlns="http://schemas.datacontract.org/2004/07/Tamigo.Services.Entities" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<DefaultDepartmentName>[DepartmentName]</DefaultDepartmentName>
<Email>[Email]</Email>
<Password/><Role>[Role]</Role><SessionToken>[SessionToken]</SessionToken>
</Login>

 

c) Get Token 

This service returns the token information. This is available for all roles.

 

Request (JSON)

GET /Login/?securitytoken={sessionToken}
Content-Type: application/json

 

Response (JSON)

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"DefaultDepartmentId":"1ca845e9-28f4-5f79-9517-6d0eac942564",
"DefaultDepartmentName":"Ny Bistro",
"DefaultCompanyId":"1fc5e5e9-28f4-42e6-9917-6faf8c98da64",
"DefaultCompanyName":"Ny Bistro",
"Email":"[email protected]",
"Password":"",
"Role":"Planner",
"SessionToken":"1fcbace9-28f4-4e76-9917-6f0ebc98da64"}