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": "",
"status": "",
"customer_id": "",
"maintenance_agreement_id": "",
"asset_category_id": "",
"asset_type": "",
"is_template": "",
"tag": "",
"location": "",
"install_date": "",
"manufacturer": "",
"model": "",
"model_number": "",
"serial_number": "",
"model_year": "",
"model_details": "",
"warranty_expiration": "",
"labor_warranty_expiration": "",
"warranty_information": "",
"labor_warranty_information": "",
"condition": "",
"issues": "",
"notes": "",
"job_ids": ""
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/assets"
payload = {
"title": "",
"status": "",
"customer_id": "",
"maintenance_agreement_id": "",
"asset_category_id": "",
"asset_type": "",
"is_template": "",
"tag": "",
"location": "",
"install_date": "",
"manufacturer": "",
"model": "",
"model_number": "",
"serial_number": "",
"model_year": "",
"model_details": "",
"warranty_expiration": "",
"labor_warranty_expiration": "",
"warranty_information": "",
"labor_warranty_information": "",
"condition": "",
"issues": "",
"notes": "",
"job_ids": ""
}
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: '',
status: '',
customer_id: '',
maintenance_agreement_id: '',
asset_category_id: '',
asset_type: '',
is_template: '',
tag: '',
location: '',
install_date: '',
manufacturer: '',
model: '',
model_number: '',
serial_number: '',
model_year: '',
model_details: '',
warranty_expiration: '',
labor_warranty_expiration: '',
warranty_information: '',
labor_warranty_information: '',
condition: '',
issues: '',
notes: '',
job_ids: ''
})
};
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));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": "",
"status": "",
"customer_id": "",
"maintenance_agreement_id": "",
"asset_category_id": "",
"asset_type": "",
"is_template": "",
"tag": "",
"location": "",
"install_date": "",
"manufacturer": "",
"model": "",
"model_number": "",
"serial_number": "",
"model_year": "",
"model_details": "",
"warranty_expiration": "",
"labor_warranty_expiration": "",
"warranty_information": "",
"labor_warranty_information": "",
"condition": "",
"issues": "",
"notes": "",
"job_ids": ""
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/assets"
payload = {
"title": "",
"status": "",
"customer_id": "",
"maintenance_agreement_id": "",
"asset_category_id": "",
"asset_type": "",
"is_template": "",
"tag": "",
"location": "",
"install_date": "",
"manufacturer": "",
"model": "",
"model_number": "",
"serial_number": "",
"model_year": "",
"model_details": "",
"warranty_expiration": "",
"labor_warranty_expiration": "",
"warranty_information": "",
"labor_warranty_information": "",
"condition": "",
"issues": "",
"notes": "",
"job_ids": ""
}
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: '',
status: '',
customer_id: '',
maintenance_agreement_id: '',
asset_category_id: '',
asset_type: '',
is_template: '',
tag: '',
location: '',
install_date: '',
manufacturer: '',
model: '',
model_number: '',
serial_number: '',
model_year: '',
model_details: '',
warranty_expiration: '',
labor_warranty_expiration: '',
warranty_information: '',
labor_warranty_information: '',
condition: '',
issues: '',
notes: '',
job_ids: ''
})
};
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));Authorizations
Body
application/json
The body is of type object.
Response
200 - application/json
Successful response
Was this page helpful?
⌘I