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

# Cancel a pickup

> Cancel a scheduled pickup, if the carrier and the pickup allow it.

> [!NOTE]
>
> OAuth2 scopes required: `write:pickup`. See [Scopes for OAuth apps](https://sendcloud.dev/api/v3/scopes.md).

Use this endpoint to cancel a pickup that hasn't taken place yet. The response contains the updated pickup.

## How cancellation works

* **Carriers that support cancellation via their API**: the pickup is canceled with the carrier during the request. If the carrier confirms, the response is `200` and the pickup has the status `CANCELLED`. If not, the response is `409` and the pickup has the status `FAILED`.
* **Carriers that Sendcloud Support handles cancellations for**: Sendcloud Support cancels the pickup with the carrier on your behalf. The response is `202` and the pickup has the status `CANCELLATION_REQUESTED`. Once Support has handled the request, the status changes to `CANCELLED`, `CANCELLATION_FAILED` or `CANCELLATION_REJECTED`, which you can follow with the [Retrieve a pickup](https://sendcloud.dev/api/v3/pickups/retrieve-a-pickup.md) endpoint.
* **Other carriers**: the pickup can't be canceled through Sendcloud. The response is `409`.

> [!NOTE]
>
> A pickup can't be canceled once its pickup time has started, or after the carrier's cancellation deadline.


## OpenAPI

````yaml /.openapi/v3/pickups/openapi.yaml post /pickups/{id}/cancel
openapi: 3.1.0
info:
  title: Pickups API
  version: 3.0.0
  contact:
    name: Sendcloud API Support
    url: https://www.sendcloud.dev
    email: contact@sendcloud.com
  description: >-
    The Pickups API lets you schedule a one-time parcel pickup with supported
    carriers.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://panel.sendcloud.sc/api/v3
    description: Sendcloud Production
security: []
tags:
  - name: Pickups
    description: >-
      The pickup is a delivery option when a carrier collects parcels at a
      specific address and time, and then delivers them to the sorting center.
paths:
  /pickups/{id}/cancel:
    parameters:
      - schema:
          type: integer
        name: id
        in: path
        required: true
        description: The `id` of the pickup you want to cancel.
    post:
      tags:
        - Pickups
      summary: Cancel a pickup
      description: Cancel a scheduled pickup, if the carrier and the pickup allow it.
      operationId: sc-public-v3-scp-post-cancel_pickup
      responses:
        '200':
          description: The carrier has canceled the pickup.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PickupCancellationResponse'
              examples:
                Cancelled:
                  summary: Pickup canceled by the carrier
                  value:
                    data:
                      id: 1
                      time_slots:
                        - start_at: '2022-04-06T12:00:00Z'
                          end_at: '2022-04-06T17:00:00Z'
                      address:
                        name: John Doe
                        city: Eindhoven
                        country_code: NL
                        address_line_1: Stadhuisplein
                        house_number: '10'
                        address_line_2: ''
                        postal_code: 5611 EM
                        company_name: Sendcloud
                        email: example@sendcloud.com
                        phone_number: '+310612345678'
                      items:
                        - quantity: 1
                          container_type: parcel
                          total_weight:
                            value: '2.00'
                            unit: kg
                      reference: ''
                      special_instructions: ''
                      tracking_number: PRG220406003404
                      status: CANCELLED
                      created_at: '2022-03-30T10:57:02.344479Z'
                      cancelled_at: '2022-03-30T10:57:11.656260Z'
                      carrier_code: dhl_express
                      contract_id: 10
        '202':
          description: The cancellation was requested from Sendcloud Support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PickupCancellationResponse'
              examples:
                CancellationRequested:
                  summary: Cancellation requested from Sendcloud Support
                  value:
                    data:
                      id: 1
                      time_slots:
                        - start_at: '2022-04-06T12:00:00Z'
                          end_at: '2022-04-06T17:00:00Z'
                      address:
                        name: John Doe
                        city: Eindhoven
                        country_code: NL
                        address_line_1: Stadhuisplein
                        house_number: '10'
                        address_line_2: ''
                        postal_code: 5611 EM
                        company_name: Sendcloud
                        email: example@sendcloud.com
                        phone_number: '+310612345678'
                      items:
                        - quantity: 1
                          container_type: parcel
                          total_weight:
                            value: '2.00'
                            unit: kg
                      reference: ''
                      special_instructions: ''
                      tracking_number: PRG220406003404
                      status: CANCELLATION_REQUESTED
                      created_at: '2022-03-30T10:57:02.344479Z'
                      cancelled_at: null
                      carrier_code: brt
                      contract_id: 10
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors'
              examples:
                Unauthorized:
                  summary: Missing or invalid credentials
                  value:
                    errors:
                      - status: '401'
                        code: not_authenticated
                        detail: Unauthorized
        '403':
          description: >-
            Forbidden. The credentials don't have the `write:pickup` scope, or
            pickups aren't available for your account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors'
              examples:
                Forbidden:
                  summary: Forbidden
                  value:
                    errors:
                      - status: '403'
                        code: forbidden
                        detail: You do not have permission to perform this action.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors'
              examples:
                NotFound:
                  summary: Not Found
                  value:
                    errors:
                      - status: '404'
                        code: not_found
                        detail: No Pickup matches the given query.
        '409':
          description: >-
            The pickup can't be canceled. The `detail` explains why, see the
            examples. A pickup gets the status `FAILED` when it couldn't be
            scheduled, or when the carrier didn't confirm an earlier
            cancellation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors'
              examples:
                PickupInThePast:
                  summary: Pickup time has already started
                  value:
                    errors:
                      - status: '409'
                        code: conflict
                        detail: You cannot cancel pickup that is already past.
                AlreadyCancelled:
                  summary: Pickup is already canceled
                  value:
                    errors:
                      - status: '409'
                        code: conflict
                        detail: >-
                          Cannot cancel a pickup that has been already
                          cancelled.
                StillBeingAnnounced:
                  summary: Pickup is still being scheduled
                  value:
                    errors:
                      - status: '409'
                        code: conflict
                        detail: >-
                          Cannot cancel a pickup that is still being announced.
                          Try again later.
                PickupFailed:
                  summary: Pickup has the status FAILED
                  value:
                    errors:
                      - status: '409'
                        code: conflict
                        detail: Cannot cancel a pickup that failed to be announced.
                CarrierDoesNotSupportCancellation:
                  summary: Carrier doesn't support cancellation
                  value:
                    errors:
                      - status: '409'
                        code: conflict
                        detail: >-
                          Cannot cancel a pickup for a carrier that does not
                          support cancellation.
                CancellationNotConfirmed:
                  summary: Carrier didn't confirm the cancellation
                  value:
                    errors:
                      - status: '409'
                        code: conflict
                        detail: >-
                          The carrier did not confirm the cancellation of this
                          pickup.
      security:
        - HTTPBasicAuth: []
        - OAuth2ClientCreds:
            - write:pickup
components:
  schemas:
    PickupCancellationResponse:
      type: object
      properties:
        data:
          oneOf:
            - $ref: '#/components/schemas/brt-pickup-response'
            - $ref: '#/components/schemas/correos-express-pickup-response'
            - $ref: '#/components/schemas/correos-pickup-response'
            - $ref: '#/components/schemas/dhl-de-pickup-response'
            - $ref: '#/components/schemas/dhl-express-pickup-response'
            - $ref: '#/components/schemas/dhl-parcel-gb-pickup-response'
            - $ref: '#/components/schemas/dhl-parcel-iberia-pickup-response'
            - $ref: '#/components/schemas/dhl-pickup-response'
            - $ref: '#/components/schemas/dpd-at-pickup-response'
            - $ref: '#/components/schemas/dpd-pickup-response'
            - $ref: '#/components/schemas/fedex-response'
            - $ref: '#/components/schemas/gls-it-response'
            - $ref: '#/components/schemas/hermes-de-pickup-response'
            - $ref: '#/components/schemas/poste-it-delivery-pickup-response'
            - $ref: '#/components/schemas/ups-pickup-response'
          discriminator:
            propertyName: carrier_code
            mapping:
              brt: '#/components/schemas/brt-pickup-response'
              correos: '#/components/schemas/correos-pickup-response'
              correos_express: '#/components/schemas/correos-express-pickup-response'
              dhl: '#/components/schemas/dhl-pickup-response'
              dhl_de: '#/components/schemas/dhl-de-pickup-response'
              dhl_express: '#/components/schemas/dhl-express-pickup-response'
              dhl_parcel_gb: '#/components/schemas/dhl-parcel-gb-pickup-response'
              dhl_parcel_iberia: '#/components/schemas/dhl-parcel-iberia-pickup-response'
              dpd: '#/components/schemas/dpd-pickup-response'
              dpd_at: '#/components/schemas/dpd-at-pickup-response'
              fedex: '#/components/schemas/fedex-response'
              gls_it: '#/components/schemas/gls-it-response'
              hermes_de: '#/components/schemas/hermes-de-pickup-response'
              poste_it_delivery: '#/components/schemas/poste-it-delivery-pickup-response'
              ups: '#/components/schemas/ups-pickup-response'
    errors:
      title: Errors
      type: object
      description: A standardized format for errors in JSON:API responses.
      properties:
        errors:
          type:
            - array
            - object
          items:
            type: object
            allOf:
              - $ref: '#/components/schemas/ErrorObject'
            required:
              - status
              - code
              - detail
    brt-pickup-response:
      title: BRT Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-request'
        - properties:
            carrier_code:
              type: string
              enum:
                - brt
              description: Pickup carrier code selected by the user.
            address:
              $ref: '#/components/schemas/pickup-address-state-province-required'
              description: Pickup address information.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
    correos-express-pickup-response:
      title: Correos Express Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - correos_express
              description: Pickup carrier code selected by the user.
            address:
              $ref: '#/components/schemas/pickup-address-phone-number-required'
              description: Pickup address information.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
    correos-pickup-response:
      title: Correos Express Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - correos
              description: Pickup carrier code selected by the user.
            address:
              $ref: '#/components/schemas/pickup-address-phone-number-required'
              description: Pickup address information.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
              description: Scheduled time slot for the pickup.
    dhl-de-pickup-response:
      title: DHL Germany Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - dhl_de
              description: Pickup carrier code selected by the user.
            time_slots:
              $ref: '#/components/schemas/time-slot-list'
              description: Scheduled time slot for the pickup.
            items:
              type: array
              items:
                $ref: '#/components/schemas/dhl-de-pickup-item'
                description: Items to be picked up.
    dhl-express-pickup-response:
      title: DHL Express Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - dhl_express
              description: Pickup carrier code selected by the user.
            address:
              $ref: '#/components/schemas/pickup-address-phone-number-required'
              description: Pickup address information.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
    dhl-parcel-gb-pickup-response:
      title: DHL Parcel GB Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - dhl_parcel_gb
              description: Pickup carrier code selected by the user.
    dhl-parcel-iberia-pickup-response:
      title: DHL Parcel Iberia Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - dhl_parcel_iberia
              description: Pickup carrier code selected by the user.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
    dhl-pickup-response:
      title: DHL Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - dhl
              description: Pickup carrier code selected by the user.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
              description: Scheduled time slot for the pickup.
            items:
              type: array
              items:
                $ref: '#/components/schemas/dhl-pickup-item'
                description: Items to be picked up.
    dpd-at-pickup-response:
      title: DPD AT Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - dpd_at
              description: Pickup carrier code selected by the user.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
              description: Scheduled time slot for the pickup.
            items:
              type: array
              items:
                $ref: '#/components/schemas/dpd-at-pickup-item'
                description: Items to be picked up.
    dpd-pickup-response:
      title: DPD Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - dpd
              description: Pickup carrier code selected by the user.
    fedex-response:
      title: Fedex Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - fedex
              description: Pickup carrier code selected by the user.
            address:
              $ref: '#/components/schemas/pickup-address-phone-number-required'
              description: Pickup address information.
            origin_detail:
              $ref: '#/components/schemas/fedex-origin-detail'
    gls-it-response:
      title: GLS Italy Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - gls_it
              description: Pickup carrier code selected by the user.
            address:
              $ref: '#/components/schemas/pickup-address-state-province-required'
              description: Pickup address information.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
              description: >
                Scheduled time slots for the pickup. One or two time slots can
                be defined, one for the morning and one for the afternoon.
              minItems: 1
              maxItems: 2
    hermes-de-pickup-response:
      title: Hermes Germany Pickup Response
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - type: object
          properties:
            carrier_code:
              type: string
              enum:
                - hermes_de
              description: Pickup carrier code selected by the user.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
    poste-it-delivery-pickup-response:
      title: Poste Italiane Delivery Pickup request
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - poste_it_delivery
              description: Pickup carrier code selected by the user.
            address:
              $ref: '#/components/schemas/pickup-address-state-province-required'
              description: Pickup address information.
    ups-pickup-response:
      title: UPS Pickup Object
      type: object
      allOf:
        - $ref: '#/components/schemas/base-pickup-response'
        - properties:
            carrier_code:
              type: string
              enum:
                - ups
              description: Pickup carrier code selected by the user.
            address:
              $ref: '#/components/schemas/pickup-address-phone-number-required'
              description: Pickup address information.
            time_slots:
              $ref: '#/components/schemas/time-slot-list-end-at-required'
            items:
              type: array
              items:
                $ref: '#/components/schemas/ups-pickup-item'
                description: Items to be picked up.
    ErrorObject:
      title: Error
      type: object
      description: Error in a JSON:API error format
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        links:
          type: object
          description: >-
            A set of hyperlinks that provide additional information about the
            error.
          properties:
            about:
              type: string
              description: A URL that provides additional information about the error.
        status:
          type: string
          format: int32
          description: The HTTP status code of the error.
          minLength: 1
        code:
          type: string
          description: A unique error code for the error, in snake case format.
          minLength: 1
          enum:
            - unknown_field
            - invalid
            - forbidden
            - invalid_choice
            - min_value
            - 'null'
            - not_found
            - required
            - not_a_list
            - non_field_errors
            - authentication_failed
            - validation_error
            - parcel_announcement_error
        title:
          type: string
          description: A short, human-readable summary of the error.
          minLength: 1
        detail:
          type: string
          description: A human-readable explanation of the error.
          minLength: 1
        source:
          type: object
          description: >-
            An object that identifies the source of the error within the request
            payload.
          properties:
            pointer:
              type: string
              description: >-
                A `JSON` pointer to the location of the error within the request
                payload.
            parameter:
              type: string
              description: The name of the `query` parameter that caused the error.
            header:
              type: string
              description: The name of the `header` parameter that caused the error.
        meta:
          type: object
          description: Additional metadata about the error.
    base-pickup-request:
      title: Base Pickup request
      type: object
      properties:
        time_slots:
          $ref: '#/components/schemas/time-slot-list'
          minItems: 1
          maxItems: 1
        items:
          type: array
          items:
            $ref: '#/components/schemas/base-pickup-item'
          description: Items scheduled to be picked up.
          minItems: 1
        reference:
          type: string
          description: Reference number for your administration.
          minLength: 0
        special_instructions:
          type: string
          description: Special instructions for the pickup driver.
        carrier_code:
          type: string
          example: dhl_express
          description: Pickup carrier code selected by the user.
        contract_id:
          type:
            - integer
            - 'null'
          description: Contract ID you want to use for the pickup request.
        quantity:
          type: integer
          minimum: 1
          description: Number of parcels to pick up.
        total_weight:
          $ref: '#/components/schemas/str-weight'
          description: Total weight in kilograms.
        address:
          $ref: '#/components/schemas/pickup-address'
          description: Pickup address information.
      required:
        - time_slots
        - quantity
        - total_weight
        - carrier_code
        - address
    pickup-address-state-province-required:
      title: Pickup Address Object
      type: object
      description: Pickup Address object
      allOf:
        - $ref: '#/components/schemas/pickup-address'
        - properties:
            country_code:
              type: string
              example: IT
              description: >-
                Country code of the pickup place according to ISO 3166-1
                alpha-2.
              minLength: 1
            state_province_code:
              type: string
              minLength: 1
              example: IT-RM
              description: >-
                State code of the pickup place according to ISO 3166-2. This
                field is required for certain countries. See [international
                shipping](/docs/shipments/international-shipping#required-fields-for-international-shipments)
                for details.
      required:
        - name
        - address_line_1
        - postal_code
        - city
        - country_code
        - state_province_code
    time-slot-list-end-at-required:
      title: Time Slot List
      type: array
      description: >-
        Scheduled time slots for the pickup. Note that most carriers only
        support a single time slot.
      items:
        type: object
        allOf:
          - $ref: '#/components/schemas/time-slot-end-at-required'
    base-pickup-response:
      title: Base Pickup Object
      type: object
      properties:
        id:
          type: integer
          format: int64
          minimum: 1
          description: Unique identifier of the pickup.
        carrier_code:
          type: string
          example: dhl_express
          description: Pickup carrier code selected by the user.
        time_slots:
          $ref: '#/components/schemas/time-slot-list'
          description: Scheduled time slots for the pickup
          minItems: 1
        items:
          type: array
          items:
            $ref: '#/components/schemas/base-pickup-item'
          description: Items scheduled to be picked up.
          minItems: 1
        reference:
          type: string
          description: Reference number for your administration.
          minLength: 0
        special_instructions:
          type: string
          description: Special instructions for the pickup driver.
          minLength: 0
        tracking_number:
          type: string
          minLength: 0
        status:
          type: string
          description: >-
            The status of the pickup:

            - `null`: no status yet. Only pickups created before the
            `ANNOUNCING` status was introduced can have this. It means the same
            as `ANNOUNCING`.

            - `ANNOUNCING`: Sendcloud has stored the pickup request but hasn't
            sent it to the carrier yet.

            - `CREATED`: the carrier acknowledged the booking and the pickup
            fee, if any, is charged. This doesn't confirm that the parcels were
            collected.

            - `FAILED`: the carrier didn't accept the pickup request, or didn't
            confirm a cancellation.

            - `CANCELLING`: Sendcloud is canceling the pickup with the carrier.

            - `CANCELLED`: the pickup is canceled.

            - `CANCELLATION_REQUESTED`: a cancellation was requested from
            Sendcloud Support, which hasn't handled it yet.

            - `CANCELLATION_FAILED`: Sendcloud Support couldn't cancel the
            pickup with the carrier.

            - `CANCELLATION_REJECTED`: the carrier rejected the cancellation
            request.

            - `COMPLETED`: set automatically once the pickup's start time has
            passed. This isn't a confirmation from the carrier that the parcels
            were collected.


            Some carriers also send their own updates on the pickup:

            - `ACCEPTED`: the carrier accepted the pickup.

            - `EN_ROUTE`: the driver is on the way.

            - `DELAYED`: the carrier reported a delay.

            - `COLLECTED`: the carrier confirmed that the parcels were
            collected.

            - `ACTION_REQUIRED`: the carrier needs action from you before the
            pickup can take place.
          enum:
            - CREATED
            - CANCELLED
            - FAILED
            - ANNOUNCING
            - CANCELLING
            - CANCELLATION_REQUESTED
            - CANCELLATION_FAILED
            - CANCELLATION_REJECTED
            - COMPLETED
            - ACCEPTED
            - EN_ROUTE
            - DELAYED
            - COLLECTED
            - ACTION_REQUIRED
        created_at:
          type: string
          format: date-time
          description: ISO 8601 DateTime at which the pickup is created.
        cancelled_at:
          type:
            - string
            - 'null'
          format: date-time
          description: ISO 8601 DateTime at which the pickup is canceled.
        contract_id:
          type: integer
          description: Id of the contract that is used to create the pickup.
        address:
          $ref: '#/components/schemas/pickup-address'
          description: Pickup address information.
    pickup-address-phone-number-required:
      title: Pickup Address Object
      type: object
      description: Pickup Address object
      allOf:
        - $ref: '#/components/schemas/pickup-address'
        - properties:
            phone_number:
              type: string
              description: Phone number of the contact person in the E.164 format.
      required:
        - name
        - address_line_1
        - postal_code
        - city
        - country_code
        - phone_number
    time-slot-list:
      title: Time Slot List
      type: array
      description: >-
        Scheduled time slots for the pickup. Note that most carriers only
        support a single time slot.
      items:
        type: object
        allOf:
          - $ref: '#/components/schemas/time-slot'
    dhl-de-pickup-item:
      title: DHL DE Pickup Item Object
      type: object
      description: Information about the items to be picked up.
      allOf:
        - $ref: '#/components/schemas/base-pickup-item'
      required:
        - quantity
    dhl-pickup-item:
      title: DHL Pickup Item Object
      type: object
      description: Provides the information about the items to be picked up.
      allOf:
        - $ref: '#/components/schemas/base-pickup-item'
        - properties:
            container_type:
              type: string
              example: parcel
              description: Type of containers to be picked up.
              enum:
                - parcel
                - pallet
      required:
        - quantity
        - container_type
        - total_weight
    dpd-at-pickup-item:
      title: DPD AT Pickup Item Object
      type: object
      description: Provides the information about the items to be picked up.
      allOf:
        - $ref: '#/components/schemas/base-pickup-item'
        - properties:
            container_type:
              type: string
              example: parcel
              description: Type of containers to be picked up.
              enum:
                - parcel
                - pallet
      required:
        - quantity
        - container_type
        - total_weight
    fedex-origin-detail:
      title: Fedex Origin Detail Object
      description: >-
        Descriptive data about the origin of the shipment being picked up by
        FedEx.
      type: object
      properties:
        package_location:
          description: >-
            Provides a location description where the courier/driver will pick
            up the package.
          type: string
          enum:
            - front
            - none
            - rear
            - side
        building_part:
          description: Describe package location building part.
          type: string
          enum:
            - apartment
            - building
            - department
            - floor
            - room
            - suite
        building_part_description:
          description: Additional description of package pickup location.
          type: string
        company_close_time:
          description: >-
            Identifies the latest time at which the driver can gain access to
            pick up the package.
          type: string
          format: time
          example: 17:00:00Z
      required:
        - package_location
        - building_part
        - company_close_time
    ups-pickup-item:
      title: UPS Pickup Item Object
      type: object
      description: Information about the items to be picked up.
      allOf:
        - $ref: '#/components/schemas/base-pickup-item'
        - properties:
            container_type:
              type: string
              example: parcel
              description: Type of containers to be picked up.
              enum:
                - parcel
                - pallet
            destination_country_code:
              type: string
              example: GB
              minLength: 2
              maxLength: 2
              description: Destination country code.
            shipping_option:
              type: string
              example: express
              description: Shipping option for the pickup.
              enum:
                - standard
                - express
                - express_saver
      required:
        - quantity
        - destination_country_code
        - container_type
        - shipping_option
        - total_weight
    base-pickup-item:
      title: Pickup Item Object
      type: object
      description: Information about the items to be picked up.
      properties:
        quantity:
          type: integer
          minimum: 1
          description: Number of items to pick up.
        container_type:
          type: string
          example: parcel
          description: Type of containers to be picked up.
          enum:
            - parcel
        total_weight:
          $ref: '#/components/schemas/str-weight'
          description: Total weight in kilograms.
      required:
        - quantity
        - container_type
        - total_weight
    str-weight:
      title: Weight
      type: object
      description: Weight in the specified unit
      properties:
        value:
          type: string
          description: Weight value
          example: '14.5'
        unit:
          $ref: '#/components/schemas/weight-units'
      required:
        - value
        - unit
    pickup-address:
      title: Pickup Address Object
      type: object
      description: Pickup Address object
      allOf:
        - $ref: '#/components/schemas/address'
        - properties:
            po_box:
              type:
                - string
                - 'null'
              description: Code required in case of PO Box or post locker delivery
              readOnly: true
      required:
        - name
        - address_line_1
        - postal_code
        - city
        - country_code
    time-slot-end-at-required:
      title: Time Slot Object
      type: object
      properties:
        start_at:
          type: string
          format: date-time
          description: Scheduled pickup time in ISO 8601 DateTime format.
        end_at:
          type: string
          format: date-time
          description: >-
            ISO 8601 DateTime of the pickup location close time. This could be
            useful in case the pickup is delayed.
    time-slot:
      title: Time Slot Object
      type: object
      properties:
        start_at:
          type: string
          format: date-time
          description: Scheduled pickup time in ISO 8601 DateTime format.
        end_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            ISO 8601 DateTime of the pickup location close time. This could be
            useful in case the pickup is delayed.
    weight-units:
      type: string
      title: Mass Units Object
      enum:
        - kg
        - g
        - lbs
        - oz
      example: g
    address:
      title: Address Object
      type: object
      description: Sendcloud Address object
      properties:
        name:
          type: string
          example: John Doe
          description: Name of the person associated with the address
          minLength: 1
        company_name:
          type: string
          example: Sendcloud
          description: Name of the company associated with the address
        address_line_1:
          type: string
          example: Stadhuisplein
          description: First line of the address
        house_number:
          type: string
          example: '50'
          description: House number of the address
        address_line_2:
          type: string
          description: Additional address information, e.g. 2nd level
          example: Apartment 17B
        postal_code:
          type: string
          example: 1013 AB
          description: Zip code of the address
          minLength: 1
        city:
          type: string
          example: Eindhoven
          description: City of the address
          minLength: 1
        po_box:
          type:
            - string
            - 'null'
          description: Code required in case of PO Box or post locker delivery
        state_province_code:
          type: string
          example: IT-RM
          description: >-
            The character state code of the customer represented as ISO 3166-2
            code. This field is required for certain countries. See
            [international
            shipping](/docs/shipments/international-shipping#required-fields-for-international-shipments)
            for details.
        country_code:
          type: string
          example: NL
          description: The country code of the customer represented as ISO 3166-1 alpha-2
          minLength: 1
        email:
          type: string
          format: email
          example: johndoe@gmail.com
          description: Email address of the person associated with the address
        phone_number:
          type: string
          example: '+319881729999'
          description: Phone number of the person associated with the address
  securitySchemes:
    HTTPBasicAuth:
      type: http
      description: >-
        Basic Authentication using API key and secrets is currently the main
        authentication mechanism.
      scheme: basic
    OAuth2ClientCreds:
      type: oauth2
      description: >-
        OAuth2 is a standardized protocol for authorization that allows users to
        share their private resources stored on one site with another site
        without having to provide their credentials. OAuth2 Client Credentials
        Grant workflow. This workflow is typically used for server-to-server
        interactions that require authorization to access specific resources.
      flows:
        clientCredentials:
          tokenUrl: https://account.sendcloud.com/oauth2/token/
          scopes:
            read:analytics: View your shipping analytics
            read:audit-log: View your account's audit log
            read:brand: View your brands
            write:brand: Manage your brands
            write:carrier: Configure carriers and contracts
            read:checkout: View your dynamic checkout configurations and templates
            read:event-subscription: View your event subscriptions
            write:event-subscription: Create and manage your event subscriptions
            read:integration: View your integrations
            write:integration: Connect and manage integrations
            read:invoice: View your invoices
            read:notification: View your notifications
            write:notification: Manage your notifications
            read:operational-settings: >-
              View your warehouses, shipping lanes, and other operational
              settings
            write:operational-settings: >-
              Manage your warehouses, shipping lanes, and other operational
              settings
            read:order: View your orders
            write:order: Import and process your orders
            read:organization: View organization settings
            write:organization: Change organization settings
            read:parcel: View your shipments and their tracking status
            write:parcel: Create, announce, and cancel shipments
            read:pickup: View carrier pickups and the options available for scheduling them
            write:pickup: Schedule and manage carrier pickups
            read:price: View shipping prices
            write:product: Manage your product catalog
            read:return: View your returns
            write:return: Create and manage returns
            read:return-settings: View your return settings
            write:return-settings: Configure your return settings
            read:service-point: View carrier service points
            read:shipping-method: View shipping methods, products and prices
            read:shipping-rule: View your shipping rules
            write:shipping-rule: Create and manage shipping rules
            read:support-ticket: View your support tickets
            write:support-ticket: Manage your support tickets
            read:tracking-message: View your tracking notifications
            write:tracking-message: Manage your tracking notifications
            read:tracking-page: View your tracking page
            write:tracking-page: Customize your tracking page
            read:user: Read your basic account information

````

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