submitTracking error 411 Length Required
sandism opened this issue · comments
Sandis commented
$api->submitTracking(array('params' =>
array(
'shop_id' => $shop,
'receipt_id' => $receipt,
'tracking_code' => $code,
'carrier_name' => $carrier,
)));
response
Fatal error: Uncaught Etsy\EtsyRequestException: [1]:### Invalid auth/bad request (got a 411, expected HTTP/1.1 20X or a redirect): Array ( ) <title>Error 411 (Length Required)!!1
Robert Van Der Kley commented
I am receiving the same issue. Any resolve to this?
Kshitij Verma commented
Hi sandism,
You need to put post content in data index for post/put request. Please refer below code:
$return = $this->api->submitTracking(
array(
'params' => array(
"receipt_id"=> "16999999",
),
'data' => array(
"tracking_code"=>"9400109202020999999999",
"carrier_name"=> "4px",
)
)
);
print_r($return);
Please let me know if you need any help.
Thanks
Kshitij