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": "test@test.com"
    },
    {
        "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": "test@test.com"
    }
]
@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

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