Open donaldrainwater opened 6 months ago
Hey @donaldrainwater! I'm looking into this now, I'll update as soon as I can. Feel free to ping me if it seems like I've forgotten it.
@donaldrainwater I don't use ShopifySharp, but I checked the generated schema class with the fulfillment object against their documentation.
The documentation on the website is as-per-usual inconsistent and confusing.
In the API documentation, (you have to check the examples on the right side for the real expected input), it will expect a single trackingInfo object with an array of tracking numbers, but will convert this into an array of trackingInfo[] objects in the returned response.
the input for multiple tracking numbers according to their documentation
"trackingInfo": {
"company": "UPS",
"numbers": [
"1Z001985YW99744790",
"1Z001985YW99744791"
]
}
versus the response
"trackingInfo": [
{
"company": "UPS",
"number": "1Z001985YW99744790",
"url": "https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z001985YW99744790"
},
{
"company": "UPS",
"number": "1Z001985YW99744791",
"url": "https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z001985YW99744791"
}
]
I've only ever fulfilled single tracking numbers, so you'll need to test if their provided example outline works,
I pasted it below.
mutation fulfillmentCreateV2($fulfillment: FulfillmentV2Input!) {
fulfillmentCreateV2(fulfillment: $fulfillment) {
fulfillment {
id
status
trackingInfo(first: 10) {
company
number
url
}
}
userErrors {
field
message
}
}
}
variables
{
"fulfillment": {
"lineItemsByFulfillmentOrder": {
"fulfillmentOrderId": "gid://shopify/FulfillmentOrder/940656279"
},
"trackingInfo": {
"numbers": [
"1Z001985YW99744790",
"MS123"
],
"urls": [
"https://www.ups.com/WebTracking?loc=en_US&requester=ST&trackNums=1Z001985YW99744790",
"http://shopify-unsupported-tracking-company.com?tracking_number=MS123"
]
}
}
}
I am interested in this as well.
If I'm reading the most up to date information it seems that the GraphQL supports multiple tracking numbers for a fulfillment but the rest api doesn't? Is that still correct?
Any updates on this would be appreciated!
Hi, I hope you can help me. I am trying to find a code sample that shows how to add multiple tracking numbers to one Fulfillment Order in ShopifySharp. I cannot find the code to make this happen.