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 external identifier specified for the new service already exists within the business, the request will return a 409 - Conflict error with the message ID already exists.
If the name of the new service is not provided, the request will return a 406 - Not Acceptable error with the message must not be null.
If the firstDayOfWeek field is not sent or its value is not one of the allowed options, the request will return a 400 - Bad Request error with the message Invalid firstDayOfWeek. Must be an integer between 1 (monday) and 7 (sunday).
|
If the |
If the external node identifier (parentOuterId) does not match any configured at the business level, the request will return a 404 - Not Found error with the message Node not found.