curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customer_id": 1,
"job_type": "some string",
"billing": 1
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/jobs"
payload = {
"customer_id": 1,
"job_type": "some string",
"billing": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: 1, job_type: 'some string', billing: 1})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}Create a job
Create a job
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/jobs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"customer_id": 1,
"job_type": "some string",
"billing": 1
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/jobs"
payload = {
"customer_id": 1,
"job_type": "some string",
"billing": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({customer_id: 1, job_type: 'some string', billing: 1})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL not found"
}{
"message": "Internal Server Error"
}{
"customer_id",// required | integer | existing customer id
"project_id",// nullable | integer | existing project id
"job_type",// required | string | max:150
"subtitle",// optional | string | max:150
"status",// required, if status_id is not set | integer | acceptable_values: 1(new),2(in progress),3(pending),4(completed),5(canceled),6(on the way)
"status_id",// required, if status is not set | integer | existing custom status id
"status_workflow_id",// required, if status_id is set | integer | existing status workflow id
"start_time",// nullable | timestamp
"end_time",// nullable | timestamp
"due_date",// nullable | timestamp
"billing",// required | integer
"notes",// optional | string | max:7500
"field_notes",// optional | string | max:5000
"location_id",// nullable | integer | existing location id
"generate_invoice",// optional | boolean
"type",// optional | string | acceptable_values: task,job
"is_template",// optional | boolean
"in_progress_status_log",// nullable | integer
"template_id",// nullable | integer | existing job template id
"hazardco_swms_id",// nullable | integer | existing swms file id
"maintenance_agreement_id",// nullable | integer | existing maintenance agreement id
"maintenance_occurrence_id",// nullable | integer | existing maintenance occurrence id
"recurring_parent_id",// nullable | integer | existing job recurring id
"task_category_id",// nullable | integer | existing task category id
"customer_contact_id",// nullable | integer | existing customer contact id
"assignments": [// optional | array
{
"team_id",// nullable | integer | existing team id
"assigned_members"// required | array | existing user ids
}
],
"customfields": [ // nullable | optional | array | description: array of custom fleds
{
"id", // optional | nullable | required if field_instance_id is not set | integer | custom field id
"field_instance_id", // optional | nullable | required if id is not set | integer | custom field instance id
"value" // required | string | custom value
},
{
"id", // optional | nullable | required if field_instance_id is not set | integer | custom field id
"field_instance_id", // optional | nullable | required if id is not set | integer | custom field instance id
"value" // required | string | custom value
}
],
"visits": [// nullable | array
{
"status",// nullable | integer | acceptable_values: 1(new),2(in progress),3(pending),4(completed),5(canceled),6(on the way)
"title",// nullable | string
"subtitle",// nullable | string
"is_visible",// optional | boolean
"start_time",// nullable | timestamp
"end_time"// nullable | timestamp
}
],
"tags",// optional | array | description: array of tag ids
"customer_arrival_window_start_time",// nullable | timestamp
"customer_arrival_window_end_time",// nullable | timestamp
"asset_ids"// optional | array | description: array of existing assets ids
"qb_time_class_id"// optional | nullable | integer | existing Quickbooks Time class id
}
Authorizations
Body
Existing customer id.
150Existing project id.
150Required if status_id is not set. 1 = new, 2 = in progress, 3 = pending, 4 = completed, 5 = canceled, 6 = on the way.
1, 2, 3, 4, 5, 6 Required if status is not set. Existing custom status id.
Required if status_id is set. Existing status workflow id.
Unix timestamp.
Unix timestamp.
Unix timestamp.
75005000Existing location id.
task, job Existing job template id.
Existing swms file id.
Existing maintenance agreement id.
Existing maintenance occurrence id.
Existing job recurring id.
Existing task category id.
Existing customer contact id.
Hide child attributes
Hide child attributes
1 = new, 2 = in progress, 3 = pending, 4 = completed, 5 = canceled, 6 = on the way.
1, 2, 3, 4, 5, 6 Unix timestamp.
Unix timestamp.
Array of tag ids.
Unix timestamp.
Unix timestamp.
Array of existing assets ids.
Existing Quickbooks Time class id.