{"swagger":"2.0","info":{"version":"0.0.1","title":"365 Distributor API","description":"Distributor API's for 365 Hub","contact":{"name":"Md. Noor Mohammad Siddique","email":"noor.siddique@metafour.com"}},"paths":{"/suppliers":{"get":{"summary":"Provide a list of suppliers","description":"The Suppliers endpoint returns information about the 365 suppliers.\nThe response includes the display name and other details about each\nsupplier, and lists the suppliers in the proper display order.\n","tags":["Suppliers"],"responses":{"200":{"description":"An array of suppliers","schema":{"type":"array","items":{"$ref":"#/definitions/Supplier"}}}}}},"/suppliers/{id}/products":{"get":{"summary":"Provide a list of products from a supplier","parameters":[{"name":"id","in":"path","description":"Supplier id","required":true,"type":"string"}],"tags":["Suppliers"],"responses":{"200":{"description":"An array of products from a supplier","schema":{"type":"array","items":{"$ref":"#/definitions/Product"}}}}}},"/suppliers/{id}/products/{productId}":{"get":{"summary":"Provide a product's data","parameters":[{"name":"id","in":"path","description":"Supplier id","required":true,"type":"string"},{"name":"productId","in":"path","description":"Product id","required":true,"type":"string"}],"tags":["Products"],"responses":{"200":{"description":"ok","schema":{"$ref":"#/definitions/Product"}}}}},"/suppliers/{id}/products/{productId}/options":{"post":{"summary":"Provide's the pricing and availbility if dates are supplied (Ticket Types ie Adult £XX.XX, Chilc £XX.XX)","parameters":[{"name":"id","in":"path","description":"Supplier id","required":true,"type":"string"},{"name":"productId","in":"path","description":"Product id","required":true,"type":"string"}],"tags":["Products"],"responses":{"200":{"description":"ok","schema":{"type":"array","items":{"$ref":"#/definitions/Option"}}}}}},"/basket/create":{"get":{"summary":"Creates a empty new basket","tags":["Basket"],"responses":{"200":{"description":"ok","schema":{"$ref":"#/definitions/Basket"}}}}},"/basket/{id}/add":{"post":{"summary":"Will add a product and its options to the basket","parameters":[{"name":"id","in":"path","description":"Basket id","required":true,"type":"string"}],"tags":["Basket"],"responses":{"200":{"description":"ok","schema":{"$ref":"#/definitions/Basket"}}}}},"/basket/{id}/delete/{productId}":{"delete":{"summary":"Will remove a product ID","parameters":[{"name":"id","in":"path","description":"Basket id","required":true,"type":"string"},{"name":"productId","in":"path","description":"Product id","required":true,"type":"string"}],"tags":["Basket"],"responses":{"200":{"description":"ok","schema":{"$ref":"#/definitions/Basket"}}}}},"/basket/{id}/options":{"put":{"summary":"Update options, If an API provides other options which we can pass an array of params to the API","parameters":[{"name":"id","in":"path","description":"Basket id","required":true,"type":"string"}],"tags":["Basket"],"responses":{"200":{"description":"ok","schema":{"$ref":"#/definitions/Basket"}}}}},"/basket/{id}/complete":{"get":{"summary":"To confirm an order. We would expect","parameters":[{"name":"id","in":"path","description":"Basket id","required":true,"type":"string"}],"tags":["Basket"],"responses":{"200":{"description":"ok","schema":{"$ref":"#/definitions/Basket"}}}}},"/bookings/{id}":{"get":{"summary":"Supplys the booking information","parameters":[{"name":"id","in":"path","description":"Bookings id","required":true,"type":"string"}],"tags":["Bookings"],"responses":{"200":{"description":"ok","schema":{"$ref":"#/definitions/Booking"}}}},"delete":{"summary":"To cancel a bookings","parameters":[{"name":"id","in":"path","description":"Bookings id","required":true,"type":"string"}],"tags":["Bookings"],"responses":{"200":{"description":"ok","schema":{"$ref":"#/definitions/Booking"}}}}}},"definitions":{"Supplier":{"type":"object","properties":{"id":{"format":"int32","type":"integer"},"name":{"type":"string"},"status":{"format":"int32","type":"integer"}}},"Product":{"type":"object","properties":{"productId":{"type":"string","description":"Unique Product id"},"description":{"type":"string","description":"Product name"},"name":{"type":"string"},"price":{"format":"double","type":"number"},"tax":{"format":"double","type":"number"},"hasManagedCapacity":{"type":"boolean"},"options":{"type":"array","items":{"$ref":"#/definitions/Option"}}}},"Basket":{"type":"object","properties":{"basketId":{"type":"string","description":"Unique Basket id"},"description":{"type":"string","description":"Basket name"}}},"Booking":{"type":"object","properties":{"id":{"type":"string"},"distributorId":{"format":"int32","type":"integer"},"createdAt":{"format":"date-time","type":"string"},"lastActivity":{"format":"date-time","type":"string"},"status":{"format":"int32","type":"integer"},"statusText":{"type":"string"},"visitDate":{"format":"date-time","type":"string"},"totalQuantity":{"format":"int32","type":"integer"},"subTotal":{"format":"double","type":"number"},"totalTax":{"format":"double","type":"number"},"total":{"format":"double","type":"number"},"order":{"$ref":"#/definitions/Order"},"guests":{"type":"array","items":{"$ref":"#/definitions/Guest"}},"items":{"type":"array","items":{"$ref":"#/definitions/BookingItem"}},"tickets":{"type":"array","items":{"$ref":"#/definitions/Ticket"}}}},"Order":{"type":"object","properties":{"orderId":{"type":"string"},"orderedAt":{"format":"date-time","type":"string"},"cancelledAt":{"format":"date-time","type":"string"},"cancelReason":{"type":"string"},"supplierOrders":{"type":"array","items":{"$ref":"#/definitions/SupplierOrder"}}}},"Ticket":{"type":"object","properties":{"createdAt":{"format":"date-time","type":"string"},"ticketNumber":{"type":"string"},"productCode":{"type":"string"},"productName":{"type":"string"},"eventId":{"type":"string"},"eventName":{"type":"string"},"eventStart":{"format":"date-time","type":"string"},"eventEnd":{"format":"date-time","type":"string"},"guest":{"$ref":"#/definitions/TicketGuest"}}},"SupplierOrder":{"type":"object","properties":{"id":{"format":"int32","type":"integer"},"name":{"type":"string"},"orderId":{"type":"string"}}},"TicketGuest":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"}}},"Guest":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"suffix":{"type":"string"},"isLead":{"type":"boolean"},"address":{"$ref":"#/definitions/Address"},"email":{"type":"string"},"phone":{"type":"string"}}},"Address":{"type":"object","properties":{"line1":{"type":"string"},"line2":{"type":"string"},"line3":{"type":"string"},"city":{"type":"string"},"province":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}},"BookingItem":{"type":"object","properties":{"id":{"type":"string"},"productCode":{"type":"string"},"productName":{"type":"string"},"quantity":{"format":"int32","type":"integer"},"createdAt":{"format":"date-time","type":"string"},"status":{"format":"int32","type":"integer"},"statusText":{"type":"string"},"eventId":{"type":"string"},"guests":{"type":"array","items":{"$ref":"#/definitions/Guest"}}}},"Option":{"type":"object","properties":{"optionId":{"type":"string","description":"The Option ID"},"productId":{"type":"string","description":"The product the options belongs to"},"name":{"type":"string","description":"The type of option IE Adult, Child"}}}}}