How do I debug a Quickbooks Create Sales receipt JSON parse error?

Hi,

I am getting the following error message from a Quickbooks create sales receipt module: The operation failed with an error. ValidationFault: Request has invalid or unsupported property (Property Name:failed to parse json object; a property specified is unsupported or invalid)

Is there a way to get more specific detail on what is not passing validation?

The JSON input into the module is:

[
    {
        "Line": [
            {
                "Qty": 1,
                "Amount": 23.8,
                "ItemRef": "94",
                "ClassRef": null,
                "UnitPrice": 23.8,
                "TaxCodeRef": {
                    "value": "6",
                    "name": "20.0% S"
                },
                "Description": "Pureology Hydrate Shampoo 266ml"
            },
            {
                "Qty": 1,
                "Amount": 24.5,
                "ItemRef": "398",
                "ClassRef": null,
                "UnitPrice": 24.5,
                "TaxCodeRef": {
                    "value": "6",
                    "name": "20.0% S"
                },
                "Description": "Davines Oi All in One Milk 135ml"
            },
            {
                "Qty": 1,
                "Amount": 26.84,
                "ItemRef": "133",
                "ClassRef": null,
                "UnitPrice": 26.84,
                "TaxCodeRef": {
                    "value": "6",
                    "name": "20.0% S"
                },
                "Description": "MOROCCANOIL Curl Defining Cream 250ml"
            }
        ],
        "TxnDate": "2023-12-18T22:22:00.000Z",
        "discount": {},
        "DocNumber": "888888",
        "CurrencyRef": "GBP",
        "CustomerRef": "406",
        "ShipFromAddr": {},
        "TxnTaxDetail": {},
        "PaymentMethodRef": "3",
        "DepositToAccountRef": "9",
        "GlobalTaxCalculation": "TaxInclusive"
    }
]

Many thanks for any help!!

Welcome to the Make community!

It is likely that the quotes are invalid because they are angled/smart quotes like this “Line” instead of "Line".

In future, could you format JSON code before submitting the post, otherwise the forum software will convert some characters to make them invalid (checked when pasted into https://jsonformatter.org)

1.

Could you format your JSON by editing three backticks ``` before and after the code, like this:

```
input/output bundle goes here
```

2.

or use the format code button in the editor:
Screenshot_2023-10-02_191027

3 Likes

OK so it turns out that it was the TaxCodeRef property. Changing it to just value rather than value and name has fixed it. Only took a whole day of trail and error to resolve it! Its a shame that Quickbooks error reporting would not give any clue as to what the cause was!

3 Likes

Hi @Nick_W welcome to the community :wave:

I just want to quickly say awesome work figuring this one out :clap: Trial and error can be the best teachers sometimes.

Thanks a lot for stepping back into the community and sharing what did the final trick for you. Your contribution is much appreciated and could be super helpful to others searching for similar information down the road :pray:

2 Likes