API batch | Training center

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

widget:

  • duration display
  • first name last name of staff

 

notifications:

  • SMS reminders at 1 hour
  • 1 day email reminders
  • Customer reviews

 

Appointment booking process:

  • minimum delay at 1 hour
  • maximum delay of 2 months
  • automatic validation
  • choice of staff


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 Location",
                "address": {
                    "city": "",
                    "country": "US",
                    "otherStreet": "",
                    "state": "",
                    "street": "",
                    "zipCode": ""
                },
                "currency": "USD",
                "email": "",
                "phone": "",
                "scheduledItems": "service-staff",
                "timeZone": "US/Eastern",
                "workingHours": [
                    {
                        "day": "monday",
                        "hours": [
                            {
                                "end": "12:00",
                                "start": "09:00"
                            },
                            {
                                "end": "18:00",
                                "start": "14:00"
                            }
                        ]
                    },
                    {
                        "day": "tuesday",
                        "hours": [
                            {
                                "end": "12:00",
                                "start": "09:00"
                            },
                            {
                                "end": "18:00",
                                "start": "14:00"
                            }
                        ]
                    },
                    {
                        "day": "wednesday",
                        "hours": [
                            {
                                "end": "12:00",
                                "start": "09:00"
                            },
                            {
                                "end": "18:00",
                                "start": "14:00"
                            }
                        ]
                    },
                    {
                        "day": "thursday",
                        "hours": [
                            {
                                "end": "12:00",
                                "start": "09:00"
                            },
                            {
                                "end": "18:00",
                                "start": "14:00"
                            }
                        ]
                    },
                    {
                        "day": "friday",
                        "hours": [
                            {
                                "end": "12:00",
                                "start": "09:00"
                            },
                            {
                                "end": "18:00",
                                "start": "14:00"
                            }
                        ]
                    },
                    {
                        "day": "saturday",
                        "hours": [
                            {
                                "end": "12:00",
                                "start": "09:00"
                            }
                        ]
                    },
                    {
                        "day": "sunday",
                        "hours": []
                    }
                ],
                "externalCalendars": [
                    {
                        "address": "https://raw.githubusercontent.com/AntoineAugusti/jours-feries-france-datagouv/master/jours_feries.ics",
                        "type": "ics"
                    }
                ]
            }
        },
        {
            "path": "/api/2.1/scheduling/companies/{id}/services",
            "method": "POST",
            "body": {
                "allowBookingIteration": false,
                "availability": "public",
                "bufferDuration": 0,
                "price": 0,
                "capacity": 20,
                "color": "#770d69",
                "description": "",
                "duration": 15,
                "maxAppointmentsPerDay": 1,
                "name": "Online course",
                "overNight": false,
                "overNightStartTime": "",
                "payable": false,
                "clientEmailFeedback": true
            }
        },
        {
            "path": "/api/2.1/scheduling/companies/{company.id}/staff",
            "method": "POST",
            "body": {
                "firstName": "Jane",
                "lastName": "Doe",
                "email": "",
                "description": "Formateur",
                "services": [
                    {
                        "id": "{id}"
                    }
                ]
            }
        },
        {
            "path": "/api/2.1/scheduling/companies/{company.id}/settings",
            "method": "PUT",
            "body": {
                "rules": {
                    "validation": "auto",
                    "maxAppointmentDate": "months-2",
                    "minAppointmentDate": "hours-1",
                    "waitingList": true
                },
                "widget": {
                    "appointmentForSomeoneElse": true,
                    "displayPrices": false,
                    "displayDuration": true,
                    "displayServicePicture": false,
                    "staffMemberNameFormat": "{staff name} {staff lastname}",
                    "freeSlotsIntervalTime": "service+buffer",
                    "displayConfirmPrintPage": true
                },
                "items": {
                    "serviceAlgorithm": "smart",
                    "staffServiceAllowRandomStaff": false,
                    "scheduledItems": "staff-service"
                },
                "notifications": {
                    "reminders.second.sms": true,
                    "reminders.first.delay": "dayBeforeEvening",
                    "reminders.first.email": true,
                    "reminders.second.delay": "60"
                }
            }
        }
    ]
}



Login or Signup to post a comment