Update a supplier
PATCH
/suppliers/{id}
const url = 'https://app.dev.buildtrace.eu/api/suppliers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","contact":"example","notes":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://app.dev.buildtrace.eu/api/suppliers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "contact": "example", "notes": "example" }'Edit a supplier’s name, contact and notes (the code is fixed). Omitted fields are left as they are; an empty contact or notes clears it.
Required scope: suppliers:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
contact
An empty string clears the contact.
string
notes
An empty string clears the notes.
string
Example generated
{ "name": "example", "contact": "example", "notes": "example"}Responses
Section titled “Responses”Updated
Media typeapplication/json
object
id
required
string format: uuid
code
required
string
name
required
string
contact
string
notes
string
active
required
boolean
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "code": "example", "name": "example", "contact": "example", "notes": "example", "active": true}Invalid (blank name)
Media typeapplication/json
object
error
required
string
Example generated
{ "error": "example"}Unauthorized
Not found