> ## 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.

# Import Departure Details

> **Import House Consignments and Goods Items**

Import House Consignments and Goods Items into an editable NCTS Departure declaration.

- **Replace existing data:** The import replaces all existing House Consignments and Goods Items in the Departure declaration.
- **Departure only:** This import is not available for NCTS Arrival declarations.
- **Import accepted (HTTP 202):** The API accepts the uploaded file for background processing.
- **Check the result:** Use the returned `operationId` to track the import status and view any errors.

**Important:** Existing House Consignments and Goods Items will be replaced when the import completes successfully.



## OpenAPI

````yaml /openapi/public-v1.json post /public/v1/ncts/transit-declarations/{transitDeclarationId}/details/import
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/ncts/transit-declarations/{transitDeclarationId}/details/import:
    post:
      summary: Import Departure Details
      description: >-
        **Import House Consignments and Goods Items**


        Import House Consignments and Goods Items into an editable NCTS
        Departure declaration.


        - **Replace existing data:** The import replaces all existing House
        Consignments and Goods Items in the Departure declaration.

        - **Departure only:** This import is not available for NCTS Arrival
        declarations.

        - **Import accepted (HTTP 202):** The API accepts the uploaded file for
        background processing.

        - **Check the result:** Use the returned `operationId` to track the
        import status and view any errors.


        **Important:** Existing House Consignments and Goods Items will be
        replaced when the import completes successfully.
      operationId: PublicTransitDeclarations_importDetails
      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: transitDeclarationId
          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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportPublicTransitDetailsDto'
            example:
              uploadId: aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa
              mode: replace_all
      responses:
        '202':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicTransitDetailsImportAcceptedDto'
              example:
                operationId: bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb
                status: queued
        '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
        '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 — required asynchronous processing is not enabled or
            available.
          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:
    ImportPublicTransitDetailsDto:
      type: object
      properties:
        uploadId:
          type: string
          format: uuid
          x-nestjs_zod-has-const: true
          x-nestjs_zod-parent-additional-properties: false
          description: >-
            Upload ID of an available NCTS goods file. Purpose must be
            ncts_items. Each upload can be used for one import.
        mode:
          type: string
          x-nestjs_zod-has-const: true
          x-nestjs_zod-parent-additional-properties: false
          enum:
            - replace_all
          description: >-
            Must be replace_all. The import replaces the current House
            Consignments and Goods Items on an editable Departure.
        packageType:
          type: string
          minLength: 2
          maxLength: 2
          x-nestjs_zod-has-const: true
          x-nestjs_zod-parent-additional-properties: false
          description: Optional two-character package type applied to the imported lines.
        shippingMarks:
          type: string
          minLength: 1
          maxLength: 512
          x-nestjs_zod-has-const: true
          x-nestjs_zod-parent-additional-properties: false
          description: Optional shipping marks, 1 to 512 characters.
      required:
        - uploadId
        - mode
    PublicTransitDetailsImportAcceptedDto:
      type: object
      properties:
        operationId:
          type: string
          format: uuid
          description: Public Operation ID. Use Get Operation to follow this import.
        status:
          type: string
          enum:
            - queued
          description: >-
            queued means the goods import has been accepted and has not started
            yet.
      required:
        - operationId
        - status
    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.