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

# 获取证据

返回证明的元数据，以及用于获取文件的短期有效签名 downloadUrl。

* 示例中缩短了 downloadUrl 的主机、有效期和签名。
* 对文件的访问会以您访问令牌中的用户身份进行审计。
* 如果 URL 过期，请再次调用此接口以获取新的 URL。

错误使用带有固定 `code` 的 `application/problem+json`。完整目录：[实体状态和错误代码](https://docs.localpayment.com/zh/reference/entity-statuses-and-error-codes.md)。


## OpenAPI

````yaml openapi/zh/localpayment.json GET /api/entity/v1/proofs/{proofId}
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/entity/v1/proofs/{proofId}:
    get:
      summary: 获取证明
      operationId: get-proof
      parameters:
        - name: Authorization
          in: header
          description: >-
            用于身份验证的 Bearer
            访问令牌。该令牌可从[获取访问令牌](/zh/reference/get-token)或[刷新访问令牌](/zh/reference/refresh-token)endpoint
            获取。系统将据此识别您的商户账户和执行操作的用户。
          required: true
          schema:
            type: string
            examples:
              - Bearer <your_access_token>
        - name: X-Correlation-ID
          in: header
          description: 跟踪标识符（UUID）。会在响应中原样返回；如未提供，则由 Localpayment 生成。
          required: false
          schema:
            type: string
            examples:
              - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
        - name: proofId
          in: path
          description: 证明 ID。
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 2c4c2f74-7179-4113-83fb-f11dbce9e07d
      responses:
        '200':
          description: OK。
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    examples:
                      - 2c4c2f74-7179-4113-83fb-f11dbce9e07d
                    description: 证明标识符（proofId）。
                  documentId:
                    type: string
                    examples:
                      - 2e16d844-4fa9-4295-9a21-83ec32ef241a
                    format: uuid
                    description: 该文件所佐证的文档。
                  proofType:
                    type: string
                    examples:
                      - FRONT
                    enum:
                      - FRONT
                      - BACK
                      - SELFIE
                      - DOCUMENT
                      - OTHER
                    description: FRONT、BACK、SELFIE、DOCUMENT、OTHER。
                  fileName:
                    type: string
                    examples:
                      - id_front.jpg
                    description: 已上传文件的元数据。上传后请检查 sizeBytes > 0。
                  mimeType:
                    type: string
                    examples:
                      - image/jpeg
                    description: 已上传文件的元数据。上传后请检查 sizeBytes > 0。
                  sizeBytes:
                    type: integer
                    examples:
                      - 102400
                    description: 已上传文件的元数据。上传后请检查 sizeBytes > 0。
                  verificationStatus:
                    type: string
                    examples:
                      - PENDING
                    enum:
                      - PENDING
                      - IN_REVIEW
                      - APPROVED
                      - REJECTED
                    description: PENDING、IN_REVIEW、APPROVED、REJECTED。由 Localpayment 合规部门设置。
                  verifiedBy:
                    type:
                      - string
                      - 'null'
                    description: 验证结果。拒绝时会填写 verificationReason。
                  verifiedAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: 验证结果。拒绝时会填写 verificationReason。
                  verificationReason:
                    type:
                      - string
                      - 'null'
                    description: 验证结果。拒绝时会填写 verificationReason。
                  uploadedBy:
                    type: string
                    examples:
                      - '12345'
                    description: 您帐户中上传文件的用户（通过访问令牌）和上传时间。
                  uploadedAt:
                    type: string
                    examples:
                      - '2024-01-15T17:03:13Z'
                    format: date-time
                    description: 您帐户中上传文件的用户（通过访问令牌）和上传时间。
                  status:
                    type: string
                    examples:
                      - CURRENT
                    enum:
                      - CURRENT
                      - SUPERSEDED
                      - DELETED
                    description: >-
                      证明生命周期：CURRENT（有效）、SUPERSEDED（已被相同 proofType 的新上传证明替换）或
                      DELETED。与 verificationStatus 无关。
                  supersededAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: 证明被替换时设置。
                  supersededBy:
                    type:
                      - string
                      - 'null'
                    description: 证明被替换时设置。
                  replacedByProofId:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    description: 证明被替换时设置。
                  deletedAt:
                    type:
                      - string
                      - 'null'
                    format: date-time
                    description: 证明被删除时设置。
                  deletedBy:
                    type:
                      - string
                      - 'null'
                    description: 证明被删除时设置。
                  inVerification:
                    type: boolean
                    examples:
                      - true
                    description: 当证明文件属于正在进行的审核（实体 IN_REVIEW）时为 true；此时无法替换或删除。
                  downloadUrl:
                    type: string
                    examples:
                      - >-
                        https://files.example.com/<object-path>?expires=600&signature=<redacted>
                    description: 签名后的URL有效期为10分钟。请在下载前立即获取；请勿保存。
              examples:
                Example 1:
                  value:
                    id: 2c4c2f74-7179-4113-83fb-f11dbce9e07d
                    documentId: 2e16d844-4fa9-4295-9a21-83ec32ef241a
                    proofType: FRONT
                    fileName: id_front.jpg
                    mimeType: image/jpeg
                    sizeBytes: 102400
                    verificationStatus: PENDING
                    verifiedBy: null
                    verifiedAt: null
                    verificationReason: null
                    uploadedBy: '12345'
                    uploadedAt: '2024-01-15T17:03:13Z'
                    status: CURRENT
                    supersededAt: null
                    supersededBy: null
                    replacedByProofId: null
                    deletedAt: null
                    deletedBy: null
                    inVerification: true
                    downloadUrl: >-
                      https://files.example.com/<object-path>?expires=600&signature=<redacted>
        '400':
          description: 错误请求。验证错误：缺少字段、标头、路径或查询参数，或者参数未知或无效。details[] 列出了字段和问题。
          content:
            application/problem+json:
              schema:
                type: object
                description: RFC 9457 问题详情（application/problem+json）。
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: 问题简述。
                  status:
                    type: integer
                    description: HTTP状态码。
                  detail:
                    type: string
                    description: 易于理解的解释。
                  instance:
                    type: string
                    description: 请求路径。
                  code:
                    type: string
                    description: 稳定的机器可读错误代码。根据此值进行分支。
                  correlationId:
                    type: string
                    format: uuid
                    description: 请求标识符。联系客服时请提供此标识符。
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: 出错字段（如适用）。
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - VALIDATION_ERROR:
                  value:
                    type: about:blank
                    title: Validation error
                    status: 400
                    detail: >-
                      A field, header, path or query parameter is missing,
                      unknown or invalid. details[] lists field and issue.
                    instance: /api/entity/v1/proofs/2c4c2f74-7179-4113-83fb-f11dbce9e07d
                    code: VALIDATION_ERROR
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details:
                      - field: externalId
                        issue: REQUIRED
        '401':
          description: 未授权。UNAUTHORIZED：缺少或无效的访问令牌。
          content:
            application/problem+json:
              schema:
                type: object
                description: RFC 9457 问题详情（application/problem+json）。
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: 问题简述。
                  status:
                    type: integer
                    description: HTTP状态码。
                  detail:
                    type: string
                    description: 易于理解的解释。
                  instance:
                    type: string
                    description: 请求路径。
                  code:
                    type: string
                    description: 稳定的机器可读错误代码。根据此值进行分支。
                  correlationId:
                    type: string
                    format: uuid
                    description: 请求标识符。联系客服时请提供此标识符。
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: 出错字段（如适用）。
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - UNAUTHORIZED:
                  value:
                    type: about:blank
                    title: Unauthorized
                    status: 401
                    detail: Missing or invalid access token.
                    instance: /api/entity/v1/proofs/2c4c2f74-7179-4113-83fb-f11dbce9e07d
                    code: UNAUTHORIZED
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
        '404':
          description: 未找到。PROOF_NOT_FOUND：该证明不存在或属于其他商家。
          content:
            application/problem+json:
              schema:
                type: object
                description: RFC 9457 问题详情（application/problem+json）。
                properties:
                  type:
                    type: string
                    examples:
                      - about:blank
                  title:
                    type: string
                    description: 问题简述。
                  status:
                    type: integer
                    description: HTTP状态码。
                  detail:
                    type: string
                    description: 易于理解的解释。
                  instance:
                    type: string
                    description: 请求路径。
                  code:
                    type: string
                    description: 稳定的机器可读错误代码。根据此值进行分支。
                  correlationId:
                    type: string
                    format: uuid
                    description: 请求标识符。联系客服时请提供此标识符。
                    examples:
                      - 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                  details:
                    type: array
                    description: 出错字段（如适用）。
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          examples:
                            - numberOfEmployees
                        issue:
                          type: string
                          examples:
                            - NOT_IN_OPTIONS
              examples:
                Example 1 - PROOF_NOT_FOUND:
                  value:
                    type: about:blank
                    title: Not found
                    status: 404
                    detail: The proof does not exist or belongs to another merchant.
                    instance: /api/entity/v1/proofs/2c4c2f74-7179-4113-83fb-f11dbce9e07d
                    code: PROOF_NOT_FOUND
                    correlationId: 0e8f6a2c-5b3d-4c1e-9a7f-6d5e4c3b2a10
                    details: []
      security:
        - token: []
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.