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

# Update or cancel tracking information for an order

> Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects:<br/><br/><table><thead><th>Attribute</th><th>Op</th><th>Notes</th></thead><tbody></tr><tr><td><code>items</code></td><td>replace</td><td>Using replace op for <code>items</code> will replace the entire <code>items</code> object with the value sent in request.</td></tr><tr><td><code>notify_payer</code></td><td>replace, add</td><td></td></tr><tr><td><code>status</code></td><td>replace</td><td>Only patching status to CANCELLED is currently supported.</td></tr></tbody></table>



## OpenAPI

````yaml /api-reference/openapi-orders.json patch /v2/checkout/orders/{id}/trackers/{tracker_id}
openapi: 3.0.4
info:
  title: Orders
  description: >-
    An order represents a payment between two or more parties. Use the Orders
    API to create, update, retrieve, authorize, and capture orders.
  version: '2.32'
servers:
  - url: https://api-m.paypal.com
    description: Server for https scheme.
security: []
tags:
  - name: externalcallback
    description: >-
      PayPal will use the callback url defined in the create order request to
      send merchants shipping address and shipping options data while the buyer
      is in the PayPal checkout.
  - name: orders
    description: >-
      Use the `/orders` resource to create, update, retrieve, authorize, capture
      and track orders.
  - name: trackers
    description: >-
      Use the `/trackers` resource to update and retrieve tracking information
      for PayPal orders.
externalDocs:
  url: ../doc/USERGUIDE.md
paths:
  /v2/checkout/orders/{id}/trackers/{tracker_id}:
    patch:
      tags:
        - trackers
      summary: Update or cancel tracking information for an order
      description: >-
        Updates or cancels the tracking information for a PayPal order, by ID.
        Updatable attributes or
        objects:<br/><br/><table><thead><th>Attribute</th><th>Op</th><th>Notes</th></thead><tbody></tr><tr><td><code>items</code></td><td>replace</td><td>Using
        replace op for <code>items</code> will replace the entire
        <code>items</code> object with the value sent in
        request.</td></tr><tr><td><code>notify_payer</code></td><td>replace,
        add</td><td></td></tr><tr><td><code>status</code></td><td>replace</td><td>Only
        patching status to CANCELLED is currently
        supported.</td></tr></tbody></table>
      operationId: orders.trackers.patch
      parameters:
        - name: id
          description: >-
            The ID of the order that the tracking information is associated
            with.
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 36
            pattern: ^[A-Z0-9]+$
          examples:
            example:
              value: 5O190127TN364715T
              summary: Example id value
              description: An example value for the id parameter.
        - name: tracker_id
          description: The order tracking ID.
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 36
            pattern: ^[A-Z0-9]+$
          examples:
            example:
              value: 8MC585209K746392H443844607820
              summary: Example tracker_id value
              description: An example value for the tracker_id parameter.
        - $ref: '#/components/parameters/authorization'
        - $ref: '#/components/parameters/paypal_auth_assertion'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/patch_request'
            examples:
              orders_trackers_patch_add_notify-payer:
                summary: Patch Tracking Information - Add Notification for a Shipment.
                description: >-
                  Updates an order tracking information to add notification for
                  a shipment.
                value:
                  - op: add
                    path: /notify_payer
                    value: true
              orders_trackers_patch_replace_status:
                summary: >-
                  Patch Tracking Information - Replace the Status of the
                  Tracker.
                description: >-
                  Updates order tracking information to replace the existing
                  status with a new status.
                value:
                  - op: replace
                    path: /status
                    value: CANCELLED
              trackers_patch_422_cannot_patch_cancelled_tracker:
                summary: >-
                  Patch Tracking Information - 422 UNPROCESSABLE ENTITY Error -
                  Cannot patch cancelled tracker.
                description: >-
                  This code sample attempts to update an order's Tracking
                  information but the request fails as the tracker had been
                  previously transitioned into the "cancelled" state.
                value:
                  - op: replace
                    path: items
                    value:
                      - name: T-Shirt
                        sku: sku01
                        quantity: '1'
                        upc:
                          type: UPC-A
                          code: upc001
                        image_url: https://www.example.com/example1.jpg
                        url: https://www.example.com/example
                      - name: NeoPhone
                        sku: sku02
                        quantity: '2'
                        upc:
                          type: UPC-A
                          code: upc002
                        image_url: https://www.example.com/example2.jpg
                        url: https://www.example.com/example
      responses:
        '204':
          $ref: '#/components/responses/204_response'
        '400':
          description: >-
            Request is not well-formed, syntactically incorrect, or violates
            schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              examples:
                trackers_patch_400_invalid_patch_value:
                  summary: >-
                    Patch Tracking Information - 400 Bad Request Error - Invalid
                    Request.
                  description: >-
                    This code sample attempts to update an order tracking
                    information to replace notify_payer, but the request fails
                    due to invalid value in the request.
                  value:
                    name: INVALID_REQUEST
                    message: >-
                      Request is not well-formed, syntactically incorrect, or
                      violates schema.
                    debug_id: 2f541ace12987
                    details:
                      - field: /notify_payer
                        issue: INVALID_PARAMETER_VALUE
                        description: The value of a field is invalid.
                        location: body
                    links:
                      - href: >-
                          https://developer.paypal.com/docs/api/orders/v2/#error-INVALID_PARAMETER_VALUE
                        rel: information_link
                        method: GET
        '401':
          $ref: '#/components/responses/401_error_response'
        '403':
          $ref: '#/components/responses/403_error_response'
        '404':
          $ref: '#/components/responses/404_error_response'
        '422':
          description: >-
            The requested action could not be performed, semantically incorrect,
            or failed business validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
              examples:
                trackers_patch_422_cannot_patch_cancelled_tracker:
                  summary: >-
                    Patch Tracking Information - 422 UNPROCESSABLE ENTITY Error
                    - Cannot patch cancelled tracker.
                  description: >-
                    This code sample attempts to update an order's Tracking
                    information but the request fails as the tracker had been
                    previously transitioned into the "cancelled" state.
                  value:
                    name: UNPROCESSABLE_ENTITY
                    message: >-
                      The requested action could not be performed, semantically
                      incorrect, or failed business validation.
                    debug_id: 3178dbf457625
                    details:
                      - field: path
                        value: /status
                        location: body
                        issue: CANNOT_PATCH_CANCELLED_TRACKER
                        description: Cancelled trackers cannot be modified.
                    links:
                      - href: >-
                          https://developer.paypal.com/docs/api/orders/v2/#error-NOT_PATCHABLE
                        rel: information_link
                        method: GET
        '500':
          $ref: '#/components/responses/500_error_response'
        default:
          $ref: '#/components/responses/default_response'
      security:
        - Oauth2:
            - https://uri.paypal.com/services/payments/payment
