mindfulsoftware / myFastway.ApiClient

Client for the myFastway API
13 stars 4 forks source link

Can a myFastway Australian (scope AUS) account provide international shipment quotes #15

Closed Janesh1 closed 3 years ago

Janesh1 commented 3 years ago

@mindfulsoftware

I have noticed when l try and calculate a cost for an International shipment it will provide the following error code.

Example used ship to destination New Zealand.

[body] => {"errors":[{"code":"GEO_ADDR_VAL","path":"","message":"Address validation failed, zero matches found (address supplied: 3 Poppy Lane , Albert Town Otago 9305, NZ)","suggestedValues":null}]}

Upon testing this with a New Zealand account and scope the address is in fact correct and will provide a shipping quote.

Can you please advise if International shipments are available for either origin Australia or New Zealand?

We don't have a myFastway rep to ask this question as we are not myfastway customers, we are just developing a plugin. Screen Shot 2021-02-17 at 3 25 50 pm

Janesh1 commented 3 years ago

If international deliveries are not provided can the error code be updated with a correct response.

Example: myFastway user account does not have permission to ship internationally

I do not feel that the response is relevant, it implies that the address is incorrect.

[body] => {"errors":[{"code":"GEO_ADDR_VAL","path":"","message":"Address validation failed, zero matches found (address supplied: 3 Poppy Lane , Albert Town Otago 9305, NZ)","suggestedValues":null}]} [response] => Array ( [code] => 400 [message] => Bad Request )

[cookies] => Array
    (
    )

[filename] => 
[http_response] => WP_HTTP_Requests_Response Object
    (
        [response:protected] => Requests_Response Object
            (
                [body] => {"errors":[{"code":"GEO_ADDR_VAL","path":"","message":"Address validation failed, zero matches found (address supplied: 3 Poppy Lane , Albert Town Otago 9305, NZ)","suggestedValues":null}]}
                [raw] => HTTP/1.1 400 Bad Request

Transfer-Encoding: chunked Content-Type: application/json; charset=utf-8 Server: Kestrel Date: Wed, 17 Feb 2021 02:58:17 GMT Connection: close

{"errors":[{"code":"GEO_ADDR_VAL","path":"","message":"Address validation failed, zero matches found (address supplied: 3 Poppy Lane , Albert Town Otago 9305, NZ)","suggestedValues":null}]} [headers] => Requests_Response_Headers Object ( [data:protected] => Array ( [content-type] => Array ( [0] => application/json; charset=utf-8 )

                                [server] => Array
                                    (
                                        [0] => Kestrel
                                    )

                                [date] => Array
                                    (
                                        [0] => Wed, 17 Feb 2021 02:58:17 GMT
                                    )
Janesh1 commented 3 years ago

Now this gets more complicated, when I log into my official MyFastway Australian account l can indeed select to ship to an international address. [screen shot attached]

Why does the API provide this response?
Screen Shot 2021-02-17 at 3 48 07 pm

Janesh1 commented 3 years ago

Can you please advise who we need to reach out to in regards to this question?

mindfulsoftware commented 3 years ago

Hi, can you advise what endpoint your posting to? and possibly provide the post as text?

Janesh1 commented 3 years ago

Endpoint: https://api.myfastway.com.au/api/consignments/quote

mindfulsoftware commented 3 years ago

Hi Janesh1

Thats the domestic endpoint, here is Internationals