JSON format for Updating Order

JoeyVM
Contributor
Contributor

Im using REST api to create, approve and complete orders successfully.

 

Having issue with update order process: Debug id:

90ee44e949a22

 

I have tried many formats to send the patch body to no avail.  Trying to update the amount.

 

{
"additional_properties": "xxxxxx",
"body": {
"op": "xxxxxx",
"path": "xxxxxx",
"value": {
"currency_code": "xxxxxx",
"value": "xxxxxx"
}
},
"header": {
"accept": "application/json",
"accept-encoding": "identity",
"accept-language": "en_CA",
"akamai-x-forwarded-for-7": "xxxxxx",
"authorization": "xxxxx",
"client-auth": "xxxxx",
"client_info": "xxxxxx",
"content-length": "136",
"content-type": "application/json; charset=utf-8",
"correlation-id": "90ee44e949a22",
"edge-locator": "xxxxxx",
"edgeid": "xxxxxx",
"host": "api.sandbox.paypal.com",
"paypal-request-id": "c2e51b85-3ac8-4eba-9e22-cdc6c5e4bbaa",
"paypal-routing-metadata": "xxxxxx",
"pp_client_ssl_cipher": "ECDHE-RSA-AES128-GCM-SHA256",
"pp_client_ssl_protocol": "TLSv1.2",
"pp_geo_loc": "CA",
"pp_remote_addr": "156.34.171.36",
"pp_vip": "173.0.93.165",
"user-agent": "Dalvik/2.1.0 (Linux; U; Android 10; SM-G960W Build/QP1A.190711.020)",
"x-forwarded-for": "10.96.32.95",
"x-forwarded-proto": "xxxxxx",
"x-paypal-correlation-id": "90ee44e949a22",
"x-pp-corrid": "90ee44e949a22",
"x-pp-idempotencyid": "90ee44e949a22_1673634260",
"x-pp-slingshot-targetapp": "apiplatformproxyserv",
"x-sigsci-agentresponse": "xxxxxx",
"x-sigsci-mac": "xxxxxx",
"x-sigsci-requestid": "xxxxxx",
"x-slr-orig-script_uri": "https://api.sandbox.paypal.com/v2/checkout/orders/2SN79655SP690570N"
},
"method": "PATCH"
}

 

response:

The request JSON is not well formed.

ppuor.path = @"\/purchase_units\/@reference_id==\'default\'\/amount";   is my path value

Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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