Creates a ticket order on disneyworld.com
-
URL
/tickets/add
-
Method:
POST -
URL Params
None
-
Data Params
{ ticket : { name : [string], email : [string], address : [string] type : [string], creditCard : [string] } }
-
Success Response:
- Code: 201
Content:{ id : 5032, msg : "Ticket Successfully Created" }
- Code: 201
-
Error Response:
- Code: 422 Unprocessable Entry
Content:{ error : "Invalid input data" }
OR
- Code: 401 UNAUTHORIZED
Content:{ error : "You are not allowed to make this request." }
- Code: 422 Unprocessable Entry
-
Sample Call:
$.ajax({ url: "/tickets/add", dataType: "json", type : "POST", data: { ticket: { id : 5034, email : "[email protected]" , address : "2023 Grand Oak DR", type : "ORDER", creditCard : "ec331f5dd1c5f40e28ea541caec913f6" } }, success : function(r) { console.log(r); } });
Returns data about a specific ticket on disneyworld.com
-
URL
/tickets/:id
-
Method:
GET -
URL Params
Required:
id=[integer] -
Data Params
None
-
Success Response:
- Code: 200
Content:{ id : [integer], name : [string], email : [string], address: [string], type : [string] }
- Code: 200
-
Error Response:
- Code: 404 NOT FOUND
Content:{ error : "Ticket does not exist" }
OR
- Code: 401 UNAUTHORIZED
Content:{ error : "You are not allowed to make this request." }
- Code: 404 NOT FOUND
-
Sample Call:
$.ajax({ url: "/tickets/5034", dataType: "json", type : "GET", success : function(r) { console.log(r); } });