How can I manually set longitude and latitude in Carrier API?

How can I manually set longitude and latitude in Carrier API?

gdn-bdl-bst
Shopify Partner
2 0 0

Hi Guys,
I want to ask about Carrier service API https://shopify.dev/docs/api/admin-rest/2023-07/resources/carrierservice.
So, our store wants to implement a custom shipping rate from another service, and the service that provides a custom rate needs the longitude and latitude of origin and destination.
but I've read the request from Shopify from our callback URL that provides longitude and latitude when customers access the CO shipping page with the request property below
- rate.origin.latitude
- rate.origin.longitude
- rate.destination.latitude
- rate.destination.longitude

 

{
    "rate": {
        "origin": {
            "country": "ID",
            "postal_code": null,
            "province": null,
            "city": null,
            "name": null,
            "address1": null,
            "address2": null,
            "address3": null,
            "latitude": null,
            "longitude": null,
            "phone": null,
            "fax": null,
            "email": null,
            "address_type": null,
            "company_name": "helloofficialstore-dev"
        },
        "destination": {
            "country": "ID",
            "postal_code": "99080",
            "province": "JT",
            "city": "Yogya",
            "name": "abdul",
            "address1": "jljljl",
            "address2": "jljl",
            "address3": null,
            "latitude": null,
            "longitude": null,
            "phone": null,
            "fax": null,
            "email": null,
            "address_type": null,
            "company_name": null
        },
        "items": [
            {
                "name": "The Videographer Snowboard",
                "sku": "",
                "quantity": 1,
                "grams": 0,
                "price": 88595,
                "vendor": "helloofficialstore-dev",
                "requires_shipping": true,
                "taxable": true,
                "fulfillment_service": "manual",
                "properties": {},
                "product_id": 8367491285288,
                "variant_id": 45474236825896
            }
        ],
        "currency": "IDR",
        "locale": "en-ID"
    }
}

My question is, can I set the values above manually? because my plan is to use Google map API to get long-lat in our store, especially on the CO Information contact page.


Thank you

Replies 0 (0)