Results from shipment endpoint. Same product on different orders. Some show 0 cogs in that items line for a shipment and the same item on another order shows the correct cogs value.
The product object in the shipment line shows correct cost.
I checked is it was related to order splitting. Not.
give us the 10,000 ft view of what happened. something like can’t update product names.
When I did:
Get shipments for a time period.
slightly more specifically, what were the inputs? something like tried to put a new name for my product.
I expected:
To have cogs consistant for the same product accross all orders shipments for that product.
what were you expecting to happen? something like the product’s name should be updated and sent back in the response json.
What actually happened:
what went wrong? something like the system 500ed and my new name wasn’t updated.
The cogs on the shipments are calculated at the time the order was imported by multiplying the item quantity by the product cost. They do not get updated when the product costs change. This is to ensure a more accurate representation of the cost when the order was processed.
I understand what you are saying.
However these orders Order Lines do have cogs. The shipments lines do not…
The inconsistancy we are seeing is related to products that have been in the system with costs for a long time and these are current orders from Shopify…
There is a problem somewhere bringing the cogs from the order lines into the shipment lines cogs in a good number of instances…
I see what’s happening. It seems that ONLY shipments that are the result of split orders will have their cogs calculated, otherwise they’ll be 0.
We recommend sticking with the Order endpoint. The /shipment endpoint is a relic of the Ordoro V2 API and is no longer maintained, which is why it isn’t listed in our documentation.
If there is any information returned from the /shipment endpoint that isn’t available from the Order endpoint please let us know and we will open an issue.
My challange with using the orders endpoint is that I need to report to Accounting shipments made in a time period regardless of the order date…
The shipment endpoint allowed me to sort in descending shipment date order…Which supported my date period logic.
Is there a way to get shipments made in a time period from the Orders endpoint? I am all ears…
Just looking at orders I would need to go back for an unknown time period looking for old orders that may have shipped in the current period. ie when we have out of stock issues that last a long time…
I am looking at the v3/Order end point and it looks like you have new parameters for shipped_after and shipped_before…
I will try these out. These were not available when I wrote the code years ago…
Dick
So if an order shipped in Say december and then again in january will it showup with a shipped_after of January?
That is, is the shipped_after/before filter applied to all shipments of an order or only the first one?
So I would iterate through the shipments list and only report the one(s) in my current reporting period?
Correct, you can use the shipped_after/before filters as well as the sort=ship_date or sort=-ship_date param.
So if an order shipped in Say december and then again in january will it showup with a shipped_after of January?
The V3 API doesn’t allow multiple shipments per order. This is part of a bigger plan to move away from the shipments model and the reason the /shipment endpoint is unlisted and why /v3/shipment endpoints are going away. When an order is unshipped (or the label deleted), the shipped date gets cleared. If it is then shipped again the new date would be populated.
So yes, the order would only be discoverable when using the shipped_after/before filters by its most recent ship date.
So I am looking at the v3/order endpoint for my shipments in a moth report and I have a need to explode kits into thier components for our corporate erp system needs.
The v2 /Shipments endpoint used to return the product object in each shipment line. I used that to detect if the item is a kit parent…
If so I would get its components from your api.
Now the v3 order lines content only has the link to the product.
So I must either check every line via api call to see if it is a kit
Or
get a list of all kits at the beginnning of my program run and reference it for each line item shipped…
Couls you add a boolean on the order line object for Peoduct IsKitParent?