#Creating a new Order

1 messages · Page 1 of 1 (latest)

vocal tundra
#

Hello, which endpoint will be used to create a new order? I can’t find the endpoint about creating the order. Could you tell me please which endpoint is used about that?

zealous sedge
#

You can find store and admin api on the Medusa document

pale coral
vocal tundra
#

I have searched. But I don't know which one to use. Please suggest me.

vocal tundra
#

I tried that way(using cartcomplete endpoint). But the new order is not saved to the database. Do you think I miss something? what could be possible? Please advise me. I tested locally the cart complete endpoint like that --- curl --location --request POST 'http://localhost:9000/store/v1/carts/cart_01GH12PSKD6F512MW3FC7EKCYR/complete'
--header 'Idempotency-Key: bf70f56a-a9f4-4025-b37b-3e51d3c53c2d'
--header 'Cookie: connect.sid=s%3AphDQsDxDksrLVowxR_lLX1Mglsb3H682.KnPoqYpY5v4WjlM2LRIesk3PTy%2FfNTKL5d7Ix4zIVDg'
--data-raw ''

mint nimbus
#

Are you using sqlite or postgres?

vocal tundra
#

postgres

mint nimbus
#

Are there any errors?

vocal tundra
#

There is no any error. But it does not save to the order table. It just returns the existing old cart information as the response like that -

mint nimbus
#

Why is there a /v1 in the curl address

vocal tundra
# mint nimbus Are there any errors?

Hello guy, my cart complete endpoint is working now. I finally found my problem. It is that the given Idempotency-Key value is incorrect. when I fixed that value, the new order is saved to the order table. Thank you guy😍

mint nimbus
#

The errors (if any) should be in console where you have ran medusa server

#

Ok

vocal tundra