logo
enes

Products

Last update: 6 hours ago by Irais Aguirre

Integration summary

  • Base URL: https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services
  • Token: admin token, in the Authorization: Bearer {{admin-token}} header (how to generate it)
  • Endpoints on this page:
    • POST /v1/catalog/{{waba_id}}/{{catalog_id}}/items_batch: Manage products in batch
    • POST /v1/catalog/{{waba_id}}/{{catalog_id}}/localized_items_batch: Manage localized products in batch
    • GET /v1/catalog/{{waba_id}}/{{catalog_id}}/check_batch_request_status/{{handle}}: Check batch request status
    • GET /v1/catalog/{{waba_id}}/{{catalog_id}}/products: List products

Create, update, and delete products in batch (including products localized by language and country), check the status of batch requests, and list the products in a catalog. If the request succeeds, every service returns HTTP 200.

Manage products in batch

Create, update, or delete products in a catalog with a single request. Processing is asynchronous: use the handles in the response to check the request status.

Request

Manage products in batch request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/catalog/{{waba_id}}/{{catalog_id}}/items_batch
MethodPOST
Typeapplication/json

Headers

Manage products in batch headers:

NameDescriptionTypeRequirements
Content-Typeapplication/jsonStringRequired
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Manage products in batch parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
catalog_idCatalog ID.StringRequired

Body

Manage products in batch body fields:

NameDescriptionTypeRequirements
requestsOperations to run on the catalog.List of product request objectsRequired

Product request object

NameDescriptionTypeRequirements
methodOperation to run. Possible values:
  • CREATE
  • UPDATE
  • DELETE
Must be sent in uppercase.
StringRequired
retailer_idUnique product identifier in your system (for example, its SKU). This is the value you send in productRetailerId in C-Commerce messages.String
  • Required.
  • With DELETE, the product must exist in the catalog.
dataProduct information. With UPDATE, send only the fields you want to change.Product data object
  • Conditional.
  • Required if method is CREATE.
  • Not needed with DELETE.

Product data object

Fields marked as required are only validated when method is CREATE.

NameDescriptionTypeRequirements
nameProduct title.String
  • Required.
  • Can't be empty.
descriptionProduct description.String
  • Required.
  • Can't be empty.
  • Up to 9,999 characters.
availabilityProduct availability. Possible values:
  • in stock
  • out of stock
  • preorder
  • available for order
  • discontinued
StringRequired
conditionProduct condition. Possible values:
  • new
  • refurbished
  • used
StringRequired
priceProduct price, for example, 150.00. It's sent to Meta together with currency (for example, 150.00 MXN).String
  • Required.
  • With UPDATE, also send currency so the price is updated.
currencyISO 4217 currency code, for example, MXN or USD.String
  • Required.
  • Must be a valid ISO 4217 code.
image_urlURL of the product image.String
  • Required.
  • Must be a valid URL.
urlURL of the website where the product can be purchased.String
  • Required.
  • Must be a valid URL.
brandProduct brand.StringOptional
categoryGoogle product category. Accepts the category path or its ID, for example, Apparel & Accessories > Clothing > Shirts & Tops or 212. See the Google taxonomy.StringOptional

Example

Complete Manage products in batch example:

curl --location 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/catalog/{{waba_id}}/{{catalog_id}}/items_batch' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{admin-token}}' \
--data '{
"requests": [
{
"method": "CREATE",
"retailer_id": "ENGLISH_COURSE_001",
"data": {
"name": "Intensive English course",
"description": "Live 3-hour classes on Saturdays.",
"availability": "in stock",
"condition": "new",
"price": "1000.00",
"currency": "MXN",
"image_url": "https://www.example.com/images/english-course-001.png",
"url": "https://www.example.com/courses/intensive-english",
"brand": "Example Academy"
}
},
{
"method": "UPDATE",
"retailer_id": "ENGLISH_COURSE_002",
"data": {
"availability": "out of stock"
}
},
{
"method": "DELETE",
"retailer_id": "ENGLISH_COURSE_003"
}
]
}'

Response

Manage products in batch response:

NameDescriptionType
handlesRequest identifiers. Use them to check the request status.List of String
validation_statusValidation errors per product. Only included if Meta found errors.List of validation status objects

Validation status object

NameDescriptionType
retailer_idThe product's retailer_id.String
errorsErrors found in the product.List of validation error objects

Validation error object

NameDescriptionType
messageError description.String
{
"handles": [
"AcxExampleHandle0001aBcDeFgHiJkLmNoPqRsTuVwXyZ"
]
}


Manage localized products in batch

Create, update, or delete localized information (by language or country) for products that already exist in the catalog. Processing is asynchronous: use the handles in the response to check the request status.

Request

Manage localized products in batch request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/catalog/{{waba_id}}/{{catalog_id}}/localized_items_batch
MethodPOST
Typeapplication/json

Headers

Manage localized products in batch headers:

NameDescriptionTypeRequirements
Content-Typeapplication/jsonStringRequired
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Manage localized products in batch parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
catalog_idCatalog ID.StringRequired

Body

Manage localized products in batch body fields:

NameDescriptionTypeRequirements
item_typeItem type. Must be PRODUCT_ITEM.StringRequired
requestsOperations to run on the catalog.List of localized request objectsRequired

Localized request object

NameDescriptionTypeRequirements
methodOperation to run. Possible values:
  • CREATE
  • UPDATE
  • DELETE
