Create Service
Create a new trade service. The service will be associated with the organization of the API key. A scenario is automatically created and linked to the service.
Authorization
bearerAuth Bearer token authentication for API access.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/services" \ -H "Content-Type: application/json" \ -d '{ "name": "Kitchen Installation", "description": "Complete kitchen renovation and installation service", "followUpQuestions": [], "duration": 180, "durationUnit": "MINUTES", "tradeCategoryId": 1, "pricingMode": "NONE" }'{
"service": {
"id": 123,
"name": "Kitchen Installation",
"description": "Complete kitchen renovation and installation service",
"duration": 180,
"durationUnit": "MINUTES",
"followUpQuestions": [
"What type of countertops do you prefer?",
"Do you need electrical work?"
],
"tradeCategoryId": 1,
"pricingMode": "FIXED",
"fixedPrice": 299.99,
"hourlyRate": 75,
"callOutFee": 50,
"plusGST": false,
"plusMaterials": false,
"minPrice": 199.99,
"maxPrice": 499.99,
"isCustomPriceResponseActive": false,
"customPriceResponse": null,
"isDisclosePrice": true,
"isActive": true,
"teamAssignmentMethod": "PRIORITY_ORDER",
"scenario": {
"id": 101,
"response": "",
"questions": [
{
"question": "Are you an existing customer?",
"answerOptions": [
{
"answer": "Yes",
"followUps": [
{
"question": "Can you tell me more about that?"
}
]
}
]
}
],
"outcome": {
"type": "continueCall",
"property1": null,
"property2": null
}
},
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": "2023-01-20T14:00:00.000Z"
}
}{
"success": false,
"message": "Bad request",
"error": {
"status": 400,
"message": "Bad request"
}
}{
"success": false,
"message": "Invalid or expired token",
"error": {
"status": 401,
"message": "Invalid or expired token"
}
}{
"success": false,
"message": "Conflict",
"error": {
"status": 409,
"message": "Conflict"
}
}{
"success": false,
"message": "Internal server error",
"error": {
"status": 500,
"message": "Internal server error"
}
}Batch Update Services PATCH
Update up to 100 trade services in one request. Items are processed sequentially and failures are reported per item without rolling back successful updates.
Delete Service DELETE
Soft-delete an existing trade service. Associated assignees, scenario, and transfer records are removed. Only services belonging to the organization associated with the API key can be deleted.