Create / Update Booking [RESTAURANT]
Booking NFT Creation Request
const URI = "https://staging-api.takyon.io/v2";
const nftdata = {
collectionId: "ce2bb8e9-ffde-4138-bc3a-bb00b879e9ec", // or your internal ID
owner: "[email protected]",
originalPrice: 599,
images: [
"https://www.yourhosting.com/image.png",
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAADHQA...",
],
lockDate: "2023-02-14T22:59:00.000Z",
guests: [
{
firstName: "Cody",
secondName: "Martin",
email: "[email protected]",
},
{
firstName: "Zac",
secondName: "Martin",
email: "[email protected]",
},
],
lang: "en",
payload: {
type: "restaurant",
restaurant: "Taste Bistro",
cuisine: "French",
email: "[email protected]",
website: "https://tastebistro.com",
note: "Include additional information about the restaurant here",
location: {
label: "123 Main Street, Anytown, USA",
value: {
description: "123 Main Street, Anytown, USA",
matched_substrings: [{ length: 12, offset: 0 }],
place_id: "ChIJRQNO6FIUhYgRqvgqaujHZgE",
reference: "ChIJRQNO6FIUhYgRqvgqaujHZgE",
structured_formatting: {
main_text: "123 Main Street",
main_text_matched_substrings: [{ length: 12, offset: 0 }],
secondary_text: "Anytown, USA",
},
terms: [
{ offset: 0, value: "123 Main Street" },
{ offset: 17, value: "Anytown" },
{ offset: 26, value: "USA" },
],
types: ["route", "geocode"],
},
},
reference: "y789012",
reservationTime: "2023-03-10T19:30:00.000Z",
partySize: 4,
specialRequests: "Vegetarian, gluten-free",
occasion: "Anniversary",
michelinStars: 2,
dressCode: "Business Casual",
reservationConfirmed: true,
parking: "Valet Parking Available",
chefsSpecialties: "Truffle Risotto, Grilled Sea Bass",
wineList: "Extensive selection of local and international wines",
tableType: "Window-side",
extra: "Include additional information about the reservation here",
},
};
const apikey = "1fed1306-3645-42d0-97d5-a39afa3195fa";
(async () => {
const rawRes = await fetch(URI + "/nft", {
method: "post",
headers: {
"Content-Type": "application/json",
API_KEY: apikey,
},
body: JSON.stringify(nftdata),
});
const res = await rawRes.json();
console.log(JSON.stringify(res));
})();PARAMETER
DESCRIPTION
TYPE
REQUIRED
Update an existent booking
Last updated