Skip to content

Pesquisar vendas

POST
/sales/search

Retorna as vendas que tenham os parâmetros pesquisados

Autorizações

Bearer

Generate a token

TipoHTTP (bearer)

Parâmetros

Parâmetros de Cabeçalho

Community-id*

Identificador da comunidade

Tipostring
Obrigatório
Exemplo"test"

Corpo da Requisição

application/json
JSON
{
"filter": {
"filters": [
{
"path": "string",
"value": "string",
"comparison": "string"
}
]
}
}

Respostas

Lista de vendas encontradas

application/json
JSON
[
{
"token": "81778d07-92ee-4f13-b177-043905322cd3",
"createdAt": "2018-05-29T15:34:11.118Z",
"updatedAt": "2018-05-30T17:34:11.118Z",
"currency": "BRL",
"items": {
"id": "5bb2575199d7179dfe85be02",
"kind": "product",
"createdAt": "2018-05-29T15:34:11.118Z",
"updatedAt": "2018-05-30T17:34:11.118Z",
"name": "6-Person dome Tent",
"published": true,
"content": {
"kind": "markdown",
"markdown": "lorem ipsum lorem harlem shakem"
},
"caption": "Algo incrível",
"currency": "BRL",
"defaultPrice": {
"currency": "BRL",
"amount": 10000
},
"shippable": false,
"package": {
"width": 5,
"depth": 5,
"height": 0.2,
"weight": 0.2
},
"skus": [
{
"_id": "string",
"alias": "string",
"price": {
"currency": "BRL",
"amount": 10000
},
"priceFrom": {
"currency": "BRL",
"amount": 10000
},
"attributes": [
{
"key": "string",
"optionName": "string",
"value": "string"
}
],
"gallery": [
{
"name": "Icon-iOS-TendaEdu.png",
"path": "/tendaedu/uploads/a0081244-f2e6-402e-9999-4ea22fc10c4e/Icon-iOS-TendaEdu.png",
"url": "https://cdn.layers.digital/tendaedu/uploads/a0081244-f2e6-402e-9999-4ea22fc10c4e/Icon-iOS-TendaEdu.png",
"thumb": "https://api.layers.digital/v1/media/thumb/png:1024x1024/tendaedu/uploads/a0081244-f2e6-402e-9999-4ea22fc10c4e/Icon-iOS-TendaEdu.png",
"size": 56878,
"mime": "image/png",
"width": 0,
"height": 0,
"orientation": "string"
}
],
"caption": "Algo incrível",
"plan": {
"interval": "string",
"intervalCount": 1,
"cyclesLimit": 0,
"price": {
"currency": "BRL",
"amount": 10000
},
"initialPrice": {
"currency": "BRL",
"amount": 10000
},
"trialDays": 0,
"startsAt": "string",
"endsAt": "string",
"chargeRemainingCyclesOnly": true
},
"inventoryId": "string",
"reference": {
"resourceKind": "string",
"resourceId": "string",
"dynamicInventory": true,
"dynamicForm": true
}
}
],
"options": [
{
"key": "color",
"name": "Color"
}
],
"gallery": [
{
"name": "Icon-iOS-TendaEdu.png",
"path": "/tendaedu/uploads/a0081244-f2e6-402e-9999-4ea22fc10c4e/Icon-iOS-TendaEdu.png",
"url": "https://cdn.layers.digital/tendaedu/uploads/a0081244-f2e6-402e-9999-4ea22fc10c4e/Icon-iOS-TendaEdu.png",
"thumb": "https://api.layers.digital/v1/media/thumb/png:1024x1024/tendaedu/uploads/a0081244-f2e6-402e-9999-4ea22fc10c4e/Icon-iOS-TendaEdu.png",
"size": 56878,
"mime": "image/png",
"width": 0,
"height": 0,
"orientation": "string"
}
],
"tags": [
"string"
],
"formId": "string",
"variants": [
{
"alias": "item-alias",
"attributes": [
{
"key": "string",
"optionName": "string",
"value": "string"
}
],
"gallery": [
{
"name": "Icon-iOS-TendaEdu.png",
"path": "/tendaedu/uploads/a0081244-f2e6-402e-9999-4ea22fc10c4e/Icon-iOS-TendaEdu.png",
"url": "https://cdn.layers.digital/tendaedu/uploads/a0081244-f2e6-402e-9999-4ea22fc10c4e/Icon-iOS-TendaEdu.png",
"thumb": "https://api.layers.digital/v1/media/thumb/png:1024x1024/tendaedu/uploads/a0081244-f2e6-402e-9999-4ea22fc10c4e/Icon-iOS-TendaEdu.png",
"size": 56878,
"mime": "image/png",
"width": 0,
"height": 0,
"orientation": "string"
}
],
"id": "c4a27fea-7908-4e70-bc70-a81837c2e8f3",
"price": {
"currency": "BRL",
"amount": 10000
}
}
]
},
"customer": {
"name": "Moquidesia da Silva",
"email": "email@example.com",
"phone": "(11) 99999-9999",
"birth": "20/02/1993",
"address": {
"title": "Casa",
"code": "74482-290",
"address": "Rua São José",
"address2": "BL 2, AP 42",
"number": "891",
"district": "Leblon",
"city": "Rio de Janeiro",
"state": "RJ",
"country": "BR",
"default": true
},
"document": {
"kind": "cnpj",
"value": "54.732.169/0001-65"
}
},
"payment": {
"status": "paid",
"statusChangedAt": "2018-05-29T15:34:11.118Z",
"tags": [
"open"
],
"method": {
"key": "iugu:credit_card",
"sourceId": "5be1e52da3b4d2002330059c",
"method": "credit_card",
"strategy": "installment",
"installments": 0,
"discount": {
"kind": "percent",
"percent": 0.2,
"fixed": {
"currency": "BRL",
"amount": 10000
}
}
}
},
"shipping": {
"required": true,
"method": {
"hash": "67b69634f9880a282c14a0f0cb7ba20cf5d677e9",
"service": "Correios",
"description": "SEDEX 10",
"currency": "BRL",
"price": {
}
},
"address": {
"title": "Casa",
"code": "74482-290",
"address": "Rua São José",
"address2": "BL 2, AP 42",
"number": "891",
"district": "Leblon",
"city": "Rio de Janeiro",
"state": "RJ",
"country": "BR",
"default": true
}
},
"discounts": [
{
"name": "discounts.payment_method_discount",
"location": "payment",
"discount": {
"kind": "percent",
"percent": 0.2,
"fixed": {
"currency": "BRL",
"amount": 10000
}
},
"value": {
"currency": "BRL",
"amount": 1
}
}
],
"owned": {
"items": {
},
"discounts": {
},
"shipping": {
},
"taxes": {
},
"total": {
}
}
}
]

Exemplos

cURL
JavaScript
PHP
Python