Calendar/Team
Fetch calendar and team
GET /v1/calendars/teams
https://link.amtssl.com/v1/calendars/teams
Get all teams.
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
Example Request
curl --location --request GET 'https://link.amtssl.com/v1/calendars/teams' \
--header 'Authorization: Bearer <token>'
Unauthorized
Bad Request. please contact support!
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful response
200 OK
Body
false
, "shouldSkipAssigningContactForExisting":false
} }, { "id": "OW59k4IchTgKjIDy3VMO", "name": "Test Team", "members": [ { "id": "mnUXmpG2MhhHKmjegzBZ", "name": "Elon Musk", "email": "elon@musk.com" }, { "id": "mnUXmpG2MhhHKmjegzBZ", "name": "Elon Musk", "email": "elon@musk.com" } ], "calendarConfig": { "calendarName": "Test Calendar", "description": "Desc.", "slug": "slug", "link": "/widget/appointment/slug", "shouldAssignContactToTeamMember":false,
"shouldSkipAssigningContactForExisting":false
} } ] }Headers
Content-Type: application/json
GET /v1/calendars/check-slug-availability/:slug
https://link.amtssl.com/v1/calendars/check-slug-availability/:slug
Check Calendar (Provider) slug availability
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
PATH VARIABLES
<token>
slug
xyx
(required) Slug
Example Request
curl --location --request GET 'https://link.amtssl.com/v1/calendars/teams' \
--header 'Authorization: Bearer <token>'
Unprocessable Entity
Successful response
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"email or phone": {
"message": "The email or phone field is mandatory.",
"rule": "required"
}
}
200 OK
Body
{
"slug": "sales-services",
"isSlugAvailable": true
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Unauthorized
Bad Request. please contact support!
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Post /v1/calendars/teams/
https://link.amtssl.com/v1/calendars/teams/
Creates a team.
Create provider will allow these fields. ex:
Fields:
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
BODY raw
{
"name": "Sales Team",
"userIds": [
"aliquip ea commodo ut",
"consectetur elit tempor do laboris"
],
"calendarConfig": {
"calendarName": "Sales Team Calendar",
"description": "Sales Team Calendar Services",
"slug": "sales-team",
"shouldAssignContactToTeamMember": false,
"shouldSkipAssigningContactForExisting": false
}
}
Example Request
curl --location --request POST 'https://link.amtssl.com/v1/calendars/teams/' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"name": "Sales Team",
"userIds": [
"tempor aliquip enim laboris",
"consequat ullamco non"
],
"calendarConfig": {
"calendarName": "Sales Team Calendar",
"description": "Sales Team Calendar Services",
"slug": "sales-team",
"shouldAssignContactToTeamMember": false,
"shouldSkipAssigningContactForExisting": false
}
}'
Successful response
200 OK
Body
Headers
Content-Type: application/json
Unprocessable Entity
Bad Request. please contact support!
Unauthorized
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"email or phone": {
"message": "The email or phone field is mandatory.",
"rule": "required"
}
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
PUT /v1/calendars/teams/
https://link.amtssl.com/v1/calendars/teams/:teamId
Create provider will allow these fields. ex:
Fields:
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
Path Variables
teamId
0nU7uKSrtT2RVM1KknuF
(Required) Team Id
BODY raw
{
"name": "Sales Team",
"userIds": [
"aliquip ea commodo ut",
"consectetur elit tempor do laboris"
],
"calendarConfig": {
"calendarName": "Sales Team Calendar",
"description": "Sales Team Calendar Services",
"slug": "sales-team",
"shouldAssignContactToTeamMember": false,
"shouldSkipAssigningContactForExisting": false
}
}
Example Request
curl --location --request PUT 'https://link.amtssl.com/v1/calendars/teams/:teamId' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"name": "Sales Team",
"userIds": [
"0nU7uKSrtT2RVM1KknuF",
"0nU7uKSrtT2RVM1KknuF"
],
"calendarConfig": {
"calendarName": "Sales Team Calendar",
"description": "Sales Team Calendar Services",
"slug": "sales-team",
"shouldAssignContactToTeamMember": false,
"shouldSkipAssigningContactForExisting": false
}
}'
Unprocessable Entity
Unauthorized
Bad Request. please contact support!
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"email or phone": {
"message": "The email or phone field is mandatory.",
"rule": "required"
}
}
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
Successful response
200 OK
Body
Headers
Content-Type: application/json
DEL /v1/calendars/teams/:teamId
https://link.amtssl.com/v1/calendars/teams/:teamId
Delete team.
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
PATH VARIABLES
teamld
0nU7uKSrtT2RVM1KknuF
(Required) Team Id
Example Request
curl --location --request DELETE 'https://link.amtssl.com/v1/calendars/teams/:teamId' \
--header 'Authorization: Bearer <token>'
Bad Request. please contact support!
Unauthorized
Successful response
400 Bad Request
Body
{
"msg": "Bad Request"
}
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
200 OK
Body
No response body
This request doesn't return a response body
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: text/plain
Calendar/Service
GET /v1/calendars/services
https://link.amtssl.com/v1/calendars/services?teamId=ABXdTR0kegkPcTvtdr1L
Get all calendar services.
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
PARAMS
teamId
ABXdTR0kegkPcTvtdr1L
Filter service by team id.
Example Request
curl --location --request GET 'https://link.amtssl.com/v1/calendars/services?teamId=ABXdTR0kegkPcTvtdr1L' \
--header 'Authorization: Bearer <token>'
Bad Request. please contact support!
Unauthorized
400 Bad Request
Body
{
"msg": "Bad Request"
}
401 Unauthorized
Body
Small Call to Action Headline
{
"msg": "Unauthorized"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful Response
200 OK
Body
Headers
Content-Type: application/json
POST /v1/calendars/services/
https://link.amtssl.com/v1/calendars/services/
Create a service
Fields:
Team members priority will have these options:
Event color will have these options:
Event type will have these options:
Slot duration or slot interval will have these minutes options:
AllowBookingAfterUnit or AllowBookingFor will have these options:
Form submission type will have these options:
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
BODY raw
Example Request
Example Response
Unauthorized
Unprocessable Entity
Bad Request. please contact support!
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"email or phone": {
"message": "The email or phone field is mandatory.",
"rule": "required"
}
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful response
200 OK
Headers
Content-Type: application/json
PUT /v1/calendars/services/
https://link.amtssl.com/v1/calendars/services/
Create a service
Fields:
Team members priority will have these options:
Event color will have these options:
Event type will have these options:
Slot duration or slot interval will have these minutes options:
AllowBookingAfterUnit or AllowBookingFor will have these options:
Form submission type will have these options:
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
PATH VARIABLES
serviceId
0RXEzw5UVe5oLFm6GQls
(Required) Service Id
BODY raw
Example Request
Example Response
Unauthorized
Unprocessable Entity
Bad Request. please contact support!
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"email or phone": {
"message": "The email or phone field is mandatory.",
"rule": "required"
}
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful response
200 OK
Headers
Content-Type: application/json
DEL /v1/calendars/services/:serviceId
https://link.amtssl.com/v1/calendars/services/:serviceId
Example Request
curl --location --request DELETE 'https://link.amtssl.com/v1/calendars/services/:serviceId' \
--header 'Authorization: Bearer <token>'
Unprocessable Entity
Unauthorized
Successful response
Bad Request, please contact support!
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"id": {
"message": "The contact id is invalid.",
"rule": "invalid"
}
}
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
200 OK
Body
No response body
This request doesn't return a response body
400 Bad Request
Body
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Appointment
Booking Appointment
Get /v1/appointments/slots
https://link.amtssl.com/v1/appointments/slots?calendarId=CVokAlI8fgw4WYWoCtQz&startDate=1598898600000&endDate=1601490599999&timezone=America/Chihuahua&userId=082goXVW3lIExEQPOnd3
AUTHORIZATION
Bearer Token
Token
<token>
PARAMS
calendarId
CVokAlI8fgw4WYWoCtQz
(Required) Calendar Id
startDate
1598898600000
(Required) epoch timestamp
endDate
1ST COLUMN
1601490599999
(Required) epoch timestamp
timezone
America/Chihuahua
Timezone
userId
082goXVW3lIExEQPOnd3
User Id
Example Request
curl --location --request GET 'https://link.amtssl.com/v1/appointments/slots?calendarId=CVokAlI8fgw4WYWoCtQz&startDate=1598898600000&endDate=1601490599999&timezone=America/Chihuahua&userId=082goXVW3lIExEQPOnd3' \
--header 'Authorization: Bearer <token>'
Example Response
Bad Request. please contact support!
Unauthorized
400 Bad Request
Body
{
"msg": "Bad Request"
}
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Unprocessable Entity
Successful response
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"calendarId": {
"message": "The calendar id field is mandatory.",
"rule": "required"
},
"startDate": {
"message": "The start date field is mandatory.",
"rule": "required"
},
"endDate": {
"message": "The end date field is mandatory.",
"rule": "required"
}
}
200 OK
Body
{
"_dates_": {
"slots": [
"2020-09-04T08:00:00+05:30",
"2020-09-04T08:00:00+05:30"
]
}
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
GET /v1/appointments/
https://link.amtssl.com/v1/appointments/?startDate=1548898600000&endDate=1601490599999&userId=non consectetur&calendarId=0nU7uKSrtT2RVM1KknuF&includeAll=true
AUTHORIZATION
Bearer Token
Token
<token>
PARAMS
startDate
1548898600000
(Required) epoch timestamp
endDate
1601490599999
(Required) epoch timestamp
userId
non consectetur
User Id
calendarId
0nU7uKSrtT2RVM1KknuF
Calendar Id
includeAll
true
Include contact and more data.
Example Request
curl --location --request GET 'https://link.amtssl.com/v1/appointments/?startDate=1548898600000&endDate=1601490599999&userId=non%20consectetur&calendarId=0nU7uKSrtT2RVM1KknuF&includeAll=true' \
--header 'Authorization: Bearer <token>'
Example Response
Unprocessable Entity
Unauthorized
Bad Request. please contact support!
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"startDate": {
"message": "The start date field is mandatory.",
"rule": "required"
},
"endDate": {
"message": "The end date field is mandatory.",
"rule": "required"
},
"userId or calendarProviderId": {
"message": "The user id or calendar provider id field is mandatory.",
"rule": "required"
}
}
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful response
Headers
Content-Type: application/json
POST /v1/appointments/
https://link.amtssl.com/v1/appointments/
Booking Appointment
Book Appointment will allow all of contact fields. ex:
Fields:
CustomField
Booked appointment will allowed all contact custom fields. You can pass something like:
customField:
{"_id_of_your_customfield_": "value of custom fields"}
or
customField: {"_id_of_your_customfield_":
["value 1", "value 2"]}
asd
Validation:
Email or Phone are required to create appointment
AUTHORIZATION
Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
BODY raw
{
"calendarId": "CVokAlI8fgw4WYWoCtQz",
"selectedTimezone": "Asia/Calcutta",
"selectedSlot": "2020-08-28T15:30:00",
"email": "john@deo.com",
"phone": "+18887324197"
}
Example Request
curl --location --request POST 'https://link.amtssl.com/v1/appointments/' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"calendarId": "CVokAlI8fgw4WYWoCtQz",
"selectedTimezone": "Asia/Calcutta",
"selectedSlot": "2020-08-28T15:30:00",
"email": "john@deo.com",
"phone": "+18887324197"
}'
Example Response
Successful Response
Unprocessable Entity
200 OK
{
"id": "004B1SpcAvh3s9E3rqk8",
"contactId": "0007BWpSzSwfiuSl0tR2",
"contact": {
"id": "0007BWpSzSwfiuSl0tR2",
"locationId": "C2QujeCh8ZnC7al2InWR",
"email": "JohnDeo@gmail.com",
"emailLowerCase": "johndeo@gmail.com",
"fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
"timezone": "Asia/Calcutta",
"country": "DE",
"customField": [
{
"id": "MgobCB14YMVKuE4Ka8p1",
"value": "laboris Lorem minim elit"
},
{
"id": "MgobCB14YMVKuE4Ka8p1",
"value": "commodo ad culpa aute ipsum"
}
],
"__moreField__": "ea aliquip aliqua"
}
}
422 Unprocessable Entity (WebDAV) (RFC 4918)
{
"calendarId": {
"message": "The calendar id field is mandatory.",
"rule": "required"
},
"selectedSlot": {
"message": "The selected slot field is mandatory.",
"rule": "required"
},
"selectedTimezone": {
"message": "The selected timezone field is mandatory.",
"rule": "required"
},
"email or phone": {
"message": "The email or phone field is mandatory.",
"rule": "required"
}
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Unauthorized
Bad Request. please contact support!
401 Unauthorized
{
"msg": "Unauthorized"
}
400 Bad Request
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
GET /v1/appointments/:appointmentId
https://link.amtssl.com/v1/appointments/:appointmentId
Get appointment by id.
AUTHORIZATION
Bearer Token
Token
<token>
PATH VARIABLES
appointmentId
004B1SpcAvh3s9E3rqk8
(Required) Appointment Id
Example Request
curl --location --request GET 'https://link.amtssl.com/v1/appointments/:appointmentId' \
--header 'Authorization: Bearer <token>'
Example Response
Bad Request. please contact support!
Unauthorized
400 Bad Request
Body
{
"msg": "Bad Request"
}
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful Response
200 OK
Body
Content-Type: application/json
PUT /v1/appointments/:appointmentId
https://link.amtssl.com/v1/appointments/:appointmentId
Update existing appointment.
AUTHORIZATION
Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
PATH VARIABLES
appointmentId
004B1SpcAvh3s9E3rqk8
(Required) Appointment Id
BODY raw
{
"selectedTimezone": "Asia/Calcutta",
"selectedSlot": "2020-08-28T15:30:00"
}
Example Request
curl --location --request PUT 'https:/link.amtssl.com/v1/appointments/:appointmentId' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"selectedTimezone": "Asia/Calcutta",
"selectedSlot": "2020-08-28T15:30:00"
}'
Example Response
Unauthorized
Bad Request. please contact support!
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful Response
Unprocessable Entity
200 OK
Body
{
"id": "004B1SpcAvh3s9E3rqk8",
"contactId": "0007BWpSzSwfiuSl0tR2",
"contact": {
"id": "0007BWpSzSwfiuSl0tR2",
"locationId": "C2QujeCh8ZnC7al2InWR",
"email": "JohnDeo@gmail.com",
"emailLowerCase": "johndeo@gmail.com",
"fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
"timezone": "Asia/Calcutta",
"country": "DE",
"customField": [
{
"id": "MgobCB14YMVKuE4Ka8p1",
"value": "qui culpa"
},
{
"id": "MgobCB14YMVKuE4Ka8p1",
"value": "Excepteur cillum"
}
],
"__moreField__": "do dolore in"
}
}
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"selectedSlot": {
"message": "The selected slot field is mandatory.",
"rule": "required"
},
"selectedTimezone": {
"message": "The selected timezone field is mandatory.",
"rule": "required"
}
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
PUT /v1/appointments/:appointmentId/status
https://link.amtssl.com/v1/appointments/:appointmentId/status
Update existing appointment status.
Status field will have this options:
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
PATH VARIABLES
appointmentId
004B1SpcAvh3s9E3rqk8
(Required) Appointment Id
BODY raw
{
"status": "confirmed"
}
Example Request
curl --location --request PUT 'https://link.amtssl.com/v1/appointments/:appointmentId/status' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"status": "confirmed"
}'
Example Response
Unauthorized
Bad Request. please contact support!
Successful response
Unprocessable Entity
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
401 Unauthorized
Body
No response body
This request doesn't return a response body
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"selectedSlot": {
"message": "The selected slot field is mandatory.",
"rule": "required"
},
"selectedTimezone": {
"message": "The selected timezone field is mandatory.",
"rule": "required"
}
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: text/plain
Headers
Content-Type: application/json