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

# Schedule pickup

> Schedule a pickup request for your shipments, scheduling a collection from your location.

**What happens:**
- Validates your pickup window (startAt and endAt times)
- Ensures pickup window is between 1 hour and 12 hours
- Validates pickup window is within available hours (2AM-12PM Mon-Fri by default)
- Schedules the pickup with the selected time window
- Returns pickup confirmation

**Pickup Window Requirements:**
- Window duration: 1 hour (3600 seconds) to 12 hours (43200 seconds)
- Available hours: 2AM-12PM Monday-Friday (configurable per account)
- Both startAt and endAt must be in the future
- Both times must be on weekdays
- Times are validated as-is (no timezone conversion)

**Why use this?**
Schedule collections for multiple shipments at once, optimizing logistics operations.
    



## OpenAPI

````yaml /api-reference/openapi.json post /api/pickups
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:
  /api/pickups:
    post:
      tags:
        - Shipping Services
      summary: Schedule pickup
      description: >-
        Schedule a pickup request for your shipments, scheduling a collection
        from your location.


        **What happens:**

        - Validates your pickup window (startAt and endAt times)

        - Ensures pickup window is between 1 hour and 12 hours

        - Validates pickup window is within available hours (2AM-12PM Mon-Fri by
        default)

        - Schedules the pickup with the selected time window

        - Returns pickup confirmation


        **Pickup Window Requirements:**

        - Window duration: 1 hour (3600 seconds) to 12 hours (43200 seconds)

        - Available hours: 2AM-12PM Monday-Friday (configurable per account)

        - Both startAt and endAt must be in the future

        - Both times must be on weekdays

        - Times are validated as-is (no timezone conversion)


        **Why use this?**

        Schedule collections for multiple shipments at once, optimizing
        logistics operations.
            
      operationId: schedulePickup
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePickupDto'
            examples:
              CreatePickup:
                summary: Create pickup request (flexible datetime format)
                value:
                  startAt: 2024-01-15T08:00
                  endAt: 2024-01-15T12:00
                  shipmentIds:
                    - a7c8961f-8693-44cf-b325-99b3c4b37b08
                    - b8d9072g-9704-55dg-c436-00c4d5c48c19
                  address:
                    name: John Doe
                    email: john.doe@example.com
                    phone: +44 20 7946 0958
                    company: Sample Exports Co
                    address:
                      addressLine1: 123 Oxford Street
                      addressLine2: Suite 456
                      city: London
                      state: England
                      postalCode: W1D 1BS
                      country: GB
                  reference: PICKUP-2024-001
              UpdatePickup:
                summary: Update pickup request (space-separated format)
                value:
                  startAt: 2024-01-15 09:00
                  endAt: 2024-01-15 11:00
                  address:
                    name: John Doe
                    email: john.doe@example.com
                    phone: +44 20 7946 0958
                    company: Sample Exports Co
                    address:
                      addressLine1: 123 Oxford Street
                      addressLine2: Suite 456
                      city: London
                      state: England
                      postalCode: W1D 1BS
                      country: GB
                  reference: PICKUP-2024-001-UPDATED
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PickkupResponseDto'
        '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:
    CreatePickupDto:
      type: object
      properties:
        startAt:
          type: string
          description: >-
            The start time of the pickup window. Must be at least one
            non-holiday, business day in the future. The pickup window must be
            between 1 hour and 12 hours, and within your account's pickup
            availability hours (default: 2AM-12PM Mon-Fri). Supports flexible
            formats: "2024-01-15T08:00", "2024-01-15 08:00",
            "2024-01-15T08:00:00.000Z"
          example: '2024-01-15T08:00:00.000Z'
        endAt:
          type: string
          description: >-
            The end time of the pickup window. Must be at least one non-holiday,
            business day in the future. The pickup window must be between 1 hour
            and 12 hours, and within your account's pickup availability hours
            (default: 2AM-12PM Mon-Fri). Supports flexible formats:
            "2024-01-15T12:00", "2024-01-15 12:00", "2024-01-15T12:00:00.000Z"
          example: '2024-01-15T12:00:00.000Z'
        shipmentIds:
          type: array
          items:
            type: string
        address:
          $ref: '#/components/schemas/OriginDto'
        reference:
          type: string
      required:
        - startAt
        - endAt
        - shipmentIds
        - address
    PickkupResponseDto:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponseDto'
        pickup:
          $ref: '#/components/schemas/PickupDto'
      required:
        - messages
    ResponseMessagesDto:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponseDto'
      required:
        - messages
    OriginDto:
      type: object
      properties:
        name:
          type: string
          description: The shipper's name.
        email:
          type: string
          description: Email address for the shipper.
        phone:
          type: string
          description: >-
            Phone number for the shipper. A valid local phone number including
            area code or a fully qualified international number. Drivers can use
            this to coordinate pickup with the sender.
        company:
          type: string
          description: >-
            Business name. This helps the driver successfully collect and
            deliver the parcel.
        address:
          description: The origin address for the shipment
          default:
            line1: ''
            city: ''
            postcode: ''
            country: GB
          allOf:
            - $ref: '#/components/schemas/OriginAddressDto'
      required:
        - name
        - address
    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
    PickupDto:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - created
            - processing
            - completed
            - failed
            - cancelled
        startAt:
          type: string
          description: >-
            The start time of the pickup window. Must be at least one
            non-holiday, business day in the future. The pickup window must be
            between 1 hour and 12 hours, and within your account's pickup
            availability hours (default: 2AM-12PM Mon-Fri). Supports flexible
            formats: "2024-01-15T08:00", "2024-01-15 08:00",
            "2024-01-15T08:00:00.000Z"
          example: '2024-01-15T08:00:00.000Z'
        endAt:
          type: string
          description: >-
            The end time of the pickup window. Must be at least one non-holiday,
            business day in the future. The pickup window must be between 1 hour
            and 12 hours, and within your account's pickup availability hours
            (default: 2AM-12PM Mon-Fri). Supports flexible formats:
            "2024-01-15T12:00", "2024-01-15 12:00", "2024-01-15T12:00:00.000Z"
          example: '2024-01-15T12:00:00.000Z'
        address:
          type: object
        reference:
          type: string
        createdAt:
          format: date-time
          type: string
      required:
        - id
        - status
        - startAt
        - endAt
        - createdAt
    OriginAddressDto:
      type: object
      properties:
        line1:
          type: string
          description: >-
            The street address for the location. Do not include the postcode,
            state, or suburb in this field.
        line2:
          type: string
          description: Second line of the street address for the location.
        city:
          type: string
          description: >-
            City or town of the location. In certain regions the name here is
            validated against the postcode, so must be valid and match.
        state:
          type: string
          description: State, province, or territory of the location.
        postcode:
          type: string
          description: Postcode, postal code, or ZIP code of the location.
        isResidential:
          type: boolean
          description: Whether the address is residential.
        country:
          type: string
          description: The country of origin for the shipment
          enum:
            - GB
            - US
            - AT
            - BE
            - DE
            - ES
            - FR
            - IT
            - LU
            - NL
      required:
        - line1
        - country
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````