Update department
curl --request PUT \
--url https://staging-api.usetyms.com/v1/adam/departments/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Marketing",
"branch_uuid": null
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/departments/{uuid}"
payload = {
"name": "Marketing",
"branch_uuid": None
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Marketing', branch_uuid: null})
};
fetch('https://staging-api.usetyms.com/v1/adam/departments/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "<string>",
"data": "<unknown>",
"meta": {}
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}Departments
Update department
PUT
/
departments
/
{uuid}
Update department
curl --request PUT \
--url https://staging-api.usetyms.com/v1/adam/departments/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Marketing",
"branch_uuid": null
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/departments/{uuid}"
payload = {
"name": "Marketing",
"branch_uuid": None
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Marketing', branch_uuid: null})
};
fetch('https://staging-api.usetyms.com/v1/adam/departments/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "<string>",
"data": "<unknown>",
"meta": {}
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Path Parameters
Department uuid.
Body
application/json
Response
Department updated