I got you are not authorized error while place new order

Hi,
Am facing not found(404) error while place the order. Please help me to resolve this issue. Thanks in advance for your help.

I used this url “https://api.veeqo.com/orders” to place order.

and my payload is :

{
“order”: {
“due_date”: “”,
“delivery_cost”: “2.99”,
“deliver_to_id”: null,
“number”: “”,
“total_tax”: “4.828”,
“total_discounts”: “0”,
“additional_order_level_taxless_discount”: “0.00”,
“delivery_method_id”: “441856”,
“channel_id”: “116887”,
“send_notification_email”: true,
“customer_id”: null,
“customer_attributes”: {
“phone”: “07581366609”,
“mobile”: “”,
“email”: “davidfaz@live.co.uk”,
“id”: null,
“billing_address_attributes”: {
“id”: null,
“customer_id”: null,
“first_name”: “David”,
“last_name”: “Farrington”,
“company”: “”,
“address1”: “4 Endsleigh Road”,
“address2”: “Brighton-le-Sands”,
“city”: “Liverpool”,
“state”: “UK - Mainland”,
“zip”: “L22 6QQ”,
“country”: “GB”,
“phone”: “07581366609”,
“email”: “davidfaz@live.co.uk
}
},
“deliver_to_attributes”: {
“first_name”: “David”,
“last_name”: “Farrington”,
“company”: “”,
“address1”: “4 Endsleigh Road”,
“address2”: “Brighton-le-Sands”,
“city”: “Liverpool”,
“state”: “UK - Mainland”,
“zip”: “L22 6QQ”,
“country”: “GB”,
“phone”: “07581366609”,
“email”: “”,
“id”: “”,
“customer_id”: null
},
“customer_note_attributes”: {
“text”: “”
},
“employee_notes_attributes”: [
{
“text”: “”
}
],
“payment_attributes”: {
“payment_type”: “Credit or Debit Card”,
“reference_number”: “59-70-69027590”
},
“line_items_attributes”: [
{
“price_per_unit”: “12.99”,
“taxless_discount_per_unit”: “20”,
“quantity”: “2”,
“tax_rate”: “20”,
“sellable_id”: 923000,
“additional_options”: “”
}
]
}
}

The error indicates you are not correctly authorised for the operation you are attempting to execute

Please ensure you are using a valid/up-to-date API key in your headers from a user registered to the correct Veeqo account or are sending the request from a registered OAuth application.

More information in our API Documentation: API Docs - Veeqo Developers

Thanks for the response … , we are using the right API key, got the new one after refresh.
But getting the same 404 error , is there any other reason?

Additional Information - this code is working fine in Debugging Proxy account using the url “https://private-anon-f3744fcedd-veeqo.apiary-proxy.com/orders” but not working in Production environment.

we passed the API key in header using “x-api-key”

We used available sellable id from Production, to place the order but still getting same 404 - not found - error

We are suspecting the issue is in Sellable ID , we tried with wrong sellable-id in Debugging Proxy - got 404 error …

Please help with the way to find the sellable-id in the product details.

Thanks in advance…

You can find the correct sellable ID by querying the /products endpoint and filtering for the product you wish to place on the order, using attributes such as product title.
The sellable ID will be contained in the product object, under sellables