Must be sent in uppercase.
StringRequired
localizationLanguage or country the information applies to.Localization objectRequired
dataLocalized product information.Localized data objectRequired

Localization object

NameDescriptionTypeRequirements
typeLocalization type. Possible values:
  • LANGUAGE
  • COUNTRY
StringRequired
valueLanguage or country. For example, en_XX or fr_XX for a language, and US or FR for a country.StringRequired

Localized data object

Send only the fields that change for the given localization.

NameDescriptionTypeRequirements
idThe product's retailer_id.StringRequired
titleProduct title.StringOptional
descriptionProduct description.StringOptional
availabilityProduct availability in the country, for example, in stock.StringOptional
pricePrice and currency, for example, 9.99 USD.StringOptional
sale_price_effective_dateSale period.StringOptional
linkURL of the website where the product can be purchased.StringOptional
brandProduct brand.StringOptional
colorProduct color.StringOptional
sizeProduct size.StringOptional
materialProduct material.StringOptional
patternProduct pattern or print.StringOptional

Example

Complete Manage localized products in batch example:

curl --location 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/catalog/{{waba_id}}/{{catalog_id}}/localized_items_batch' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{admin-token}}' \
--data '{
"item_type": "PRODUCT_ITEM",
"requests": [
{
"method": "CREATE",
"localization": {
"type": "LANGUAGE",
"value": "en_XX"
},
"data": {
"id": "ENGLISH_COURSE_001",
"title": "Intensive English course",
"description": "Live 3-hour classes on Saturdays."
}
},
{
"method": "CREATE",
"localization": {
"type": "COUNTRY",
"value": "US"
},
"data": {
"id": "ENGLISH_COURSE_001",
"availability": "in stock",
"price": "59.99 USD"
}
}
]
}'

Response

Manage localized products in batch response:

NameDescriptionType
handlesRequest identifiers. Use them to check the request status.List of String
{
"handles": [
"AcxExampleHandle0002aBcDeFgHiJkLmNoPqRsTuVwXyZ"
]
}


Check batch request status

Returns the result of a product batch or localized product batch request.

Request

Check batch request status request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/catalog/{{waba_id}}/{{catalog_id}}/check_batch_request_status/{{handle}}
MethodGET

Headers

Check batch request status headers:

NameDescriptionTypeRequirements
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

Check batch request status parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
catalog_idCatalog ID.StringRequired
handleOne of the handles returned by the batch request.StringRequired

Example

Complete Check batch request status example:

curl --location 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/catalog/{{waba_id}}/{{catalog_id}}/check_batch_request_status/{{handle}}' \
--header 'Authorization: Bearer {{admin-token}}'

Response

Check batch request status response:

NameDescriptionType
dataRequest status.List of batch status objects

Batch status object

NameDescriptionType
handleRequest identifier.String
statusRequest status, for example, finished.String
errors_total_countTotal number of errors.Number
errorsErrors found while processing the request.List of batch error objects

Batch error object

NameDescriptionType
linePosition of the item in the requests list.Number
idThe product's retailer_id.String
messageError description.String

Request with no errors:

{
"data": [
{
"handle": "AcxExampleHandle0001aBcDeFgHiJkLmNoPqRsTuVwXyZ",
"status": "finished",
"errors_total_count": 0,
"errors": []
}
]
}

Request with errors:

{
"data": [
{
"handle": "AcxExampleHandle0002aBcDeFgHiJkLmNoPqRsTuVwXyZ",
"status": "finished",
"errors_total_count": 1,
"errors": [
{
"line": 0,
"id": "ENGLISH_COURSE_001",
"message": "Invalid value: The value passed at position 0 (id=ENGLISH_COURSE_001) is invalid."
}
]
}
]
}


List products

Request

List products request:

URLhttps://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/catalog/{{waba_id}}/{{catalog_id}}/products
MethodGET

Headers

List products headers:

NameDescriptionTypeRequirements
AuthorizationAdmin token. See Generate authentication token.StringRequired

Parameters

List products parameters:

NameDescriptionTypeRequirements
waba_idWhatsApp Business Account ID.StringRequired
catalog_idCatalog ID.StringRequired
return_only_approved_productsIf true, only products approved by Meta are returned. Sent as a query parameter.Boolean
  • Optional.
  • Default: false.

Example

Complete List products example:

curl --location 'https://{{url}}/whatsapp-bsp-admin-ext-endpoint-ws/services/v1/catalog/{{waba_id}}/{{catalog_id}}/products?return_only_approved_products=true' \
--header 'Authorization: Bearer {{admin-token}}'

Response

List products response:

The service returns a list of products.

NameDescriptionType
idProduct ID in Meta.String
retailerIdProduct identifier in your system.String
nameProduct title.String
descriptionProduct description.String
availabilityProduct availability.String
conditionProduct condition.String
priceFormatted price, for example, $1,000.00.String
currencyISO 4217 currency code.String
inventoryNumber of units in stock.Integer
imageUrlURL of the product image.String
urlURL of the website where the product can be purchased.String
[
{
"id": "7001234567890123",
"name": "Intensive English course",
"retailerId": "ENGLISH_COURSE_001",
"imageUrl": "https://www.example.com/images/english-course-001.png",
"inventory": 100,
"availability": "in stock",
"price": "$1,000.00",
"currency": "MXN",
"condition": "new",
"description": "Live 3-hour classes on Saturdays.",
"url": "https://www.example.com/courses/intensive-english"
}
]

Previous
Link catalogs
Next
Product feeds