Not Found error message response on order creation

Hi. I receive an error when I try to create a new order.

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

This is a sample object I am sending in the request:


{
    "order": {
        "channel_id": 214637,
        "customer_id": 302358031,
        "deliver_to_id": 955744310,
        "delivery_method_id": 597918,
        "number": "576667087382351640",
        "line_items_attributes": [
            {
                "sellable_id": 230250341,
                "price_per_unit": 40,
                "quantity": 1
            }
        ],
        "payment_attributes": {
            "payment_type": "Credit Card"
        }
    }
}

And the response is

{ error_messages: 'Not found' }

Any help please?

Hey @lipob,
I’ve had a look at the IDs you’ve given and it seems like your deliver_to_id is incorrect as it doesn’t exist on our database, which is causing this error.

Hey @fullsam Thanks for replying.
Which is the value associated with the deliver_to_id? I was using the user address ID for that field.
I could resolve the issue by using the deliver_to_attibutes with the customer_id, which worked without problems. But, maybe it’s better to use deliver_to_id for setting a specific address

@lipob When you create an order in Veeqo there is a deliver_to field in the response, the ID of which you can use as the deliver_to_id in future requests.

The deliver_to field is also present when listing all orders.

1 Like

Thank you very much for the explanation.