Skip to main content

Create Order API

The API is used to create orders in the 1mg system. Merchant partners must call this API to create an order in the 1mg system as the last step of the cart checkout journey. The API requires details about the cart items, coupons, prescriptions, payment options for the order, and other related information to place the order.

There are two possible values for the payment_method param in the request payload, COD or ONLINE. If the payment method is ONLINE, the responsibility of collecting the payment from the customer lies on the merchant partner. Merchants must collect the payment from the customer before calling the “Confirm Order“ API. Also, 1mg will need a set of APIs from the merchant partners to access the payment details for the order. These APIs are explained in the respective section of the doc.

Path Parameters
  • merchant_id string required
Header Parameters
  • X-Access-Key string
    Example: 1mg_client_access_key
Request Body
  • merchant_order_id string
  • payable_amount string
  • payment_method string
  • coupon_code string
  • user object
  • email string
  • mobile string
  • first_name string
  • last_name string
  • address object
  • pincode string
  • contact_number string
  • name string
  • street1 string
  • street2 string
  • type string
  • prescriptions string[]
  • skus object
  • 117004 integer
  • 139559 integer
  • 340278 integer
  • 367281 integer
  • 528051 integer
Responses

OK

Response Headers
  • Date string
  • Content-Type string
  • Transfer-Encoding string
  • Connection string
  • Vary string
  • X-Request-ID string
  • VISITOR-ID string
  • X-VISITOR-ID string
  • Server string
  • Access-Control-Allow-Methods string
  • Access-Control-Allow-Headers string
  • Access-Control-Allow-Origin string
  • Content-Encoding string

Schema
  • object
Loading...