# Product API

API ini digunakan untuk menambah produk, menambah unit produk, menambah kategori produk, mengedit produk, menghapus produk, dll dalam modul Sales SRM.

### **Get Product with Pagination**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| URL        | http\://\[server]/dolphin/apiv1/graph/products?start=0\&count=2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: \[<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner\_id]”,<br>    “createdDate”: 1603099191614,<br>    “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>    “modifiedDate”: 1603099258387,<br>    “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>    “name”: “\[name]”,<br>    “productCode”: “\[product\_code]”,<br>    “price”: \[price],<br>    “unitId”: “{\”name\”:\”\[name]\”,\”id\”:\”\[id]\”}”,<br>    “categoryId”: “{\”name\”:\”\[name]\”,\”id\”:\”\[id]\”}”,<br>    “userAccess”: “\[everyone, owner, group, selectedGroup]”<br>   },<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner\_id]”,<br>    “createdDate”: 1594891612640,<br>    “createdBy”: “2e6cb05e5c20f1ffda1a1801128546ef”,<br>    “modifiedDate”: 1603101105188,<br>    “modifiedBy”: “8e8c2328425057241e808b6abe6881da”,<br>    “name”: “\[name]”,<br>    “price”: \[price],<br>    “unitId”: “{\”name\”:\”\[name]\”,\”id\”:\”\[id]\”}”,<br>    “categoryId”: “{\”name\”:\”name\”,\”id\”:\”\[id]\”}”,<br>    “stock”: \[stock],<br>    “userAccess”: “\[everyone, owner, group, selectedGroup]”,<br>    “userAccessId”: \[<br>     “\[userAccessId]”<br>    ],<br>    “quantityPurchase”: true<br>   }<br>  ],<br>  “hasMore”: true,<br>  “nextIndex”: 2,<br>  “prevIndex”: 0,<br>  “totalResults”: 22<br>}</p> |

### **Get Product by Product Id**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/\[product\_id]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>ProductId : \[product\_id]</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: {<br>   “id”: “\[id]”,<br>   “owner”: “\[owner\_id]”,<br>   “createdDate”: 1595073751385,<br>   “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>   “modifiedDate”: 1595144418926,<br>   “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>   “name”: “\[name]”,<br>   “productCode”: “\[productCode]”,<br>   “price”: \[price],<br>   “unitId”: “<br>{\”name\”:\”\[name]\”,\”id\”:\”\[id]\”}”,<br>   “categoryId”: “<br>{\”name\”:\”\[name]\”,\”id\”:\”\[id]\”}”,<br>   “stock”: \[stock],<br>   “userAccess”: “\[everyone, owner, group, selectedGroup]”,<br>   “quantityPurchase”: true<br>  },<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Get Product by Product Code**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/code/\[product\_code]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>productCode : \[product\_code]</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: {<br>   “id”: “\[id]”,<br>   “owner”: “\[owner\_id]”,<br>   “createdDate”: 1595073751385,<br>   “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>   “modifiedDate”: 1595144418926,<br>   “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>   “name”: “\[name]”,<br>   “productCode”: “\[productCode]”,<br>   “price”: \[price],<br>   “unitId”: “<br>{\”name\”:\”\[name]\”,\”id\”:\”\[id]\”}”,<br>   “categoryId”: “<br>{\”name\”:\”\[name]\”,\”id\”:\”\[id]\”}”,<br>   “stock”: \[stock],<br>   “userAccess”: “\[everyone, owner, group, selectedGroup]”,<br>   “quantityPurchase”: true<br>  },<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Add Product**

| Method     | POST                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/add                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Body       | <p>Body Example :<br>{<br>  “name”: “Sales CRM”,<br>  “productCode”: “123”,<br>  “price”: 1000000,<br>  “unitId”: “\[unitId]”,<br>  “categoryId”: “\[categoryId]”,<br>  “stock”: 10,<br>  “userAccess”: “\[everyone, owner, owner group, group]”,<br>  “quantityPurchase”: true<br>}<br></p><p><strong>Note</strong> : If the selected user access is selectedGroup, then you must enter userAccessId.</p>                                                                                                                                                                                                                                                  |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: {<br>   “id”: “\[id]”,<br>   “owner”: “\[owner\_id]”,<br>   “createdDate”: 1603162398941,<br>   “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>   “modifiedDate”: 1603162398941,<br>   “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>   “name”: “Sales CRM”,<br>   “productCode”: “123”,<br>   “price”: 1000000,<br>   “unitId”: “\[unitId]”,<br>   “categoryId”: “\[categoryId]”,<br>   “stock”: 10,<br>   “userAccess”: “\[everyone, owner, group, selectedGroup]”,<br>   “quantityPurchase”: true<br>},<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |

### **Add Multiple Product**

