Work management
Update a work request portal
PATCH
/
workrequestportals
/
{id}
Update a work request portal
curl --request PATCH \
--url https://api.oncanary.com/v1/workrequestportals/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"welcomeText": "<string>",
"descriptionPlaceholder": "<string>",
"contactInformation": "<string>",
"assetId": "<string>",
"locationId": "<string>",
"emailOnly": true,
"sendEmailNotification": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
welcomeText: '<string>',
descriptionPlaceholder: '<string>',
contactInformation: '<string>',
assetId: '<string>',
locationId: '<string>',
emailOnly: true,
sendEmailNotification: true
})
};
fetch('https://api.oncanary.com/v1/workrequestportals/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/workrequestportals/{id}"
payload = {
"title": "<string>",
"welcomeText": "<string>",
"descriptionPlaceholder": "<string>",
"contactInformation": "<string>",
"assetId": "<string>",
"locationId": "<string>",
"emailOnly": True,
"sendEmailNotification": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"workRequestPortal": {
"id": "<string>",
"title": "<string>",
"portalUrl": "<string>",
"welcomeText": "<string>",
"descriptionPlaceholder": "<string>",
"contactInformation": "<string>",
"assetId": "<string>",
"locationId": "<string>",
"emailOnly": true,
"sendEmailNotification": true
}
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}Authorizations
Organization API key with an sk_live_ or sk_test_ prefix
Path Parameters
Resource ID
Body
application/json
Maximum string length:
255Maximum string length:
5000Maximum string length:
500Maximum string length:
512Response
Updated work request portal
Show child attributes
Show child attributes
⌘I
Update a work request portal
curl --request PATCH \
--url https://api.oncanary.com/v1/workrequestportals/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"welcomeText": "<string>",
"descriptionPlaceholder": "<string>",
"contactInformation": "<string>",
"assetId": "<string>",
"locationId": "<string>",
"emailOnly": true,
"sendEmailNotification": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
welcomeText: '<string>',
descriptionPlaceholder: '<string>',
contactInformation: '<string>',
assetId: '<string>',
locationId: '<string>',
emailOnly: true,
sendEmailNotification: true
})
};
fetch('https://api.oncanary.com/v1/workrequestportals/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.oncanary.com/v1/workrequestportals/{id}"
payload = {
"title": "<string>",
"welcomeText": "<string>",
"descriptionPlaceholder": "<string>",
"contactInformation": "<string>",
"assetId": "<string>",
"locationId": "<string>",
"emailOnly": True,
"sendEmailNotification": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"workRequestPortal": {
"id": "<string>",
"title": "<string>",
"portalUrl": "<string>",
"welcomeText": "<string>",
"descriptionPlaceholder": "<string>",
"contactInformation": "<string>",
"assetId": "<string>",
"locationId": "<string>",
"emailOnly": true,
"sendEmailNotification": true
}
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}{
"type": "https://api.oncanary.com/errors/validation_error",
"title": "Validation Error",
"status": 400,
"detail": "Request validation failed",
"request_id": "req_01JAY8FVDM6CH4R3X9Q2T7K5NP",
"code": "validation_error"
}