Skip to main content

Create Booking

This api is used to create booking for 1mg order.

  • The booking keys required in the request payload are configured in vendor configurations at 1mg.
  • A vendor can create cart for all possible lab, test combinations. For example, combinations like lab1, test1 and lab2, test2 for keys lab_id, test_id respectively can be specified. These will result in creation of individual bookings for each combination. These bookings will have common Order group id, which is generated in Create booking api response. (Refer to key - data[0]._order_group_id in response)
  • Only cash payment_mode is allowed for third party orders.
  • Email is sent to vendor based on the communication key specified in vendor configurations. The email contains all the charges and booking details.

::: requestmodel

PropertyType?Required?
cartListRequired
cart[i].lab_idIntegerRequired
cart[i].test_idIntegerRequired
cityStringRequired
stateStringRequired, if specified in booking keys in vendor configuration
streetStringRequired
localityStringRequired
landmarkStringRequired
patient_nameStringRequired
mobile_numberStringRequired
emailStringRequired
genderStringRequired
ageIntegerRequired
collection_timeStringRequired
pin_codeStringRequired
payment_modeStringOptional, default value is CASH
referralStringRequired, if specified in booking keys in vendor configuration
merchant_paidIntegerRequired
user_paidIntegerRequired
coupon_codeStringRequired, if specified in booking keys in vendor configuration
merchant_idStringRequired. An identifier that you would like to use later for identification of your order at 1mg side, you can pass that in merchant_id. Else you can pass empty string
policy_idStringOptional. An identifier that you would like to use later for identification of your order at 1mg side, related to customer order
referrence_idStringOptional. An identifier that you would like to use later for identification of your order at 1mg side, related to vendor reference. This is similar to merchant_id
Header Parameters
  • Content-Type string
    Example: application/json
  • x-access-key string
    Example: 1mg_client_public_access_key
  • X-Authorization string
    Example: {{X-Authorization}}
Request Body
  • object
Responses

OK

Response Headers
  • Date string
  • Content-Type string
  • Transfer-Encoding string
  • Connection string
  • vary string
  • x-request-id string
  • set-cookie string
  • visitor-id string
  • x-visitor-id string
  • access-control-allow-methods string
  • access-control-allow-headers string
  • access-control-allow-origin string
  • CF-Cache-Status string
  • Server string
  • CF-RAY string
  • Content-Encoding string

Schema
  • object
Loading...