Create an asset
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/assets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"title": "some string",
"status": "uninstalled"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/assets"
payload = {
"title": "some string",
"status": "uninstalled"
}
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({title: 'some string', status: 'uninstalled'})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/assets', 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"
}Assets
Create an asset
POST
/
assets
Create an asset
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/assets \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"title": "some string",
"status": "uninstalled"
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/assets"
payload = {
"title": "some string",
"status": "uninstalled"
}
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({title: 'some string', status: 'uninstalled'})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/assets', 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)
{
"title",// required | max : 200
"status",// required | acceptable_values : uninstalled,installed,retired
"customer_id",// nullable | integer | existing customer id
"maintenance_agreement_id",// nullable | integer | existing maintenance agreement id
"asset_category_id",// nullable | integer | existing asset category id
"asset_type",// optional | acceptable_values : company,customer
"is_template",// optional | boolean
"tag",// optional | string | max:255
"location",// optional | string | max:255 | description: Location string for example "Some street 1, City, State, Zip Code"
"install_date",// nullable | timestamp
"manufacturer",// optional | string | max:255 | description: Mannufacturer name
"model",// optional | string | max:255 | description: Model name
"model_number",// optional | string | max:255
"serial_number",// optional | string | max:255
"model_year",// optional | integer
"model_details",// optional | string | max:4000
"warranty_expiration",// optional | integer | digits:10
"labor_warranty_expiration",// optional | integer | digits:10
"warranty_information",// optional | string | max:4000
"labor_warranty_information",// optional | string | max:4000
"condition",// optional | string | max:255
"issues",// optional | string | max:4000
"notes",// optional | string | max:4000
"job_ids",// optional | array | description: array of existing job ids to associate the asset
"location_id",// nullable | integer | existing location id
"customfields": [ // 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
}
]
}
Authorizations
Body
application/json
Maximum string length:
200Available options:
uninstalled, installed, retired Existing customer id.
Existing maintenance agreement id.
Existing asset category id.
Available options:
company, customer Maximum string length:
255Location string for example "Some street 1, City, State, Zip Code".
Maximum string length:
255Unix timestamp.
Mannufacturer name.
Maximum string length:
255Model name.
Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
400010 digits.
10 digits.
Maximum string length:
4000Maximum string length:
4000Maximum string length:
255Maximum string length:
4000Maximum string length:
4000Array of existing job ids to associate the asset.
Existing location id.