Info
Welcome to the Blue Sky Golf Rental API! You can use our API to access Blue Sky Golf API endpoints, which can get information on various Club Makes, Warehouses, Bookings, Clubs Available, etc. in our database.
We have language bindings in Shell and Javascript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Authentication
Blue Sky Golf Rental uses API keys to allow access to the API. You can request a new Blue Sky Golf Rental API key by sending us an email to one of our addresses on our contacts page.
Blue Sky Golf Rental expects for the API key to be included in all API requests to the server in a header that looks like the following:
Authorization: Bearer [TOKEN GOES HERE]
Example request:
curl "http://api.blueskygolf-rental.com/api/{endpoint}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/{endpoint}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
AvailableStocks
Endpoint to handle AvailableStocks
Display the specified AvailableStock.
Example request:
curl "http://api.blueskygolf-rental.com/api/availablestocks/warehouse/{warehouse_id}/product/{product_id}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/availablestocks/warehouse/{warehouse_id}/product/{product_id}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"warehouse_id": "ALGARVE",
"product_id": "A0508J",
"qty_avail": 1,
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": 108376,
"created_at": "2016-12-13 03:26:37",
"updated_at": "2016-12-13 03:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": 1,
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": 29,
"price_7": 32,
"price_10": 40,
"price_14": 45,
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
}
HTTP Request
GET api/availablestocks/warehouse/{warehouse_id}/product/{product_id}
HEAD api/availablestocks/warehouse/{warehouse_id}/product/{product_id}
Display a listing of all the AvailableStocks By Warehouse ID.
Example request:
curl "http://api.blueskygolf-rental.com/api/availablestocks/warehouse/{warehouse_id}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/availablestocks/warehouse/{warehouse_id}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"warehouse_id": "ALGARVE",
"product_id": "A0508J",
"qty_avail": 1,
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": 108376,
"created_at": "2016-12-13 03:26:37",
"updated_at": "2016-12-13 03:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": 1,
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": 29,
"price_7": 32,
"price_10": 40,
"price_14": 45,
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
},
{
"warehouse_id": "ALGARVE",
"product_id": "A0811J",
"qty_avail": 2,
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": 108376,
"created_at": "2016-12-13 03:26:37",
"updated_at": "2016-12-13 03:26:37"
},
"product": {
"id": "A0811J",
"description": "Wilson Junior 8-11 Yrs Old Right Handed",
"make": 1,
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior1.jpg",
"video_url": "http://www.youtube.com/embed/JvJN9X5Kt-I?rel=0&wmode=transparent",
"price_daily": null,
"price_4": 29,
"price_7": 32,
"price_10": 40,
"price_14": 45,
"price_extra_day": null,
"detail_1": "Fairway wood, hybrid",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": "Ages 8-11",
"detail_5": ".",
"created_at": null,
"updated_at": null
}
}
]
HTTP Request
GET api/availablestocks/warehouse/{warehouse_id}
HEAD api/availablestocks/warehouse/{warehouse_id}
Display a listing of all the AvailableStocks By Product ID.
Example request:
curl "http://api.blueskygolf-rental.com/api/availablestocks/product/{product_id}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/availablestocks/product/{product_id}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"warehouse_id": "ALGARVE",
"product_id": "A0508J",
"qty_avail": 1,
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": 108376,
"created_at": "2016-12-13 03:26:37",
"updated_at": "2016-12-13 03:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": 1,
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": 29,
"price_7": 32,
"price_10": 40,
"price_14": 45,
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
}
]
HTTP Request
GET api/availablestocks/product/{product_id}
HEAD api/availablestocks/product/{product_id}
Display a listing of all the AvailableStocks.
Example request:
curl "http://api.blueskygolf-rental.com/api/availablestocks" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/availablestocks",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"warehouse_id": "ALGARVE",
"product_id": "A0508J",
"qty_avail": 1
},
{
"warehouse_id": "ALGARVE",
"product_id": "A0811J",
"qty_avail": 2
},
{
"warehouse_id": "ALGARVE",
"product_id": "A1114J",
"qty_avail": 3
}
]
HTTP Request
GET api/availablestocks
HEAD api/availablestocks
BookingStocks
Endpoint to handle BookingStocks
Display the specified BookingStock.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"warehouse_id": "ALGARVE",
"booking_ref": "103487",
"product_id": "A0508J",
"number_of_days": "6",
"price_charged": "29.00",
"qty_booked": "1",
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": "108322",
"created_at": "2016-12-13 02:26:37",
"updated_at": "2016-12-13 02:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
}
HTTP Request
GET api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}
HEAD api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}
Display a listing of the all the BookingStocks By Warehouse ID.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookingstocks/warehouse/{warehouse_id}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookingstocks/warehouse/{warehouse_id}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"warehouse_id": "ALGARVE",
"booking_ref": "103487",
"product_id": "A0508J",
"number_of_days": "6",
"price_charged": "29.00",
"qty_booked": "1",
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": "108322",
"created_at": "2016-12-13 02:26:37",
"updated_at": "2016-12-13 02:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
},
{
"warehouse_id": "ALGARVE",
"booking_ref": "103517",
"product_id": "A0508J",
"number_of_days": "5",
"price_charged": "29.00",
"qty_booked": "1",
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": "108322",
"created_at": "2016-12-13 02:26:37",
"updated_at": "2016-12-13 02:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
}
]
HTTP Request
GET api/bookingstocks/warehouse/{warehouse_id}
HEAD api/bookingstocks/warehouse/{warehouse_id}
Display a listing of the all the BookingStocks By Product ID.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookingstocks/product/{product_id}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookingstocks/product/{product_id}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"warehouse_id": "ALGARVE",
"booking_ref": "103487",
"product_id": "A0508J",
"number_of_days": "6",
"price_charged": "29.00",
"qty_booked": "1",
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": "108322",
"created_at": "2016-12-13 02:26:37",
"updated_at": "2016-12-13 02:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
},
{
"warehouse_id": "ALGARVE",
"booking_ref": "103517",
"product_id": "A0508J",
"number_of_days": "5",
"price_charged": "29.00",
"qty_booked": "1",
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": "108322",
"created_at": "2016-12-13 02:26:37",
"updated_at": "2016-12-13 02:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
}
]
HTTP Request
GET api/bookingstocks/product/{product_id}
HEAD api/bookingstocks/product/{product_id}
Update the specified BookingStock in storage.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}",
"method": "PUT",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
PUT api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}
Remove the specified BookingStock from storage.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}",
"method": "DELETE",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
DELETE api/bookingstocks/warehouse/{warehouse_id}/product/{product_id}
Display a listing of the all the BookingStocks.
This endpoint retrieves all the BookingStocks.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookingstocks" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookingstocks",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"warehouse_id": "ALGARVE",
"booking_ref": "103487",
"product_id": "A0508J",
"number_of_days": "6",
"price_charged": "29.00",
"qty_booked": "1",
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": "108322",
"created_at": "2016-12-13 02:26:37",
"updated_at": "2016-12-13 02:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
},
{
"warehouse_id": "ALGARVE",
"booking_ref": "103517",
"product_id": "A0508J",
"number_of_days": "5",
"price_charged": "29.00",
"qty_booked": "1",
"warehouse": {
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": "108322",
"created_at": "2016-12-13 02:26:37",
"updated_at": "2016-12-13 02:26:37"
},
"product": {
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
}
}
]
HTTP Request
GET api/bookingstocks
HEAD api/bookingstocks
Store a newly created BookingStock in storage.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookingstocks" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookingstocks",
"method": "POST",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
POST api/bookingstocks
Bookings
Endpoint to handle Bookings
Display the specified Booking.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}",
"method": "GET",
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"warehouse_id": "ALGARVE",
"booking_ref": "101222",
"region_id": "ALGARVE",
"surname": "Saasen",
"forename": "Mikael",
"start_date": "2012-10-08 07:00:00",
"end_date": "2012-10-15 06:59:00",
"number_of_days": "7",
"mobile": "004748358722",
"email": "msaasen@hotmail.com",
"delivery_region": "Portugal - Monte Gordo",
"loc_type": "villa",
"special_instr": "",
"notes": null,
"loc_addr1": "Casa de Audiencia",
"loc_addr2": "Villa Casa Elouise",
"loc_addr3": "(http://www.holiday-rentals.co.uk/p94391",
"loc_addr4": "",
"currency_code": "EUR",
"total_before_discount": "71.00",
"discount_code": "",
"discount_perc": "0",
"discount_amount": "0.00",
"total_after_discount": "71.00",
"pay_txn_type": "paypal",
"pay_txn_id": "94133288YK346372T",
"pay_status": "Completed",
"payer_email": "msaasen@hotmail.com",
"pay_amount": "71.00",
"pay_agency_fee": "2.76",
"assigned_to": null,
"affiliate_id": null,
"paid": "Y",
"paid_at": "2012-07-24 13:21:48",
"cancelled": "N",
"cancelled_at": "2012-07-24 13:17:58",
"delivered": "Y",
"delivered_at": "2012-11-18 09:21:12",
"collected": "N",
"collected_at": "2012-07-24 13:17:58",
"created_at": null,
"updated_at": null
}
HTTP Request
GET api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}
HEAD api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}
Update the specified Booking in storage.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}",
"method": "PUT",
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
PUT api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}
Remove the specified Booking from storage.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}",
"method": "DELETE",
"headers": {
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
DELETE api/bookings/warehouse/{warehouse_id}/reference/{booking_ref}
Display a listing of all the Bookings.
This endpoint retrieves all the Bookings
Example request:
curl "http://api.blueskygolf-rental.com/api/bookings" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookings",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"total": 10274,
"per_page": 10,
"current_page": 2,
"last_page": 1028,
"next_page_url": "http://api.blueskygolf-rental.com/api/bookings?page=3",
"prev_page_url": "http://api.blueskygolf-rental.com/api/bookings?page=1",
"from": 11,
"to": 20,
"data": [
{
"warehouse_id": "ALGARVE",
"booking_ref": "101247",
"region_id": "ALGARVE",
"surname": "O' Hare",
"forename": "Gerry`",
"start_date": "2012-08-18 11:00:00",
"end_date": "2012-08-24 16:00:00",
"number_of_days": "7",
"mobile": "00447900492422",
"email": "niall@oharesolicitors.com",
"delivery_region": "Portugal - Armacao de Pera",
"loc_type": "apartment",
"special_instr": "bring calloway caliers for women as discussed",
"notes": null,
"loc_addr1": "atlantico apartments",
"loc_addr2": "block 9",
"loc_addr3": "quinta dos arcs",
"loc_addr4": "armacoa de pera",
"currency_code": "EUR",
"total_before_discount": "120.00",
"discount_code": "",
"discount_perc": "0",
"discount_amount": "0.00",
"total_after_discount": "120.00",
"pay_txn_type": "paypal",
"pay_txn_id": "1GT3066497944794G",
"pay_status": "Completed",
"payer_email": "niall@oharesolicitors.com",
"pay_amount": "120.00",
"pay_agency_fee": "4.43",
"assigned_to": null,
"affiliate_id": null,
"paid": "Y",
"paid_at": "2012-08-16 21:58:09",
"cancelled": "N",
"cancelled_at": "2012-08-16 21:51:13",
"delivered": "Y",
"delivered_at": "2012-09-04 08:36:27",
"collected": "N",
"collected_at": "2012-08-16 21:51:13",
"created_at": null,
"updated_at": null
},
{
"warehouse_id": "ALGARVE",
"booking_ref": "101249",
"region_id": "ALGARVE",
"surname": "Denton",
"forename": "Charles",
"start_date": "2012-09-19 06:00:00",
"end_date": "2012-09-22 16:00:00",
"number_of_days": "4",
"mobile": "+447836500820",
"email": "charlesdenton@hotmail.com",
"delivery_region": "Portugal - Quinta do Lago",
"loc_type": "villa",
"special_instr": "",
"notes": null,
"loc_addr1": "126 Atlantico",
"loc_addr2": "Quinta do Lago",
"loc_addr3": "",
"loc_addr4": "",
"currency_code": "EUR",
"total_before_discount": "58.00",
"discount_code": "",
"discount_perc": "0",
"discount_amount": "0.00",
"total_after_discount": "58.00",
"pay_txn_type": "paypal",
"pay_txn_id": "9JY13652EC672203R",
"pay_status": "Completed",
"payer_email": "charlesdenton@hotmail.com",
"pay_amount": "58.00",
"pay_agency_fee": "2.32",
"assigned_to": null,
"affiliate_id": null,
"paid": "Y",
"paid_at": "2012-08-20 07:51:53",
"cancelled": "N",
"cancelled_at": "2012-08-20 07:48:37",
"delivered": "Y",
"delivered_at": "2012-11-18 09:21:29",
"collected": "N",
"collected_at": "2012-08-20 07:48:37",
"created_at": null,
"updated_at": null
}
]
}
HTTP Request
GET api/bookings
HEAD api/bookings
URL Parameters
Page: ?page={PageNumber}
Store a newly created Booking in storage.
Example request:
curl "http://api.blueskygolf-rental.com/api/bookings" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/bookings",
"method": "POST",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
HTTP Request
POST api/bookings
Discount Codes
Endpoint to handle Discount Codes
Display the specified Discount Code.
Example request:
curl "http://api.blueskygolf-rental.com/api/discountcodes/{discount_code}" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/discountcodes/{discount_code}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"discount_code": "TEN2016",
"start_date": "2016-11-15 23:00:00",
"end_date": "2016-12-30 23:00:00",
"perc_disc": "50",
"active": "Y"
}
HTTP Request
GET api/discountcodes/{discount_code}
HEAD api/discountcodes/{discount_code}
Display a listing of the Discount Codes.
This endpoint retrieves all the Discount Codes Available.
Example request:
curl "http://api.blueskygolf-rental.com/api/discountcodes" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/discountcodes",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"discount_code": "BLUEFRI20",
"start_date": "2016-11-24 00:00:00",
"end_date": "2016-11-25 23:59:59",
"perc_disc": 20,
"active": "Y"
},
{
"discount_code": "BSGTEST1",
"start_date": "2016-11-01 00:00:00",
"end_date": "2016-11-30 23:59:59",
"perc_disc": 20,
"active": "Y"
}
]
HTTP Request
GET api/discountcodes
HEAD api/discountcodes
Free Delivery Regions
Endpoint to handle the Free Delivery Regions
Display a listing of all the Free Delivery Region.
This endpoint retrieves all the free delivery regions.
Example request:
curl "http://api.blueskygolf-rental.com/api/freedeliveryregions" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/freedeliveryregions",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"id": 72,
"name": "Other - please contact office",
"region_id": "ALGARVE",
"created_at": "2016-12-13 05:08:43",
"updated_at": "2016-12-13 05:08:43"
},
{
"id": 6,
"name": "Portugal - Acoteias",
"region_id": "ALGARVE",
"created_at": "2016-12-13 05:08:43",
"updated_at": "2016-12-13 05:08:43"
}
]
HTTP Request
GET api/freedeliveryregions
HEAD api/freedeliveryregions
Display the specified Free Delivery Region.
Example request:
curl "http://api.blueskygolf-rental.com/api/freedeliveryregions/{freedeliveryregion}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/freedeliveryregions/{freedeliveryregion}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"id": 72,
"name": "Other - please contact office",
"region_id": "ALGARVE",
"created_at": "2016-12-13 05:08:43",
"updated_at": "2016-12-13 05:08:43"
}
HTTP Request
GET api/freedeliveryregions/{freedeliveryregion}
HEAD api/freedeliveryregions/{freedeliveryregion}
Makes
Endpoint to handle club manufacturers
Display a listing of all the Makes.
This endpoint retrieves all the club manufacturers.
Example request:
curl "http://api.blueskygolf-rental.com/api/makes" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/makes",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"id": 2,
"name": "Mizuno",
"created_at": "2016-12-12 21:46:40",
"updated_at": "2016-12-12 21:46:40"
},
{
"id": 3,
"name": "Callaway",
"created_at": "2016-12-12 21:47:21",
"updated_at": "2016-12-12 21:47:21"
},
{
"id": 4,
"name": "TaylorMade",
"created_at": "2016-12-12 21:47:29",
"updated_at": "2016-12-12 21:47:29"
},
{
"id": 5,
"name": "Titleist",
"created_at": "2016-12-12 21:47:31",
"updated_at": "2016-12-12 21:47:31"
},
{
"id": 6,
"name": "Ping",
"created_at": "2016-12-12 21:47:34",
"updated_at": "2016-12-13 00:15:51"
}
]
HTTP Request
GET api/makes
HEAD api/makes
Display the specified Make.
Example request:
curl "http://api.blueskygolf-rental.com/api/makes/2" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/makes/2",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"id": 2,
"name": "Mizuno",
"created_at": "2016-12-12 21:46:40",
"updated_at": "2016-12-12 21:46:40"
}
HTTP Request
GET api/makes/{make}
HEAD api/makes/{make}
Products
Endpoint to handle products (Golf Clubs and Accessories)
Display a listing of all the Products
This endpoint retrieves all the products.
Example request:
curl "http://api.blueskygolf-rental.com/api/products" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/products",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"id": "A0508J",
"description": "Wilson Junior 5-8 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior2.jpg",
"video_url": null,
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": null,
"detail_5": null,
"created_at": null,
"updated_at": null
},
{
"id": "A0811J",
"description": "Wilson Junior 8-11 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior1.jpg",
"video_url": "http://www.youtube.com/embed/JvJN9X5Kt-I?rel=0&wmode=transparent",
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood, hybrid",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": "Ages 8-11",
"detail_5": ".",
"created_at": null,
"updated_at": null
}
]
HTTP Request
GET api/products
HEAD api/products
Display the specified Product.
Example request:
curl "http://api.blueskygolf-rental.com/api/products/{product}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/products/{product}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"id": "A0811J",
"description": "Wilson Junior 8-11 Yrs Old Right Handed",
"make": "1",
"gender": "J",
"hand": "R",
"shaft": "GR",
"rental_product": "Y",
"daily_rate_product": null,
"image_url": "images/bsg/equipment/junior1.jpg",
"video_url": "http://www.youtube.com/embed/JvJN9X5Kt-I?rel=0&wmode=transparent",
"price_daily": null,
"price_4": "29.00",
"price_7": "32.00",
"price_10": "40.00",
"price_14": "45.00",
"price_extra_day": null,
"detail_1": "Fairway wood, hybrid",
"detail_2": "7 & PW Cavity Back Irons",
"detail_3": "Putter & Lightweight Carry bag",
"detail_4": "Ages 8-11",
"detail_5": ".",
"created_at": null,
"updated_at": null
}
HTTP Request
GET api/products/{product}
HEAD api/products/{product}
Regions
Endpoint to handle regions
Display a listing of all the Regions.
This endpoint retrieves all the regions.
Example request:
curl "http://api.blueskygolf-rental.com/api/regions" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/regions",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"id": "ALGARVE",
"name": "Algarve",
"country": "Portugal",
"email": "reservations@blueskygolf-rental.com",
"email2": "",
"paypal_seller": "algarve@blueskygolf-rental.com",
"paypal_tx_log": "ipn/paypal-algarve.txt",
"active": "1",
"warehouse_id": "ALGARVE",
"created_at": "2016-12-13 01:42:35",
"updated_at": "2016-12-13 01:42:35"
},
{
"id": "LISBON",
"name": "Lisbon",
"country": "Portugal",
"email": "lisbon@blueskygolf-rental.com",
"email2": "lisbonorders@blueskygolf-rental.com",
"paypal_seller": "algarve@blueskygolf-rental.com",
"paypal_tx_log": "ipn/paypal-lisbon.txt",
"active": "1",
"warehouse_id": "LISBON",
"created_at": "2016-12-13 01:46:28",
"updated_at": "2016-12-13 01:46:28"
}
]
HTTP Request
GET api/regions
HEAD api/regions
Display the specified Region.
Example request:
curl "http://api.blueskygolf-rental.com/api/regions/{region}" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/regions/{region}",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"id": "ALGARVE",
"name": "Algarve",
"country": "Portugal",
"email": "reservations@blueskygolf-rental.com",
"email2": "",
"paypal_seller": "algarve@blueskygolf-rental.com",
"paypal_tx_log": "ipn/paypal-algarve.txt",
"active": "1",
"warehouse_id": "ALGARVE",
"created_at": "2016-12-13 01:42:35",
"updated_at": "2016-12-13 01:42:35",
"freedeliveryregions": [
{
"id": 2,
"name": "Portugal - Armacao de Pera",
"region_id": "ALGARVE",
"created_at": "2016-12-13 05:08:43",
"updated_at": "2016-12-13 05:08:43"
},
{
"id": 3,
"name": "Portugal - Alvor",
"region_id": "ALGARVE",
"created_at": "2016-12-13 05:08:43",
"updated_at": "2016-12-13 05:08:43"
}
]
}
HTTP Request
GET api/regions/{region}
HEAD api/regions/{region}
Warehouses
Endpoint to handle warehouses
Display a listing of all the Warehouses.
This endpoint retrieves all warehouses.
Example request:
curl "http://api.blueskygolf-rental.com/api/warehouses" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/warehouses",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
[
{
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": "108322",
"created_at": "2016-12-13 02:26:37",
"updated_at": "2016-12-13 02:26:37"
},
{
"id": "HUELVA-CADIZ",
"name": "Huelva / Cadiz",
"next_booking_reference": "700903",
"created_at": "2016-12-13 02:27:34",
"updated_at": "2016-12-13 02:27:34"
}
]
HTTP Request
GET api/warehouses
HEAD api/warehouses
Display the specified Warehouse.
Example request:
curl "http://api.blueskygolf-rental.com/api/warehouses/ALGARVE" \
-H "Authorization: Bearer [TOKEN GOES HERE]" \
-H "Accept: application/json"
var settings = {
"async": true,
"crossDomain": true,
"url": "http://api.blueskygolf-rental.com/api/warehouses/ALGARVE",
"method": "GET",
"headers": {
"authorization": "Bearer [TOKEN GOES HERE]",
"accept": "application/json"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Example response:
{
"id": "ALGARVE",
"name": "Algarve",
"next_booking_reference": "108322",
"created_at": "2016-12-13 02:26:37",
"updated_at": "2016-12-13 02:26:37",
"regions": [
{
"id": "ALGARVE",
"name": "Algarve",
"country": "Portugal",
"email": "reservations@blueskygolf-rental.com",
"email2": "",
"paypal_seller": "algarve@blueskygolf-rental.com",
"paypal_tx_log": "ipn/paypal-algarve.txt",
"active": "1",
"warehouse_id": "ALGARVE",
"created_at": "2016-12-13 01:42:35",
"updated_at": "2016-12-13 01:42:35"
}
]
}
HTTP Request
GET api/warehouses/{warehouse}
HEAD api/warehouses/{warehouse}