- Produtos
- Cadastrar produto
Produtos
Cadastrar produto
Cadastrar produto
POST
/products
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/products \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"cProd": "<string>",
"xProd": "<string>",
"NCM": "<string>",
"cEAN": "<string>",
"uCom": "<string>",
"orig": 123,
"vUnCom": 123.45
}'
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/products \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"cProd": "<string>",
"xProd": "<string>",
"NCM": "<string>",
"cEAN": "<string>",
"uCom": "<string>",
"orig": 123,
"vUnCom": 123.45
}'Autenticação
x-api-key
required
string
API Key da empresa.
Body
application/json
cProd
required
string
Código interno do produto.
xProd
required
string
Descrição.
NCM
required
string
NCM (8 dígitos).
cEAN
string
GTIN
uCom
required
string
Unidade comercial.
orig
required
integer
Origem da mercadoria (tabela da NF-e).
vUnCom
number
Valor unitário padrão.
Respostas
| Status | Descrição |
|---|---|
201 | Produto criado. |
400 | Body inválido (campo obrigatório ausente, formato incorreto ou campo não permitido). |
401 | Credencial ausente, inválida ou expirada. |
curl -X POST "https://api.treeunfe.com.br/api/v1/products" \
-H "x-api-key: SUA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cProd": "6654",
"xProd": "PLACA DE IDENTIFICACAO",
"NCM": "83100000",
"cEAN": "SEM GTIN",
"uCom": "UN",
"orig": 0,
"vUnCom": 0
}'
curl -X POST "https://api.treeunfe.com.br/api/v1/products" \
-H "x-api-key: SUA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"cProd": "6654",
"xProd": "PLACA DE IDENTIFICACAO",
"NCM": "83100000",
"cEAN": "SEM GTIN",
"uCom": "UN",
"orig": 0,
"vUnCom": 0
}'
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/products \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"cProd": "<string>",
"xProd": "<string>",
"NCM": "<string>",
"cEAN": "<string>",
"uCom": "<string>",
"orig": 123,
"vUnCom": 123.45
}'
curl --request POST \
--url https://api.treeunfe.com.br/api/v1/products \
--header 'x-api-key: <api-key>' \
--header 'x-api-key: <x_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"cProd": "<string>",
"xProd": "<string>",
"NCM": "<string>",
"cEAN": "<string>",
"uCom": "<string>",
"orig": 123,
"vUnCom": 123.45
}'