Spring Sale: Get 50% Off All Plans Prices go back up April 1

Rest API Endpoints

Learn how to use the Booknetic REST API (v1.0.0) to manage appointments and customers.

Version:
Categories

Booknetic includes a JSON-based REST API for working with core resources such as appointments and customers. This guide is based on the provided OpenAPI specification and presents the available endpoints in a cleaner, more developer-friendly format.

The API is intended for programmatic access to Booknetic data through standard HTTP requests and JSON payloads.

API Overview

PropertyValue
Version1.0.0
Base path/wp-json/booknetic/v1
FormatJSON (application/json)

Base URL

All endpoints in this guide are relative to:

/wp-json/booknetic/v1

In a typical WordPress installation, the full base URL is:

https://your-domain.com/wp-json/booknetic/v1

Content Type

Requests and responses use JSON.

HeaderValue
Request headerContent-Type: application/json
Response headerContent-Type: application/json

Available Resources

ResourceDescription
AppointmentsAppointment management
CustomersCustomer management

Appointments

The appointments resource provides endpoints for listing, creating, retrieving, updating, deleting, and changing appointment records, as well as fetching available statuses and time slots.

Get Appointments

Returns a list of appointments.

Endpoint

GET /appointments

Response

200 OK — List of appointments

Response body: array of Appointment

Example response

[
  {
    "id": 101,
    "customer_id": 55,
    "service_id": 9,
    "staff_id": 3,
    "date": "2026-01-10T14:30:00Z",
    "status": "approved"
  }
]

Create Appointment

Creates a new appointment.

Endpoint

POST /appointments

Request body

Required — AppointmentCreate

Example request

{
  "customer_id": 55,
  "service_id": 9,
  "staff_id": 3,
  "date": "2026-01-10T14:30:00Z"
}

Responses

201 Created — Appointment created

Response body: Appointment

Example response

{
  "id": 102,
  "customer_id": 55,
  "service_id": 9,
  "staff_id": 3,
  "date": "2026-01-10T14:30:00Z",
  "status": "pending"
}

Get Appointment by ID

Returns a single appointment by its ID.

Endpoint

GET /appointments/{id}

Path parameters

NameTypeRequiredDescription
idintegerYesAppointment ID

Responses

200 OK — Appointment

Response body: Appointment

Example response

{
  "id": 102,
  "customer_id": 55,
  "service_id": 9,
  "staff_id": 3,
  "date": "2026-01-10T14:30:00Z",
  "status": "pending"
}

Update Appointment

Updates an appointment by its ID.

Endpoint

PUT /appointments/{id}

Path parameters

NameTypeRequiredDescription
idintegerYesAppointment ID

Request body

Required — AppointmentUpdate

Example request

{
  "staff_id": 4,
  "date": "2026-01-10T15:00:00Z",
  "status": "approved"
}

Responses

200 OK — Appointment updated

The provided OpenAPI specification does not define a response schema for this endpoint. In practice, returning the updated Appointment object would make the endpoint more predictable and easier to consume.

Delete Appointment

Deletes an appointment by its ID.

Endpoint

DELETE /appointments/{id}

Path parameters

NameTypeRequiredDescription
idintegerYesAppointment ID

Responses

204 No Content — Appointment deleted

Change Appointment Status

Updates the status of an appointment.

Endpoint

PUT /appointments/{id}/change-status

Path parameters

FieldTypeRequiredDescription
idintegerYesAppointment ID

Request body

Required

FieldTypeRequiredDescription
statusstringYesNew status value

Example request

{
  "status": "approved"
}

Responses

200 OK — Status updated

The provided OpenAPI specification does not define a response schema for this endpoint. A consistent implementation may return either the updated Appointment object or a standard success payload.

Get Appointment Statuses

Returns the list of available appointment statuses.

Endpoint

GET /appointments/statuses

Responses

200 OK — Available statuses

Response body: array of strings

Example response

["pending", "approved", "canceled"]

Get Available Appointment Times

Returns a list of available appointment time slots.

Endpoint

GET /appointments/available-times

Responses

200 OK — Available times

Response body: array of strings

Example response

[
  "2026-01-10 14:30",
  "2026-01-10 15:00",
  "2026-01-10 15:30"
]

The OpenAPI schema defines the example as a plain string such as "2026-01-10 14:30". If the actual implementation expects ISO 8601 values or timezone-aware values, that should be documented explicitly.

Customers

The customers resource provides endpoints for listing, retrieving, creating, updating, and deleting customer records.

Get Customers

Returns a list of customers.

Endpoint

GET /customers

Responses

200 OK — Customer list

Response body: array of Customer

Example response

[
  {
    "id": 55,
    "name": "Jane Doe",
    "email": "[email protected]",
    "phone": "+1 555 123 4567"
  }
]

