Patch Subscription: INVALID_REQUEST error

jjkk1232
Contributor
Contributor

I can successfully create a subscription. But, when I try to patch it using the example provided in PayPal Subscriptions API:

 

curl -v -X PATCH https://api.sandbox.paypal.com/v1/billing/subscriptions/I-BW452GLLEP1G \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token" \ -d '[ { "op": "replace", "path": "/status_change_note", "value": "Item out of stock" } ]'

 

Note: in my example, I use my Subscription_ID and Access-Token. I got the  INVALID_REQUEST error. Here is the detailed error message:

{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"debug_id": "f26d92212b103",
"details": [
{
"field": "/0/path",
"value": "/status_change_note",
"location": "body",
"issue": "INVALID_PATCH_PATH",
"description": "Specified field cannot be patched"
}
],
"links": [
{
"href": "https://developer.paypal.com/docs/api/v1/billing/subscriptions#INVALID_REQUEST",
"rel": "information_link",
"method": "GET"
}
]
}

I also tried to change the start_time field using the path: "/start_time", but got the same error. The path seems correct, and why does not work?

 

 

 

 

 

 

 

Login to Me Too
1 REPLY 1

mlkju
Contributor
Contributor
Nici la mine nu merge
Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.