Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

how can I set discounted_price of shipping_lines correctly?

how can I set discounted_price of shipping_lines correctly?

ZhangLi
Shopify Partner
1 0 0

When I creating the order, I have included the param "shipping_lines" like this:

 

{
  "shipping_lines": [
    {
      "title": "Free Shipping",
      "custom": true,
      "discounted_price": "0.00",
      "discounted_price_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "SGD"
        }
      },
      "price": "5.00",
      "price_set": {
        "shop_money": {
          "amount": "5.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "5.00",
          "currency_code": "SGD"
        }
      }
    }
  ]
}

 

 

But the order I created got shippling_lines like this:

 

{
  "shipping_lines": [
    {
      "id": 3510226256012,
      "carrier_identifier": null,
      "code": "Free Shipping",
      "delivery_category": null,
      "discounted_price": "5.00",
      "discounted_price_set": {
        "shop_money": {
          "amount": "5.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "5.00",
          "currency_code": "SGD"
        }
      },
      "phone": null,
      "price": "5.00",
      "price_set": {
        "shop_money": {
          "amount": "5.00",
          "currency_code": "SGD"
        },
        "presentment_money": {
          "amount": "5.00",
          "currency_code": "SGD"
        }
      },
      "requested_fulfillment_service_id": null,
      "source": null,
      "title": "Free Shipping",
      "tax_lines": [

      ],
      "discount_allocations": [

      ]
    }
  ]
}

 

 

The discounted_price turns to "5.00" automatically, is my understanding wrong? or my param is wrong?

Can anyone help me about this?

 

Thank you very much 

Replies 0 (0)