Bad Request Error when creating orders

Hi there,

I am currently trying to create orders through the endpoint but am getting a 400 “Bad Request” error.

I need to either; update the shipping address on an existing customer (no support for this in customers endpoint docs), create a new customer in customers endpoint with existing email but then incorrect billing address then change it with another customers request, or create a new customer in the orders endpoint with existing email but unique shipping address each time.

If possible it would make life much easier if you could update shipping address, and get a little bit more information about the errors.

With the last method, here is the data I tried to post:
“”"
{
“order”: {
“channel_id”: 35917,
“number”: “test”,
“line_items_attributes”: [
{
“price_per_unit”: “75.000”,
“quantity”: “1”,
“sellable_id”: 7540729,
},
],
“delivery_method_id”: 153710,
“payment_attributes”: {
“payment_type”: “paypal”
},
“customer_attributes”: {
“phone”: “test”,
“mobile”: “test”,
“email”: "jasper.haward@canadianspacompany.com",
“billing_address_attributes”: {
“id”: “”,
“first_name”: “test”,
“last_name”: “test”,
“company”: “test”,
“address1”: “test”,
“address2”: “test”,
“city”: “test”,
“state”: “”,
“zip”: “test”,
“country”: “GB”,
“phone”: “test”,
“email”: “test”
}
},
“deliver_to_attributes”: {
“first_name”: “test”,
“last_name”: “test”,
“company”: “test”,
“address1”: “test”,
“address2”: “test”,
“city”: “test”,
“state”: “test test”,
“zip”: “test”,
“country”: “GB”,
“phone”: “test”,
“email”: “test”,
“id”: “”
},
}
}
“”"

The same sellable_id/delivery_method_id/channel_id with an existing customer and deliver to ID creates order successfully. The code itself is copied straight from the docs with non-required elements removed.

Any advice would be very helpful!

Regards,

Jasper