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

# Reschedule delivery

> Update the pickup or delivery window, address, or provider for an existing service order. Send delivery as null to cancel a scheduled delivery.



## OpenAPI

````yaml PATCH /service-order/{serviceOrderId}/transportation
openapi: 3.1.0
info:
  title: OpenAPI Cents
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api3.trycents.com/api/v1/common
security: []
paths:
  /service-order/{serviceOrderId}/transportation:
    patch:
      description: >-
        Update the pickup or delivery configuration for an existing service
        order. At least one of pickup or delivery must be provided. Send
        delivery as null to cancel a scheduled delivery.
      parameters:
        - $ref: '#/components/parameters/OriginHeader'
        - name: serviceOrderId
          in: path
          required: true
          schema:
            type: number
          description: ID of the service order to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pickup:
                  type: object
                  properties:
                    deliveryWindow:
                      type: array
                      items:
                        type: number
                      minItems: 2
                      maxItems: 2
                      description: >-
                        Unix timestamps [start, end] representing the delivery
                        window
                    deliveryProvider:
                      type: string
                      enum:
                        - OWN_DRIVER
                        - ON_DEMAND
                      description: Delivery provider for this leg
                    courierTip:
                      type: number
                      nullable: true
                      description: Tip amount for the courier in dollars
                    type:
                      type: string
                      enum:
                        - PICKUP
                        - RETURN
                      description: Whether this is a pickup or return delivery leg
                    centsCustomerAddressId:
                      type: number
                      description: ID of the customer address to use for this leg
                    timingsId:
                      type: number
                      description: ID of the delivery timing slot
                    thirdPartyDeliveryId:
                      type: string
                      nullable: true
                      description: Third-party delivery provider order ID, if applicable
                  required:
                    - deliveryWindow
                    - deliveryProvider
                    - courierTip
                    - type
                    - centsCustomerAddressId
                    - timingsId
                    - thirdPartyDeliveryId
                  description: >-
                    Updated pickup configuration. Omit to leave pickup
                    unchanged.
                delivery:
                  oneOf:
                    - type: object
                      properties:
                        deliveryWindow:
                          type: array
                          items:
                            type: number
                          minItems: 2
                          maxItems: 2
                          description: >-
                            Unix timestamps [start, end] representing the
                            delivery window
                        deliveryProvider:
                          type: string
                          enum:
                            - OWN_DRIVER
                            - ON_DEMAND
                          description: Delivery provider for this leg
                        courierTip:
                          type: number
                          nullable: true
                          description: Tip amount for the courier in dollars
                        type:
                          type: string
                          enum:
                            - PICKUP
                            - RETURN
                          description: Whether this is a pickup or return delivery leg
                        centsCustomerAddressId:
                          type: number
                          description: ID of the customer address to use for this leg
                        timingsId:
                          type: number
                          description: ID of the delivery timing slot
                        thirdPartyDeliveryId:
                          type: string
                          nullable: true
                          description: >-
                            Third-party delivery provider order ID, if
                            applicable
                      required:
                        - deliveryWindow
                        - deliveryProvider
                        - courierTip
                        - type
                        - centsCustomerAddressId
                        - timingsId
                        - thirdPartyDeliveryId
                    - type: 'null'
                  description: >-
                    Updated delivery configuration. Send null to cancel a
                    scheduled delivery. Omit to leave delivery unchanged.
                paymentMethodToken:
                  type: string
                  nullable: true
                  description: Stripe Payment Method ID to charge for any cost difference
      responses:
        '200':
          description: Transportation updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    type: object
                    properties:
                      id:
                        type: number
                        description: Service order ID
                      status:
                        type: string
                        description: Current order status
                      orderTotal:
                        type: number
                        description: Updated order total in dollars
                      netOrderTotal:
                        type: number
                        description: Order total after promotions and credits
                      paymentStatus:
                        type: string
                        description: Payment status of the order
                      pickupDeliveryFee:
                        type: number
                        description: Updated pickup delivery fee in dollars
                      returnDeliveryFee:
                        type: number
                        description: Updated return delivery fee in dollars
        '400':
          description: >-
            Order cannot be rescheduled — status is CANCELLED, COMPLETED, or
            EN_ROUTE_TO_CUSTOMER
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Service order not found or does not belong to the authenticated
            customer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Validation error — neither pickup nor delivery provided, or invalid
            field values
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    OriginHeader:
      name: fwdorigin
      in: header
      required: true
      schema:
        type: string
        default: DISPATCH_API
        enum:
          - DISPATCH_API
  schemas:
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````