Ta. Both the admin panel test and cart request seem to include dimensions. It seems the bug is that the weight is being sent as 250kg for the letter but .250kg for the package … that said it works ok for the admin panel test. Saids that service code is wrong, but it is the same service code for the admin panel test!!! Maybe it is that the cart test adds a decimal point and the admin panel test doesn’t.
Letter no work
Requests (Shipping request)
URL: https://digitalapi.auspost.com.au/postage/letter/domestic/calculate.json
Request: array ( ‘country_code’ => ‘AU’, ‘service_code’ => ‘AUS_LETTER_REGULAR_LARGE_500’, ‘weight’ => 250.0, ‘from_postcode’ => ‘5114’, ‘to_postcode’ => ‘5114’, ‘length’ => 1, ‘width’ => 1, ‘height’ => 1, )
Response: {“error”:{“errorMessage”:“Please enter a valid Service code.”}}
Shipping: aup
Package works
Requests (http/https request)
URL: https://digitalapi.auspost.com.au/postage/parcel/domestic/calculate.json
Request: ‘country_code=AU&service_code=AUS_PARCEL_REGULAR_PACKAGE_SMALL&weight=0.25&from_postcode=5114&to_postcode=5000&length=1&width=1&height=1’
Response: {“postage_result”:{“service”:“Small”,“delivery_time”:“Delivered in 2-3 business days”,“total_cost”:“10.60”,“costs”:{“cost”:{“item”:“Small”,“cost”:“10.60”}}}}
Admin panel test (works)
Requests (http/https request)
URL: https://digitalapi.auspost.com.au/postage/letter/domestic/calculate.json
Request: ‘country_code=AU&service_code=AUS_LETTER_REGULAR_LARGE_500&weight=500&from_postcode=5114&to_postcode=5000&length=10&width=10&height=10’
Response: {“postage_result”:{“service”:“Large Letter”,“delivery_time”:“Delivered in 2 to 3 business days, dependent on point of origin and destination”,“total_cost”:“6.00”,“costs”:{“cost”:{“item”:“Large Letter”,“cost”:“6.00”}}}}