What json value do you send to the end point to link items with tax rates. I currently have this and its not working.
- $curl=curl_init('https://sandbox.dev.clover.com/v3/merchants/{MID}/category_items');
- curl_setopt($curl, CURLOPT_HTTPHEADER, array(
- "Authorization:Bearer " . $accessToken,
- 'Content-Type: application/json',
- )
- );
- $data = "{ "elements": [ { "taxRates": {"id": "abc"}, "item": {"id": "123"} } ] }";
- curl_setopt( $curl, CURLOPT_POST, true );
- curl_setopt( $curl, CURLOPT_POSTFIELDS, $data);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- $auth = curl_exec($curl);
- $info = curl_getinfo($curl);
- $result=json_decode($auth, true);
I am getting the error invalid value in json.