curl --request GET \
--url https://lojinha.dev/api/v1/:customer/orders/:id \
--header 'Authorization: Bearer <token>'
{
"order": {
"id": "4f24a75c-792a-4aff-9265-19deb198be07",
"store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
"customerId": "7b16fb4f-6c54-4f7c-a751-3027b451b4ed",
"addressId": "96c0e914-0094-4694-b735-a54633f8dfbc",
"price": 8000,
"originalPrice": null,
"status": "CREATED",
"createdAt": "2023-07-23T22:04:52.234Z",
"updatedAt": "2023-07-24T15:00:44.852Z",
"deletedAt": null,
"products": [
{
"id": "4cf35a0f-7f25-43ef-8e5e-208fbfeb1bd0",
"store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
"status": "ACTIVE",
"name": "A Tormenta de Espadas",
"slug": "a-tormenta-de-espadas",
"description": "<p>Terceiro livro da série</p>",
"price": 8000,
"originalPrice": 12000,
"quantity": 9,
"sku": "LI-004",
"createdAt": "2023-07-22T00:51:44.685Z",
"updatedAt": "2023-07-24T02:09:03.948Z",
"deletedAt": null,
"order": {
"quantity": 1,
"price": 8000
}
}
],
"address": {
"id": "96c0e914-0094-4694-b735-a54633f8dfbc",
"customerId": "7b16fb4f-6c54-4f7c-a751-3027b451b4ed",
"alias": "Casa",
"zipcode": "87045-700",
"street": "Praça Pioneiro Antônio Laurentino Tavares",
"state": "PR",
"city": "Maringá",
"country": "Brasil",
"neightborhood": "Jd. América",
"number": "200",
"complement": "Casa Azul",
"createdAt": "2023-07-24T14:46:19.941Z",
"updatedAt": null,
"deletedAt": null
}
}
}
Retorna um pedido pelo id.
curl --request GET \
--url https://lojinha.dev/api/v1/:customer/orders/:id \
--header 'Authorization: Bearer <token>'
{
"order": {
"id": "4f24a75c-792a-4aff-9265-19deb198be07",
"store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
"customerId": "7b16fb4f-6c54-4f7c-a751-3027b451b4ed",
"addressId": "96c0e914-0094-4694-b735-a54633f8dfbc",
"price": 8000,
"originalPrice": null,
"status": "CREATED",
"createdAt": "2023-07-23T22:04:52.234Z",
"updatedAt": "2023-07-24T15:00:44.852Z",
"deletedAt": null,
"products": [
{
"id": "4cf35a0f-7f25-43ef-8e5e-208fbfeb1bd0",
"store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
"status": "ACTIVE",
"name": "A Tormenta de Espadas",
"slug": "a-tormenta-de-espadas",
"description": "<p>Terceiro livro da série</p>",
"price": 8000,
"originalPrice": 12000,
"quantity": 9,
"sku": "LI-004",
"createdAt": "2023-07-22T00:51:44.685Z",
"updatedAt": "2023-07-24T02:09:03.948Z",
"deletedAt": null,
"order": {
"quantity": 1,
"price": 8000
}
}
],
"address": {
"id": "96c0e914-0094-4694-b735-a54633f8dfbc",
"customerId": "7b16fb4f-6c54-4f7c-a751-3027b451b4ed",
"alias": "Casa",
"zipcode": "87045-700",
"street": "Praça Pioneiro Antônio Laurentino Tavares",
"state": "PR",
"city": "Maringá",
"country": "Brasil",
"neightborhood": "Jd. América",
"number": "200",
"complement": "Casa Azul",
"createdAt": "2023-07-24T14:46:19.941Z",
"updatedAt": null,
"deletedAt": null
}
}
}
Show child attributes
Show child attributes
DRAFT | ACTIVE
string
com HTML
Stock Keeping Unit
, pode
ser o código de barras de um produto úniconull
Show child attributes
{
"order": {
"id": "4f24a75c-792a-4aff-9265-19deb198be07",
"store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
"customerId": "7b16fb4f-6c54-4f7c-a751-3027b451b4ed",
"addressId": "96c0e914-0094-4694-b735-a54633f8dfbc",
"price": 8000,
"originalPrice": null,
"status": "CREATED",
"createdAt": "2023-07-23T22:04:52.234Z",
"updatedAt": "2023-07-24T15:00:44.852Z",
"deletedAt": null,
"products": [
{
"id": "4cf35a0f-7f25-43ef-8e5e-208fbfeb1bd0",
"store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
"status": "ACTIVE",
"name": "A Tormenta de Espadas",
"slug": "a-tormenta-de-espadas",
"description": "<p>Terceiro livro da série</p>",
"price": 8000,
"originalPrice": 12000,
"quantity": 9,
"sku": "LI-004",
"createdAt": "2023-07-22T00:51:44.685Z",
"updatedAt": "2023-07-24T02:09:03.948Z",
"deletedAt": null,
"order": {
"quantity": 1,
"price": 8000
}
}
],
"address": {
"id": "96c0e914-0094-4694-b735-a54633f8dfbc",
"customerId": "7b16fb4f-6c54-4f7c-a751-3027b451b4ed",
"alias": "Casa",
"zipcode": "87045-700",
"street": "Praça Pioneiro Antônio Laurentino Tavares",
"state": "PR",
"city": "Maringá",
"country": "Brasil",
"neightborhood": "Jd. América",
"number": "200",
"complement": "Casa Azul",
"createdAt": "2023-07-24T14:46:19.941Z",
"updatedAt": null,
"deletedAt": null
}
}
}