... | @@ -167,50 +167,73 @@ https://baas.kinvey.com/appdata/{{app-key}}/assortment |
... | @@ -167,50 +167,73 @@ https://baas.kinvey.com/appdata/{{app-key}}/assortment |
|
]
|
|
]
|
|
}
|
|
}
|
|
|
|
|
|
### GET
|
|
### GET AVAILABLE
|
|
https://baas.kinvey.com/appdata/{{app-key}}/Harvests
|
|
https://baas.kinvey.com/appdata/{{app-key}}/assortment?query={"id_producer":"{{idusuario}}"}&fields=available,canceled
|
|
|
|
|
|
|
|
Obs: Os valores {{idusuario}} e {{app-key}} devem ser substituídos pelos dados que se deseja obter na operação.
|
|
|
|
|
|
#### Exemplo de retorno
|
|
#### Exemplo de retorno
|
|
[
|
|
[
|
|
{
|
|
{
|
|
"_id": "5af4db1b8ad21e249a8c6cac",
|
|
"_id": "5b049c319720683ab826a1ab",
|
|
"id_producer": "5ae4eb537864c356779d5562fa0",
|
|
|
|
"canceled": "false",
|
|
"canceled": "false",
|
|
"organics": [
|
|
"available": [
|
|
{
|
|
|
|
"organic": {
|
|
|
|
"name": "melancia",
|
|
|
|
"measurement": "un",
|
|
|
|
"image": "dakjflksdjflskdfjkl"
|
|
|
|
},
|
|
|
|
"quantity": "5",
|
|
|
|
"price": "6,6"
|
|
|
|
},
|
|
|
|
{
|
|
{
|
|
"organic": {
|
|
"name": "Maçã Vermelha",
|
|
"name": "laranja",
|
|
"measurement": "kg",
|
|
"measurement": "un",
|
|
"quantity": "150",
|
|
"image": "dakjflksdjflskdfjkl"
|
|
"price": "5,5",
|
|
},
|
|
"image": {
|
|
"quantity": "5",
|
|
"_downloadURL": "http://storage.googleapis.com/f043309f51f746e495a9c4a6a4fae3cf/2da6265e-39db-4291-8ba8-530b7cd70892/maca.jpg"
|
|
"price": "5,5"
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"organic": {
|
|
"name": "Abacate",
|
|
"name": "limão",
|
|
"measurement": "un",
|
|
"measurement": "un",
|
|
"quantity": "200",
|
|
"image": "dakjflksdjflskdfjkl"
|
|
"price": "10,3",
|
|
},
|
|
"image": {
|
|
"quantity": "5",
|
|
"_downloadURL": "http://storage.googleapis.com/f043309f51f746e495a9c4a6a4fae3cf/403097ff-78f2-4463-9ca0-0251e3f78fa3/abacate.jpg"
|
|
"price": "5,5"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
],
|
|
"_acl": {
|
|
"_acl": {
|
|
"creator": "5ae4eb0b4c356779d5562e2f"
|
|
"creator": "5b0087f9e7944c29fda4658d"
|
|
},
|
|
}
|
|
"_kmd": {
|
|
}
|
|
"lmt": "2018-05-10T23:51:55.674Z",
|
|
]
|
|
"ect": "2018-05-10T23:51:55.674Z"
|
|
|
|
}
|
|
|
|
}
|
|
### GET AVAILABLE
|
|
|
|
https://baas.kinvey.com/appdata/{{app-key}}/assortment?query={"id_producer":"{{idusuario}}"}&fields=available,canceled
|
|
|
|
|
|
|
|
Obs: Os valores {{idusuario}} e {{app-key}} devem ser substituídos pelos dados que se deseja obter na operação.
|
|
|
|
|
|
|
|
#### Exemplo de retorno
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"_id": "5b0095dc9720683ab81978b6",
|
|
|
|
"canceled": "false",
|
|
|
|
"required": [
|
|
|
|
{
|
|
|
|
"name": "Maçã Vermelha",
|
|
|
|
"measurement": "kg",
|
|
|
|
"quantity": "135",
|
|
|
|
"image": {
|
|
|
|
"_downloadURL": "http://storage.googleapis.com/f043309f51f746e495a9c4a6a4fae3cf/2da6265e-39db-4291-8ba8-530b7cd70892/maca.jpg"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name": "Abacate",
|
|
|
|
"measurement": "un",
|
|
|
|
"quantity": "190",
|
|
|
|
"image": {
|
|
|
|
"_downloadURL": "http://storage.googleapis.com/f043309f51f746e495a9c4a6a4fae3cf/403097ff-78f2-4463-9ca0-0251e3f78fa3/abacate.jpg"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"_acl": {
|
|
|
|
"creator": "5b0087f9e7944c29fda4658d"
|
|
|
|
}
|
|
|
|
}
|
|
] |
|
] |
|
|
|
\ No newline at end of file |