> For the complete documentation index, see [llms.txt](https://docs.antbuddy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.antbuddy.com/huong-dan-tich-hop-api-team-technical-api-integration-guide-technical-team/antcrm/3.-api-get-product.md).

# 3. API get product

1. List of products or details of a product via code on Ant CRM

URL: <https://apiring.antbuddy.com/products>

Method: GET

Content-Type: application/json

| **Parameters** | **Type** | **Required** | **Explain**                                                                                                                                           |
| -------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| code           | string   |              | product code                                                                                                                                          |
| type           | string   |              | Product type. If it is a combo, then the type is passed as combo, and for individual products, the type is product. If not passed, all will be taken. |
| page           | number   |              | Page number, maximum 20 products per page                                                                                                             |
| limit          | number   |              | Number of records per page                                                                                                                            |

Results returned: HTTP Response Code: 200

Response:

\[{ value: "",

name: "test", code: “3609”, productIdApiRing: “”,

\_id: “” }]

1. Add products URL: /products

Method: POST

Content-Type: application/json

| **Parameters**   | **Type** | **Required** | **Explain**                                             |
| ---------------- | -------- | ------------ | ------------------------------------------------------- |
| name             | string   | AND          | Product's name                                          |
| code             | string   | AND          | Product code on CRM                                     |
| productIdApiRing | string   | AND          | Product code                                            |
| value            | string   |              | Amount of money                                         |
| canEdit          | Boolean  |              | Can the product price be updated when placing an order? |

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1,

"code”: 9457 (product code on antcrm) }

2. Edit products

URL: <https://apiring.antbuddy.com/products>

Method: PUT

Headers

```json
{
  "apikey": "<secret key>",
  "Content-Type": "application/json"
}
```

| **Parameters**   | **Type** | **Required**   | **Explain**                                             |
| ---------------- | -------- | -------------- | ------------------------------------------------------- |
| name             | string   |                | Product's name                                          |
| code             | string   |                | Product code on CRM                                     |
| productIdApiRing | string   | **Required**\* | Product code                                            |
| sku              | string   | **Required**\* | Product SKU code                                        |
| value            | string   |                | Amount of money                                         |
| canEdit          | Boolean  |                | Can the product price be updated when placing an order? |
| warehouse        | string   |                | Warehouse ID                                            |
| warehouseCode    | string   |                | Warehouse Code                                          |
| warehouseName    | string   |                | Warehouse Name                                          |
| quantity         | number   |                |                                                         |

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1,

"code”: 9457 (product code on antcrm) }

3. Delete product

URL: <https://apiring.antbuddy.com/products>

Method: DELETE

Content-Type: application/json

| **Parameters**   | **Type** | **Required** | **Explain** |
| ---------------- | -------- | ------------ | ----------- |
| productIdApiRing | string   | AND          |             |

Results returned:

HTTP Response Code: 200

Response:

{

"success": 1

}
