Product catalog
· 8 endpoints
- GET/accounts/{accountId}/zalo/catalogs
- POST/accounts/{accountId}/zalo/catalogs
- GET/accounts/{accountId}/zalo/catalogs/{catalogId}/products
- POST/accounts/{accountId}/zalo/catalogs/{catalogId}/products
- DELETE/accounts/{accountId}/zalo/catalogs/{catalogId}/products
- PATCH/accounts/{accountId}/zalo/catalogs/{catalogId}
- DELETE/accounts/{accountId}/zalo/catalogs/{catalogId}
- PATCH/accounts/{accountId}/zalo/catalogs/{catalogId}/products/{productId}
Product catalogs of the Zalo Business account
GET
/api/v1/accounts/{accountId}/zalo/catalogsScope: chat:readRead from Zalo page by page. url = the catalog.zalo.me link for sending into a conversation (via the link-sending route).
Parameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
pagequery · optional | integer ≥ 0 · default 0 | |
limitquery · optional | integer ≥ 1 · ≤ 50 · default 20 |
Example request
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo/catalogs" \
-H "Authorization: Bearer dpk_xxx"Create a Zalo Business product catalog
POST
/api/v1/accounts/{accountId}/zalo/catalogsScope: crm:writeParameters
accountIdpath · required | string max 200 | Account ID (accounts.zalo_id). Facebook uses the Facebook ID, Telegram uses the Telegram account ID. |
Request body (JSON)
namerequired | string max 200 |
Example request
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo/catalogs" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"string"}'Products in a Zalo Business catalog
GET
/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}/productsScope: chat:readRead from Zalo page by page. Each product has a url (catalog.zalo.me) for sending into a conversation.
Parameters
accountIdpath · required | string max 200 | |
catalogIdpath · required | string max 200 | Catalog ID |
pagequery · optional | integer ≥ 0 · default 0 | |
limitquery · optional | integer ≥ 1 · ≤ 100 · default 100 |
Example request
bash
curl "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}/products" \
-H "Authorization: Bearer dpk_xxx"Add a product to a Zalo Business catalog
POST
/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}/productsScope: crm:writePhotos: photos (links already on Zalo) and / or photo_files (new photos that Deplao uploads to Zalo first).
Parameters
accountIdpath · required | string max 200 | |
catalogIdpath · required | string max 200 | Catalog ID |
Request body (JSON)
namerequired | string max 200 | |
pricerequired | string max 30 | Price, digits only (VND), e.g. "150000" |
descriptionoptional | string max 2000 | |
photosoptional | string[] max 5 items | URLs of photos already on Zalo (e.g. another product's photos), kept in order |
photo_filesoptional | object[] max 5 items | New photos: each item has exactly one of upload_id, library_uuid, url. Deplao uploads them to Zalo first and places them after photos. At most 5 photos + photo_files in total |
└upload_idoptional | string | ID from POST /media/uploads |
└library_uuidoptional | string | UUID of a photo in the media library |
└urloptional | string (uri) | Public http/https photo link; the server downloads it itself |
Example request
bash
curl -X POST "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}/products" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"string","price":"string","description":"string"}'Delete products from a Zalo Business catalog
DELETE
/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}/productsScope: crm:writeDeleted on Zalo and cannot be undone: send confirm=true.
Parameters
accountIdpath · required | string max 200 | |
catalogIdpath · required | string max 200 | Catalog ID |
Request body (JSON)
product_idsrequired | string[] max 100 items | |
confirmoptional | boolean default false |
Example request
bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}/products" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"product_ids":[],"confirm":false}'Rename a Zalo Business product catalog
PATCH
/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}Scope: crm:writeParameters
accountIdpath · required | string max 200 | |
catalogIdpath · required | string max 200 | Catalog ID |
Request body (JSON)
namerequired | string max 200 |
Example request
bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"string"}'Delete a Zalo Business product catalog
DELETE
/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}Scope: crm:writeAlso deletes the products in the catalog on Zalo and cannot be undone: send confirm=true.
Parameters
accountIdpath · required | string max 200 | |
catalogIdpath · required | string max 200 | Catalog ID |
confirmquery · optional | boolean default false | Must be true |
Example request
bash
curl -X DELETE "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}" \
-H "Authorization: Bearer dpk_xxx"Update a product in a Zalo Business catalog
PATCH
/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}/products/{productId}Scope: crm:writeSend the full name, price, description and photos (like the app's edit form) plus the product's created_at (from the product list). Photos to keep: photos; new photos: photo_files.
Parameters
accountIdpath · required | string max 200 | |
catalogIdpath · required | string max 200 | |
productIdpath · required | string max 200 | Product ID |
Request body (JSON)
namerequired | string max 200 | |
pricerequired | string max 30 | Price, digits only (VND), e.g. "150000" |
descriptionoptional | string max 2000 | |
photosoptional | string[] max 5 items | URLs of photos already on Zalo (e.g. another product's photos), kept in order |
photo_filesoptional | object[] max 5 items | New photos: each item has exactly one of upload_id, library_uuid, url. Deplao uploads them to Zalo first and places them after photos. At most 5 photos + photo_files in total |
└upload_idoptional | string | ID from POST /media/uploads |
└library_uuidoptional | string | UUID of a photo in the media library |
└urloptional | string (uri) | Public http/https photo link; the server downloads it itself |
created_atrequired | integer ≥ 0 | The product's created_at (ms) |
Example request
bash
curl -X PATCH "http://127.0.0.1:9900/api/v1/accounts/{accountId}/zalo/catalogs/{catalogId}/products/{productId}" \
-H "Authorization: Bearer dpk_xxx" \
-H "Content-Type: application/json" \
-d '{"name":"string","price":"string","created_at":0}'