Consultar pedidos
Recuperar pedido por ID
Este endpoint permite que o vendedor (seller) recupere um pedido utilizando o id como referência.
Escopo requerido
| Valor | Descrição |
|---|---|
order-order:read | Permite a leitura de pedidos e dados relacionados. |
Parâmetros da URL
| Campo | Tipo | Descrição | Obrigatório |
|---|---|---|---|
id | ObjectId | ID do pedido na plataforma. | Sim |
Chamada:
GET /v1.0/marketplace/orders/{id} \
Host: apps.eupreciso.com.br \
Authorization: Bearer {access_token} \
Content-Type: application/json \Resposta:
{
"id": "6702ebb49359bd8347435a66",
"status": "new|approved|cancelled|finished",
"created_at": "2024-10-06T19:57:40.574Z",
"approved_at": "2024-10-06T19:58:46.977Z",
"purchased_at": "2024-10-06T19:57:40.574Z",
"updated_at": "2024-10-24T22:12:21.566Z",
"customer": {
"birth_date": "1960-01-27",
"customer_type": "cpf|cnpj",
"document_number": "XXXXXXXXXXX",
"email": "[email protected]",
"name": "Customer Name",
"phones": [
{
"area_code": "47",
"country_code": "55",
"number": "XXXXXXXXX"
}
]
},
"payments": [
{
"gateway": {
"document": "pay_exampledocument123"
},
"description": "Pix",
"installments": 1,
"method": "pix",
"currency": "BRL",
"normalizer": 100,
"amount": 6947
}
],
"amounts": {
"currency": "BRL",
"normalizer": 100,
"total": 5000,
"discount": {
"currency": "BRL",
"normalizer": 100,
"total": 0,
"shared": 0
},
"freight": {
"currency": "BRL",
"normalizer": 100,
"total": 1947,
"shared": 0
},
"comission": {
"currency": "BRL",
"normalizer": 100,
"type": "value",
"total": 500
}
},
"deliveries": [
{
"id": "671ac64594f71864cd8811b6",
"status": "delivered",
"items": [
{
"sequencial": 1,
"amounts": {
"currency": "BRL",
"normalizer": 100,
"total": 5000,
"discount": {
"currency": "BRL",
"normalizer": 100,
"total": 0,
"shared": 0
},
"freight": {
"currency": "BRL",
"normalizer": 100,
"total": 0,
"shared": 0
},
"comission": {
"normalizer": 100,
"type": "value",
"value": 500
}
},
"info": {
"sku": "example_sku",
"id": "6702d9ee5c6008580b5e0e6a",
"name": "Product Name",
"description": "Product description",
"images": ["https://example.com/image.jpg"],
"attributes": [
{
"name": "color",
"value": "black"
}
],
"extras": {},
"dimensions": {
"height": {
"value": 3,
"unit": "cm"
},
"width": {
"value": 11,
"unit": "cm"
},
"length": {
"value": 17,
"unit": "cm"
},
"weight": {
"value": 220,
"unit": "g"
}
}
},
"unit_price": {
"currency": "BRL",
"normalizer": 100,
"value": 5000
},
"measure_unit": "PC",
"quantity": 1
}
],
"shipping": {
"posting_date": "2024-10-09T17:40:36.000Z",
"delivery_date": "2024-10-17T02:04:11.000Z",
"labels": {
"requested_at": "2024-10-06T20:51:30.719Z",
"generated_at": "2024-10-06T20:51:31.202Z",
"url": "https://www.eupreciso.com.br/minhasvendas/pedido/6702ebb49359bd8347435a66/imprimir"
},
"tracking": {
"number": "XXXXXXXXXXXXXXX",
"label_id": "example-label-id-123",
"url": "https://app.example.com/track"
},
"recipient": {
"customer_type": "cpf|cnpj",
"document_number": "XXXXXXXXXXX",
"email": "[email protected]",
"name": "Recipient Name",
"phones": [
{
"area_code": "47",
"country_code": "55",
"number": "XXXXXXXXX"
}
],
"address": {
"zipcode": "89203060",
"street": "Example Street",
"number": "1188",
"district": "Example District",
"city": "Example City",
"state": "SC",
"country": "BR",
"complement": "Example Complement",
"reference": ""
}
},
"pickup_details": {
"agency_id": "15",
"agency_company": "JeT",
"method": "Standard",
"id": "16305",
"company_name": "Company example",
"email": "[email protected]",
"postal_code": "89201270",
"address": "Example Street",
"number": "213",
"complement": "Example Complement",
"district": "Example District",
"city": "Example City",
"state": "SC",
"phone": "47XXXXXXXX",
"latitude": -26.2999739,
"longitude": -48.844277
},
"handling_time": {
"value": 7,
"precision": "days",
"workday": true,
"limit_date": "2024-10-16T17:40:36.000Z"
},
"deadline": {
"value": 8,
"precision": "days",
"workday": true,
"limit_date": "2024-10-17T17:40:36.000Z"
}
}
}
]
}Recuperar pedidos por filtros
Este endpoint permite recuperar uma coleção de pedidos utilizando filtros como referência.
Escopo requerido
| Valor | Descrição |
|---|---|
order-order:read | Permite a leitura de pedidos e dados relacionados. |
Filtros
| Campo | Tipo | Descrição | Obrigatório |
|---|---|---|---|
status | String | Status do pedido, pode ser os seguintes valores: new, approved, cancelled, finished. | Não |
id | String | Id. do pedido. | Não |
updated_at__ge | String (datetime ISO 8601) | Filtra pedidos a partir da data informada (ex.: “2024-08-27T12:15:37.729Z”) | Não |
updated_at__le | String (datetime ISO 8601) | Filtra pedidos até a data informada (ex.: “2024-10-27T12:15:37.729Z”) | Não |
Paginação e Ordenação
| Campo | Tipo | Descrição | Obrigatório |
|---|---|---|---|
_limit | Inteiro | Determina a quantidade de registros a serem retornados. Valor padrão 50. | Não |
_offset | Inteiro | Posição de registro de referência, a partir dele serão retornados os próximos N registros. | Não |
_sort | String | Ordenação, sendo permitido os seguintes valores: | Não |
- created_at:asc | |||
- created_at:desc | |||
- updated_at:asc | |||
- updated_at:desc |
Chamada:
GET /v1.0/marketplace/orders?status=approved&_limit=10&_offset=0 \
Host: apps.eupreciso.com.br \
Authorization: Bearer {access_token} \
Content-Type: application/json \Resposta:
{
"meta": {
"page": {
"limit": 20,
"offset": 150,
"count": 10,
"max_limit": 100
},
"links": {
"previous": "?_offset=130&_limit=20",
"next": "?_offset=170&_limit=20",
"self": "?_offset=150&_limit=20"
}
},
"results": [
{
"id": "6702ebb49359bd8347435a66",
"status": "new|approved|cancelled|finished",
"created_at": "2024-10-06T19:57:40.574Z",
"approved_at": "2024-10-06T19:58:46.977Z",
"purchased_at": "2024-10-06T19:57:40.574Z",
"updated_at": "2024-10-24T22:12:21.566Z",
"customer": {
"birth_date": "1960-01-27",
"customer_type": "cpf|cnpj",
"document_number": "XXXXXXXXXXX",
"email": "[email protected]",
"name": "Customer Name",
"phones": [
{
"area_code": "47",
"country_code": "55",
"number": "XXXXXXXXX"
}
]
},
"payments": [
{
"gateway": {
"document": "pay_exampledocument123"
},
"description": "Pix",
"installments": 1,
"method": "pix",
"currency": "BRL",
"normalizer": 100,
"amount": 6947
}
],
"amounts": {
"currency": "BRL",
"normalizer": 100,
"total": 5000,
"discount": {
"currency": "BRL",
"normalizer": 100,
"total": 0,
"shared": 0
},
"freight": {
"currency": "BRL",
"normalizer": 100,
"total": 1947,
"shared": 0
},
"comission": {
"currency": "BRL",
"normalizer": 100,
"type": "value",
"total": 500
}
},
"deliveries": [
{
"id": "671ac64594f71864cd8811b6",
"status": "delivered",
"items": [
{
"sequencial": 1,
"amounts": {
"currency": "BRL",
"normalizer": 100,
"total": 5000,
"discount": {
"currency": "BRL",
"normalizer": 100,
"total": 0,
"shared": 0
},
"freight": {
"currency": "BRL",
"normalizer": 100,
"total": 0,
"shared": 0
},
"comission": {
"normalizer": 100,
"type": "value",
"value": 500
}
},
"info": {
"sku": "example_sku",
"id": "6702d9ee5c6008580b5e0e6a",
"name": "Product Name",
"description": "Product description",
"images": ["https://example.com/image.jpg"],
"attributes": [
{
"name": "color",
"value": "black"
}
],
"extras": {},
"dimensions": {
"height": {
"value": 3,
"unit": "cm"
},
"width": {
"value": 11,
"unit": "cm"
},
"length": {
"value": 17,
"unit": "cm"
},
"weight": {
"value": 220,
"unit": "g"
}
}
},
"unit_price": {
"currency": "BRL",
"normalizer": 100,
"value": 5000
},
"measure_unit": "PC",
"quantity": 1
}
],
"shipping": {
"posting_date": "2024-10-09T17:40:36.000Z",
"delivery_date": "2024-10-17T02:04:11.000Z",
"labels": {
"requested_at": "2024-10-06T20:51:30.719Z",
"generated_at": "2024-10-06T20:51:31.202Z",
"url": "https://www.eupreciso.com.br/minhasvendas/pedido/6702ebb49359bd8347435a66/imprimir"
},
"tracking": {
"number": "XXXXXXXXXXXXXXX",
"label_id": "example-label-id-123",
"url": "https://app.example.com/track"
},
"recipient": {
"customer_type": "cpf|cnpj",
"document_number": "XXXXXXXXXXX",
"email": "[email protected]",
"name": "Recipient Name",
"phones": [
{
"area_code": "47",
"country_code": "55",
"number": "XXXXXXXXX"
}
],
"address": {
"zipcode": "89203060",
"street": "Example Street",
"number": "1188",
"district": "Example District",
"city": "Example City",
"state": "SC",
"country": "BR",
"complement": "Example Complement",
"reference": ""
}
},
"pickup_details": {
"agency_id": "15",
"agency_company": "JeT",
"method": "Standard",
"id": "16305",
"company_name": "Company example",
"email": "[email protected]",
"postal_code": "89201270",
"address": "Example Street",
"number": "213",
"complement": "Example Complement",
"district": "Example District",
"city": "Example City",
"state": "SC",
"phone": "47XXXXXXXX",
"latitude": -26.2999739,
"longitude": -48.844277
},
"handling_time": {
"value": 7,
"precision": "days",
"workday": true,
"limit_date": "2024-10-16T17:40:36.000Z"
},
"deadline": {
"value": 8,
"precision": "days",
"workday": true,
"limit_date": "2024-10-17T17:40:36.000Z"
}
}
}
]
}
]
}