criar pedido
curl --request POST \
--url https://api.teceo.co/store/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "brand_abc",
"items": [
{
"product_id": "prod_abc123",
"quantity": 10
},
{
"product_id": "prod_def456",
"quantity": 5
}
],
"notes": "entregar no período da manhã"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
brand_id: 'brand_abc',
items: [
{product_id: 'prod_abc123', quantity: 10},
{product_id: 'prod_def456', quantity: 5}
],
notes: 'entregar no período da manhã'
})
};
fetch('https://api.teceo.co/store/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.teceo.co/store/v1/orders"
payload = {
"brand_id": "brand_abc",
"items": [
{
"product_id": "prod_abc123",
"quantity": 10
},
{
"product_id": "prod_def456",
"quantity": 5
}
],
"notes": "entregar no período da manhã"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"number": "<string>",
"status": "pending",
"total": 123,
"items_count": 123,
"brand": {
"id": "<string>",
"name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>"
}pedidos
criar pedido
cria um novo pedido para uma marca/distribuidora
POST
/
orders
criar pedido
curl --request POST \
--url https://api.teceo.co/store/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brand_id": "brand_abc",
"items": [
{
"product_id": "prod_abc123",
"quantity": 10
},
{
"product_id": "prod_def456",
"quantity": 5
}
],
"notes": "entregar no período da manhã"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
brand_id: 'brand_abc',
items: [
{product_id: 'prod_abc123', quantity: 10},
{product_id: 'prod_def456', quantity: 5}
],
notes: 'entregar no período da manhã'
})
};
fetch('https://api.teceo.co/store/v1/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.teceo.co/store/v1/orders"
payload = {
"brand_id": "brand_abc",
"items": [
{
"product_id": "prod_abc123",
"quantity": 10
},
{
"product_id": "prod_def456",
"quantity": 5
}
],
"notes": "entregar no período da manhã"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"number": "<string>",
"status": "pending",
"total": 123,
"items_count": 123,
"brand": {
"id": "<string>",
"name": "<string>"
},
"created_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
pedido criado com sucesso
