Hi All ,
I am trying to create a new fulfillment via rest api but unable to create and getting below error
ā RestResourceError: Could not find a path for request
const session = await Shopify.Utils.loadCurrentSession(req, res);
console.log(session);
const { Fulfillment } = await
import (
`@shopify/shopify-api/dist/rest-resources/${Shopify.Context.API_VERSION}/index.js`
);
const fulfillment = new Fulfillment({session: session});
fulfillment.message = "The package was shipped this morning.";
fulfillment.notify_customer = false;
fulfillment.tracking_info = {
"number": 1562678,
"url": "https://www.my-shipping-company.com",
"company": "my-shipping-company"
};
fulfillment.line_items_by_fulfillment_order = [
{
"fulfillment_order_id": 1046000820
}
];
await fulfillment.save({});
Kindly someone please help me on the same