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

# Upload shipping document



## OpenAPI

````yaml /api-reference/openapi.json post /documents/etds/upload
openapi: 3.0.0
info:
  title: Teleship
  description: >

    Teleship is a leading cross-border logistics provider offering seamless
    global commerce solutions through our comprehensive API.


    With Teleship's API, developers can integrate our cross-border shipping
    services, trade engine, and logistics solutions directly into their
    applications.


    **Key Features:**

    - Cross-border shipping solutions for international commerce

    - Real-time shipping rates and delivery estimates

    - End-to-end shipment tracking with detailed status updates

    - Automated customs compliance and product classification

    - Real-time event notifications through webhooks


    **Why Teleship?**

    - API-first: Developer-friendly integration with comprehensive documentation

    - Enterprise-ready: Built for businesses of all sizes

    - Secure: Enterprise-grade security and compliance

    - Integrated: Seamless connection with e-commerce, ERP, and fulfillment
    systems


    Start shipping globally with Teleship's powerful cross-border logistics API.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.teleship.com
security: []
tags: []
paths:
  /documents/etds/upload:
    post:
      tags:
        - Shipping Services
      summary: Upload shipping document
      operationId: uploadShippingDocument
      parameters: []
      requestBody:
        required: true
        description: The EDT upload payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadElectronicTradeDocumentDto'
      responses:
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseMessagesDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseMessagesDto'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseMessagesDto'
      security:
        - bearer: []
components:
  schemas:
    UploadElectronicTradeDocumentDto:
      type: object
      properties:
        shipmentId:
          type: string
          description: The shipment ID to upload the electronic trade document
        electronicTradeDocuments:
          description: The electronic trade document to upload
          type: array
          items:
            $ref: '#/components/schemas/ElectronicTradeDocumentDto'
      required:
        - shipmentId
        - electronicTradeDocuments
    ResponseMessagesDto:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponseDto'
      required:
        - messages
    ElectronicTradeDocumentDto:
      type: object
      properties:
        name:
          type: string
          description: The name of the file.
          example: commercial-invoice.pdf
        type:
          type: string
          description: >
            The type of the document.

            IMPORT_LICENSE: Country-issued permit to import controlled goods

            HEALTH_CERTIFICATE: Verifies safety of food, pharma, cosmetics

            SAFETY_DATA_SHEET: Chemical safety and handling infoHazmat,
            industrial goods

            CE_DECLARATION: Conformity certificate for EU goods

            FDA_PRIOR_NOTICE: PDF confirmation of PN submission

            TEST_REPORT: For electronics, toys, or regulated goods

            DECLARATION_OF_COMPLIANCE: Blanket legal compliance statement

            OTHER: For edge cases (requires name + description)
          enum:
            - PROFORMA_INVOICE
            - COMMERCIAL_INVOICE
            - CERTIFICATE_OF_ORIGIN
            - IMPORT_LICENSE
            - HEALTH_CERTIFICATE
            - SAFETY_DATA_SHEET
            - CE_DECLARATION
            - FDA_PRIOR_NOTICE
            - TEST_REPORT
            - DECLARATION_OF_COMPLIANCE
            - OTHER
          default: COMMERCIAL_INVOICE
        format:
          type: string
          description: The format of the document.
          enum:
            - PDF
            - PNG
          default: PDF
        content:
          type: string
          description: The file content encoded in base64.
          example: JVBERi0xLjQKJQlJbTgKMSAwIG9iago8PSplbiAkZwoKCSvQ==
      required:
        - content
    ErrorResponseDto:
      type: object
      properties:
        code:
          type: number
        level:
          type: string
          enum:
            - error
            - warning
            - info
          example: error
          description: Error level
          default: error
        timestamp:
          format: date-time
          type: string
          example: '2024-01-01T00:00:00.00Z'
        message:
          type: string
          example: An error occurred
        details:
          example:
            - Missing required field
          type: array
          items:
            type: string
      required:
        - code
        - level
        - timestamp
        - message
        - details
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````