Update service
PATCH
/api/v1/services/{service_id}
const url = 'https://app.ayna.com/api/v1/services/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","category":"example","description":"example","base_price":1,"price_unit":"example","includes":["example"],"turnaround_days":1,"default_pilot_id":"example","is_active":true,"sort_order":1}'};
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.ayna.com/api/v1/services/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "category": "example", "description": "example", "base_price": 1, "price_unit": "example", "includes": [ "example" ], "turnaround_days": 1, "default_pilot_id": "example", "is_active": true, "sort_order": 1 }'Update a service.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”service_id
required
Service Id
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ServiceUpdateRequest
object
Example generated
{ "name": "example", "category": "example", "description": "example", "base_price": 1, "price_unit": "example", "includes": [ "example" ], "turnaround_days": 1, "default_pilot_id": "example", "is_active": true, "sort_order": 1}Responses
Section titled “Responses”OK
Media typeapplication/json
Response
object
key
additional properties
any
Example generated
{}