Product Price Behaviour through Draft Order API

Product Price Behaviour through Draft Order API

Racquet-Ball
Visitor
3 0 0

Hi,

We have different pricing for different wholesalers and these orders are submitted via API. When I submit an order via the API with a custom price, this price is being ignored by the API. Is there a way around this?

 

Here's the input:

[
    {
        "email": "email@email.com",
        "customer": {
            "id": "xxxxxxxxxxxxx"
        },
        "line_items": [
            {
                "sku": "LGD-120-NZ",
                "grams": null,
                "price": "11",
                "title": "LGD-120-NZ",
                "vendor": null,
                "quantity": 48,
                "tax_lines": [],
                "product_id": xxxxxxxxxx,
                "variant_id": xxxxxxxxxx
            },
            {
                "sku": "LGD-60-NZ",
                "grams": null,
                "price": "5.99",
                "title": "LGD-60-NZ",
                "vendor": null,
                "quantity": 36,
                "tax_lines": [],
                "product_id": xxxxxxxxxx,
                "variant_id": xxxxxxxxxx
            }
        ],
        "location_id": 8788738084,
        "shipping_line": {},
        "billing_address": {},
        "shipping_address": {}
    }
]

and here's the response:

[
    {
        "id": xxxxxxxx,
        "note": null,
        "email": "email@email.com",
        "taxes_included": true,
        "currency": "NZD",
        "invoice_sent_at": null,
        "created_at": "2022-08-27T04:36:12.000Z",
        "updated_at": "2022-08-27T04:36:12.000Z",
        "tax_exempt": false,
        "completed_at": null,
        "name": "#D159",
        "status": "open",
        "line_items": [
            {
                "id": xxxxxxxxxxx,
                "variant_id": xxxxxxxxxxx,
                "product_id": xxxxxxxxxxx,
                "title": "Compostable Poop Bags - 10-Pack (120 Bags) - Wholesale",
                "variant_title": null,
                "sku": "LGD-120-WS",
                "vendor": "xxxxxxxxxxx",
                "quantity": 48,
                "requires_shipping": true,
                "taxable": false,
                "gift_card": false,
                "fulfillment_service": "manual",
                "grams": 600,
                "tax_lines": [],
                "applied_discount": null,
                "name": "Compostable Poop Bags - 10-Pack (120 Bags) - Wholesale",
                "properties": [],
                "custom": false,
                "price": "12.00",
                "admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/xxxxxxxxxxx"
            },
            {
                "id": xxxxxxxxxxx,
                "variant_id": xxxxxxxxxxx,
                "product_id": xxxxxxxxxxx,
                "title": "Compostable Poop Bags - 10-Pack (120 Bags)",
                "variant_title": null,
                "sku": "LGD-120-NZ",
                "vendor": "Little Green Dog",
                "quantity": 36,
                "requires_shipping": true,
                "taxable": true,
                "gift_card": false,
                "fulfillment_service": "manual",
                "grams": 600,
                "tax_lines": [
                    {
                        "rate": 0.15,
                        "title": "GST",
                        "price": "117.34"
                    }
                ],
                "applied_discount": null,
                "name": "Compostable Poop Bags - 10-Pack (120 Bags)",
                "properties": [],
                "custom": false,
                "price": "24.99",
                "admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/xxxxxxxxxxx"
            }
        ],

continues with other order details...

 

Replies 0 (0)