Amazon-SP-API-CSharp icon indicating copy to clipboard operation
Amazon-SP-API-CSharp copied to clipboard

tracking multiple items error... "The data you submitted is incomplete or invalid"

Open Adamyoelfc opened this issue 2 years ago • 2 comments

hi there... I'm trying to specify each item in each upload I do because I need to track shipping separately, I added a List<Item> to the OrderFulfillmentMessage object and it's uploading well. Still, anyway, I'm getting an error after... "The data you submitted is incomplete or invalid"

I'm doing this:

            int messageId = 1;

            foreach (var item in tList)
            {
                list.Add(new OrderFulfillmentMessage()
                {
                    AmazonOrderID = item["AmazonOdrId"].ToString(),
                    FulfillmentDate = item["FulfillmentDate"] + "",
                    FulfillmentData = new FulfillmentData()
                    {
                        CarrierCode = item["CarrierCode"].ToString(),
                        ShippingMethod = "Standard",
                        ShipperTrackingNumber = item["ShipperTrackingNumber"].ToString(),
                    },
                    Item = new List<Item> { new Item {
                        AmazonOrderItemCode = item["FreeTxt"]?.ToString(),
                        Quantity = Convert.ToInt32(decimal.Parse(item["Quantity"].ToString()))
                    } }
                });

                messageId++;
            }

            createDocument.AddOrderFulfillmentMessage(list);

            var xml = createDocument.GetXML();
            string xmlfilename = string.Format(@"AmzFeed/Upload/AmzShippingFeedUpload_{0}.xml", DateTime.Now.Ticks);
            
      System.IO.File.WriteAllText(xmlfilename, xml); ;
            var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_ORDER_FULFILLMENT_DATA);


updating this:

  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <OrderFulfillment>
      <AmazonOrderID>111-1111111-1111111</AmazonOrderID>
      <FulfillmentDate>2024-01-12T00:00:00</FulfillmentDate>
      <FulfillmentData>
        <CarrierCode>USPS</CarrierCode>
        <ShippingMethod>Standard</ShippingMethod>
        <ShipperTrackingNumber>487965489465483</ShipperTrackingNumber>
      </FulfillmentData>
      <Item>
        <AmazonOrderItemCode>87465486432484354</AmazonOrderItemCode>
        <Quantity>1</Quantity>
      </Item>
    </OrderFulfillment>
  </Message>

and getting this in the result file:

   {
      "MessageID": "2",
      "ResultCode": "Error",
      "ResultMessageCode": "18028",
      "ResultDescription": "The data you submitted is incomplete or invalid. For help fixing this, see http://sellercentral.amazon.com/gp/help/30721",
      "AdditionalInfo": {
        "SKU": null,
        "FulfillmentCenterID": null,
        "AmazonOrderID": "114-1111111-1111111",
        "AmazonOrderItemCode": null
      }
    },

any help with this, please?

Adamyoelfc avatar Jan 15 '24 20:01 Adamyoelfc

.try to use all Elements spezified in the orderfulfillment.xsd

Shipfromaddress Element is missing

Merchantorderid is missing

Luschmann Warenhandel Inh. Thomas Luschmann Schlesierweg 4 34346 Hann. Münden

Tel./Fax.: 004932121285722

Adam @.***> schrieb am Mo. 15. Jan. 2024 um 21:53:

hi there... I'm trying to specify each item in each upload I do because I need to track shipping separately, I added a List to the OrderFulfillmentMessage object and it's uploading well. Still, anyway, I'm getting an error after... "The data you submitted is incomplete or invalid"

I'm doing this:

        int messageId = 1;

        foreach (var item in tList)
        {
            list.Add(new OrderFulfillmentMessage()
            {
                AmazonOrderID = item["AmazonOdrId"].ToString(),
                FulfillmentDate = item["FulfillmentDate"] + "",
                FulfillmentData = new FulfillmentData()
                {
                    CarrierCode = item["CarrierCode"].ToString(),
                    ShippingMethod = "Standard",
                    ShipperTrackingNumber = item["ShipperTrackingNumber"].ToString(),
                },
                Item = new List<Item> { new Item {
                    AmazonOrderItemCode = item["FreeTxt"]?.ToString(),
                    Quantity = Convert.ToInt32(decimal.Parse(item["Quantity"].ToString()))
                } }
            });

            messageId++;
        }

        createDocument.AddOrderFulfillmentMessage(list);

        var xml = createDocument.GetXML();
        string xmlfilename = string.Format(@"AmzFeed/Upload/AmzShippingFeedUpload_{0}.xml", DateTime.Now.Ticks);

  System.IO.File.WriteAllText(xmlfilename, xml); ;
        var feedID = amazonConnection.Feed.SubmitFeed(xml, FeedType.POST_ORDER_FULFILLMENT_DATA);

