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 to send shipping cost in order.json endpoint?

How to send shipping cost in order.json endpoint?

shubham1234
Visitor
1 0 0

I'm trying to create an order in my store using API endpoint order.json
I'm sending this JSON 

 

 

 

 

{
    "order": {
        "inventory_behaviour": "decrement_obeying_policy",
        "email": "admin@amdocs.com",
        "send_receipt": true,
        "line_items": [
            {
                "variant_id": 42673087447286,
                "quantity": 1
            }
        ],
        "customer": {
            "first_name": "Yuvraj",
            "last_name": "Singh",
            "email": "admin@amdocs.com"
        }
    },
    "billing_address": {
        "first_name": "Rahmathullah",
        "last_name": "Mohammed",
        "address1": "Phase 1",
        "address2": "Landmark - Near Das CNC",
        "city": "Bangalore",
        "country_code": "IN",
        "province": "Karnataka",
        "province_code": "KA",
        "country": "India",
        "zip": "560048",
        "phone": "9483397633"
    },
    "shipping_address": {
        "first_name": "Rahmathullah",
        "last_name": "Mohammed",
        "address1": "Phase 1",
        "address2": "Landmark - Near Das CNC",
        "city": "Bangalore",
        "country_code": "IN",
        "province": "Karnataka",
        "province_code": "KA",
        "country": "India",
        "zip": "560048",
        "phone": "9483397633"
    },
    "phone": "9483397610",
    "total_shipping_price_set": {
        "shop_money": {
            "amount": "99.00",
            "currency_code": "INR"
        },
        "presentment_money": {
            "amount": "99.00",
            "currency_code": "INR"
        }
    },
    "shipping_lines": [{
        // "id":87516020982,
        // "handle": "For ThirdParty",
        // "price": "99.00",
        // "title": "GENERAL SHIPPING RATES"

        "id": 87516020982,
        "title": "GENERAL SHIPPING RATES",
        "price": "99.00",
        "code": "For ThirdParty",
        "source": "shopify",
        "phone": null,
        "requested_fulfillment_service_id": null,
        "delivery_category": null,
        "carrier_identifier": null,
        "discounted_price": "0.00",
        "price_set": {
          "shop_money": {
            "amount": "99.00",
            "currency_code": "INR"
          },
          "presentment_money": {
            "amount": "99.00",
            "currency_code": "INR"
          }
        }
    }]
}

 

 

 

 

 

Order is created successfully but in response shipping_lines,shipping_address,billing_address getting empty or none.
Please help me with this issue

Reply 1 (1)

Argante
Visitor
1 0 0

Hi @shubham1234 How / where did you get the shipping ID?

Did you ever get this to work? Currently struggling on the same issue