# Not Found error message response on order creation

**URL:** <https://developer-forum.veeqo.com/t/not-found-error-message-response-on-order-creation/1022>\
**Category:** API Queries (How To)\
**Created:** [May 10, 2024, 11:52am UTC](https://developer-forum.veeqo.com/t/not-found-error-message-response-on-order-creation/1022 "2024-05-10T11:52:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lipob](https://avatars.discourse-cdn.com/v4/letter/l/7A66F9/32.png) [@lipob](https://developer-forum.veeqo.com/u/lipob)\
**Post date:** [May 10, 2024, 11:52am UTC](https://developer-forum.veeqo.com/t/not-found-error-message-response-on-order-creation/1022/1 "2024-05-10T11:52:24Z")

</div>

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

Endpoint:  
[https://api.veeqo.com/orders](https://api.veeqo.com/orders)

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

```auto

{
    "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?

---

<div class="post-metadata">

**Author:** ![fullsam](https://avatars.discourse-cdn.com/v4/letter/f/232F3E/32.png) [@fullsam](https://developer-forum.veeqo.com/u/fullsam)\
**Post date:** [May 20, 2024, 8:27am UTC](https://developer-forum.veeqo.com/t/not-found-error-message-response-on-order-creation/1022/2 "2024-05-20T08:27:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lipob](https://avatars.discourse-cdn.com/v4/letter/l/7A66F9/32.png) [@lipob](https://developer-forum.veeqo.com/u/lipob)\
**Post date:** [May 20, 2024, 10:09am UTC](https://developer-forum.veeqo.com/t/not-found-error-message-response-on-order-creation/1022/3 "2024-05-20T10:09:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fullsam](https://avatars.discourse-cdn.com/v4/letter/f/232F3E/32.png) [@fullsam](https://developer-forum.veeqo.com/u/fullsam)\
**Post date:** [May 20, 2024, 2:56pm UTC](https://developer-forum.veeqo.com/t/not-found-error-message-response-on-order-creation/1022/4 "2024-05-20T14:56:49Z")

</div>

@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](https://developer.veeqo.com/docs#/reference/orders/order-collection/list-all-orders).

---

<div class="post-metadata">

**Author:** ![lipob](https://avatars.discourse-cdn.com/v4/letter/l/7A66F9/32.png) [@lipob](https://developer-forum.veeqo.com/u/lipob)\
**Post date:** [May 20, 2024, 7:40pm UTC](https://developer-forum.veeqo.com/t/not-found-error-message-response-on-order-creation/1022/5 "2024-05-20T19:40:55Z")

</div>

Thank you very much for the explanation.
