Order
curl --request GET \
--url https://api.service.getjusto.com/v3/ecommerce/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "ord-123",
"isScheduled": true,
"isConfirmed": true,
"websiteId": "<string>",
"storeId": "<string>",
"code": "123",
"fullCode": "C#123",
"userId": "<string>",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"_id": "<string>",
"placeId": "<string>",
"address": "Av. Apoquindo 3000",
"addressLine2": "Depto 1201",
"addressSecondary": "<string>",
"location": {
"lat": -33.4489,
"lng": -70.6693
}
},
"menuId": "<string>",
"deliverAt": "2020-01-01T00:00:00.000Z",
"timeText": "<string>",
"paymentType": "<string>",
"paymentTypeLabel": "<string>",
"paymentTypeIsIntegration": true,
"tipAmount": 123,
"amountToPay": 123,
"deliveryFee": 123,
"deliveryFeeWithoutDiscount": 123,
"serviceFee": 123,
"itemsPrice": 123,
"totalPrice": 123,
"baseItemsPrice": 123,
"baseTotalPrice": 123,
"itemsPriceBeforeDiscountsAfterProductDiscount": 123,
"totalPriceBeforeDiscountsAfterProductDiscount": 123,
"discountedAmountAfterProductDiscount": 123,
"justoCoinsDiscount": 123,
"websiteCoinsDiscount": 123,
"totalDiscount": 123,
"amountFinancedByWebsite": 123,
"amountFinancedByJusto": 123,
"expectedPreparationDuration": 123,
"deliveryDuration": 123,
"cashAmount": 123,
"source": "<string>",
"buyerName": "<string>",
"phone": "<string>",
"email": "<string>",
"couponId": "<string>",
"couponName": "<string>",
"couponCode": "<string>",
"couponExternalId": "<string>",
"couponDiscount": 123,
"couponPercentageOff": 123,
"couponType": "<string>",
"promotionDiscount": 123,
"promotionIds": [
"<string>"
],
"flagColor": "<string>",
"items": [
{
"_id": "<string>",
"product": {
"_id": "<string>",
"name": "Hamburguesa",
"externalId": "<string>",
"metadata": {},
"priceMetadata": {}
},
"unitPrice": 5990,
"baseUnitPrice": 5990,
"productPrice": 5990,
"baseProductPrice": 5990,
"amount": 2,
"comment": "<string>",
"description": "Bebida: Coca Zero - Comentario: \"Sin cebolla\"",
"promotionId": "<string>",
"promotionDiscount": 123,
"promotionType": "<string>",
"promotionLabel": "<string>",
"modifiers": [
{
"modifierId": "<string>",
"externalId": "<string>",
"name": "Agregados",
"shortName": "<string>",
"metadata": {},
"description": "<string>",
"countById": {},
"countByExternalId": {},
"options": [
{
"optionId": "<string>",
"name": "Queso",
"price": 1000,
"externalId": "<string>",
"metadata": {},
"priceMetadata": {}
}
]
}
]
}
],
"transaction": {
"_id": "<string>",
"totalPrice": 123,
"paymentType": "<string>",
"cardType": "<string>",
"cardLast4": "<string>",
"status": "<string>"
},
"deliveries": [
{
"_id": "<string>",
"price": 2500,
"placeName": "<string>",
"isCash": true,
"instructions": "<string>",
"driverPassword": "5366",
"fromLocation": {
"lat": -33.4489,
"lng": -70.6693
},
"toLocation": {
"lat": -33.4489,
"lng": -70.6693
},
"trackingURL": "<string>",
"orderId": "<string>",
"activatesAt": "2020-01-01T00:00:00.000Z",
"createdAt": "2020-01-01T00:00:00.000Z",
"forDate": "2020-01-01T00:00:00.000Z",
"nearStoreAt": "2020-01-01T00:00:00.000Z",
"pickupAt": "2020-01-01T00:00:00.000Z",
"nearClientAt": "2020-01-01T00:00:00.000Z",
"completedAt": "2020-01-01T00:00:00.000Z",
"canceledAt": "2020-01-01T00:00:00.000Z",
"deliveryExpectedAt": "2020-01-01T00:00:00.000Z",
"estimatedArrivalAtStoreAt": "2020-01-01T00:00:00.000Z",
"driverReceivedAt": "2020-01-01T00:00:00.000Z",
"driverInformation": {},
"deliveryInformation": {},
"externalId": "<string>",
"specialCode": "<string>"
}
],
"orderParams": {},
"hasManagedDelivery": true,
"gift": {},
"billing": {},
"cancellationInfo": {},
"deliveryZoneName": "<string>"
}
}{
"success": "false",
"error": {
"error": "error",
"message": "The request has an error"
}
}Pedidos
Order
GET
/
ecommerce
/
orders
/
{orderId}
Order
curl --request GET \
--url https://api.service.getjusto.com/v3/ecommerce/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/ecommerce/orders/{orderId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"_id": "ord-123",
"isScheduled": true,
"isConfirmed": true,
"websiteId": "<string>",
"storeId": "<string>",
"code": "123",
"fullCode": "C#123",
"userId": "<string>",
"createdAt": "2020-01-01T00:00:00.000Z",
"address": {
"_id": "<string>",
"placeId": "<string>",
"address": "Av. Apoquindo 3000",
"addressLine2": "Depto 1201",
"addressSecondary": "<string>",
"location": {
"lat": -33.4489,
"lng": -70.6693
}
},
"menuId": "<string>",
"deliverAt": "2020-01-01T00:00:00.000Z",
"timeText": "<string>",
"paymentType": "<string>",
"paymentTypeLabel": "<string>",
"paymentTypeIsIntegration": true,
"tipAmount": 123,
"amountToPay": 123,
"deliveryFee": 123,
"deliveryFeeWithoutDiscount": 123,
"serviceFee": 123,
"itemsPrice": 123,
"totalPrice": 123,
"baseItemsPrice": 123,
"baseTotalPrice": 123,
"itemsPriceBeforeDiscountsAfterProductDiscount": 123,
"totalPriceBeforeDiscountsAfterProductDiscount": 123,
"discountedAmountAfterProductDiscount": 123,
"justoCoinsDiscount": 123,
"websiteCoinsDiscount": 123,
"totalDiscount": 123,
"amountFinancedByWebsite": 123,
"amountFinancedByJusto": 123,
"expectedPreparationDuration": 123,
"deliveryDuration": 123,
"cashAmount": 123,
"source": "<string>",
"buyerName": "<string>",
"phone": "<string>",
"email": "<string>",
"couponId": "<string>",
"couponName": "<string>",
"couponCode": "<string>",
"couponExternalId": "<string>",
"couponDiscount": 123,
"couponPercentageOff": 123,
"couponType": "<string>",
"promotionDiscount": 123,
"promotionIds": [
"<string>"
],
"flagColor": "<string>",
"items": [
{
"_id": "<string>",
"product": {
"_id": "<string>",
"name": "Hamburguesa",
"externalId": "<string>",
"metadata": {},
"priceMetadata": {}
},
"unitPrice": 5990,
"baseUnitPrice": 5990,
"productPrice": 5990,
"baseProductPrice": 5990,
"amount": 2,
"comment": "<string>",
"description": "Bebida: Coca Zero - Comentario: \"Sin cebolla\"",
"promotionId": "<string>",
"promotionDiscount": 123,
"promotionType": "<string>",
"promotionLabel": "<string>",
"modifiers": [
{
"modifierId": "<string>",
"externalId": "<string>",
"name": "Agregados",
"shortName": "<string>",
"metadata": {},
"description": "<string>",
"countById": {},
"countByExternalId": {},
"options": [
{
"optionId": "<string>",
"name": "Queso",
"price": 1000,
"externalId": "<string>",
"metadata": {},
"priceMetadata": {}
}
]
}
]
}
],
"transaction": {
"_id": "<string>",
"totalPrice": 123,
"paymentType": "<string>",
"cardType": "<string>",
"cardLast4": "<string>",
"status": "<string>"
},
"deliveries": [
{
"_id": "<string>",
"price": 2500,
"placeName": "<string>",
"isCash": true,
"instructions": "<string>",
"driverPassword": "5366",
"fromLocation": {
"lat": -33.4489,
"lng": -70.6693
},
"toLocation": {
"lat": -33.4489,
"lng": -70.6693
},
"trackingURL": "<string>",
"orderId": "<string>",
"activatesAt": "2020-01-01T00:00:00.000Z",
"createdAt": "2020-01-01T00:00:00.000Z",
"forDate": "2020-01-01T00:00:00.000Z",
"nearStoreAt": "2020-01-01T00:00:00.000Z",
"pickupAt": "2020-01-01T00:00:00.000Z",
"nearClientAt": "2020-01-01T00:00:00.000Z",
"completedAt": "2020-01-01T00:00:00.000Z",
"canceledAt": "2020-01-01T00:00:00.000Z",
"deliveryExpectedAt": "2020-01-01T00:00:00.000Z",
"estimatedArrivalAtStoreAt": "2020-01-01T00:00:00.000Z",
"driverReceivedAt": "2020-01-01T00:00:00.000Z",
"driverInformation": {},
"deliveryInformation": {},
"externalId": "<string>",
"specialCode": "<string>"
}
],
"orderParams": {},
"hasManagedDelivery": true,
"gift": {},
"billing": {},
"cancellationInfo": {},
"deliveryZoneName": "<string>"
}
}{
"success": "false",
"error": {
"error": "error",
"message": "The request has an error"
}
}⌘I