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

# 上传个体工商户文件

> 用于在注册 SOLE_PROPRIETORSHIP 企业时上传所需支持文件的 REST 端点。

大多数 Fluz API 是 GraphQL —— 文件上传是个例外。当以 `businessStructure: SOLE_PROPRIETORSHIP` 调用 [`registerBusiness`](/api-reference/mutations/register-business) 时，请先通过此 REST 端点上传支持文件，然后在 [`RegisterBusinessInput`](/api-reference/types/register-business-input) 中将返回的 URL 作为 `soleProprietorshipDocumentUrl` 传入。

## 端点

| 环境      | URL                                                                                                    |
| ------- | ------------------------------------------------------------------------------------------------------ |
| Staging | `POST https://transactional-graph.staging.fluzapp.com/api/v1/file-upload/sole-proprietorship-document` |
| Live    | `POST https://transactional-graph.fluzapp.com/api/v1/file-upload/sole-proprietorship-document`         |

## 请求

以 `multipart/form-data` 发送文件，并使用与注册流程相同的访问令牌进行认证：

```bash theme={null}
curl -X POST https://transactional-graph.staging.fluzapp.com/api/v1/file-upload/sole-proprietorship-document \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -F "file=@business-license.pdf"
```

## 响应

返回已上传文件的公共 URL —— 参见 [`UploadSoleProprietorshipDocumentResponse`](/api-reference/types/upload-sole-proprietorship-document-response)：

```json theme={null}
{
  "url": "https://storage.fluzapp.com/documents/..."
}
```

在提交 `registerBusiness` 时，将此值填入 `soleProprietorshipDocumentUrl`。有关完整注册流程（包括 KYB 生命周期），请参见[企业注册](/business-registration)。
