{"_id":"564ed2eb9209cf0d001d6917","category":{"_id":"543ee0c055bb1008000955b6","__v":21,"pages":["543ee1d615d0560800502749","543ee5c015d0560800502758","543ee87715d0560800502763","543ee9e315d056080050276c","543f003c55bb100800095624","543f030555bb10080009563f","543f0b3e15d05608005027ee","543f0d0755bb10080009566d","543f0e8415d056080050281b","543f0f8f55bb10080009567e","543f109055bb100800095689","543f11d315d056080050282b","543f15c615d0560800502845","544aec7fa761f90800c41d32","545a7fae1d018b1400227eff","545e9dc97e32310e00f400ca","5603c5dde416560d00fa63ad","564ed2eb9209cf0d001d6917","56cb2acb245b841300806ea4","56e05f414685db1700d9480b","56e063e4f97d422900d639bf"],"project":"543005c87d487022005b3fa8","version":"543005c87d487022005b3fab","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-15T21:01:52.185Z","from_sync":false,"order":1,"slug":"iwebcab-api-tools","title":"Gazoop Internal API"},"githubsync":"","parentDoc":null,"project":"543005c87d487022005b3fa8","user":"543005a67d487022005b3fa7","__v":6,"editedParams":true,"editedParams2":true,"version":{"_id":"543005c87d487022005b3fab","__v":6,"project":"543005c87d487022005b3fa8","createdAt":"2014-10-04T14:35:52.362Z","releaseDate":"2014-10-04T14:35:52.362Z","categories":["543005c87d487022005b3fac","54345156edce04080040964e","543ee0c055bb1008000955b6","54c82a78ab706219009e0656","57390d0e1f4b740e00b06cb2","5741d5ab28f5fb0e0063ed36"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-20T07:59:39.409Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"post","results":{"codes":[{"language":"json","code":"{\n    \"result\": \"valid\",\n \t\t\"quote_id\": \"12345\",\n  \t\"pickup_fee\": \"10.00\",\n  \t\"distance_fee\": \"30.00\",\n    \"time_fee\": \"10.00\",\n    \"cost\": \"50.00\",\n    \"currency\": \"USD\",\n    \"currency_sign\": \"$\"\n}","name":"Success"},{"language":"json","code":"{\n    \"result\": \"error\",\n\t  \"error\": \"Reason for error\"\n}","name":"Failure"}]},"settings":"","auth":"never","params":[{"_id":"543f0b3e15d0560800502805","ref":"","in":"body","required":true,"desc":"This is a 25 alphanumeric hash code provided to you by the fleet.","default":"","type":"string","name":"api_key"},{"_id":"543f0b3e15d0560800502804","ref":"","in":"body","required":false,"desc":"This is the mobile number for the customer account.","default":"","type":"int","name":"phone_number"},{"_id":"543f0b3e15d0560800502802","ref":"","in":"body","required":false,"desc":"You can also send the customers PIN number for verification, if this fails, the API command will fail. If left blank, no validation is done on the authenticity of the customer ID.","default":"","type":"int","name":"customer_pin"},{"_id":"543f0b3e15d0560800502801","ref":"","in":"body","required":false,"desc":"This should contain the lead passengers name or reference.","default":"","type":"string","name":"passenger_name"},{"_id":"543f0b3e15d0560800502800","ref":"","in":"body","required":false,"desc":"This should contain a mobile or landline number in international format for the lead passenger. (IE: in the UK: 447780123456 and in the US: 15468875544). The default is the PHONE_NUMBER value sent in the user parameters.","default":"","type":"int","name":"passenger_phone_number"},{"_id":"543f0b3e15d05608005027ff","ref":"","in":"body","required":false,"desc":"This should contain the total number of passengers. It is important to provide this value when more than 4 passengers are required as this will limit the type of vehicles that will receive this job. The default value is 1.","default":"1","type":"int","name":"passenger_total"},{"_id":"543f0b3e15d05608005027fe","ref":"","in":"body","required":false,"desc":"This should contain the total number of cases required as part of the booking so that an appropriate vehicle is sent. Please consider larger items such as golf clubs as 2 cases. The default value is 0.","default":"0","type":"int","name":"cases_total"},{"_id":"543f0b3e15d05608005027fd","ref":"","in":"body","required":false,"desc":"This should contain the full pick-up text with no line breaks. Please ensure each section of the address is separated by a comma. For example, you would send: 13 Down Town, London, SW13 9KD, UK If the address contains a POI (Point-of-interest), you can place this at the start by including it within brackets. For example: (Coffee Cafe) 13 Down Town, London, SW13 9KD, UK","default":"","type":"string","name":"pickup_address"},{"_id":"543f0b3e15d05608005027fc","ref":"","in":"body","required":false,"desc":"Latitude of the pick-up location in Decimal Degrees only. Do not use commas as decimals. For example: 51.507323","default":"","type":"double","name":"pickup_lat"},{"_id":"543f0b3e15d05608005027fb","ref":"","in":"body","required":false,"desc":"Longitude of the pick-up location in Decimal Degrees only. Do not use commas as decimals. For example: -0.127754","default":"","type":"double","name":"pickup_long"},{"_id":"543f0b3e15d05608005027f9","ref":"","in":"body","required":false,"desc":"This should contain the full drop-off text with no line breaks. Please ensure each section of the address is separated by a comma. For example, you would send: 13 Down Town, London, SW13 9KD, UK If the address contains a POI (Point-of-interest), you can place this at the start by including it within brackets. For example: (Coffee Cafe) 13 Down Town, London, SW13 9KD, UK","default":"","type":"string","name":"dropoff_address"},{"_id":"543f0b3e15d05608005027f8","ref":"","in":"body","required":false,"desc":"Latitude of the drop-off location in Decimal Degrees only. Do not use commas as decimals. For example: 51.507323","default":"","type":"double","name":"dropoff_lat"},{"_id":"543f0b3e15d05608005027f7","ref":"","in":"body","required":false,"desc":"Longitude of the drop-off location in Decimal Degrees only. Do not use commas as decimals. For example: 51.507323","default":"","type":"double","name":"dropoff_long"},{"_id":"543f0b3e15d05608005027f5","ref":"","in":"body","required":false,"desc":"This should be a multidimensional JSON object with the following elements in each child array. Please look further down the page for what each object within the viapoints array should include.","default":"","type":"array_mixed","name":"viapoints"},{"_id":"543f0b3e15d05608005027f2","ref":"","in":"body","required":false,"desc":"Depending if the fleet operator has enabled this option this value lets you pre-define the set price rate for this booking. The fleet operator and driver still maintains the ability to modify this.","default":"","type":"double","name":"cost"},{"_id":"543f0b3e15d05608005027f1","ref":"","in":"body","required":false,"desc":"This should include any important notes regarding the booking. This will display on the fleet operators booking information screen, and also at the very top in bold on the drivers tablet/mobile device.","default":"","type":"string","name":"notes"},{"_id":"543f0b3e15d05608005027f0","ref":"","in":"body","required":false,"desc":"This is the vehicle preference for the booking. Please seek \"vehicle_types\" API for valid vehicle types to use.","default":"NA","type":"string","name":"vehicle_preference"},{"_id":"5741d4d191fd8d0e00713ba5","ref":"","in":"body","required":false,"desc":"If a wheelchair accessible vehicle is required this should be set to Y.","default":"N","type":"string","name":"wheelchair"},{"_id":"543f0b3e15d05608005027ef","ref":"","in":"body","required":false,"desc":"This should contain the date and time of the booking pickup. You must supply this using a valid date and time format as detailed here: http://uk3.php.net/manual/en/datetime.formats.php If however the booking is for now, you can either send the current date/time, or send the value NOW. This default value is NOW. Please be aware that this only influences the price of the journey, it does not get stored with the quote.","default":"NOW","type":"datetime","name":"pickup_time"},{"_id":"5671637efa9dda0d00660192","ref":"","in":"body","required":false,"desc":"This returns back the selected pricing, \"simple\" will return a basic mileage, time, and start fee price, where as \"advance\" will return the price with all advance localisation rules and flat rates considered. \"none\" will mark the quote as already calculated and use the cost field provided as the fare quote. Default is \"none\".","default":"simple","type":"string","name":"pricing_type"}],"url":"/create_quote.json"},"isReference":false,"order":10,"body":"When creating a quote you will receive a quote reference number, it is important that you log this as you will need this quote number if you wish to quickly create the job. Otherwise, you can create the booking using the exact same fields.\n\nThe system does not send any quote emails or SMS messages automatically when using the API.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Customer Account Information Optional\",\n  \"body\": \"Quotes can be generated without any customer account identified, however, please be aware this also means a customer can not retrieve any previously stored quotes and you will be unable to retrieve them from their customer ID.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Via Points\"\n}\n[/block]\nVia Points must be provided in the following format for each array object.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"text\",\n    \"0-1\": \"This should contain the full via-point address text. Seek PICKUP_ADDRESS for formatting information.\",\n    \"1-0\": \"lat\",\n    \"1-1\": \"Via-point Latitude. Seek PICKUP_LAT for formatting information.\",\n    \"2-0\": \"long\",\n    \"2-1\": \"Via-point Longitude. Seek PICKUP_LONG for formatting information.\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","excerpt":"This tool creates a brand new quote for the customer.","slug":"create_quote","type":"endpoint","title":"create_quote"}

postcreate_quote

This tool creates a brand new quote for the customer.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

api_key:
required
string
This is a 25 alphanumeric hash code provided to you by the fleet.
phone_number:
integer
This is the mobile number for the customer account.
customer_pin:
integer
You can also send the customers PIN number for verification, if this fails, the API command will fail. If left blank, no validation is done on the authenticity of the customer ID.
passenger_name:
string
This should contain the lead passengers name or reference.
passenger_phone_number:
integer
This should contain a mobile or landline number in international format for the lead passenger. (IE: in the UK: 447780123456 and in the US: 15468875544). The default is the PHONE_NUMBER value sent in the user parameters.
passenger_total:
integer1
This should contain the total number of passengers. It is important to provide this value when more than 4 passengers are required as this will limit the type of vehicles that will receive this job. The default value is 1.
cases_total:
integer0
This should contain the total number of cases required as part of the booking so that an appropriate vehicle is sent. Please consider larger items such as golf clubs as 2 cases. The default value is 0.
pickup_address:
string
This should contain the full pick-up text with no line breaks. Please ensure each section of the address is separated by a comma. For example, you would send: 13 Down Town, London, SW13 9KD, UK If the address contains a POI (Point-of-interest), you can place this at the start by including it within brackets. For example: (Coffee Cafe) 13 Down Town, London, SW13 9KD, UK
pickup_lat:
double
Latitude of the pick-up location in Decimal Degrees only. Do not use commas as decimals. For example: 51.507323
pickup_long:
double
Longitude of the pick-up location in Decimal Degrees only. Do not use commas as decimals. For example: -0.127754
dropoff_address:
string
This should contain the full drop-off text with no line breaks. Please ensure each section of the address is separated by a comma. For example, you would send: 13 Down Town, London, SW13 9KD, UK If the address contains a POI (Point-of-interest), you can place this at the start by including it within brackets. For example: (Coffee Cafe) 13 Down Town, London, SW13 9KD, UK
dropoff_lat:
double
Latitude of the drop-off location in Decimal Degrees only. Do not use commas as decimals. For example: 51.507323
dropoff_long:
double
Longitude of the drop-off location in Decimal Degrees only. Do not use commas as decimals. For example: 51.507323
viapoints:
array of mixed
This should be a multidimensional JSON object with the following elements in each child array. Please look further down the page for what each object within the viapoints array should include.
cost:
double
Depending if the fleet operator has enabled this option this value lets you pre-define the set price rate for this booking. The fleet operator and driver still maintains the ability to modify this.
notes:
string
This should include any important notes regarding the booking. This will display on the fleet operators booking information screen, and also at the very top in bold on the drivers tablet/mobile device.
vehicle_preference:
stringNA
This is the vehicle preference for the booking. Please seek "vehicle_types" API for valid vehicle types to use.
wheelchair:
stringN
If a wheelchair accessible vehicle is required this should be set to Y.
pickup_time:
datetimeNOW
This should contain the date and time of the booking pickup. You must supply this using a valid date and time format as detailed here: http://uk3.php.net/manual/en/datetime.formats.php If however the booking is for now, you can either send the current date/time, or send the value NOW. This default value is NOW. Please be aware that this only influences the price of the journey, it does not get stored with the quote.
pricing_type:
stringsimple
This returns back the selected pricing, "simple" will return a basic mileage, time, and start fee price, where as "advance" will return the price with all advance localisation rules and flat rates considered. "none" will mark the quote as already calculated and use the cost field provided as the fare quote. Default is "none".

Result Format


Documentation

When creating a quote you will receive a quote reference number, it is important that you log this as you will need this quote number if you wish to quickly create the job. Otherwise, you can create the booking using the exact same fields. The system does not send any quote emails or SMS messages automatically when using the API. [block:callout] { "type": "warning", "title": "Customer Account Information Optional", "body": "Quotes can be generated without any customer account identified, however, please be aware this also means a customer can not retrieve any previously stored quotes and you will be unable to retrieve them from their customer ID." } [/block] [block:api-header] { "type": "basic", "title": "Via Points" } [/block] Via Points must be provided in the following format for each array object. [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "text", "0-1": "This should contain the full via-point address text. Seek PICKUP_ADDRESS for formatting information.", "1-0": "lat", "1-1": "Via-point Latitude. Seek PICKUP_LAT for formatting information.", "2-0": "long", "2-1": "Via-point Longitude. Seek PICKUP_LONG for formatting information." }, "cols": 2, "rows": 3 } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}