Sending Carton Contents feed for FBA Inbound shipments


#1

I’m trying to send Carton Contents feed data, which apparently finishes processing correctly, but when trying to get the package labels I’m getting an error. I’m submitting the following feed:

<?xml version="1.0" encoding="iso-8859-1"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
  <Header>
    <DocumentVersion>1.01</DocumentVersion>
    <MerchantIdentifier>XXXXXXXX</MerchantIdentifier>
  </Header>
  <MessageType>CartonContentsRequest</MessageType>
  <PurgeAndReplace>false</PurgeAndReplace>
  <Message>
    <MessageID>1</MessageID>
    <CartonContentsRequest>
      <ShipmentId>XXXXXXXXX</ShipmentId>
      <NumCartons>2</NumCartons>
      
      <Carton>
        <CartonId>3</CartonId>
        
        <Item>
          <SKU>AAAAAAAAAA</SKU>
          <QuantityShipped>60</QuantityShipped>
          <QuantityInCase>1</QuantityInCase>
        </Item>
        
      </Carton>
      
      <Carton>
        <CartonId>4</CartonId>
        
        <Item>
          <SKU>BBBBBBBBB</SKU>
          <QuantityShipped>6</QuantityShipped>
          <QuantityInCase>1</QuantityInCase>
        </Item>
        
        <Item>
          <SKU>VVVVVVVV</SKU>
          <QuantityShipped>6</QuantityShipped>
          <QuantityInCase>1</QuantityInCase>
        </Item>
        
        <Item>
          <SKU>CCCCCCCCCC</SKU>
          <QuantityShipped>11</QuantityShipped>
          <QuantityInCase>1</QuantityInCase>
        </Item>
        
      </Carton>
      
    </CartonContentsRequest>
  </Message>
</AmazonEnvelope>

then I query the submitted feeds list (response is parsed into dicts but it’s easy to read):

In [10]: api.get_feed_submission_list().parsed
{'FeedSubmissionInfo': [{'FeedProcessingStatus': {'value': '_IN_PROGRESS_'},
   'FeedSubmissionId': {'value': '298675018208'},
   'FeedType': {'value': '_POST_FBA_INBOUND_CARTON_CONTENTS_'},
   'StartedProcessingDate': {'value': '2019-11-08T15:37:22+00:00'},
   'SubmittedDate': {'value': '2019-11-08T15:37:16+00:00'},
   'value': '\n      '},
  {'CompletedProcessingDate': {'value': '2019-11-08T15:05:07+00:00'},
....

again, now it shows as _DONE_

In [11]: api.get_feed_submission_list(feed_ids=[298675018208]).parsed
Out[11]: 
{'FeedSubmissionInfo': {'CompletedProcessingDate': {'value': '2019-11-08T15:37:42+00:00'},
  'FeedProcessingStatus': {'value': '_DONE_'},
  'FeedSubmissionId': {'value': '298675018208'},
  'FeedType': {'value': '_POST_FBA_INBOUND_CARTON_CONTENTS_'},
  'StartedProcessingDate': {'value': '2019-11-08T15:37:22+00:00'},
  'SubmittedDate': {'value': '2019-11-08T15:37:16+00:00'},
  'value': '\n      '},
 'HasNext': {'value': 'false'},
 'value': '\n    '}

but when trying to get the package labels, I get an error:

In [13]: res = api.inbound_shipments_api.get_unique_package_labels(fbais.shipment_id, 'PackageLabel_Letter_6', [3])

MWSError: <ErrorResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
  <Error>
    <Type>Sender</Type>
    <Code>InvalidRequestException</Code>
    <Message>Package Identifier/s provided are not valid FBA15JF0YKX2</Message>
  </Error>
  <RequestId>f7d7c638-ce8d-4564-87c8-1be3c426a9c9</RequestId>
</ErrorResponse>