Connect Material List item to entity
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/material-lists/{id}/item-connect \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"to_entity": "job",
"to_entity_id": 1,
"item_ids": [
1
]
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/material-lists/{id}/item-connect"
payload = {
"to_entity": "job",
"to_entity_id": 1,
"item_ids": [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({to_entity: 'job', to_entity_id: 1, item_ids: [1]})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/material-lists/{id}/item-connect', 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 or object not found"
}{
"message": "Internal Server Error"
}Material Lists
Connect Material List item to entity
POST
/
material-lists
/
{id}
/
item-connect
Connect Material List item to entity
curl --request POST \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/material-lists/{id}/item-connect \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"to_entity": "job",
"to_entity_id": 1,
"item_ids": [
1
]
}
'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/material-lists/{id}/item-connect"
payload = {
"to_entity": "job",
"to_entity_id": 1,
"item_ids": [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({to_entity: 'job', to_entity_id: 1, item_ids: [1]})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/material-lists/{id}/item-connect', 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 or object not found"
}{
"message": "Internal Server Error"
}Body raw (json)
{
"to_entity", // required | string | max:255 | values: 'job', 'project', 'invoice', 'order', 'estimate'
"to_entity_id", // required | integer | existing id of entities listed for to_entity
"item_ids" // required | array of material list line item ids
}
Authorizations
Path Parameters
Body
application/json