POST
/
v1
/
customer
/
create_customer
Add a customer
curl --request POST \
  --url https://dev-api-be.localwell.in/app/partner/v1/customer/create_customer \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-pharmacy-id: <x-pharmacy-id>' \
  --data '{
  "customer_name": "Ram Kumar",
  "customer_mobile_number": "9876543210",
  "customer_reference_no": "RO8871V6",
  "customer_is_business": true,
  "customer_gstin": "22AAAAA0000A1Z5",
  "is_composition_dealer": true,
  "customer_dob": "12/12/1992",
  "customer_gender": "Male",
  "customer_address": "AB Road, SR, Delhi",
  "pincode": 560001
}'
{
  "data": {
    "customer_id": 5001,
    "customer_name": "Ram Kumar"
  },
  "statuscode": 200,
  "message": "Okay"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-pharmacy-id
integer
required

Pharmacy ID passed in the header

Body

application/json
customer_name
string
required

Name of the customer

Example:

"Ram Kumar"

customer_mobile_number
string

Customer's mobile number

Example:

"9876543210"

customer_reference_no
string

Reference number or Hospital ID for the customer (Either of Reference Number or Mobile Number is mandatory)

Example:

"RO8871V6"

customer_is_business
boolean

Whether customer is business (default false)

Example:

true

customer_gstin
string

GSTIN of the customer

Example:

"22AAAAA0000A1Z5"

is_composition_dealer
boolean

Whether customer is a composition dealer (Can be true only when GSTIN is there)

Example:

true

customer_dob
string

DOB of the Customer

Example:

"12/12/1992"

customer_gender
string

Gender of the customer

Example:

"Male"

customer_address
string

Address of the customer

Example:

"AB Road, SR, Delhi"

pincode
integer

Pincode of the customer's address

Example:

560001

Response

Customer added successfully

data
object
statuscode
integer
Example:

200

message
string
Example:

"Okay"