components:
  parameters:
    authorization:
      name: Authorization
      in: header
      description: Holds authorization information for external API calls.
      required: false
      schema:
        $ref: '#/components/schemas/standard_header_schema'
      examples:
        bearer:
          summary: Bearer authorization.
          description: >-
            An authorization header with information for the Bearer
            authorization scheme. The authorization parameter value is
            randomized for this example.
          value: >-
            Bearer
            A21AAGHr9qtiRRXH4oYcQokQgV99rGqEIfgrr8xHCclP0OzmD9KVgg5ppIIg1jzJgQkV4wd02svIvBJyg6cLFJjFow_SjBhxQ
    paypal_auth_assertion:
      name: PayPal-Auth-Assertion
      in: header
      description: >-
        Header for an API client-provided JWT assertion that identifies the
        merchant. Establishing the consent to act-on-behalf of a merchant is a
        prerequisite for using this header.
      required: false
      schema:
        description: >-
          Header for an API client-provided JWT assertion that identifies the
          merchant. Establishing the consent to act-on-behalf of a merchant is a
          prerequisite for using this header.
        type: string
        minLength: 1
        maxLength: 10000
        pattern: ^.*$
      examples:
        auth_assertion:
          summary: An auth assertion.
          description: A paypal-auth-assertion header with a randomized value.
          value: eyJhbGciOiJub25lIn0.eyJlbWFpbCI6Im15QGVtYWlsLmNvbSJ9
  schemas:
    patch_request:
      title: Patch Request
      description: An array of JSON patch objects to apply partial updates to resources.
      type: array
      minItems: 0
      maxItems: 32767
      items:
        allOf:
          - $ref: '#/components/schemas/patch'
          - title: patch
    error:
      title: Error
      description: The error details.
      type: object
      required:
        - debug_id
        - message
        - name
      properties:
        name:
          description: The human-readable, unique name of the error.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        message:
          description: The message that describes the error.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        debug_id:
          description: The PayPal internal ID. Used for correlation purposes.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        details:
          description: An array of additional details about the error.
          type: array
          minItems: 0
          maxItems: 32767
          items:
            allOf:
              - $ref: '#/components/schemas/error_details'
              - title: error_details
        links:
          description: >-
            An array of request-related [HATEOAS
            links](/api/rest/responses/#hateoas-links).
          type: array
          minItems: 0
          maxItems: 32767
          readOnly: true
          items:
            allOf:
              - $ref: '#/components/schemas/link_description'
              - title: link_description
                readOnly: true
    standard_header_schema:
      title: Schema Object for standard headers
      description: >-
        Standard headers are generally less restrictive in structure due to
        historical precedent across browsers, etc. This is a common schema for
        use in defining most standard headers.
      type: string
      minLength: 1
      maxLength: 16000
      pattern: ^.*$
    patch:
      title: Patch
      description: The JSON patch object to apply partial updates to resources.
      type: object
      required:
        - op
      properties:
        op:
          description: The operation.
          type: string
          enum:
            - add
            - remove
            - replace
            - move
            - copy
            - test
        path:
          description: >-
            The <a href="https://tools.ietf.org/html/rfc6901">JSON Pointer</a>
            to the target document location at which to complete the operation.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        value:
          title: Patch Value
          description: >-
            The value to apply. The <code>remove</code>, <code>copy</code>, and
            <code>move</code> operations do not require a value. Since <a
            href="https://www.rfc-editor.org/rfc/rfc6902">JSON Patch</a> allows
            any type for <code>value</code>, the <code>type</code> property is
            not specified.
        from:
          description: >-
            The <a href="https://tools.ietf.org/html/rfc6901">JSON Pointer</a>
            to the target document location from which to move the value.
            Required for the <code>move</code> operation.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
    error_details:
      title: Error Details
      description: The error details. Required for client-side `4XX` errors.
      type: object
      required:
        - issue
      properties:
        field:
          description: >-
            The field that caused the error. If this field is in the body, set
            this value to the field's JSON pointer value. Required for
            client-side errors.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        value:
          description: The value of the field that caused the error.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        location:
          description: >-
            The location of the field that caused the error. Value is `body`,
            `path`, or `query`.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
          default: body
        issue:
          description: The unique, fine-grained application-level error code.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        links:
          description: >-
            An array of request-related [HATEOAS
            links](/api/rest/responses/#hateoas-links) that are either relevant
            to the issue by providing additional information or offering
            potential resolutions.
          type: array
          minItems: 1
          maxItems: 4
          readOnly: true
          items:
            allOf:
              - $ref: '#/components/schemas/link_description'
              - title: link_description
                readOnly: true
        description:
          description: >-
            The human-readable description for an issue. The description can
            change over the lifetime of an API, so clients must not depend on
            this value.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
    link_description:
      title: Link Description
      description: >-
        The request-related [HATEOAS link](/api/rest/responses/#hateoas-links)
        information.
      type: object
      required:
        - href
        - rel
      properties:
        href:
          description: >-
            The complete target URL. To make the related call, combine the
            method with this [URI
            Template-formatted](https://tools.ietf.org/html/rfc6570) link. For
            pre-processing, include the `$`, `(`, and `)` characters. The `href`
            is the key HATEOAS component that links a completed call with a
            subsequent call.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        rel:
          description: >-
            The [link relation
            type](https://tools.ietf.org/html/rfc5988#section-4), which serves
            as an ID for a link that unambiguously describes the semantics of
            the link. See [Link
            Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml).
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        method:
          description: The HTTP method required to make the related call.
          type: string
          enum:
            - GET
            - POST
            - PUT
            - DELETE
            - HEAD
            - CONNECT
            - OPTIONS
            - PATCH
        title:
          description: The link title.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        mediaType:
          title: media_type
          description: >-
            The media type, as defined by [RFC
            2046](https://www.ietf.org/rfc/rfc2046.txt). Describes the link
            target.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        encType:
          title: enc_type
          description: The media type in which to submit the request data.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
          default: application/json
        schema:
          allOf:
            - $ref: '#/components/schemas/link_schema'
            - description: The schema that describes the request data.
        targetSchema:
          allOf:
            - $ref: '#/components/schemas/link_schema'
            - title: target_schema
              description: The schema that describes the link target.
    link_schema:
      title: Link Schema
      description: The request data or link target.
      type: object
      properties:
        additionalItems:
          title: additional_items
          description: Any additional items.
          type: object
        dependencies:
          title: Dependencies
          description: The dependencies.
          type: object
        items:
          title: Items
          description: An item.
          type: object
        definitions:
          title: Definitions
          description: Definitions.
          type: object
        patternProperties:
          title: pattern_properties
          description: The pattern properties.
          type: object
        properties:
          title: Properties
          description: The properties.
          type: object
        allOf:
          title: all_of
          description: >-
            An array of sub-schemas. The data must validate against all
            sub-schemas.
          type: array
          minItems: 0
          maxItems: 32767
          items:
            title: all_of_item
            description: A sub-schema against which the data must validate.
            type: object
        anyOf:
          title: any_of
          description: >-
            An array of sub-schemas. The data must validate against one or more
            sub-schemas.
          type: array
          minItems: 0
          maxItems: 32767
          items:
            title: any_of_item
            description: A sub-schema against which the data must validate.
            type: object
        oneOf:
          title: one_of
          description: >-
            An array of sub-schemas. The data must validate against one
            sub-schema.
          type: array
          minItems: 0
          maxItems: 32767
          items:
            title: one_of_item
            description: A sub-schema against which the data must validate.
            type: object
        not:
          title: Not
          description: Not.
          type: object
        links:
          description: An array of links.
          type: array
          minItems: 0
          maxItems: 32767
          readOnly: true
          items:
            title: link
            description: A link.
            type: object
            readOnly: true
        fragmentResolution:
          title: fragment_resolution
          description: The fragment resolution.
          type: string
          minLength: 0
          maxLength: 2147483647
          pattern: ^[\S\s]*$
        media:
          title: Media
          description: The media type and context-encoding scheme.
          type: object
          properties:
            type:
              description: >-
                The media type. See [Multipurpose Internet Mail Extensions
                (MIME) Part Two: Media
                Types](https://tools.ietf.org/html/rfc2046).
              type: string
              minLength: 0
              maxLength: 2147483647
              pattern: ^[\S\s]*$
            binaryEncoding:
              title: binary_encoding
              description: >-
                The content-encoding scheme. See [Multipurpose Internet Mail
                Extensions (MIME) Part One: Format of Internet Message
                Bodies](https://tools.ietf.org/html/rfc2045).
              type: string
              minLength: 0
              maxLength: 2147483647
              pattern: ^[\S\s]*$
        pathStart:
          title: path_start
          description: >-
            To apply this schema to the instances' URIs, start the URIs with
            this value.
          type: string
          minLength: 0
          maxLength: 2147483647
          format: uri
  responses:
    204_response:
      description: No Content.
    401_error_response:
      description: Unauthorized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Generic 'Unauthorized' error.
              description: Example response for unauthorized request.
              value:
                name: AUTHENTICATION_FAILURE
                debug_id: b1d1f06c7246c
                message: >-
                  Authentication failed due to missing Authorization header, or
                  invalid authentication credentials.
    403_error_response:
      description: Forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Generic 'Forbidden' error.
              description: Example response for a forbidden request.
              value:
                name: NOT_AUTHORIZED
                debug_id: b1d1f06c7246c
                message: Authorization failed due to insufficient permissions.
    404_error_response:
      description: Not Found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Generic 'Not Found' error.
              description: >-
                Example response for a request to a resource that does not
                exist.
              value:
                name: RESOURCE_NOT_FOUND
                debug_id: b1d1f06c7246c
                message: The specified resource does not exist.
    500_error_response:
      description: Internal Server Error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Generic internal server error.
              description: >-
                Example response for a request that fails for reasons internal
                to the server.
              value:
                name: INTERNAL_SERVER_ERROR
                debug_id: b1d1f06c7246c
                message: An internal server error has occurred.
    default_response:
      description: Default response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            generic:
              summary: Default response.
              description: >-
                Example catch all response, should not be encountered in
                practice.
              value:
                name: INTERNAL_SERVER_ERROR
                debug_id: b1d1f06c7246c
                message: An internal server error has occurred.
  securitySchemes:
    Oauth2:
      type: oauth2
      description: Oauth 2.0 authentication
      flows:
        clientCredentials:
          tokenUrl: https://api-m.paypal.com/v1/oauth2/token
          scopes:
            https://uri.paypal.com/services/payments/payment: Manage payments and checkout workflow.
            https://uri.paypal.com/services/payments/payment/reference-transaction: Permission to initiate reference transaction
            https://uri.paypal.com/services/payments/initiatepayment: Initiates payments and checkout workflows.
            https://uri.paypal.com/services/payments/orders/deprecating-jssdk-migration-for-limited-merchants: >-
              Allows client-side integration on Create, Get, Patch, Authorize &
              Capture Order endpoints.
            https://uri.paypal.com/services/payments/orders/client_sdk_orders_api: >-
              Enables secure client-side integration on confirm payment source
              endpoint
            https://uri.paypal.com/services/payments/orders/provision-card: Manage card provisioning merchants.

````