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

# Cancel pickup

> Cancel a previously scheduled pickup, preventing the collection from taking place.

**When to use:**
- Customer cancels pickup request
- You need to reschedule the pickup for a different time

**Result:**
The pickup is cancelled and cannot be used for collection.
    



## OpenAPI

````yaml /api-reference/openapi.json post /api/pickups/{pickupId}/cancel
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/{pickupId}/cancel:
    post:
      tags:
        - Shipping Services
      summary: Cancel pickup
      description: >-
        Cancel a previously scheduled pickup, preventing the collection from
        taking place.


        **When to use:**

        - Customer cancels pickup request

        - You need to reschedule the pickup for a different time


        **Result:**

        The pickup is cancelled and cannot be used for collection.
            
      operationId: cancelPickup
      parameters:
        - name: pickupId
          required: true
          in: path
          description: The pickup ID to cancel
          schema:
            example: pickup_2024_123456789
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelPickupDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseMessagesDto'
        '404':
          description: Pickup not found
          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:
    CancelPickupDto:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - created
            - processing
            - completed
            - failed
            - cancelled
        cancelledAt:
          format: date-time
          type: string
      required:
        - id
        - status
        - cancelledAt
    ResponseMessagesDto:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponseDto'
      required:
        - messages
    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

````