I am trying to get order id on confirmation page of big-commerce store after placing an order according to the following code:
fetch('/api/storefront/order/{{checkout.order.id}}', {credentials: 'include'})
.then(function(response) {
return response.json();
})
.then(function(myJson) {
console.log(myJson);
});
But I am getting the following error:
{title: 'Not Found', type: 'about:blank', status: 404, detail: "Provided order Id doesn't represent a valid order"}