API batch | Hair salon

Here is an API batch to create a location for a hairdresser, including the settings for the scheduling process:

  • staff can be chosen or randomy assigned, depending on the client's choice ;
  • the start time interval for each appointment is 15-minutes, no matter how long each appointment is ;
  • staff's lastname is not to be displayed ;
  • waiting list is available.


You can learn more about settings for a hairdresser in our use case.


{
    "requests": [
        {
            "path": "/api/2.1/scheduling/companies",
            "method": "POST",
            "body": {
                "name": "My Salon",
                "address": {
                    "city": "",
                    "country": "FR",
                    "otherStreet": "",
                    "state": "",
                    "street": "",
                    "zipCode": ""
                },
                "currency": "EUR",
                "email": "",
                "phone": "",
                "scheduledItems": "service-staff",
                "timeZone": "Europe/Paris",
                "workingHours": [
                    {
                        "day": "monday",
                        "hours": [
                            {
                                "end": "18:00",
                                "start": "14:00"
                            }
                        ]
                    },
                    {
                        "day": "tuesday",
                        "hours": [
                            {
                                "end": "18:00",
                                "start": "09:00"
                            }
                        ]
                    },
                    {
                        "day": "wednesday",
                        "hours": [
                            {
                                "end": "18:00",
                                "start": "09:00"
                            }
                        ]
                    },
                    {
                        "day": "thursday",
                        "hours": [
                            {
                                "end": "18:00",
                                "start": "09:00"
                            }
                        ]
                    },
                    {
                        "day": "friday",
                        "hours": [
                            {
                                "end": "18:00",
                                "start": "09:00"
                            }
                        ]
                    },
                    {
                        "day": "saturday",
                        "hours": [
                            {
                                "end": "18:00",
                                "start": "09:00"
                            }
                        ]
                    },
                    {
                        "day": "sunday",
                        "hours": []
                    }
                ]
            }
        },
        {
            "path": "/api/2.1/scheduling/companies/{id}/services",
            "method": "POST",
            "body": {
                "allowBookingIteration": false,
                "availability": "public",
                "bufferDuration": 0,
                "price": 20,
                "capacity": 1,
                "color": "#770d69",
                "description": "",
                "duration": 15,
                "maxAppointmentsPerDay": 1,
                "name": "Haircut",
                "overNight": false,
                "overNightStartTime": "",
                "payable": false
            }
        },
        {
            "path": "/api/2.1/scheduling/companies/{company.id}/staff",
            "method": "POST",
            "body": {
                "firstName": "John",
                "lastName": "Doe",
                "email": "",
                "services": [
                    {
                        "id": "{id}"
                    }
                ]
            }
        },
        {
            "path": "/api/2.1/scheduling/companies/{company.id}/settings",
            "method": "PUT",
            "body": {
                "rules": {
                    "validation": "auto",
                    "maxAppointmentDate": "months-2",
                    "minAppointmentDate": "minutes-15",
                    "waitingList": true,
                },
                "widget": {
                    "appointmentForSomeoneElse": false,
                    "displayPrices": true,
                    "displayDuration": false,
                    "displayServicePicture": false,
                    "staffMemberNameFormat": "{staff name}",
                    "freeSlotsIntervalTime": "15"
                },
                "items": {
                    "serviceAlgorithm": "smart",
                    "staffServiceAllowRandomStaff": true,
                    "scheduledItems": "service-staff"
                }
            }
        }
    ]
}



Login or Signup to post a comment