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

# Complete Upload

> Confirm that your uploaded file is valid and ready for import.

- **File validation:** The API verifies the uploaded bytes and checks that the file is a supported CSV or Excel file.
- **Upload completed:** A successful response means the file is ready for import.
- **Important:** Uploading the file to the temporary storage URL is not enough. You must also call Complete Upload.



## OpenAPI

````yaml /openapi/public-v1.json post /public/v1/uploads/{uploadId}/complete
openapi: 3.0.0
info:
  title: Eaze Customs Public API
  version: '1.0'
  description: >-
    Customer API for Shipments, Import and Export Declarations, NCTS Departure
    and Arrival, RTO, and documents. Configure webhook endpoints in the Eaze
    Customs Portal. Authenticate with an Eaze Customs API credential. Staging —
    For Integration Testing: https://staging.api.eazecustoms.com. All routes in
    this specification start with /public/v1.
servers:
  - url: https://staging.api.eazecustoms.com
    description: >-
      Staging — For Integration Testing. Do not append /public/v1. That prefix
      is already part of each path.
security:
  - bearer: []
paths:
  /public/v1/uploads/{uploadId}/complete:
    post:
      summary: Complete Upload
      description: >-
        Confirm that your uploaded file is valid and ready for import.


        - **File validation:** The API verifies the uploaded bytes and checks
        that the file is a supported CSV or Excel file.

        - **Upload completed:** A successful response means the file is ready
        for import.

        - **Important:** Uploading the file to the temporary storage URL is not
        enough. You must also call Complete Upload.
      operationId: PublicUploads_complete
      parameters:
        - name: X-Eaze-Client-Ref
          in: header
          description: >-
            Required. Send the clientRef returned by List Clients. Do not send
            this header on Get Credential Details or List Clients.
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 100
            example: ACME-AMS
          example: ACME-AMS
        - name: uploadId
          required: true
          in: path
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
            pattern: ^[!-~]{1,200}$
            example: 6f1c0b3e-8a21-4c5d-9e10-1a2b3c4d5e6f
          description: >-
            Required. Use 1 to 200 visible ASCII characters. Create a new key
            for a new request. Send the same key only when you retry the exact
            same request after a network failure. The same key with a different
            body is rejected.
          example: 6f1c0b3e-8a21-4c5d-9e10-1a2b3c4d5e6f
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicUploadCompletedDto'
              example:
                id: aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa
                purpose: shipment_manifest
                status: available
                filename: manifest.csv
                contentType: text/csv
                byteLength: 73
                sha256: >-
                  4ea9a34e9b058915cb420a3b6f18fee40a6b877b0f330e33b5497c1fc0370a4d
                scanRequired: false
        '400':
          description: E0001 — malformed or invalid request.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E0001
                message: Invalid request parameters
                errors:
                  - field: shipmentType
                    message: 'Invalid option: expected one of "IMPORT"|"EXPORT"'
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '401':
          description: >-
            E0002 — missing, invalid, expired or revoked Eaze Customs API
            credential.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E0002
                message: >-
                  Missing, invalid, expired or revoked Eaze Customs API
                  credential
                errors: []
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '403':
          description: E0003 — credential, module or client authorization denied.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E0003
                message: The import module is not enabled for this credential
                errors: []
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '404':
          description: E0004 — authorized resource not found.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E0004
                message: Shipment not found
                errors: []
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '409':
          description: E0006 — idempotency or resource-state conflict.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E0006
                message: Idempotency-Key was already used with a different request
                errors:
                  - code: idempotency_key_reused
                    message: Idempotency-Key was already used with a different request
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '410':
          description: E9999 — upload session expired and a new upload is required.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E9999
                message: Upload session has expired
                errors:
                  - code: upload_expired
                    message: Upload session has expired
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '415':
          description: E0007 — uploaded content does not match the declared media type.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E0007
                message: Only CSV and XLSX uploads are supported
                errors: []
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '422':
          description: >-
            E9999 — upload verification or structured-file assessment failed
            permanently.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E9999
                message: Upload verification failed
                errors:
                  - code: upload_checksum_mismatch
                    message: Upload verification failed
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '429':
          description: >-
            E0008 — Public API rate limit exceeded; retry after the indicated
            delay.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E0008
                message: Public API rate limit exceeded
                errors: []
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '500':
          description: >-
            E0009 — unexpected server error; report requestId if the problem
            persists.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E0009
                message: Unexpected server error
                errors: []
                requestId: 550e8400-e29b-41d4-a716-446655440000
        '503':
          description: >-
            E0011 — storage verification or structured-file assessment is
            temporarily unavailable.
          headers:
            X-Request-Id:
              description: >-
                Globally unique request UUID; identical to requestId in the
                error body and structured logs.
              schema:
                type: string
                format: uuid
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              example:
                errorCode: E0011
                message: Public API background processing is not enabled
                errors: []
                requestId: 550e8400-e29b-41d4-a716-446655440000
      security:
        - bearer: []
components:
  schemas:
    PublicUploadCompletedDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Public Upload ID. Send it when you import the file.
        purpose:
          type: string
          enum:
            - ncts_items
            - shipment_manifest
          description: >-
            shipment_manifest for a shipment file. ncts_items for an NCTS
            departure goods file.
        status:
          type: string
          enum:
            - available
          description: The upload passed verification and structured-file assessment.
        filename:
          type: string
          description: Name of the uploaded file.
        contentType:
          type: string
          enum:
            - text/csv
            - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
          description: Media type of the uploaded file.
        byteLength:
          type: number
          minimum: 1
          maximum: 20971520
          description: Size of the uploaded file in bytes.
        sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
          description: SHA-256 fingerprint of the uploaded file.
        scanRequired:
          type: boolean
          description: >-
            Legacy field. False after a successful completion. It does not
            describe an antivirus scan.
      required:
        - id
        - purpose
        - status
        - filename
        - contentType
        - byteLength
        - sha256
        - scanRequired
    PublicApiError:
      type: object
      required:
        - errorCode
        - message
        - errors
        - requestId
      properties:
        errorCode:
          type: string
          example: E0001
        message:
          type: string
          example: Invalid request parameters
        errors:
          type: array
          items:
            $ref: '#/components/schemas/PublicApiValidationIssue'
        requestId:
          type: string
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
    PublicApiValidationIssue:
      type: object
      required:
        - message
      properties:
        field:
          type: string
          example: filename
        code:
          type: string
          example: invalid_format
        message:
          type: string
          example: Filename contains unsupported characters
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: EZ_<credential-id>_<secret>
      type: http
      description: >-
        Send Authorization: Bearer followed by the full Eaze Customs API
        credential. The credential looks like EZ_<credential-id>_<secret>. It is
        shown only when Eaze Customs creates or rotates it.

````

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