How to retrieve the delivery values chosen by the user in an order with multiple origins?

paulomiranda98
New Member
1 0 0

We are developing an app that allows you to send only some products from the store.

When I place the order independently it calculates the delivery value correctly and specifies which the user chose. Below are the two examples.


Captura de tela de 2021-06-24 12-22-04.png

 

Captura de tela de 2021-06-24 12-22-27.png

 

However, when choosing two products from different origins, the delivery value is merged and the specification changes to a generic name. The API's Json doesn't have this information either. Below is the in-store example and the JSON of the order.

Captura de tela de 2021-06-24 12-22-58.png

 

 

"shipping_lines":[
  {
    "id":3286621192377,
    "carrier_identifier":null,
    "code":"Frete",
    "delivery_category":null,
    "discounted_price":"47.24",
    "discounted_price_set":{
      "shop_money":{
        "amount":"47.24",
        "currency_code":"BRL"
      },
      "presentment_money":{
        "amount":"47.24",
        "currency_code":"BRL"
      }
    },
    "phone":null,
    "price":"47.24",
    "price_set":{
      "shop_money":{
        "amount":"47.24",
        "currency_code":"BRL"
      },
      "presentment_money":{
        "amount":"47.24",
        "currency_code":"BRL"
      }
    },
    "requested_fulfillment_service_id":null,
    "source":"Shopify",
    "title":"Frete",
    "tax_lines":[

    ],
    "discount_allocations":[

    ]
  }
]

 

 

In our app you will need to know the shipping cost of each product independently. How can we do that?

0 Likes