Skip to main content

Done In One Flow for Merchants

The "Done in One" flow is a streamlined process designed for merchant users to order medicine. This process is initiated by a single API call, which includes the upload of a valid prescription.

Upon receipt, the prescription undergoes validation at 1mg. If successful, a cart is created for the merchant's customer. A confirmation SMS is then dispatched to the customer, containing a link to finalize their order.

The customer can follow this link to the 1mg website, where they can complete their purchase by processing the payment. This efficient flow ensures a smooth and user-friendly experience for both the merchant and the customer.

Steps to implement Merchant Done in One (DIO) flow

Refer to API Spec for contracts

This document outlines the steps required to implement API integration for consuming services provided by a merchant, specifically focusing on orders related to drugs and over-the-counter (OTC) products. Let's elaborate on each step:

  1. Generate JWT Token

    • This step involves generating a JWT (JSON Web Token) to authenticate and authorize API requests. Refer to this document on how to generate those tokens.
  2. Call Merchant Create DIO Cart API -

    • This API will take in the user details, address and prescriptions of the merchant user and on success will respond with a job_id shared in the response.
    • This job_id should be stored by the merchant to track if the cart got converted to order successfully or not. Use the Track Order API to Track the order status using the job_id.
    • On order creation, we store the job_id as a merchant_order_id at our end and share it with the merchant for tracking purposes.
  3. Order Status Updates

    • All order updates are communicated via an Order Status Webhook provided by the merchant's side. This webhook is responsible for notifying the merchant about any changes or updates to orders.

    • Refer to Merchant Order Updates for details

  4. DIO Track Order API

    • Fetch 1MG Order Details using merchant_order_id through the Track Order API.
    • merchant_order_id refers to job_id shared in the Create DIO Cart API.