Reputation: 33
Using the Shopify API, I am able to successfully pull down orders from a shop, and also post fulfillments to that shop. However, when I update that fulfillment with a tracking number(s), I can't figure out how to add more than 1 tracking number per line-item. I can update a single tracking number at the order level, or just one at each individual line-item level. This can cause an issue when the line item needs to be broken up into different shipments.
For example, say a store sells just one type of hat, with sku 1234. An order comes in for 10 hats. The order has one line item, with qty 10.
Since I only have boxes that can fit 4 hats each, I need to send this order in 3 different boxes:
Box 1 - 4 hats, sku 1234, tracking number 700
Box 2 - 4 hats, sku 1234, tracking number 800
Box 3 - 2 hats, sku 1234, tracking number 900
In this scenario I am currently doing a PUT to update the tracking with the 3 tracking numbers comma separated into the single tracking-number element,
<fulfillment>
<tracking-number>700,800,900</tracking-number>
<id type="integer">255858046</id>
</fulfillment>
But it would be preferable to be able to distinguish them as 3 different tracking numbers:
<fulfillment>
<tracking-number>700</tracking-number>
<tracking-number>800</tracking-number>
<tracking-number>900</tracking-number>
<id type="integer">255858046</id>
</fulfillment>
Using the Shopify API, is there a way to get all 3 of these tracking numbers separately tacked onto the fulfillment at either the order level, or line-item level?
Upvotes: 3
Views: 2112
Reputation: 1742
This is a known issue and actually messes with some 3rd party integrations we have. There is a patch being worked on ATM that should make it possible to do for both that integration as well as your situation.
All that to say, currently it is not possible. I'd suggest doing 3 separate fulfillments as a work around, but that only works if these items aren't all the same product variant.
Upvotes: 3