Booknetic REST API
Learn how to use the Booknetic REST API (v1.0.0) to manage appointments and customers.
Learn how to use the Booknetic REST API (v1.0.0) to manage appointments and customers.
This document describes the Booknetic REST API endpoints included in the provided OpenAPI specification.
Version: 1.0.0
Base path: /wp-json/booknetic/v1
Format: JSON (application/json)
All endpoints in this documentation are relative to:
/wp-json/booknetic/v1
In a typical WordPress installation, the full URL is:
https://your-domain.com/wp-json/booknetic/v1
Send and receive JSON:
GET /appointments
Returns a list of appointments.
Response
200 OK — List of appointments
Response body (schema)
Array of Appointment
Example response
[
{
"id": 101,
"customer_id": 55,
"service_id": 9,
"staff_id": 3,
"date": "2026-01-10T14:30:00Z",
"status": "approved"
}
]POST /appointments
Creates a new appointment.
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 /appointments/{id}
Returns a single appointment by its ID.
Path parameters
Name | Type | Required | Description |
| id | integer | Yes | Appointment 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"
}PUT /appointments/{id}
Updates an appointment by its ID.
Path parameters
Name | Type | Required | Description |
| id | integer | Yes | Appointment ID |
Request body
Required — AppointmentUpdate
Example request
{
"staff_id": 4,
"date": "2026-01-10T15:00:00Z",
"status": "approved"
}Responses
200 OK — Appointment updated
The OpenAPI file does not define a response schema for this endpoint.
In your implementation, you may return the updated Appointment object for consistency.
DELETE /appointments/{id}
Deletes an appointment by its ID.
Path parameters
Name | Type | Required | Description |
| id | integer | Yes | Appointment ID |
Responses
204 No Content — Appointment deleted
PUT /appointments/{id}/change-status
Updates the status of an appointment.
Path parameters
Field | Type | Required | Description |
| id | integer | Yes | Appointment ID |
Request body
Required
Field | Type | Required | Description |
| status | string | Yes | New status value |
Example request
{
"status": "approved"
}Responses
200 OK — Status updated
The OpenAPI file does not define a response schema.
Recommended: return the updated Appointment or a standard success payload.
GET /appointments/statuses
Returns a list of available appointment statuses.
Responses
200 OK — Available statuses
Response body: array of strings
Example response
["pending", "approved", "canceled"]GET /appointments/available-times
Returns a list of available appointment time slots.
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"
]Note: The OpenAPI schema uses "example": "2026-01-10 14:30" and defines a plain string.
If your system expects timezone or ISO8601, document it explicitly.
GET /customers
Returns a list of 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/{id}
Returns a customer by ID.
Field | Type | Required | Description |
| id | integer | Yes | Customer ID |
Responses
200 OK — Customer info
Response body: Customer
Example response
{
"id": 55,
"name": "Jane Doe",
"email": "[email protected]",
"phone": "+1 555 123 4567"
}POST /customer/create
Creates a new customer.
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
POST /customer/edit
Edits an existing customer.
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 OpenAPI file does not define a response schema.
Recommended: return the updated Customer object.
POST /customer/delete
Deletes a customer by ID.
Request body
Required
Field | Type | Required | Description |
| id | integer | Yes | Customer ID |
Example request
{
"id": 55
}Responses
200 OK — Customer deleted
This endpoint uses POST rather than DELETE. If intentional (e.g., WP patterns, permissions, or nonce constraints), document the rationale.
Field | Type | Notes |
| id | integer | Appointment ID |
| customer_id | integer | Related customer ID |
| service_id | integer | Related service ID |
| staff_id | integer | Related staff ID |
| date | string (date-time) | ISO 8601 datetime |
| status | string | Appointment status |
Required fields: customer_id, service_id, date
Field | Type | Required | Notes |
| customer_id | integer | Yes | Customer ID |
| service_id | integer | Yes | Service ID |
| staff_id | integer | No | Staff ID |
| date | string (date-time) | Yes | ISO 8601 datetime |
Field | Type | Required | Notes |
| staff_id | integer | No | Staff ID |
| date | string (date-time) | No | ISO 8601 datetime |
| status | string | No | Appointment status |
Field | Type | Notes |
| id | integer | Customer ID |
| name | string | Customer name |
| string (email) | Customer email | |
| phone | string | Customer phone |
Required fields: name
Field | Type | Required | Notes |
| name | string | Yes | Customer name |
| string (email) | No | Customer email | |
| phone | string | No | Customer phone |
Required fields: id
Field | Type | Required | Notes |
| id | integer | Yes | Customer ID |
| name | string | No | Customer name |
| string (email) | No | Customer email | |
| phone | string | No | Customer phone |