Line Items error when posting an order

I am trying to post the following order through the API but I am getting an error.

POST https://api.veeqo.com/orders

{
    "channel_id": 763163,
    "delivery_method_id": "1685680",
    "due_date": "16/10/2025",
    "number": "SO1516848",
    "customer_attributes": {
        "billing_address_attributes": {
            "first_name": "Hayden",
            "last_name": "Littlewood",
            "company": null,
            "address1": "Address 1",
            "address2": "Address 2",
            "city": "City",
            "state": "State",
            "zip": "AA11AA",
            "country": "GB",
            "phone": null,
            "email": null
        }
    },
    "deliver_to_attributes": {
        "address1:": "Address 1",
        "address2": "Address 2",
        "city": "City",
        "company": null,
        "country": "GB",
        "first_name": "Hayden",
        "last_name": "Littlewood",
        "phone": "01234567890",
        "state": "Cheshire",
        "zip": "AA11AA"
    },
    "line_items_atributes": [
        {
            "price_per_unit": "23.99",
            "quantity": "2",
            "tax_rate": 0.2,
            "sellable_id": 440445244

        }
    ],
        "payment_attributes": {
        "payment_type": "cash"
    }
}

However, I get the following error:

{
    "error_messages": {
        "order": {
            "line_items": [
                "can't be blank"
            ]
        }
    }
}

I know this is a valid sellable id as it is on an existing order.

Does anyone have an idea of why this might be happening?

Thanks.

Hey @hayden,

I’ve taken a look at your request payload.

Your request says line_items_atributes when it should be line_items_attributes (missing an extra t). If you fix the name of the parameter it should be fine.

If this works for you, please mark this message as a solution so that other developers can use it as a reference. If you are still having trouble then contact Veeqo Support via the support messenger in the Veeqo app or contacting helpme@support.veeqo.com

Hope this helps,
Alex - Veeqo

Hi @Alex-Veeqo Apologies, I should have looked into this more, this has sorted the issue thanks!

1 Like

No problem, glad I could help!