Skip to main content
PATCH
/
v2
/
checkout
/
orders
/
{id}
curl --request PATCH \
  --url https://api-m.paypal.com/v2/checkout/orders/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
[
  {
    "op": "replace",
    "path": "/purchase_units/@reference_id=='PUHF'/shipping/address",
    "value": {
      "address_line_1": "2211 N First Street",
      "address_line_2": "Building 17",
      "admin_area_2": "San Jose",
      "admin_area_1": "CA",
      "postal_code": "95131",
      "country_code": "US"
    }
  }
]
EOF
{
  "name": "INVALID_REQUEST",
  "details": [
    {
      "field": "/purchase_units/@reference_id=='Reference ID 2'/shipping/address",
      "value": "x",
      "location": "body",
      "issue": "INVALID_PARAMETER_SYNTAX",
      "description": "The value of a field does not conform to the expected format."
    }
  ],
  "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
  "debug_id": "f087ef02ffdb6",
  "links": [
    {
      "href": "https://developer.paypal.com/api/orders/v2/#error-INVALID_PARAMETER_SYNTAX",
      "rel": "information_link",
      "method": "GET"
    }
  ]
}

Authorizations

Authorization
string
header
required

Oauth 2.0 authentication

Headers

Authorization
string

Holds authorization information for external API calls. 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.

Required string length: 1 - 16000
PayPal-Auth-Assertion
string

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 string length: 1 - 10000

Path Parameters

id
string
required

The ID of the order to update.

Required string length: 1 - 36

Body

application/json
Maximum array length: 32767
op
enum<string>
required

The operation.

Available options:
add,
remove,
replace,
move,
copy,
test
path
string

The JSON Pointer to the target document location at which to complete the operation.

Maximum string length: 2147483647
value
any

The value to apply. The remove, copy, and move operations do not require a value. Since JSON Patch allows any type for value, the type property is not specified.

from
string

The JSON Pointer to the target document location from which to move the value. Required for the move operation.

Maximum string length: 2147483647

Response

No Content.