Download the PHP package rebelcode/rcmod-eddbk-rest-api without Composer
On this page you can find all versions of the php package rebelcode/rcmod-eddbk-rest-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rebelcode/rcmod-eddbk-rest-api
More information about rebelcode/rcmod-eddbk-rest-api
Files in rebelcode/rcmod-eddbk-rest-api
Package rcmod-eddbk-rest-api
Short Description A RebelCode module that provides the REST API used in EDD Bookings.
License GPL-3.0
Informations about the package rcmod-eddbk-rest-api
RebelCode - EDD Bookings REST API
A RebelCode module that provides the REST API used in EDD Bookings.
REST API Details
1. Bookings
Retrieving Booking Info
Retrieves a booking by ID.
The response will contain an object with the following properties:
Property | Type | Description | Values |
---|---|---|---|
id |
integer | The ID of the booking | positive non-zero integer |
start |
integer | The start time of the booking in the format Y-M-D H:i:s |
integer |
end |
integer | The end time of the booking in the format Y-M-D H:i:s |
integer |
status |
string | The current status of the booking | "" , "draft" , "in_cart" , "pending" , "approved" , "rejected" , "scheduled" , "cancelled" , "completed" |
service |
service | The service for which the booking was made | Service object |
resource |
integer | The ID of the resource for which the booking was made | positive non-zero integer |
client |
client | The client for the booking | Client object or null |
clientTzName |
string | The client's timezone name | any timezone name or null |
clientTzOffset |
integer | The client's UTC timezone offset in seconds, at the start time of the booking |
integer or null |
payment |
integer | The payment number | integer or null |
notes |
string | Admin booking notes | string |
Query Bookings
Multiple field and value pairs may be provided to narrow the query. The following table lists the available query fields and how a provided value is compared:
Field | Description | Value Type |
---|---|---|
id |
The booking with the given ID | integer |
start |
The bookings that start at or after the given UTC timestamp | integer |
end |
The bookings that end at or before the given UTC timestamp | integer |
service |
The bookings made for the service with the given ID | positive non-zero integer |
resource |
The bookings made for the resource with the given ID | positive non-zero integer |
client |
The bookings made for the client with the given ID | positive non-zero integer |
payment |
The bookings associated with the payment with the given ID | positive non-zero integer |
status |
The booking statuses to filter by | comma separated list (without spaces!) of status names |
The following additional filters are also available:
Filter | Description | Value Type | Default |
---|---|---|---|
numItems |
The maximum number of items to receive per page |
positive non-zero integer | 20 |
page |
The page number | positive non-zero integer | 1 |
The response is an object with 3 keys: items
, count
and statuses
. Example:
The statuses
counts are calculated independently from any query filters.
Creating Bookings
Creates a new booking and responds with the booking object. The following table lists the available fields:
Property | Type | Description | Required? |
---|---|---|---|
start |
integer | The start time of the booking as a UTC timestamp | ✅ |
end |
integer | The end time of the booking as a UTC timestamp | ✅ |
service |
positive non-zero integer | The ID of the service for which the booking will be made | ✅ |
resource |
positive non-zero integer | The ID of the resource for which the booking will be made | ✅ |
transition |
"draft" or "cart" |
The initial transition to apply to the booking | ✅ |
client |
positive non-zero integer | The ID of the client for which the booking will be made | |
clientTz |
string | The name of the client's timezone | |
payment |
integer or null |
The payment number | |
notes |
string | Admin booking notes |
Updating Bookings
Updates a booking. The following table lists the available fields for updating:
Property | Type | Description | |
---|---|---|---|
start |
integer | The start time of the booking as a UTC timestamp | |
end |
integer | The end time of the booking as a UTC timestamp | |
service |
positive non-zero integer | The ID of the service for which the booking will be made | |
resource |
positive non-zero integer | The ID of the resource for which the booking will be made | |
client |
positive non-zero integer | The ID of the client for which the booking will be made | |
clientTz |
string | The name of the client's timezone | |
payment |
integer | The payment number | integer or null |
notes |
string | Admin booking notes | string |
Deleting Bookings
Deletes the booking with the given ID.
All versions of rcmod-eddbk-rest-api with dependencies
rebelcode/modular Version ^0.1-alpha1
rebelcode/booking-transitioner Version ^0.2-alpha2
rebelcode/entity-manager-interface Version ^0.1-alpha2
rebelcode/transformers Version ^0.1-alpha1
rebelcode/wp-nonce Version ^0.1
dhii/data-object-abstract Version ^0.1-alpha1
dhii/cqrs-resource-model-interface Version ^0.2-alpha1
dhii/expression-interface Version ^0.1 | ^0.2
dhii/iterator-base Version ^0.1-alpha3
dhii/iterator-helper-base Version ^0.1-alpha2
dhii/validation-base Version ^0.2-alpha1
dhii/normalization-helper-base Version ^0.1-alpha2
dhii/sql-interface Version ^0.1-alpha1