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"
}Jobs
Create a job
Create a job
POST
/
jobs
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"
}Body raw (json)
{
"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 | integer | description: timestamp
"end_time",// nullable | integer | description: timestamp
"due_date",// nullable | integer | description: 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 | integer | description: timestamp
"end_time"// nullable | integer | description: timestamp
}
],
"tags",// optional | array | description: array of tag ids
"customer_arrival_window_start_time",// nullable | integer | description: timestamp
"customer_arrival_window_end_time",// nullable | integer | description: timestamp
"asset_ids"// optional | array | description: array of existing assets ids
"qb_time_class_id"// optional | nullable | integer | existing Quickbooks Time class id
"is_visible" // optional | boolean | description: to hide/show the job
}
Body
application/json
Hide child attributes
Hide child attributes