We have an API Gateway endpoint, that accepts the batch data. Our standard endpoint, located at batch-import.factbird.com (for Private Cloud installations, the endpoint is batch-import.<tenant>.factbird.com)
Example cURL call:
curl -X POST -H "Content-Type: application/xml" \\
-H 'x-api-key: xxxxxxXXXXXXXxxxxxxxXXXXXXxxxxxxx' \\
'<https://batch-import.factbird.com/test-file.xml>' \\
-d '<batch><product>....</batch>' # XML contents here
The above call will send the XML data to our API Gateway endpoint, which will validate the Batch Import key
The following parts should change according to your need:
test-file.xml
to a unique filenamex-api-key
with your Batch Import key'<batch><product>....</batch>'
with your actual batch XML data<?xml version="1.0" encoding="UTF-8"?>
<batch>
<product>
<!-- If not relevant, create a static packaging and put it here -->
<packaging>
<packagingExternalId>Generic</packagingExternalId> <!-- Used to match packaging -->
<packagingName>Pcs</packagingName>
<packagingUnit>pcs</packagingUnit>
<packagingComment/>
</packaging>
<productExternalId>000000000000103262</productExternalId> <!-- The product SKU/number, used to match product -->
<productName>Magic Pill 10 MG BLIST 14 TAB DRY TEST</productName>
<validatedSpeed>200</validatedSpeed> <!-- Optional -->
<expectedLineSpeed>150</expectedLineSpeed> <!-- Optional -->
<multiplier>1</multiplier>
</product>
<externalLineId>640-6-1</externalLineId> <!-- ID of the line (you can find this in Factbird under Administration -> Line -> Identifier) -->
<batchNumber>000001005302</batchNumber> <!-- The batch/PO number, Used to match batch -->
<plannedStart>2019-03-19T11:38:48.000Z</plannedStart> <!-- Optional time as ISO string -->
<actualStart>2019-05-13T08:38:00.000Z</actualStart> <!-- Optional time as ISO string -->
<actualStop>2019-05-13T08:38:00.000Z</actualStop> <!-- Optional time as ISO string -->
<plannedAmount>10</plannedAmount>
<comment>Batch comment</comment> <!-- Optional -->
</batch>
<?xml version="1.0" encoding="UTF-8"?>
<batches>
<batch>
...
</batch>
</batches>