Carrier Service

Solved
CubiGear
Tourist
7 2 0

I have successfully posted a Carrier Service so I can use it in Shopify, however no rates are listed and my server is never called however when I try the url in the browser I get the proper json response that Shopfiy expect to have.  My zone is respected, the rate from app called Cubi Shipping Rates is added correctly and saved.  Any idea what is going on ?

POST

{
  "carrier_service": {
    "name": "Cubi Shipping Rates",
    "callback_url": "https://40cc73a39d74.ngrok.io/Shopify/GetCubiRates",
    "service_discovery": true
  }
}

RESPONSE for Carrier Service POST

{
  "carrier_service": {
    "id": 53739913383,
    "name": "Cubi Shipping Rates",
    "active": true,
    "service_discovery": true,
    "carrier_service_type": "api",
    "admin_graphql_api_id": "gid:\/\/shopify\/DeliveryCarrierService\/53739913383",
    "format": "json",
    "callback_url": "https:\/\/2998168d4785.ngrok.io\/Shopify\/GetCubiRates"
  }
}

Result from callback_url

{
  "rates": [
    {
      "service_name": "Cubi Fast Overnight",
      "service_code": "ON",
      "total_price": "1295",
      "description": "This is the fastest option by far",
      "currency": "CAD",
      "min_delivery_date": "2013-04-12 14:48:45 -0400",
      "max_delivery_date": "2013-04-12 14:48:45 -0400"
    },
    {
      "service_name": "Cubi 2 Days Ground",
      "service_code": "2D",
      "total_price": "2934",
      "currency": "USD",
      "min_delivery_date": "2013-04-12 14:48:45 -0400",
      "max_delivery_date": "2013-04-12 14:48:45 -0400"
    },
    {
      "service_name": "Cubi Priority Overnight",
      "service_code": "1D",
      "total_price": "3587",
      "currency": "USD",
      "min_delivery_date": "2013-04-12 14:48:45 -0400",
      "max_delivery_date": "2013-04-12 14:48:45 -0400"
    }
  ]
}

 

0 Likes
CubiGear
Tourist
7 2 0

This is an accepted solution.

The problem was because I was using ngrok so we published to Azure instead and gave Shopify the Azure URL and everything works like a charm.

0 Likes