Create a service
This endpoint enables the creation of a new service within the business.
POST /api/v2/businesses/{businessId}/services
Below is a detailed explanation of each field that can be included in the request body. Some of them are required for the request to be processed successfully.
|
Required fields are marked with an asterisk (*). |
Request body
| JSON Analysis |
|---|
Details
|
Request example
After analyzing the different fields, here is an example of the request body:
{
"newServiceOuterId": "1327",
"newServiceName": "STORE 1327",
"timeZone": "Africa/Freetown",
"firstDayOfWeek": 1,
"copyFromServiceOuterId": "0001",
"parentOuterId": "PN"
}
Considerations
|
If the |
Error codes
In addition to the common errors, this endpoint can return the following codes:
| Code | Message | Description |
|---|---|---|
|
newServiceName must not be empty |
The |
Invalid TimeZone |
The |
|
Invalid firstDayOfWeek. Must be an integer between 1 (monday) and 7 (sunday) |
The |
|
parentOuterId must not be empty |
The |
|
- |
The request body is not valid JSON. |
|
|
Node not found |
The |
Node not found |
The |
|
|
ID already exists |
The |
- |
A conflict occurred while creating the service. It is recommended to check that the data sent does not violate any integrity constraint. |