cancel
Showing results for 
Search instead for 
Did you mean: 

v2 - update/patch Order - INVALID_JSON_POINTER_FORMAT

Options
gcpman
Contributor

Thanks. This worked.

However I'm now dealing with an issue where clicking the cart at the top to view the items refreshes the Iframe and removes my shipping selection options. If I change my shipping the options reload. I get a receive::req checkClose() event when clicking the cart

v2 - update/patch Order - INVALID_JSON_POINTER_FORMAT

Options
LeviPike
Contributor

I am having trouble on this end, too. When I want to patch an order I always receive 

REFERENCE_ID_NOT_FOUND

as an error. It does not matter, if I use 'defaul', the orders internal refrence id or the paypal transactionId as reference_id. The answer is always the same. 

Here is the call:

 

 

 

[{
    "op": "replace",
    "path": "\/purchase_units\/@reference_id=='default'",
    "value": [{
        "reference_id": "2295037",
        "description": "Your order at Shop",
        "custom_id": "Shop Id 2295037",
        "soft_descriptor": "Shopname",
        "invoice_id": "2295037",
        "amount": {
            "currency_code": "EUR",
            "value": 59.98,
            "breakdown": {
                "item_total": {
                    "currency_code": "EUR",
                    "value": 50.4
                },
                "shipping": {
                    "currency_code": "EUR",
                    "value": 0
                },
                "discount": {
                    "currency_code": "EUR",
                    "value": 0
                },
                "tax_total": {
                    "currency_code": "EUR",
                    "value": 9.58
                }
            }
        },
        "items": [{
            "name": "Product 1",
            "description": "Product Descr. 1",
            "sku": "1019879",
            "unit_amount": {
                "currency_code": "EUR",
                "value": 16.8
            },
            "tax": {
                "currency_code": "EUR",
                "value": 3.19
            },
            "quantity": "1",
            "category": "PHYSICAL_GOODS"
        }, {
            "name": "Product 2",
            "description": "Product Descr. 2",
            "sku": "1024593",
            "unit_amount": {
                "currency_code": "EUR",
                "value": 33.61
            },
            "tax": {
                "currency_code": "EUR",
                "value": 6.38
            },
            "quantity": "1",
            "category": "PHYSICAL_GOODS"
        }],
        "shipping": {
            "name": {
                "full_name": "John Doe"
            },
            "address": {
                "address_line_1": "Badensche Str. 24",
                "address_line_2": "",
                "admin_area_2": "Berlin",
                "postal_code": "10715",
                "country_code": "DE"
            }
        }
    }]
}]

 

 

 

 

And the reply is always: REFERENCE_ID_NOT_FOUND

v2 - update/patch Order - INVALID_JSON_POINTER_FORMAT

Options
LeviPike
Contributor

Turned out, that I made a mistake by accidently sending value as an array of objects (should be object only)

 

Using the provided shops orderId as reference in the path worked then:

 

 

    "path": "\/purchase_units\/@reference_id=='2295037'",    
    "value": {
        "reference_id": "2295037",

 

Haven't Found your Answer?

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