| Method     | POST                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/add/multiple                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Body       | <p>Body Example :<br>\[<br>  {<br>   “name”: “Product 1”,<br>   “productCode”: “01”,<br>   “price”: 1000000,<br>   “unitId”: “\[unitId]”,<br>   “categoryId”: “\[categoryId]”,<br>   “stock”: 10,<br>   “userAccess”: “\[everyone, owner, owner group, group]”,<br>   “quantityPurchase”: true<br>  },<br>  {<br>   “name”: “Product 2”,<br>   “productCode”: “02”,<br>   “price”: 2000000,<br>   “unitId”: “\[unitId]”,<br>   “categoryId”: “\[categoryId]”,<br>   “stock”: 20,<br>   “userAccess”: “\[everyone, owner, owner group, group]”,<br>   “quantityPurchase”: true<br>  }<br>]<br></p><p><strong>Note</strong> : If the selected user access is selectedGroup, then you must enter userAccessId.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: \[<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner\_id]”,<br>    “createdDate”: 1603165923106,<br>    “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>    “modifiedDate”: 1603165923106,<br>    “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>    “name”: “Product 1”,<br>    “productCode”: “01”,<br>    “price”: 1000000,<br>    “unitId”: “\[unitId]”,<br>    “categoryId”: “\[catgoryId]”,<br>    “stock”: 10,<br>    “userAccess”: “\[everyone, owner, group, selectedGroup]”,<br>    “quantityPurchase”: true<br>   },<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner\_id]”,<br>    “createdDate”: 1603165923183,<br>    “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>    “modifiedDate”: 1603165923183,<br>    “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>    “name”: “Product 2”,<br>    “productCode”: “02”,<br>    “price”: 2000000,<br>    “unitId”: “\[unitId]”,<br>    “categoryId”: “\[categoryId]”,<br>    “stock”: 20,<br>    “userAccess”: “\[everyone, owner, group, selectedGroup]”,<br>    “quantityPurchase”: true<br>   }<br>  ],<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Edit Product**

| Method     | PUT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/edit                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Body       | <p>Body Example :<br>{<br>  “id” : “\[id]”,<br>  “name”: “Product 1”,<br>  “productCode”: “01”,<br>  “price”: 1500000,<br>  “unitId”: “\[unitId]”,<br>  “categoryId”: “\[categoryId]”,<br>  “stock”: 100,<br>  “userAccess”: “\[everyone, owner, owner group, group]”,<br>  “quantityPurchase”: true<br>}<br></p><p><strong>Note</strong> : If you update user access to selectedGroup, then you must enter userAccessId.</p>                                                                                                                                                                                                                                         |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: {<br>   “id”: “\[id]”,<br>   “owner”: “\[owner\_id]”,<br>   “createdDate”: 1603174958991,<br>   “createdBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>   “modifiedDate”: 1603174958991,<br>   “modifiedBy”: “ac2c37cf90ee51edf54b2e4bc2298e03”,<br>   “name”: “Product 1”,<br>   “productCode”: “01”,<br>   “price”: 1500000,<br>   “unitId”: “\[unitId]”,<br>   “categoryId”: “\[categoryId]”,<br>   “stock”: 100,<br>   “userAccess”: “\[everyone, owner, group, selectedGroup]”,<br>   “quantityPurchase”: true<br>  },<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Delete Product**

