OnAutomate API V1.1.1

Welcome to onautomate Api docs.

Task

GET /v1/contacts/:contactId/tasks/

https://link.amtssl.com/v1/contacts/:contactId/tasks/

Get all contact tasks.

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

PATH VARIABLES

customValueId

sx6wyHhbFdRXh302LLNR

(Required) Contact Id

Example Request

curl --location --request GET 'https://link.amtssl.com/v1/contacts/:contactId/tasks/' \

--header 'Authorization: Bearer <token>'

Example Response

Bad Request. please contact support!

Successful Response

200 OK

Body

{

"tasks": [

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

},

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

}

]

}

200 OK

Body

{

"tasks": [

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

},

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

}

]

}

Headers

Content-Type: application/json

Headers

Content-Type: application/json

Successful Response

200 OK

Body

{

"tasks": [

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

},

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

}

]

}

Headers

Content-Type: application/json

POST /v1/contacts/:contactId/tasks/

https://link.amtssl.com/v1/contacts/:contactId/tasks/

Create Tasks.

Status: (optional) Field have following options.

  • completed
  • incompleted (default)

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

contactId

sx6wyHhbFdRXh302LLNR

(Required) Contact Id

BODY raw

{

"title": "First Task",

"dueDate": "2020-10-25T11:00:00Z",

"description": "loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"status": "incompleted"

}

Example Request

curl --location --request POST 'https://link.amtssl.com/v1/contacts/:contactId/tasks/' \

--header 'Authorization: Bearer <token>' \

--data-raw '{

"title": "First Task",

"dueDate": "2020-10-25T11:00:00Z",

"description": "loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"status": "incompleted"

}'

Example Response

Successful response

Unprocessable Entity

200 OK

Body

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

}

422 Unprocessable Entity (WebDAV) (RFC 4918)

Body

{

"title": {

"message": "The title field is mandatory.",

"rule": "required"

},

"dueDate": {

"message": "The due date field is mandatory.",

"rule": "required"

}

}

Headers

Content-Type: application/json

Headers

Content-Type: application/json

Bad Request. please contact support!

Bad Request. please contact support!

400 Bad Request

Body

{

"msg": "Bad Request"

}

401 Unauthorized

Body

{

"msg": "Unauthorized"

}

Headers

Content-Type: application/json

Headers

Content-Type: application/json

GET /v1/contacts/:contactId/tasks/:taskId

https://link.amtssl.com/v1/contacts/:contactId/tasks/:taskId

Get task by id.

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

PATH VARIABLES

contactId

sx6wyHhbFdRXh302LLNR

(Required) Contact Id

taskId

ocQHyuzHvysMo5N5VsXc

(Required) Task Id

Example Request

curl --location --request GET 'https://link.amtssl.com/v1/contacts/:contactId/tasks/:taskId' \

--header 'Authorization: Bearer <token>'

Example Response

Successful response

Bad Request. please contact support!

Unauthorized

200 OK

Body

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

}

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/contacts/:contactId/tasks/:taskId

https://link.amtssl.com/v1/contacts/:contactId/tasks/:taskId

Create Tasks.

Status: (optional) Field have following options.

  • completed
  • incompleted (default)

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

HEADERS

Content-Type

application/json

PATH VARIABLES

contactId

sx6wyHhbFdRXh302LLNR

(Required) Contact Id

taskId

ocQHyuzHvysMo5N5VsXc

(Required) Task Id

BODY raw

{

"title": "First Task",

"dueDate": "2020-10-25T11:00:00Z",

"description": "loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"status": "incompleted"

}

Example Request

curl --location --request POST 'https://link.amtssl.com/v1/contacts/:contactId/tasks/' \

--header 'Authorization: Bearer <token>' \

--data-raw '{

"title": "First Task",

"dueDate": "2020-10-25T11:00:00Z",

"description": "loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"status": "incompleted"

}'

Example Response

Successful response

Unprocessable Entity

200 OK

Body

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

}

422 Unprocessable Entity (WebDAV) (RFC 4918)

Body

{

"title": {

"message": "The title field is mandatory.",

"rule": "required"

},

"dueDate": {

"message": "The due date field is mandatory.",

"rule": "required"

}

}

Headers

Content-Type: application/json

Headers

Content-Type: application/json

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

DEL /v1/contacts/:contactId/tasks/:taskId

https://link.amtssl.com/v1/contacts/:contactId/tasks/:taskId

Delete one of Task.

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

PATH VARIABLES

contactId

sx6wyHhbFdRXh302LLNR

(Required) Contact Id

taskId

ocQHyuzHvysMo5N5VsXc

(Required) Task Id

Example Request

curl --location --request DELETE 'https://link.amtssl.com/v1/contacts/:contactId/tasks/:taskId' \

--header 'Authorization: Bearer <token>'

Example Response

Bad Request. please contact support!

Unauthorized

Successful response

400 Bad Request

Body

{

"msg": "Bad Request"

}

401 Unauthorized

Body

{

"msg": "Unauthorized"

}

200 OK

Body

""

Headers

Content-Type: application/json

Headers

Content-Type: application/json

Headers

Content-Type: application/json

PUT /v1/contacts/:contactId/tasks/:taskId/status

https://link.amtssl.com/v1/custom-values/:customValueId

Get custom value by id.

Authorization:

Provide your location api key (Bearer Token).

AUTHORIZATION

Bearer Token

Token

<token>

PATH VARIABLES

contactId

sx6wyHhbFdRXh302LLNR

(Required) Contact Id

taskId

ocQHyuzHvysMo5N5VsXc

(Required) Task Id

Body raw

{

"status": "completed"

}

Example Request

curl --location --request PUT 'https://link.amtssl.com/v1/contacts/:contactId/tasks/:taskId/status' \

--header 'Authorization: Bearer <token>' \

--data-raw '{

"status": "completed"

}'

Example Response

Unprocessable Entity

Successful response

422 Unprocessable Entity (WebDAV) (RFC 4918)

Body

{

"title": {

"message": "The title field is mandatory.",

"rule": "required"

},

"dueDate": {

"message": "The due date field is mandatory.",

"rule": "required"

}

}

200 OK

Body

{

"id": "Lj371SHlVMyfVlMcKiuk",

"title": "Loram ipsum",

"description": "Loram ipsum",

"assignedTo": "hxHGVRb1YJUscrCB8eXK",

"dueDate": "2020-10-25T11:00:00Z",

"isCompleted": false

}

Headers

Content-Type: application/json

Headers

Content-Type: application/json

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