Skip to content

Instantly share code, notes, and snippets.

@Crocoblock
Created February 12, 2024 18:48
Show Gist options
  • Save Crocoblock/b0797f1011bdae579e2a4893e12d6ce2 to your computer and use it in GitHub Desktop.
Save Crocoblock/b0797f1011bdae579e2a4893e12d6ce2 to your computer and use it in GitHub Desktop.
JetAppointment REST API

Autentification

Authenticate with Application Password, with user having 'manage_options' capability

Get excluded dates

GET /wp-json/jet-engine/v2/appointment-refresh-date/?service={service_id}&provider={provider_id}

For example /wp-json/jet-engine/v2/appointment-refresh-date/?service=75&provider=false

Response:

{
    "success": true,
    "data": {
        "excludedDates": [
            {
                "start": 1707782400,
                "end": 1707782400,
                "service": 75,
                "is_full": true
            },
            {
                "start": 1707868800,
                "end": 1707868800,
                "service": 75,
                "is_full": true
            },
            {
                "start": 1707955200,
                "end": 1707955200,
                "service": 75,
                "is_full": true
            }
        ],
        "worksDates": [],
        "datesRange": {
            "start": 0,
            "end": 0
        },
        "datesMode": "override_days",
        "availableWeekDays": [
            "saturday",
            "sunday",
            "monday"
        ]
    }
}

Create appointment

POST /wp-json/jet-engine/v2/appointment-add-appointment

Pass an array of appointments

[
    {
        "service": 75,
        "date": "18/02/2024",
        "date_timestamp": "1708214400",
        "slot": "10:00",
        "slot_end": "16:00",
        "slot_timestamp": "1708250400",
        "slot_end_timestamp": "1708272000",
        "status": "pending",
        "user_email": "[email protected]"
    },
    {
        "service": 75,
        "date": "18/02/2024",
        "date_timestamp": "1708214400",
        "slot": "10:00",
        "slot_end": "16:00",
        "slot_timestamp": "1708250400",
        "slot_end_timestamp": "1708272000",
        "status": "pending",
        "user_email": "[email protected]"
    }
]
@ihslimn
Copy link

ihslimn commented Feb 28, 2024

/wp-json/jet-booking/v2/ fot JetBooking
endpoints can be found in folder \jet-booking\includes\rest-api\endpoints

@AviadCon
Copy link

AviadCon commented Apr 1, 2025

@Crocoblock
I am trying to use this API, but did not understand how to make it.
Someone can please help me and send the curl syntax for it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment