API batch | Beauty salon & spa

Here is an API batch to create a location for a beauty center or spa, including the settings for the scheduling process: 

  • staff is automatically assigned ;
  • 60-minutes appointments + 30-minutes after each appointment (eg: cleansing) ;
  • staff's lastname is not to be displayed ;
  • waiting list is available ;
  • a client can book an appointment for someone else (eg: gift).


{
    "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": []
                    },
                    {
                        "day": "sunday",
                        "hours": []
                    }
                ]
            }
        },
        {
            "path": "/api/2.1/scheduling/companies/{id}/services",
            "method": "POST",
            "body": {
                "allowBookingIteration": false,
                "availability": "public",
                "bufferDuration": 30,
                "price": 70,
                "capacity": 1,
                "color": "#770d69",
                "description": "",
                "duration": 60,
                "maxAppointmentsPerDay": 1,
                "name": "Massage",
                "overNight": false,
                "overNightStartTime": "",
                "payable": false
            }
        },
        {
            "path": "/api/2.1/scheduling/companies/{company.id}/staff",
            "method": "POST",
            "body": {
                "firstName": "Jane",
                "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": true,
                    "displayPrices": true,
                    "displayDuration": true,
                    "displayServicePicture": false,
                    "staffMemberNameFormat": "{staff name}",
                    "freeSlotsIntervalTime": "service+buffer",
                    "displayConfirmPrintPage": true
                },
                "items": {
                    "serviceAlgorithm": "smart",
                    "staffServiceAllowRandomStaff": true,
                    "scheduledItems": "service"
                }
            }
        }
    ]
}


Login or Signup to post a comment