API Services

The services API enables managers to retrieve, by way of a RESTful API, schedules of services which are available for booking.

API Definition

TYPE: RESTful & CORS enabled
URL: https://www.shopperee.com/apidmp/services
Verb: GET
Data Format: JSON
Data Specification: { "success": true, "payload": Data Set, "total": number of records in query}
Error Specification: { "success": false, "error": description of error }

Basic Parameters

Use these parameters to log in and define the return data structure. Only login parameters are mandatory. Default parameters are provided.

Parameter Type Mandatory Default Description
api_username String Y Get the username directly from the manager.
api_password String Y Get the password directly from the manager.
page Integer N 1 Defines the page number the request returns. For example, if a query contains 50 records, specifying page=2 returns records 26-50.
pageSize Integer N 25 Change this value to change the number of records returned in the data payload

Query Parameters

Control the data returned with any of the following parameters. If multiple data selections are required, the query parameters may be replicated.

Not specifying any parameters returns the default data set which is "all schedules available for booking".

Parameter Type Multi-Variant Capable Description
category String Y Specifies the category(ies) of service for the query.
location_id Integer Y Specifies the id of location(s) for the query.
location String Y Specifies the name of location(s) for the query.
period_start_date yyyy-MM-dd N Specifies the start date of the period of query. If no period_end_date is specified, records are returned in perpetuity.
period_end_date yyyy-MM-dd N Specifies the end date of the period of query. If no period_start_date is specified, records available from today till period_end_date are returned.
schedule_id Integer Y Specifies the id(s) of schedule(s) for the query.
service_name String Y Specifies the service name(s) of the service for the query.
service_id Integer Y Specifies the id(s) of service(s) for the query.
start_date yyyy-MM-dd Y Specifies the start date(s) of the schedule for the query.

Sample Queries

The Default Query

https://www.shopperee.com/apidmp/services/?api_username=dummy1&api_password=dummy2

returns the default dataset.

All Whale Watching Bookings

https://www.shopperee.com/apidmp/services/?api_username=dummy1&api_password=dummy2&category=Whale%20Watching

returns all available whale watching schedules.

Sample Code At jsfiddle

Note that while the sample code is in Javascript, use the API in server or backend calls and not client or front end calls. This will dramatically improve security for your application and your customer (the merchant).

Data Set

Data Element Description
service_id Unique identifier for the service provided for this schedule.
service_name Name of the service provided for this schedule.
category Category of the service provided for this schedule.
location Location where the schedule takes place.
location_address Address of the location.
staff_firstname Firstname of the staff member allocated to this schedule.
staff_surname Surname of the staff member allocated to this schedule.
start_date First or next date the schedule will take place.
start_time The start time of the schedule.
end_time The end time of the schedule.
booking_time The combination of the day of the week, start time and end time of the schedule.
next_start_session_index The index of the next date for this schedule. This value is 1 for all single date schedules.
total_session_count The number of sessions which this schedule is run over.
age_min The minimum age of customers allowed to book into this schedule.
age_max The maximum age of customers allowed to book into this schedule.
capacity The booking capacity of this schedule.
booking_count_todate The number of bookings to date.
capacity_remaining The booking capacity remaining of this schedule.
schedule_id Unique identifier for this schedule.
schedule_description Description for this schedule.
schedule_title Title for this schedule.
pricing_type_id The pricing model used for this schedule type; e.g. LUMPSUM, WEEKLY, TICKET.
cost_description Any additional description for the pricing model.
duration The duration of this schedule (end time minus start time).
duration_units The units of the duration of this schedule; e.g. days, terms, weeks, hours, minutes.
full_day_label The full day label.
half_day_label The half day label.
pricing A JSON Array which contains pricing detail for this service. TICKET pricing will show an array of ticket type, ticket description and sell price per passenger.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License