📦 Extract from File - API Documentation

  1. Extract Packing list
  2. Extract Commercial Invoice
  3. Pre-Request

📦 Extract Packing List

📥 Request

This API accepts a supplier number and Excel file (either base64 or file upload) and extracts packing list details.

🔗 Endpoint

POST /api/ExtractPackingList

Content-Type: multipart/form-data

You can send either a base64 file string or attach an Excel (.xls) file directly.

Form Fields:

Example Request using file (Postman form-data):

    Key: supplier_no  → 304797
    Key: file         → [upload XLS file here]
    

Example Request using base64 (Postman form-data):

    Key: supplier_no  → 304797
    Key: fileBase64   → [base64-encoded file string]
    

📤 Successful Response

    {
      "container_no": null,
      "seal_no" : null,
      "supplier_packing_no": null,
      "total_weight": 1.4445,
      "packages": [
        {
          "package_no": "1",
          "items": [
            {
              "supplier_integration_part_no": "1305",
              "country_of_origin": "JAPAN",
              "qty": 17,
              "weight": 4.335,
              "no_of_carton": null,
              "unit_per_carton": null,
              "mixed_carton_no": "1-XYZ"
            }
          ]
        }
        ]
    }
    

❌ Failure Response

        

400 Bad Request

Something went wrong, Please check your input file

Index

📄 Extract Invoice & Packing List

🔗 Endpoint

POST /api/Extract/CommercialInvoice

📥 Request

This API accepts a supplier number and PDF content (either base64 or file upload) and extracts invoice and packing list details.

Payload (Form Data or JSON):

{
  "supplier_no": "304797",
  "fileBase64": "(base64 string of PDF)",
  "file": [Uploaded PDF file - optional if base64 used]
}

📤 Successful Response

{
  "invoices": [
    {
      "invoice_no": "96277421",
      "invoice_currency_code": "USD",
      "invoice_amt": 3039.72,
      "invoice_date": "2025-01-10T00:00:00",
      "po_no": "OS 24101556",
      "items": [
        {
          "supplier_integration_part_no": "10287582",
          "invoice_qty": 12,
          "invoice_unit_price": 253.31,
          "country_of_origin_code": "US"
        }
      ]
    },
    {
      "invoice_no": "96279329",
      "invoice_currency_code": "USD",
      "invoice_amt": 330.69,
      "invoice_date": "2025-01-13T00:00:00",
      "po_no": "OS 24101684",
      "items": [
        {
          "supplier_integration_part_no": "10315065",
          "invoice_qty": 1,
          "invoice_unit_price": 330.69,
          "country_of_origin_code": "US"
        }
      ]
    }
  ],
  "packing_list": {
    "container_no": null,
    "seal_no": null,
    "supplier_packing_no": null,
    "total_weight": 4872.168,
    "packages": [
      {
        "package_no": "1005501633",
        "items": [
          {
            "supplier_integration_part_no": "10287582",
            "country_of_origin": "US",
            "qty": 12,
            "weight": 0,
            "no_of_carton": null,
            "unit_per_carton": null,
            "mixed_carton_no": null
          }
        ]
      },
      {
        "package_no": "1005503237",
        "items": [
          {
            "supplier_integration_part_no": "10315065",
            "country_of_origin": "US",
            "qty": 1,
            "weight": 0,
            "no_of_carton": null,
            "unit_per_carton": null,
            "mixed_carton_no": null
          }
        ]
      }
    ]
  }
}

❌ Failure Response

        

400 Bad Request

Something went wrong, Please check your input file

Index

Request:

Please contact the Digital Team via email for more specific packing, commerical invoice list respective to supplier number.
⬅️ Back to Home Index