API Order 404 Error

Hello @fullsam
I have noticed you have helped quite a few Order 404 issues,
Our API developer has hit the same issue with Cubecart orders to Veeqo.

Could you cast your eye across this text file and hopefully give some insight as to what’s going wrong?
Many thanks
Rick

https://api.veeqo.com/orders

Request Payload

//passing channel id, sellable_id,delivery_method_id after fetching from relevant endpoints.
payload

{
“order”: {
“channel_id”: 227582,
“due_date”: “31/01/2024”,
“number”: “pix01924”,
“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”: 112475678,
“additional_options”: “This is a custom field for this line item”
}
],
“additional_order_level_taxless_discount”: “19.50”,
“delivery_method_id”: 621297,
“delivery_cost”: “2.00”,
“total_tax”: “35.54”,
“total_discounts”: “49.5”,
“payment_attributes”: {
“payment_type”: “paypal”,
“reference_number”: “PPP1234”
},
“customer_attributes”: {
“phone”: “07891234567”,
“mobile”: “07891234567”,
“email”: “baggins…”,
“billing_address_attributes”: {
“first_name”: “Frodo”,
“last_name”: “Baggins”,
“company”: “The Ring Bearers”,
“address1”: “The New Bag End”,
“address2”: “1st Avenue”,
“city”: “Valinor”,
“state”: “The Undying Lands”,
“zip”: “VA1 1NB”,
“country”: “GB”,
“phone”: “07XXXXXXXXX”,
“email”: “cust@demo.org
}
},
“deliver_to_attributes”: {
“first_name”: “Samwise”,
“last_name”: “Gamgee”,
“company”: “The Fellowship”,
“address1”: “Bag End”,
“address2”: “Hobbiton”,
“city”: “Shire”,
“state”: “Middle Earth”,
“zip”: “SH1 1BG”,
“country”: “GB”,
“phone”: “07891234567”,
“email”: “Gamgee…”
},
“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

{
“error_messages”: “Not found”
}

Hey @Rick1,
Thanks for the enquiry. It looks like you are using the product ID rather than the product variant ID in your order.line_items_attributes[0].sellable_id field.
To find the product variant’s ID you should make a GET request to https://api.veeqo.com/products/112475678, which will contain a field called sellables. Each object in the sellables array represents a product variant within Veeqo. You should find the correct product variant and note the id, then use that as the sellable_id in your request.

Hi fullsam,
Thank you for the swift reply - hugely appreciated.
I will pass this on to our API developer.

Many thanks
Rick