How to send a barcode via API?

Hey everyone, I handle the integration and need to send the barcode via API on the product POST route — is that possible?

Hello @bernardoveras, how are you?

Welcome to the VTEX community.

Both in the product and SKU import documentation and in the VTEX Sales App documentation, we can see that in VTEX, barcode values are always used as values for the SkuEan field.

SkuEan: unique identification code of the SKU (barcode), accepts up to 13 numeric characters. If the CodigoReferenciaSKU field has been filled in, this field is no longer required.

So basically it would be a matter of following the Create SKU EAN API documentation to associate each barcode with each SKU using the SKU EAN field:

curl --request post \
	--url https://apiexamples.vtexcommercestable.com.br/api/catalog/pvt/stockkeepingunit/{SkuId}/ean/{Barcode} \
	--header 'Accept: application/json' \
	--header 'Content-Type: application/json' \
	--header 'X-VTEX-API-AppKey: ' \
	--header 'X-VTEX-API-AppToken: '

Cheers!