updating this:

1 Update 111-1111111-1111111 2024-01-12T00:00:00 USPS Standard 487965489465483 87465486432484354 1

and getting this in the result file:

{ "MessageID": "2", "ResultCode": "Error", "ResultMessageCode": "18028", "ResultDescription": "The data you submitted is incomplete or invalid. For help fixing this, see http://sellercentral.amazon.com/gp/help/30721", "AdditionalInfo": { "SKU": null, "FulfillmentCenterID": null, "AmazonOrderID": "114-1111111-1111111", "AmazonOrderItemCode": null } },

any help with this, please?

— Reply to this email directly, view it on GitHub https://github.com/abuzuhri/Amazon-SP-API-CSharp/issues/700, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUQIONS5QW52GTXXTMBZEC3YOWJMVAVCNFSM6AAAAABB3ZULFGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4DENRWGU2DQMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ThomasL1973 avatar Jan 16 '24 05:01 ThomasL1973

@ThomasL1973 Thank for answering this, i added MerchatFulfillmentId, and MerchantFulfillmentItemId, at this point in my code I don't have the address, I can get it but I don't think that would solve the issue (missing address at that point)... this is my new code:

            foreach (var item in tList)
            {
                list.Add(new OrderFulfillmentMessage()
                {
                    AmazonOrderID = item["AmazonOdrId"].ToString(),
                    MerchantFulfillmentID = item["DocNum"].ToString(),
                    FulfillmentDate = item["FulfillmentDate"] + "",
                    FulfillmentData = new FulfillmentData()
                    {
                        CarrierCode = item["CarrierCode"].ToString(),
                        ShippingMethod = "Standard",
                        ShipperTrackingNumber = item["ShipperTrackingNumber"].ToString(),
                    },
                    Item = new List<Item> { new Item {
                        AmazonOrderItemCode = item["FreeTxt"]?.ToString(),
                        MerchantFulfillmentItemID = item["ItemCode"].ToString(),
                        Quantity = Convert.ToInt32(decimal.Parse(item["Quantity"].ToString()))
                    } }
                });

                messageId++;
            }

I'm uploading this:

  <Message>
    <MessageID>9</MessageID>
    <OperationType>Update</OperationType>
    <OrderFulfillment>
      <AmazonOrderID>111-1111111-1111111</AmazonOrderID>
      <MerchantFulfillmentID>1234567</MerchantFulfillmentID>
      <FulfillmentDate>2024-01-15T00:00:00</FulfillmentDate>
      <FulfillmentData>
        <CarrierCode>USPS</CarrierCode>
        <ShippingMethod>Standard</ShippingMethod>
        <ShipperTrackingNumber>89746548646864567</ShipperTrackingNumber>
      </FulfillmentData>
      <Item>
        <AmazonOrderItemCode>12345678912345</AmazonOrderItemCode>
        <MerchantFulfillmentItemID>3214</MerchantFulfillmentItemID>
        <Quantity>1</Quantity>
      </Item>
    </OrderFulfillment>
  </Message>

and getting this error:

    {
      "MessageID": "10",
      "ResultCode": "Error",
      "ResultMessageCode": "18028",
      "ResultDescription": "The data you submitted is incomplete or invalid. For help fixing this, see http://sellercentral.amazon.com/gp/help/30721",
      "AdditionalInfo": {
        "SKU": null,
        "FulfillmentCenterID": null,
        "AmazonOrderID": "111-1111111-1111111",
        "AmazonOrderItemCode": null
      }
    },

I think I don't have more elements to put in there, I was thinking of the type of each variable, but it's uploading the XML like that, and I think it's right...

is there a way to upload the SKU code with this package ???

Adamyoelfc avatar Jan 16 '24 16:01 Adamyoelfc