Shipment status in V3 #908
Unanswered
emergingdzns
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey folks. We've run into a small stumbling block with V3. In V2 we used to get a field (I think called
major_tracking_state
?) on the receipts that would give us shipping status on receipts. Now, in V3 it will list any shipments tied to the receipts but all it gives is the tracking code and carrier. There's no status on the shipments.So, we are left with making several calls to the api using the logic below. I'm looking for opinions from others on if this makes sense to you. I've done it this way because it seems like the
was_shipped
andwas_delivered
being set tofalse
don't equate to "show me the receipts where the items are NOT shipped or NOT delivered" but rather setting tofalse
is like not including the filter at all.$receipt_ids_found
(we are using PHP).was_shipped=true
andwas_delivered=true
. Any receipts that come out from this query I think we can safely quantify as "Delivered". We then take the receipt ids from this result set and add them to the$receipt_ids_found
array.was_shipped=true
andwas_delivered=false
. Filter out any where the receipt id is already in$receipt_ids_found
. Then put these ids into the$receipt_ids_found
array. I think we can count these as "In Transit". However, what if there are no records in theshipments
array?was_shipped=false
andwas_delivered=false
. Again, filter out any where the receipt id is already in$receipt_ids_found
. So at this point I think the best approach is to look for records in theshipments
array. If there's at least one, we mark it as "In Transit". If there are none, we assume not yet shipped.Unless I'm mistaken, a seller can mark and order as shipped without entering a carrier name or tracking number. So there's really no way to track the actual status.
If anyone has a better method for getting a more accurate status, it would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions