Step 1: Upload File
Requests
Method: POST
URL: https://ai-book-sea-mvp.shipping.langtec.de/api/upload
Authorization: Basic
Username: <username>
Password: <password>
cURL:
curl --location 'localhost:1031/api/upload' \
--header 'Authorization: Basic ZGVtb19hZG1pbjpkZW1vNzg5Pw==' \
--form 'data_input=@"{PATH_TO_YOUR_PDF_FILE}"'
Response
{
"filename": "upload/xxx.pdf"
}
Step 2: Extract Content
Requests
Method: POST
URL: https://ai-book-sea-mvp.shipping.langtec.de/api/extract_content
Authorization: Basic
Username: <username>
Password: <password>
cURL:
curl --location 'localhost:1031/api/extract_content/<filename path from the first request>' \
--header 'Authorization: <your basic auth token>'
Response
{
"Shipper Company Name": "Random Shipping Co.",
"Shipper Address": "123 Shipping Street",
"Shipper City": "New York City",
"Shipper Zip Code": "10001",
"Shipper Country": "United States",
"Consignee Company Name": "ABC Manufacturing",
"Consignee Address": "456 Industrial Avenue",
"Consignee City": "Los Angeles, CA",
"Consignee Zip Code": "90001",
"Consignee Country": "United States",
"Quantity": "10",
"Length": "60 cm",
"Width": "40 cm",
"Height": "30 cm",
"Weight": "20 kg",
"Total Quantity": "1",
"Total Weight": "20.000 KG",
"Incoterms": "DDP Los Angeles, CA 90001",
"Cargo Description": "Product XYZ123\nModel: ABC-456\nSerial Number: 7890\nManufacturer: ABC Corporation\nCountry of Origin: United States",
"Remarks": "1 case - 60x40x30 cm\n- 20 kg gross weight / 18 kg net weight -"
}
Note: The response varies depending on the detected fields and values of the uploaded PDF.