| Method     | PUT                                                                                                                                                             |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/delete/\[product\_id]                                                                                            |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>ProductId : \[product\_id]</p>                                                                                   |
| Body       |                                                                                                                                                                 |
| Status     | 200                                                                                                                                                             |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: “Product Deleted”,<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Search Product**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/search?query=\[query]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>Query : \[e.g Customer Service]</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Response   | <p>{<br>“status”: “success”,<br>“data”: \[<br>{<br>“id”: “\[id]”,<br>“owner”: “\[owner\_id]”,<br>“createdDate”: 1595073751385,<br>“createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>“modifiedDate”: 1595144418926,<br>“modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>“name”: “Customer Service”,<br>“productCode”: “\[productCode]”,<br>“price”: 1500000,<br>“unitId”: “{\”name\”:\”\[name]\”,\”id\”:\”\[id]\”}”,<br>“categoryId”: “{\”name\”:\”\[name]\”,\”id\”:\”\[id]\”}”,<br>“stock”: 100,<br>“userAccess”: “\[everyone, owner, group, selectedGroup]”,<br>“quantityPurchase”: true<br>}<br>],<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |

### **Get Product Unit with Pagination**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/unit?start=0\&count=2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: \[<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner\_id]”,<br>    “createdDate”: 1594883155056,<br>    “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “modifiedDate”: 1594883155056,<br>    “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “name”: “\[name]”<br>   },<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner\_id]”,<br>    “createdDate”: 1594883195857,<br>    “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “modifiedDate”: 1594883195857,<br>    “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “name”: “\[name]”<br>   }<br>  ],<br>  “hasMore”: true,<br>  “nextIndex”: 2,<br>  “prevIndex”: 0,<br>  “totalResults”: 9<br>}</p> |

### **Get Product Unit by Product Unit Id**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                           |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/unit/\[unit\_id]                                                                                                                                                                                                                                                                                                                                                            |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>unitId : \[unit\_id]</p>                                                                                                                                                                                                                                                                                                                                                    |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: {<br>   “id”: “\[id]”,<br>   “owner”: “\[owner\_id]”,<br>   “createdDate”: 1594883155056,<br>   “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>   “modifiedDate”: 1594883155056,<br>   “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>   “name”: “\[name]”<br>  },<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Add Product Unit**

| Method     | POST                                                                                                                                                               |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Media Type | application/json                                                                                                                                                   |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/unit/add                                                                                                            |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                           |
| Body       | <p>Body Example :<br>{<br>  “name”: “LINE”<br>}</p>                                                                                                                |
| Status     | 200                                                                                                                                                                |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: “Product Unit Added”,<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Delete Product Unit**

| Method     | PUT                                                                                                                                                                  |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                     |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/unit/delete/\[unit\_id]                                                                                               |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>unitId : \[unit\_id]</p>                                                                                              |
| Body       |                                                                                                                                                                      |
| Status     | 200                                                                                                                                                                  |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: “Product Unit Deleted”,<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Get Product Category with Pagination**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/category?start=0\&count=2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: \[<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner\_id]”,<br>    “createdDate”: 1594883331431,<br>    “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “modifiedDate”: 1594883331431,<br>    “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “name”: “\[name]”<br>   },<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner\_id]”,<br>    “createdDate”: 1594883346713,<br>    “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “modifiedDate”: 1594883346713,<br>    “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “name”: “\[name]”<br>   }<br>  ],<br>  “hasMore”: true,<br>  “nextIndex”: 2,<br>  “prevIndex”: 0,<br>  “totalResults”: 10<br>}</p> |

### **Get Product Category by Product Category Id**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                           |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/category/\[category\_id]                                                                                                                                                                                                                                                                                                                                                    |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>categoryId : \[category\_id]</p>                                                                                                                                                                                                                                                                                                                                            |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: {<br>   “id”: “\[id]”,<br>   “owner”: “\[owner\_id]”,<br>   “createdDate”: 1594883395633,<br>   “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>   “modifiedDate”: 1594883395633,<br>   “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>   “name”: “\[name]”<br>  },<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Add Product Category**

| Method     | POST                                                                                                                                                                   |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                       |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/category/add                                                                                                            |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                               |
| Body       | <p>Body Example :<br>{<br>  “name”: “Omni Channel”<br>}</p>                                                                                                            |
| Status     | 200                                                                                                                                                                    |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: “Product Category Added”,<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Delete Product Category**

| Method     | PUT                                                                                                                                                                      |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Media Type | application/json                                                                                                                                                         |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/category/delete/\[category\_id]                                                                                           |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>categoryId : \[category\_id]</p>                                                                                          |
| Body       |                                                                                                                                                                          |
| Status     | 200                                                                                                                                                                      |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: “Product Category Deleted”,<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 0<br>}</p> |

### **Get Product Timelines with Pagination**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/timelines/\[product\_id]?start=0\&count=2                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>productId : \[product\_id]</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: \[<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner\_id]”,<br>    “createdDate”: 1595217170619,<br>    “createdBy”: “8e8c2328425057241e808b6abe6881da”,<br>    “modifiedDate”: 1595217170619,<br>    “modifiedBy”: “8e8c2328425057241e808b6abe6881da”,<br>    “productId”: “\[productId]”,<br>    “action”: “add”,<br>    “actionType”: “\[actionType]”,<br>    “payload”: “{\”id\”:\”\[id]\”}”<br>   }<br>  ],<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 1<br>}</p> |

### **Get Product Changelog with Pagination**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| URL        | http\://\[server]/dolphin/apiv1/graph/products/changelog/\[product\_id]?start=0\&count=4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>productId : \[product\_id]</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Response   | <p>{<br>  “status”: “success”,<br>  “data”: \[<br>   {<br>    “id”: “\[id]”,<br>    “owner”: “\[owner]”,<br>    “createdDate”: 1595073786872,<br>    “createdBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “modifiedDate”: 1595073786872,<br>    “modifiedBy”: “c04ca68f4c031e5c7cd6d3675b67e3a5”,<br>    “productId”: “\[product\_id]”,<br>    “action”: “edit”,<br>    “field”: “price”,<br>    “oldValue”: “\[oldValue]”,<br>    “newValue”: “\[newValue]”,<br>    “actionType”: “\[actionType]”<br>   }<br>  ],<br>  “hasMore”: false,<br>  “nextIndex”: 0,<br>  “prevIndex”: 0,<br>  “totalResults”: 1<br>}</p> |
