> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/chinese/gao-ji-gong-neng-yu-gong-ju/postman-for-docbits/test-your-bod-connection-with-postman.md).

# 使用 Postman 测试 BOD 连接

## 概述

本页介绍如何使用 Postman 验证 BOD（业务对象文档）是否已成功处理。您将通过发送包含 BOD 映射文件的请求来测试相关 API 端点。请按照以下步骤完成操作。

## 获取 API 密钥和 BOD 映射文件

### 获取 API 密钥

1. 前往 **设置 → 全局设置 → 集成与单点登录**。

   <figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-f047fd0fa83dbcab959c2f4a1ef76c83332bcdf4%2Fsettings_integration.png?alt=media" alt=""><figcaption></figcaption></figure>
2. 您可以手动复制 **API 密钥**，也可以点击复制按钮将其复制到剪贴板。

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

### **下载 BOD 映射文件**

1. 前往 **设置 → 文档处理 → 导出**。

   <figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-fe43abcc67bb0a9d95c6568d8967004bf9f10e85%2Fsettings_export.png?alt=media" alt=""><figcaption></figcaption></figure>
2. 在相关导出条目的 **操作** 列中，点击三点菜单并选择 **编辑**。

   <figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-0871fc8d61b6b639eb47f55d070801fd7c294029%2Ftest_bod_connection_postman_2.png?alt=media" alt=""><figcaption></figcaption></figure>
3. 找到 **BOD 映射文件**，然后点击 **下载** 按钮将其保存。

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

## 在 Postman 中测试端点

1. **在 Postman 中粘贴 cURL 命令**

   打开 Postman，并将以下 cURL 命令粘贴到 **导入** 区域。Postman 会自动配置请求。

   ```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://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-e03f89cb8e9ca8c91a823d421587ddb5304b2f77%2Ftest_bod_connection_postman_4.png?alt=media" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-80ba33e990a1ab6cdbed441ac26a42fda5483635%2Ftest_bod_connection_postman_5.png?alt=media" alt=""><figcaption></figcaption></figure>
2. **设置 API 密钥**\
   转到 **Headers** 选项卡，找到 `X-API-KEY` 标头，然后在 **Value** 列中粘贴 API 密钥。

   <figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-273adeb9a34564b9d5d2d88dd5a855bd8d1bb225%2Ftest_bod_connection_postman_6.png?alt=media" alt=""><figcaption></figcaption></figure>
3. **上传 BOD 文件**\
   转到 **Body** 选项卡，找到 `file` 键，然后点击 **Value** 列中的 **Select Files**，并上传 BOD XML 文件。

   <figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-9994b7414680da648de2ab2dd7b83f64923a8c73%2Ftest_bod_connection_postman_7.png?alt=media" alt=""><figcaption></figcaption></figure>
4. **发送请求**\
   点击 **Send** 发起 API 调用。

   <figure><img src="https://1870485400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlPczlNw8zzYNLfjfispX%2Fuploads%2Fgit-blob-e9283f6bbdf971ed37d5e15e2d42e7f95bfab6e8%2Ftest_bod_connection_postman_8.png?alt=media" alt=""><figcaption></figcaption></figure>
5. **验证响应**\
   检查响应，确认 BOD 已成功处理。

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/chinese/gao-ji-gong-neng-yu-gong-ju/postman-for-docbits/test-your-bod-connection-with-postman.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
