API documentation
All requests must have apikey in a header.
https://app.ambersoft.eu/api/v1/
Validation
GET
validate {token}
Validates token. Returns user information
Params
token
Token provided by authentication
Url
https://app.ambersoft.eu/app/v1/validate?token=xxxxx
Response
200
{id:0, name:"John Smith", number:"+37060050000", application: "My app", ... }
401
Token verification failed
User might have more parameters than id, name, number and application.
Users
POST
user
Creates or updates user.
{id:0, name:"John Smith", number:"+37060050000" ...}
{"id":0, "name":"John Smith", "number":"+37060050000", ... } - with any other data
Url
https://app.ambersoft.eu/app/v1/user
Response
200
{"id":0, "name":"John Smith", "number":"+37060050000", ... }
If "id" is not provided - 0 will be assigned. "id" can be used as a user identifier from your databases.
DELETE
user
Deletes user.
Params
id
User id
number
Phone number
Url
https://app.ambersoft.eu/app/v1/user?id=0&number=+37060050000
Response
200
POST
users
Creates or updates the list of users. Users created earlyer and not in the list - will be deleted.
[{id:0, name:"John Smith", number:"+37060050000", ... }]
If "id" is not provided - 0 will be assigned. "id" can be used as a user identifier from your databases.
Url
https://app.ambersoft.eu/app/v1/users
Response
200
{created:0, updated:1, deleted:0}