---
# System prepended metadata

title: YM Canary API Documentation

---

# YM Canary API Documentation

* [Product API's](#products-api)
  * [API List](#api-list-products)
  * [Mandatory Fields In Response](#mandatory-fields-products)
  * [Parameters Description](#parameters-description-products)
  * [Request and Response Details](#request-and-response-details-products)
* [User API's](#user-api)
  * [API List](#api-list-user)
  * [Mandatory Fields In Response](#mandatory-fields-user)
  * [Parameters Description](#parameters-description-user)
  * [Request and Response Details](#request-and-response-details-user)
* [Order API's](#order-api)
  * [API List](#api-list-order)
  * [Mandatory Fields In Response](#mandatory-fields-order)
  * [Parameters Description](#parameters-description-order)
  * [Request and Response Details](#request-and-response-details-order)
* [Subscription API's](#subscription-api)
  * [API List](#api-list-subscription)
  * [Mandatory Fields In Response](#mandatory-fields-subscription)
  * [Parameters Description](#parameters-description-subscription)
  * [Request and Response Details](#request-and-response-details-subscription)
* [Appointment API's](#appointment-api)
  * [API List](#api-list-appointment)
  * [Mandatory Fields In Response](#mandatory-fields-appointment)
  * [Parameters Description](#parameters-description-appointment)
  * [Request and Response Details](#request-and-response-details-appointment)
* [Service API's](#service-api)
  * [API List](#api-list-service)
  * [Mandatory Fields In Response](#mandatory-fields-service)
  * [Parameters Description](#parameters-description-service)
  * [Request and Response Details](#request-and-response-details-service)
* [Therapist API's](#therapist-api)
  * [API List](#api-list-therapist)
  * [Mandatory Fields In Response](#mandatory-fields-therapist)
  * [Parameters Description](#parameters-description-therapist)
  * [Request and Response Details](#request-and-response-details-therapist)
* [Store API's](#store-api)
  * [API List](#api-list-store)
  * [Mandatory Fields In Response](#mandatory-fields-store)
  * [Parameters Description](#parameters-description-store)
  * [Request and Response Details](#request-and-response-details-store)
 

---

## Product API's <a id="products-api"></a>

| API List :mag_right: <a id="api-list-products"></a>
-
---

1. getAllProducts (`from`, `size`)  **`GET`**

2. getProduct (`productId`)  **`GET`**

3. getProductsByUserChoice (`options`)  **`POST`**

4. getProductsBy (`columns`, `from`, `size`)  **`POST`**

5. getProductsByCategory (`category`)  **`GET`**

6. getProductsBySubcategory (`subcategory`)  **`GET`**

7. getVariants (`productId`)  **`GET`**

8. getFilter (`options`)  **`POST`**

---
| Mandatory Fields In Response :mag_right: <a id="mandatory-fields-products"></a>
-
---

> **For Products** [name=Mandatory] 

- Product ID [`string`]
- Title [`string`]
- Description [`string`]
- Brand [`string`]
- Tags [`string`]
- Images [`string`]
- MRP Price [`integer`]
- Seling Price [`integer`]
- Category Level 1 [`string`]
- Category Level 2 [`string`]
- Variants ( Check the variants response for more details ) [`array of variants`]

> **For Variants** [name=Mandatory] 

- Available Quantity [`integer`]
- Selling Price [`integer`]
- Size ['string']
- Sku Id [`string`]
- MRP Price [`integer`]
- Image [`string`]
- Color [`string`]
- Weight [`string`]

---
| Parameters Description :mag_right: <a id="parameters-description-products"></a>
-
---

| Parameters | Type | Description |
| - | - | - |
| **`from`** | integer | The value from which the api has to start fetching the products
| **`size`** | integer | The amount of data that we expect to be returned from the api
| **`productId`** | string (or) integer | The unique id of the product with which it is referred
| **`columns`** | object | An object containing the key as the column name and the value as the data that has to be searched in that column
| **`options`** | object | An object containing the key as the column name and the value as the data that has to be searched in that column
| **`category`** | string | The category
| **`subcategory`** | string | The subcategory
| **`subscription`** | boolean | A boolean value to identify to check only for subscription products
 
---
| Request and Response Details :mag_right: <a id="request-and-response-details-products"></a>
-
---


**1. getAllProducts()**
```api
[API] getAllProducts (`from`, `size`,`subscription`)  [`GET`]
[Parameters] from, size, subscription
[Request] https://example.com/api/v3/products
[Response] Array of Multiple Products
```

**2. getProduct()**
```api
[API] getProduct (`productId`,`subscription`)  [`GET`]
[Parameters] productId,subscription
[Request] https://example.com/api/v3/products/<productId>
[Response] Single Product Object
```

**3. getProductsByUserChoice()**
```api
[API] getProductsByUserChoice(`options`)  [`POST`]
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/products-by-user-choice
[Response] Array of Products by User Choice
```

**4. getProductsBy()**
```api
[API] getProductsBy (`columns`, `from`, `size`)  [`POST`]
[Parameters] from, size
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/products-by
[Response] Array of Products by the Requested Columns
```

**5. getProductsByCategory()**
```api
[API] getProductsByCategory (`category`,`subscription`)  [`GET`]
[Parameters] category,subscription
[Request] https://example.com/api/v3/products-category
[Response] Array of Products by the Category
```

**6. getProductsBySubcategory()**
```api
[API] getProductsBySubcategory (`subcategory`,`subscription`)  [`GET`]
[Parameters] subcategory,subscription
[Request] https://example.com/api/v3/products-subcategory
[Response] Array of Products by the Subcategory
```

**7. getVariants()**
```api
[API] getVariants (`productId`,`subscription`)  [`GET`]
[Parameters] productId,subscription
[Request] https://example.com/api/v3/variants/<product-id>
[Response] Array of Variants of a Product
```

**8. getFilter()**
```api
[API] getFilter (`options`)  [`POST`]
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/get-filter
[Response] Array of Products Based on the Filter
```

---

## User API's <a id="user-api"></a>

| API List :mag_right: <a id="api-list-user"></a>
-
---

1. getAllUsers ()  **`GET`**

2. getUser (`primaryKey`)  **`GET`**

3. getUserData (`data`, `primaryKey`)  **`POST`**

4. addUser (`data`)  **`POST`**

5. updateUser (`data`, `primaryKey`)  **`POST`**

6. utilUserDetails(`data`, `primaryKey`) **`POST`**

---
| Mandatory Fields In Response :mag_right: <a id="mandatory-fields-user"></a>
-
---

> **For User** [name=Mandatory] 

- User ID [`string`]
- Name [`string`]
- Email [`string`]
- Mobile [`string`]
- Pincode [`string`]
- City [`string`]
- Region [`string`]
- Country [`string`]
- Country Code [`string`]
- Offers [`array`]
- Address [`array of objects ( Max 3 address )`]
- Lat Long [`integer`]
- Optin [`array`]
- Locale [`string`]
- User Type [`string`]
- User Status [`string`]
- Recent Orders (Last 5 Order's Order-ID) [`array`]
- Channels Interacted [`array`]
- Store ID [`string`]
- Store [`string`]
- Open Cart [`array of objects`]
- Last Interacted [`timestamp`]
- Building [`string`]

---
| Parameters Description :mag_right: <a id="parameters-description-user"></a>
-
---

| Parameters | Type | Description |
| - | - | - |
| **`primaryKey`** | string / integer | The primary key of the user. Either userId (or) mobile (or) email
| **`data`** | object | An object containing the data that has to be inseted / updated / deleted

---
| Request and Response Details :mag_right: <a id="request-and-response-details-user"></a>
-
---


**1. getAllUsers()**
```api
[API] getAllUsers ()  [`GET`]
[Request] https://example.com/api/v3/users
[Response] Array of Multiple Users
```

**2. getUser()**
```api
[API] getUser (`primaryKey`)  [`GET`]
[Parameters] primaryKey ( Mobile, Email or UserID )
[Request] https://example.com/api/v3/users/<primary-key>
[Response] Single User Object
```

**3. getUserData()**
```api
[API] getUserData(`data`, `primaryKey`)  [`POST`]
[Parameters] primaryKey ( Mobile, Email or UserID )
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/user-data
[Response] Object of a Single User with the Specified Fields
```

**4. addUser()**
```api
[API] addUser (`data`)  [`GET`]
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/variants/add-users
[Response] If the User has been Added Successfully
```

**5. updateUser()**
```api
[API] updateUser (`data`, `primaryKey`)  [`POST`]
[Parameters] primaryKey ( Mobile, Email or UserID )
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/update-user
[Response] Object of the Columns that have been Updated
```

**6. utilUserDetails()**
```api
[API] utilUserDetails (`data`, `primaryKey`)  [`POST`]
[Parameters] primaryKey ( Mobile, Email or UserID )
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/util-user-details
[Response] Data that has been Updated ( last_interacted, open_cart, channels_interacted )
```

---

## Order API's <a id="order-api"></a>

| API List :mag_right: <a id="api-list-order"></a>
-
---

1. placeOrder (`data`)  **`POST`**

2. updateOrder (`data`)  **`POST`**

3. getOrderStatus (`orderId`)  **`GET`**

4. getOrderDetails (`orderId`)  **`GET`**

---
| Mandatory Fields In Response :mag_right: <a id="mandatory-fields-order"></a>
-
---

> **For Order** [name=Mandatory] 

- Customer Name [`string`]
- Mobile [`string`]
- Address [`string`]
- City [`string`]
- Pincode [`string`]
- Landmark [`string`]
- Nearest Store [`string`]
- Order Items [`array of items ordered`]
- Order Quantity [`array of quantity of respective items ordered`]
- Order ID [`string`]
- Payment Mode [`string`]
- Region [`String`]
- Store Plant [`string`]
- Order Value [`integer`]
- User Source [`string`]
- Order Status [`string`]
- Ordered Time [`Timestamp`]
- Order Reason [`string`]

---
| Parameters Description :mag_right: <a id="parameters-description-order"></a>
-
---

| Parameters | Type | Description |
| - | - | - |
| **`data`** | object | Object containing the customer details along with his cart details
| **`orderId`** | string | Unique order id for that order

---
| Request and Response Details :mag_right: <a id="request-and-response-details-order"></a>
-
---


**1. placeOrder()**
```api
[API] placeOrder ()  [`POST`]
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/place-order
[Response] Object with the details of the Order and Customer
```

**2. updateOrder()**
```api
[API] updateOrder ()  [`POST`]
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/updateOrder
[Response] Object with the Details of the Order that has been Updated
```

**3. getOrderStatus()**
```api
[API] getOrderStatus (`orderId`)  [`GET`]
[Parameters] orderId
[Request] https://example.com/api/v3/order-status
[Response] Order Status of the Specified Order ID
```

**4. getOrderDetails()**
```api
[API] getOrderDetails (`orderId`)  [`GET`]
[Parameters] orderId
[Request] https://example.com/api/v3/order-details
[Response] Order Details of the Specified Order ID
```
---
## Subscription API's <a id="subscription-api"></a>

| API List :mag_right: <a id="api-list-subscription"></a>
-
---


1. getProductsBySubType(`subtype`) **`GET`**

2. getSubscriptionDetailsByVariantId(`variantId`) **`GET`**
3. getSubscribedItemsByUserId(`userId`) **`GET`**
4. getSubscribedItemsByMobileNumber(`mobileNo`) **`GET`**
5. getSubscribedItemsByDate(`fromDate`,`toDate`) **`GET`**
6. addSubscription (`data`)  **`POST`**
7. getAllSubType() **`GET`**
8. deleteSubscription(`subId`) **`POST`**
9. cancelSubscription(`subId`) **`POST`**
10. getSubByMobileAndVariantId(`data`) **`POST` **

---
| Mandatory Fields In Response :mag_right: <a id="mandatory-fields-subscription"></a>
-
---



> **For Subscription** [name=Mandatory] 
- Subscription ID[`string`]
- User ID[`string`]
- Mobile Number[`string`]
- Product ID[`string`]
- Variant ID['string']
- Subscription Type[`string`]
- Start Date[`Timestamp`]
- End Date[`Timestamp`]
- Subscription Times[`string`]


---
| Parameters Description :mag_right: <a id="parameters-description-subscription"></a>
-
---

| Parameters | Type | Description |
| - | - | - |
| **`from`** | integer | The value from which the api has to start fetching the products
| **`size`** | integer | The amount of data that we expect to be returned from the api
| **`productId`** | string (or) integer | The unique id of the product with which it is referred
| **`subType`** | string | The subscription type
| **`variantId`** | string (or) integer | The unique id of the product's variant with which it is referred
| **`columns`** | object | An object containing the key as the column name and the value as the data that has to be searched in that column
| **`options`** | object | An object containing the key as the column name and the value as the data that has to be searched in that column
| **`userId`** | string | The unique ID to identify the user
| **`mobileNo`** | string | The mobile number of the user
 
---
| Request and Response Details :mag_right: <a id="request-and-response-details-subscription"></a>
-
---



**1. getProductBySubType()**
```api
[API] getProduct (`subType`)  [`GET`]
[Parameters] subType
[Request] https://example.com/api/v3/products/<subType>
[Response] Product Object
```
**2. getSubscriptionDetailsByVariantId()**
```api
[API] getProduct (`variantId`)  [`GET`]
[Parameters] variantId
[Request] https://example.com/api/v3/products/<variant-id>
[Response] Single Product Object
```

**3. getSubscribedItemsByUserId()**
```api
[API] getSubscribedItemsByUserId (`userId`)  [`GET`]
[Parameters] userId
[Request] https://example.com/api/v3/get-subscribed-items-userid/<user-id>
[Response] Array of Products Based on the Filter
```
**4. getSubscribedItemsByMobileNo()**
```api
[API] getSubscribedItemsByUserId (`mobileNo`)  [`GET`]
[Parameters] mobileNo
[Request] https://example.com/api/v3/get-subscribed-items-mobile/<mobile-no>
[Response] Array of Products Based on the Filter
```

**5. getSubscribedItemsByDate()**
```api
[API] getSubscribedItemsByUserId (`options`)  [`GET`]
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/get-subscribed-items-by-date
[Response] Array of Products Based on the Filter
```

**6. addSubscription()**
```api
[API] addSubscription (`data`)  [`POST`]
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/add-subscription
[Response] If the subscription has been Added Successfully
```
**7. deleteSubscription()**
```api
[API] deleteSubscription (`variantId`)  [`POST`]
[Parameters] variantId
[Request] https://example.com/api/v3/delete-subscription
[Response] If the product has been deleted from the subscription list
```
**8. getAllSubType()**
```api
[API] getAllSubType (`from`,`size`)  [`GET`]
[Parameters] from,size
[Request] https://example.com/api/v3/get-subscription-types
[Response] Array of Products Based on the Filter
```

**9. getSubByMobileAndVariantId()**
```api
[API] getSubByMobileAndVariantId ('data')  [`POST`]
[Body] Object ( Key - Column, Value - Data to Search )
[Request] https://example.com/api/v3/get-subscription-mobile-variantId
[Response] Array of Products Based on the Filter
```

---

## Appointment API's <a id="appointment-api"></a>

| API List :mag_right: <a id="api-list-appointment"></a>
-
---


1. bookAppointment(`bookAppointmentData`) **`POST`**

2. getAllAppointments(`mobile`) **`GET`**

3. getAppointment(`appointmentId`) **`GET`**
 
4. cancelAppointment(`appointmentId`) **`GET`**
 
5. rescheduleAppointment(`rescheduleData`) **`POST`**

---
| Mandatory Fields In Response :mag_right: <a id="mandatory-fields-appointment"></a>
-
---

> **For Appointment** [name=Mandatory] 
- User ID [`string`]
- Name [`string`]
- Mobile Number [`string`]
- Email [`string`]
- Appointment ['string']
- Service [`string`]
- Date [`string`]
- Slotted [`boolean`]
- Start Time [`string`]
- End Time [`string`]
- Status [`string`]
- Service Status [`string`]
- Custom Therapist [`boolean`]
- Therapist [`string`]
- Notes [`string`]
- Price [`String`]
- Checkin Time [`string`]

---
| Parameters Description :mag_right: <a id="parameters-description-appointment"></a>
-
---

| Parameters | Type | Description |
| - | - | - |
| **`bookAppointmentData`** | object | All the mandatory fields which are required to create an appointment for the user
| **`mobile`** | string | Mobile number of the user which is the unique primary key
| **`appointmentId`** | string (or) integer | The unique appointment ID of the booked appointment
| **`rescheduleData`** | object | This consist of the appointment id, the new date and new time to reschedule the appointment
 
---
| Request and Response Details :mag_right: <a id="request-and-response-details-appointment"></a>
-
---



**1. bookAppointment()**
```api
[API] bookAppointment (`bookAppointmentData`)  [`POST`]
[Parameters] bookAppointmentData
[Request] https://example.com/api/v3/appointments/book
[Response] Single Object with all the Booked Appointment Details
```
**2. getAllAppointments()**
```api
[API] getAllAppointments (`mobile`)  [`GET`]
[Parameters] mobile
[Request] https://example.com/api/v3/appointments/getAll
[Response] Array of Multiple Objects of Appointments Matched With the Passed Mobile
```

**3. getAppointment()**
```api
[API] getAppointment (`appointmentId`)  [`GET`]
[Parameters] appointmentId
[Request] https://example.com/api/v3/appointments/getAppintment
[Response] Single Object With All the Data of the Booked Appointment
```
**4. cancelAppointment()**
```api
[API] cancelAppointment (`appointmentId`)  [`GET`]
[Parameters] appointmentId
[Request] https://example.com/api/v3/appointments/cancelAppointment
[Response] Response Whether the Cancel was true or fase
```

**5. rescheduleAppointment()**
```api
[API] rescheduleAppointment (`rescheduleDate`)  [`GET`]
[Body] rescheduleData (appointmentId, newDate, newTime)
[Request] https://example.com/api/v3/appointments/reschedule
[Response] Response With all the New Changed Values of the Appointment
```
---

## Service API's <a id="service-api"></a>

| API List :mag_right: <a id="api-list-service"></a>
-
---


1. getService(`category`, `subcategory`) **`GET`**

2. getAllServices() **`GET`**

3. getCategories() **`GET`**
 
4. getSubcategories(`category`) **`GET`**

---
| Mandatory Fields In Response :mag_right: <a id="mandatory-fields-service"></a>
-
---

> **For Services** [name=Mandatory] 
- Service ID [`integer or string`]
- Name [`string`]
- Category [`string`]
- Subcategory [`string`]
- Description ['string']
- Image [`string`]
- Duration [`string`]
- Recovery Time [`string`]
- Price [`string`]
- Additional Info [`string`]
- Variants [`array`]
- Variants ID [`array`]
- Offers [`array`]
- Is Add On [`boolean`]
- Has Add On [`boolean`]
- Add Ons [`array`]

---
| Parameters Description :mag_right: <a id="parameters-description-service"></a>
-
---

| Parameters | Type | Description |
| - | - | - |
| **`category`** | string | Category to which a service belong to
| **`subcategory`** | string | Subcategory to which a service belong to
 
---
| Request and Response Details :mag_right: <a id="request-and-response-details-service"></a>
-
---



**1. getService()**
```api
[API] getService (`category`, `subcategory`)  [`POST`]
[Parameters] category, subcategory
[Request] https://example.com/api/v3/services/get
[Response] Single Object with all the Service Details
```
**2. getAllServices()**
```api
[API] getAllAppointments ()  [`GET`]
[Parameters] 
[Request] https://example.com/api/v3/services/getAll
[Response] Array of Multiple Objects of Services
```

**3. getCategories()**
```api
[API] getCategories ()  [`GET`]
[Parameters] 
[Request] https://example.com/api/v3/services/getCategories
[Response] Array of All the Categories Available
```
**4. getSubcategories()**
```api
[API] cancelAppointment (`category`)  [`GET`]
[Parameters] categiry
[Request] https://example.com/api/v3/services/getSubcategory
[Response] Array of Subcategories Which Belong to Passed Category
```
---

## Therapist API's <a id="therapist-api"></a>

| API List :mag_right: <a id="api-list-therapist"></a>
-
---


1. getAllTherapist(`storeId`) **`GET`**

2. get(`therapistId`) **`GET`**

3. getAllTherapistId(`storeId`) **`GET`**

---
| Mandatory Fields In Response :mag_right: <a id="mandatory-fields-therapist"></a>
-
---

> **For Therapist** [name=Mandatory] 
- Name [`string`]
- Mobile [`string`]
- Email [`string`]
- Employee ID ['string']
- Service Handled [`array`]
- Available [boolean]
- Servicable [`boolean`]
- Store ID [`string`]

---
| Parameters Description :mag_right: <a id="parameters-description-therapist"></a>
-
---

| Parameters | Type | Description |
| - | - | - |
| **`storeId`** | string | The unique ID of the store to which the therapist belong to
| **`therpistId`** | string | The unique id of the therapist
 
---
| Request and Response Details :mag_right: <a id="request-and-response-details-therapist"></a>
-
---



**1. getAllTherapist()**
```api
[API] getAllTherapist (`storeId`)  [`POST`]
[Parameters] storeId
[Request] https://example.com/api/v3/therapist/storeId
[Response] Array of Multiple Objects of Services
```
**2. get()**
```api
[API] get (`therapistId`)  [`GET`]
[Parameters] 
[Request] https://example.com/api/v3/therapist/get
[Response] Single Object with all the Therapist Details
```

**3. getAllTherapistId(`storeId`)**
```api
[API] getAllTherapistId (`storeId`)  [`GET`]
[Parameters] 
[Request] https://example.com/api/v3/therapist/getAllTherapistId
[Response] Array of All the Therapist ID Withing the Store
```
---


## Store API's <a id="store-api"></a>

| API List :mag_right: <a id="api-list-store"></a>
-
---


1. getStores(`lat,lng,distance`) **`GET`**

2. getStoresByPlant(`plantName`) **`GET`**

---
| Mandatory Fields In Response :mag_right: <a id="mandatory-fields-store"></a>
-
---

> **For Therapist** [name=Mandatory] 
- Plant Name [`string`]
- Address [`string`]
- Branch Name [`string`]
- City ['string']
- Region [`array`]
- Store Status [boolean]
- Store ID [`string`]

---
| Parameters Description :mag_right: <a id="parameters-description-stores"></a>
-
---

| Parameters | Type | Description |
| - | - | - |
| **`plantName`** | string | The store name
| **`address`** | string | The store address
| **`branchName`** | string | The branch name for the store
| **`city`** | string | The city name
| **`region`** | string | The region name
| **`storeStatus`** | boolean | The status of the store
| **`storeId`** | boolean | The unique id for the store

 
---
| Request and Response Details :mag_right: <a id="request-and-response-details-store"></a>
-
---



**1. getStores()**
```api
[API] getStores (`lat,lng,distance`)  [`POST`]
[Parameters] lat,lng,distance
[Request] https://example.com/api/v3/store/getStores
[Response] Array of Multiple Objects of Stores
```
**2. getStoresByPlantName()**
```api
[API] getStoresByPlantName (`plantName`)  [`GET`]
[Parameters] plantName
[Request] https://example.com/api/v3/stores/getStoresByPlantName
[Response] Single Object with all the Store Details by plant name
```
---