Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FulFillmentInbound.GetShipmentItems Error "Either the ShipmentId or a pair of LastUpdatedAfter and LastUpdatedBefore must be passed in input" #814

Open
adenke opened this issue Jan 3, 2025 · 0 comments

Comments

@adenke
Copy link

adenke commented Jan 3, 2025

I am getting this error every single time and have verified repeatedly that I have a ShipmentId. Tried it also using a LastUpdatedBefore and LastUpdatedAfter parameter (although I need to use the ShipmentId) and get the same error every single time.

Here is part of my code if that helps:

                var shipmentItemsParameter = new FikaAmazonAPI.Parameter.FulFillmentInbound.ParameterGetShipmentItems
                {
                    
                    ShipmentId = shipmentId,
                    MarketplaceId = AmazonMarketPlaceID
                 };

                try
                {
                    // Get the shipment items
                    var shipmentItems = amazonConnection.FulFillmentInbound.GetShipmentItems(shipmentItemsParameter);

                    // Now iterate over the items (shipmentItems should be the correct collection)
                    foreach (var item in shipmentItems)
                    {
                        string sku = item.SellerSKU;
                        int quantityShipped = Convert.ToInt32(item.QuantityShipped);
                        int quantityReceived = item.QuantityReceived ?? 0;

                        // Output the shipment details for each SKU
                        MessageBox.Show($"Shipment ID: {shipment.ShipmentId}, Fulfillment Center Id:{shipment.DestinationFulfillmentCenterId} SKU: {sku}, Shipped: {quantityShipped}, Received: {quantityReceived}");
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show($"Error fetching shipment items for Shipment ID {shipmentId}: {ex.Message}");
                }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant