Services
Batch Update Services
Update up to 100 trade services in one request. Items are processed sequentially and failures are reported per item without rolling back successful updates.
Authorization
bearerAuth AuthorizationBearer <token>
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
curl -X PATCH "https://example.com/v1/services/batch" \ -H "Content-Type: application/json" \ -d '{ "updates": [ { "id": 123, "pricing": { "pricingMode": "FIXED", "fixedPrice": 299 }, "duration": 120, "durationUnit": "MINUTES" }, { "id": 124, "name": "Renamed service" } ] }'{
"results": [
{
"id": 123,
"status": "ok",
"service": {
"id": 123,
"name": "Kitchen Installation",
"description": "Complete kitchen renovation and installation service",
"duration": 120,
"durationUnit": "MINUTES",
"followUpQuestions": [],
"tradeCategoryId": 1,
"pricingMode": "FIXED",
"fixedPrice": 299,
"hourlyRate": null,
"callOutFee": null,
"plusGST": false,
"plusMaterials": false,
"minPrice": null,
"maxPrice": null,
"isCustomPriceResponseActive": false,
"customPriceResponse": null,
"isDisclosePrice": true,
"isActive": true,
"teamAssignmentMethod": "PRIORITY_ORDER",
"scenario": null,
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": "2023-01-20T14:00:00.000Z"
}
},
{
"id": 124,
"status": "error",
"code": "NOT_FOUND",
"message": "Service not found"
}
],
"summary": {
"total": 2,
"succeeded": 1,
"failed": 1
}
}{
"success": false,
"message": "Batch size exceeds maximum of 100 items",
"error": {
"status": 400,
"code": "BATCH_TOO_LARGE",
"message": "Batch size exceeds maximum of 100 items"
}
}{
"success": false,
"message": "Invalid or expired token",
"error": {
"status": 401,
"message": "Invalid or expired token"
}
}{
"success": false,
"message": "Internal server error",
"error": {
"status": 500,
"message": "Internal server error"
}
}Update Scenario PUT
Update an existing scenario. Only scenarios belonging to the organization associated with the API key can be updated.
Create Service POST
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.