> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ebrc.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Extract eBRC-specific Shipping Bill Data

> Extract only the shipping bill fields needed to file an eBRC from a PDF, such as bill number, date, port code, and invoice value, ready to map to a remittance.

Extract the eBRC-relevant fields from a shipping bill PDF. Use this variant when you are preparing a [bulk eBRC upload](/api-reference/genebrc/bulk-upload); use [the full variant](/api-reference/extraction/shipping-bills-full) when you need the complete document.

`POST /shipping-bills/extract` on the [Tradelens host](/api-reference/extraction/introduction#base-url).

## Request

<ParamField body="file" type="file" required>
  The shipping bill PDF document to process. Must be a valid PDF file under 5 MB.
</ParamField>

### Headers

<ParamField header="x-api-key" type="string" required>
  Your Tradelens API key. This is a separate key from your eBRC API key.
</ParamField>

<ParamField header="accept" type="string" default="application/json">
  Response content type (application/json)
</ParamField>

## Example request

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl --location 'https://tradelens-apis.eximfiles.io/platform/shipping-bills/extract' \
  --header 'x-api-key: <TRADELENS_API_KEY>' \
  --header 'accept: application/json' \
  --form 'file=@"/path/to/shipping-bill.pdf"'
  ```

  ```javascript JavaScript theme={"dark"}
  const formData = new FormData();
  formData.append('file', fileInput.files[0]);

  fetch('https://tradelens-apis.eximfiles.io/platform/shipping-bills/extract', {
    method: 'POST',
    headers: {
      'x-api-key': '<TRADELENS_API_KEY>',
      'accept': 'application/json'
    },
    body: formData
  })
  .then(response => response.json())
  .then(data => console.log(data));
  ```

  ```python Python theme={"dark"}
  import requests

  url = "https://tradelens-apis.eximfiles.io/platform/shipping-bills/extract"
  headers = {
      "x-api-key": "<TRADELENS_API_KEY>",
      "accept": "application/json"
  }
  files = {
      "file": open("shipping-bill.pdf", "rb")
  }

  response = requests.post(url, headers=headers, files=files)
  data = response.json()
  ```
</CodeGroup>

## Response

<ResponseField name="status" type="string">
  Processing status (success/error)
</ResponseField>

<ResponseField name="data" type="object">
  Extracted shipping bill data
</ResponseField>

## Related

* [Extract complete Shipping Bill Data](/api-reference/extraction/shipping-bills-full) for the whole document.
* [Bulk Upload via Excel](/api-reference/genebrc/bulk-upload) to file the extracted rows.
* [Data Extraction overview](/api-reference/extraction/introduction) for auth and limits.
