#Unable to create an order using postman

3 messages · Page 1 of 1 (latest)

glossy frost
#

I tried to create an order using postman with and without region id. But it throws an error says "property region_id should not exist". Could you help me out ?

This is my sample params
{
"email": "user@example.com",
"billing_address": {
"company": "Acme",
"first_name": "Arno",
"last_name": "Willms",
"address_1": "14433 Kemmer Court",
"address_2": "Suite 369",
"city": "South Geoffreyview",
"country_code": "st",
"province": "Kentucky",
"postal_code": "72093",
"phone": "16128234334802"
},
"shipping_address": {
"company": "Acme",
"first_name": "Arno",
"last_name": "Willms",
"address_1": "14433 Kemmer Court",
"address_2": "Suite 369",
"city": "South Geoffreyview",
"country_code": "st",
"province": "Kentucky",
"postal_code": "72093",
"phone": "16128234334802"
},
"items": [
{
"title": "S / Black",
"variant_id": "variant_01GK1MPY0PE75ER7FPS26F78YD",
"quantity": 5
}
],
"customer_id": "cus_01GK1N5TSQ8ZJCXH6NW35ME71R",
"payment_method": {
"provider_id": "manual"
},
"shipping_method": {
"provider_id": "manual",
"profile_id": "sp_01GK1MPXG58JTRSYC5T7YPMQ10",
"price": 0,
"data": { },
"items": []
},
"region": "EU",
"region_id": "reg_01GK1MPXNB6CPTPK1ZDWQA0B3M",
"no_notification": true
}

mortal pewter
#

You can't create an order like that. Orders are created from completing a cart in Medusa. If you want to create an order through the admin API, you should create a draft order.

https://docs.medusajs.com/api/admin/#tag/Draft-Order

API reference for Medusa's Admin endpoints. All endpoints are prefixed with /admin.

Authentication

There are two ways to send authenticated requests to the Medusa server: Using a user's API token, or using a Cookie Session ID.

Expanding Fields

In many endpoints you'll find an expand query parameter that can be passed to the endpo...