Get Customer Info

Returns a customer by ID.

Endpoint

GET /customer/info/{id}

Path parameters

FieldTypeRequiredDescription
idintegerYesCustomer ID

Responses

200 OK — Customer info

Response body: Customer

Example response

{
  "id": 55,
  "name": "Jane Doe",
  "email": "[email protected]",
  "phone": "+1 555 123 4567"
}

Create Customer

Creates a new customer.

Endpoint

POST /customer/create

Request body

Required — CustomerCreate

Example request

{
  "name": "Jane Doe",
  "email": "[email protected]",
  "phone": "+1 555 123 4567"
}

Responses

201 Created — Customer created

Response body: Customer

Edit Customer

Updates an existing customer.

Endpoint

POST /customer/edit

Request body

Required — CustomerUpdate

Example request

{
  "id": 55,
  "name": "Jane A. Doe",
  "email": "[email protected]",
  "phone": "+1 555 123 4567"
}

Responses

200 OK — Customer updated

The provided OpenAPI specification does not define a response schema for this endpoint. Returning the updated Customer object would improve consistency.

Delete Customer

Deletes a customer by ID.

Endpoint

POST /customer/delete

Request body

Required

FieldTypeRequiredDescription
idintegerYesCustomer ID

Example request

{
  "id": 55
}

Responses

200 OK — Customer deleted

This endpoint uses POST rather than DELETE. If that is intentional because of WordPress-specific implementation patterns, permissions, or nonce handling, the rationale should be documented clearly for API consumers.

Schemas

The following schemas are described in the provided OpenAPI specification.

Appointment

FieldTypeNotes
idintegerAppointment ID
customer_idintegerRelated customer ID
service_idintegerRelated service ID
staff_idintegerRelated staff ID
datestring (date-time)ISO 8601 datetime
statusstringAppointment status

AppointmentCreate

Required fields: customer_id, service_id, date

FieldTypeRequiredNotes
customer_idintegerYesCustomer ID
service_idintegerYesService ID
staff_idintegerNoStaff ID
datestring (date-time)YesISO 8601 datetime

AppointmentUpdate

FieldTypeRequiredNotes
staff_idintegerNoStaff ID
datestring (date-time)NoISO 8601 datetime
statusstringNoAppointment status

Customer

FieldTypeNotes
idintegerCustomer ID
namestringCustomer name
emailstring (email)Customer email
phonestringCustomer phone

CustomerCreate

Required fields: name

FieldTypeRequiredNotes
namestringYesCustomer name
emailstring (email)NoCustomer email
phonestringNoCustomer phone

CustomerUpdate

Required fields: id

FieldTypeRequiredNotes
idintegerYesCustomer ID
namestringNoCustomer name
emailstring (email)NoCustomer email
phonestringNoCustomer phone

Endpoint Summary

The following table summarizes all endpoints defined in the provided specification.

Appointment Endpoints

MethodEndpointDescription
GET/appointmentsGet appointments
POST/appointmentsCreate appointment
GET/appointments/{id}Get appointment by ID
PUT/appointments/{id}Update appointment
DELETE/appointments/{id}Delete appointment
PUT/appointments/{id}/change-statusChange appointment status
GET/appointments/statusesGet appointment statuses
GET/appointments/available-timesGet available appointment times

Customer Endpoints

MethodEndpointDescription
GET/customersGet customers
GET/customer/info/{id}Get customer info
POST/customer/createCreate customer
POST/customer/editEdit customer
POST/customer/deleteDelete customer

Notes for Implementers

A few details in the provided specification are not fully defined and would benefit from clarification in the final production documentation.

Missing Response Schemas

These endpoints do not define response schemas in the provided OpenAPI file:

EndpointNote
PUT /appointments/{id}Updated appointment response is not defined
PUT /appointments/{id}/change-statusResponse payload is not defined
POST /customer/editUpdated customer response is not defined

Returning the updated resource object for these endpoints would make the API easier to use and more consistent.

Time Format Consistency

The date field is documented as string (date-time) and example request and response payloads use ISO 8601 values such as:

"2026-01-10T14:30:00Z"

At the same time, the available times endpoint returns strings formatted like:

"2026-01-10 14:30"

If the implementation relies on a specific timezone, local server time, or strict ISO 8601 formatting, that expectation should be documented explicitly.

HTTP Method Consistency

The customer delete endpoint uses POST instead of DELETE:

POST /customer/delete

If this behavior is intentional, documenting the reason will reduce confusion for developers integrating with the API.

Summary

Booknetic’s REST API provides a JSON-based interface for managing appointments and customers under the /wp-json/booknetic/v1 namespace.

The current specification includes support for:

ResourceOperations
AppointmentsList, create, retrieve, update, delete, change status, get statuses, get available times
CustomersList, retrieve, create, update, delete