Hi,
I’m trying to create an order via the API with the following input.
Request Body:
{
“order”: {
“channel_id”: 52720,
“customer_id”: 50231737,
“send_notification_email”: true,
“line_items_attributes”: [
{
“price_per_unit”: “75.000”,
“taxless_discount_per_unit”: “0.00”,
“quantity”: “1”,
“tax_rate”: 0.2,
“sellable_id”: 19359804,
“additional_options”: “This thing is a thing”
}
],
“additional_order_level_taxless_discount”: “19.50”,
“delivery_method_id”: 206074,
“delivery_cost”: “2.00”,
“total_tax”: “35.54”,
“total_discounts”: “49.5”,
“payment_attributes”: {
“payment_type”: “paypal”,
“reference_number”: “PPP1234”
},
“deliver_to_attributes”: {
“customer_id”: 50231737,
“first_name”: “Jabbar”,
“last_name”: “Daomilang”,
“address1”: “Tech Hub”,
“address2”: “221 High Street”,
“city”: “Swansea”,
“company”: “AppTradies”,
“country”: “GB”,
“state”: null,
“zip”: “SA1 1NW”,
“phone”: null
},
“customer_note_attributes”: {
“text”: “Please tell Sam to look after this puppy. --This is a customer note–”
},
“employee_notes_attributes”: [
{
“text”: “Package contains a dog. Use suitable box. --This is an internal note–”
}
]
}
}
Response: 400 Bad Request {“error_messages”:“The order is unable to be created with this channel type”}
Could you let me know what I am missing? Note that the product (or sellable_id) that I’m passing is related to the channel_id. I’ve also tried all my channels/stores available but I got the same response. All the channels/stores are active.
Thanks for your help.
Jabbar