Update subject
curl --request PUT \
--url https://partner-api.ochy-prod.com/subjects/{subject_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Jane Smith-Williams",
"weight": 63
}
'import requests
url = "https://partner-api.ochy-prod.com/subjects/{subject_id}"
payload = {
"name": "Jane Smith-Williams",
"weight": 63
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Jane Smith-Williams', weight: 63})
};
fetch('https://partner-api.ochy-prod.com/subjects/{subject_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "Subject updated"
}{
"detail": "Internal server error",
"code": "insufficient_api_credits"
}{
"detail": "API Key is missing"
}{
"detail": "API Key is missing"
}{
"detail": "Subject not found"
}{
"detail": "Internal server error",
"code": "insufficient_api_credits"
}Subjects
Update subject
Update an existing subject. Only the fields provided in the request body are updated — omitted fields remain unchanged.
PUT
/
subjects
/
{subject_id}
Update subject
curl --request PUT \
--url https://partner-api.ochy-prod.com/subjects/{subject_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Jane Smith-Williams",
"weight": 63
}
'import requests
url = "https://partner-api.ochy-prod.com/subjects/{subject_id}"
payload = {
"name": "Jane Smith-Williams",
"weight": 63
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Jane Smith-Williams', weight: 63})
};
fetch('https://partner-api.ochy-prod.com/subjects/{subject_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "Subject updated"
}{
"detail": "Internal server error",
"code": "insufficient_api_credits"
}{
"detail": "API Key is missing"
}{
"detail": "API Key is missing"
}{
"detail": "Subject not found"
}{
"detail": "Internal server error",
"code": "insufficient_api_credits"
}Authorizations
bearerAuthapiKeyHeaderapiKeyQuery
Recommended. Pass your API key as a Bearer token in the Authorization header: Authorization: Bearer YOUR_API_KEY.
Path Parameters
Subject ID.
Body
application/json
Response
Subject updated.