When I create a new order via the API and specify the customer_id
and deliver_to_id
correctly for a wholesale customer, the order is created but the customer’s shipping address is deleted. This is unexpected - am I doing something wrong?
This is the API body I’m sending (minus the real IDs):
{
"order": {
"channel_id": 77777,
"customer_id": 66666666,
"deliver_to_id": 111111111,
"created_at": "2020-03-22T13:08:43.000Z",
"due_date": "22/03/2020",
"number": "TEST1",
"send_notification_email": false,
"line_items_attributes": [
{
"price_per_unit": "77.000",
"taxless_discount_per_unit": "0.00",
"quantity": "1",
"tax_rate": 0,
"sellable_id": 44444444
}
],
"additional_order_level_taxless_discount": "00.00",
"delivery_method_id": 222222,
"delivery_cost": "0.00",
"total_tax": "0.00",
"total_discounts": "0",
"payment_attributes": {
"payment_type": "online_finance",
"reference_number": "PAYMENTJLTEST1"
},
"employee_notes_attributes": [
{
"text": "Test Sale"
}
]
}
}