Create service
POST
/api/v1/services/
const url = 'https://app.ayna.com/api/v1/services/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","category":"example","description":"example","base_price":1,"price_unit":"per session","includes":["example"],"turnaround_days":3,"default_pilot_id":"example","is_active":true,"sort_order":0}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.ayna.com/api/v1/services/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "category": "example", "description": "example", "base_price": 1, "price_unit": "per session", "includes": [ "example" ], "turnaround_days": 3, "default_pilot_id": "example", "is_active": true, "sort_order": 0 }'Create a new service.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ServiceCreateRequest
object
name
required
Name
string
category
required
Category
Real_estate, events, construction, inspection, mapping, agriculture, other
string
base_price
required
Base Price
number
price_unit
Price Unit
string
turnaround_days
Turnaround Days
integer
is_active
Is Active
boolean
sort_order
Sort Order
integer
Responses
Section titled “Responses”Created
Media typeapplication/json
Response
object
key
additional properties
any
Example generated
{}