Buscar ofertas
curl --request POST \
--url https://api.example.com/offers/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"page.number": 123,
"page.size": 123,
"sort": [
{}
],
"filters": {}
}
'import requests
url = "https://api.example.com/offers/search"
payload = {
"page.number": 123,
"page.size": 123,
"sort": [{}],
"filters": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({'page.number': 123, 'page.size': 123, sort: [{}], filters: {}})
};
fetch('https://api.example.com/offers/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"total": 1,
"pageStart": 0,
"pageSize": 10,
"totalPages": 1,
"_links": { "self": { "href": "/zipconsig-marketplace/offers/search?pageStart=0&pageSize=10" } },
"_embedded": [
{
"_embedded": {
"id": 4521,
"cpf": "52998224725",
"offerer": true,
"loanValue": 10000.00,
"installmentsNumber": 36,
"employer": "Empresa ABC",
"status": "pending",
"hasGuarantee": "false"
},
"_links": { "self": { "href": "/zipconsig-marketplace/offers/4521" } }
}
]
}
Ofertas
Buscar ofertas
Busca paginada de ofertas com filtros e ordenação
POST
/
offers
/
search
Buscar ofertas
curl --request POST \
--url https://api.example.com/offers/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"page.number": 123,
"page.size": 123,
"sort": [
{}
],
"filters": {}
}
'import requests
url = "https://api.example.com/offers/search"
payload = {
"page.number": 123,
"page.size": 123,
"sort": [{}],
"filters": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({'page.number': 123, 'page.size': 123, sort: [{}], filters: {}})
};
fetch('https://api.example.com/offers/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"total": 1,
"pageStart": 0,
"pageSize": 10,
"totalPages": 1,
"_links": { "self": { "href": "/zipconsig-marketplace/offers/search?pageStart=0&pageSize=10" } },
"_embedded": [
{
"_embedded": {
"id": 4521,
"cpf": "52998224725",
"offerer": true,
"loanValue": 10000.00,
"installmentsNumber": 36,
"employer": "Empresa ABC",
"status": "pending",
"hasGuarantee": "false"
},
"_links": { "self": { "href": "/zipconsig-marketplace/offers/4521" } }
}
]
}
Endpoint público — não exige autenticação.
Parâmetros
integer
Número da página, começando em 0 (padrão:
0)integer
Itens por página — de 5 a 100 (padrão:
10)array
Array de
{field, direction} (direction: asc ou desc)object
Objeto com chaves
and / or / not, cada uma um array de {field, operator, value}. Operadores
aceitos: eq, ne, lte, gte, lt, gt, startswith, between, like, ilike, in, notIn,
isNull.Exemplo
curl -X POST https://hml.zipdin.com.br/zipconsig-marketplace/offers/search \
-H "Content-Type: application/json" \
-d '{
"page": { "number": 0, "size": 10 },
"sort": [{ "field": "createdAt", "direction": "desc" }],
"filters": { "and": [{ "field": "status", "operator": "eq", "value": "pending" }] }
}'
{
"total": 1,
"pageStart": 0,
"pageSize": 10,
"totalPages": 1,
"_links": { "self": { "href": "/zipconsig-marketplace/offers/search?pageStart=0&pageSize=10" } },
"_embedded": [
{
"_embedded": {
"id": 4521,
"cpf": "52998224725",
"offerer": true,
"loanValue": 10000.00,
"installmentsNumber": 36,
"employer": "Empresa ABC",
"status": "pending",
"hasGuarantee": "false"
},
"_links": { "self": { "href": "/zipconsig-marketplace/offers/4521" } }
}
]
}
