# Test your BOD connection with Postman

## Overview

This page explains how to verify the successful processing of your BOD (Business Object Document) using Postman. You will test the relevant API endpoint by sending a request with your BOD mapping file. Follow the steps below to complete the process.

## Accessing Your API Key and BOD Mapping File

### Retrieving Your API Key

1. Go to **Settings → Global Settings → Integration & SSO**.

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-f047fd0fa83dbcab959c2f4a1ef76c83332bcdf4%2Fsettings_integration.png?alt=media" alt=""><figcaption></figcaption></figure>
2. You can either manually copy your **API key** or click the copy button to copy it to your clipboard.

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-f744813da4545d67ec03926ad1b512d2b0aa095c%2Ftest_bod_connection_postman_1.png?alt=media" alt=""><figcaption></figcaption></figure>

### **Downloading the BOD Mapping File**

1. Go to **Settings → Document Processing → Export**.

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-fe43abcc67bb0a9d95c6568d8967004bf9f10e85%2Fsettings_export.png?alt=media" alt=""><figcaption></figcaption></figure>
2. In the **Actions** column of the relevant export entry, click the three-dot menu and select **Edit**.

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-0871fc8d61b6b639eb47f55d070801fd7c294029%2Ftest_bod_connection_postman_2.png?alt=media" alt=""><figcaption></figcaption></figure>
3. Locate the **BOD Mapping File** and click the **Download** button to save it.

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-5c8c7c926e928b437146c7742f28ddae6d212759%2Ftest_bod_connection_postman_3.png?alt=media" alt=""><figcaption></figcaption></figure>

## Test the Endpoint in Postman

1. **Paste the cURL Command in Postman**

   Open Postman and paste the following cURL command into the **Import** section. Postman will automatically configure the request.

   ```bash
   curl -X 'POST' \
     'https://api.docbits.com/prod-api/import/purchase_order_bod' \
     -H 'accept: application/json' \
     -H 'X-API-KEY:' \
     -H 'Content-Type: multipart/form-data' \
     -F 'org_id=' \
     -F 'sub_org_id=' \
     -F 'file=@file.xml;type=text/xml' \
     -F 'custom_fields_mapping='
   ```

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-e03f89cb8e9ca8c91a823d421587ddb5304b2f77%2Ftest_bod_connection_postman_4.png?alt=media" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-80ba33e990a1ab6cdbed441ac26a42fda5483635%2Ftest_bod_connection_postman_5.png?alt=media" alt=""><figcaption></figcaption></figure>
2. **Set the API Key**\
   Go to the **Headers** tab, locate the `X-API-KEY` header, and paste your API key into the **Value** column.

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-273adeb9a34564b9d5d2d88dd5a855bd8d1bb225%2Ftest_bod_connection_postman_6.png?alt=media" alt=""><figcaption></figcaption></figure>
3. **Upload the BOD File**\
   Go to the **Body** tab, locate the `file` key, then click **Select Files** in the **Value** column and upload your BOD XML file.

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-9994b7414680da648de2ab2dd7b83f64923a8c73%2Ftest_bod_connection_postman_7.png?alt=media" alt=""><figcaption></figcaption></figure>
4. **Send the Request**\
   Click **Send** to make the API call.

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-e9283f6bbdf971ed37d5e15e2d42e7f95bfab6e8%2Ftest_bod_connection_postman_8.png?alt=media" alt=""><figcaption></figcaption></figure>
5. **Verify the Response**\
   Check the response to confirm that your BOD was processed successfully.

   <figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-0a8e8562e2327e336a40b1653cdc1a4a323f8276%2Ftest_bod_connection_postman_9.png?alt=media" alt=""><figcaption></figcaption></figure>
