# 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

}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.antbuddy.com/huong-dan-tich-hop-api-team-technical-api-integration-guide-technical-team/antcrm/3.-api-get-product.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
