php-shopify icon indicating copy to clipboard operation
php-shopify copied to clipboard

Want to create a multi fulfillment

Open dion opened this issue 4 years ago • 1 comments

Hi I want to use this endpoint/schema for fulfilling multiple orders, https://shopify.dev/docs/admin-api/rest/reference/shipping-and-fulfillment/fulfillment#createV2-2021-04

POST /admin/api/2021-04/fulfillments.json the post body is :

{
  "fulfillment": {
    "message": "The package was shipped this morning.",
    "notify_customer": false,
    "tracking_info": {
      "number": 1562678,
      "url": "https://www.my-shipping-company.com",
      "company": "my-shipping-company"
    },
    "line_items_by_fulfillment_order": [
      {
        "fulfillment_order_id": 1046000802,
        "fulfillment_order_line_items": [
          {
            "id": 1025578676,
            "quantity": 1
          }
        ]
      }
    ]
  }
}

the current $shopify->Order($orderId)->Fulfillment->post($fulfillmentEvent); is not adequate for this because multiple order id's a nested within the form body,

is there a workaround for this?

dion avatar Apr 21 '21 10:04 dion

I'm probably better off switching to https://github.com/osiset/Basic-Shopify-API

dion avatar May 01 '21 05:05 dion