Update cart item
curl --request PATCH \
--url https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productId": "<string>",
"amount": 123,
"modifiers": [
{
"modifierId": "<string>",
"optionsIds": [
"<string>"
]
}
],
"comment": "<string>"
}
'import requests
url = "https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}"
payload = {
"productId": "<string>",
"amount": 123,
"modifiers": [
{
"modifierId": "<string>",
"optionsIds": ["<string>"]
}
],
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
productId: '<string>',
amount: 123,
modifiers: [{modifierId: '<string>', optionsIds: ['<string>']}],
comment: '<string>'
})
};
fetch('https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}', 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/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'productId' => '<string>',
'amount' => 123,
'modifiers' => [
[
'modifierId' => '<string>',
'optionsIds' => [
'<string>'
]
]
],
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}"
payload := strings.NewReader("{\n \"productId\": \"<string>\",\n \"amount\": 123,\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\",\n \"optionsIds\": [\n \"<string>\"\n ]\n }\n ],\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"productId\": \"<string>\",\n \"amount\": 123,\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\",\n \"optionsIds\": [\n \"<string>\"\n ]\n }\n ],\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productId\": \"<string>\",\n \"amount\": 123,\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\",\n \"optionsIds\": [\n \"<string>\"\n ]\n }\n ],\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"item": {
"_id": "<string>",
"productId": "<string>",
"menuId": "<string>",
"amount": 123,
"quantity": 123,
"comment": "<string>",
"modifiers": [
{}
],
"product": {},
"unitPrice": 123,
"totalPrice": 123
},
"state": {
"_id": "<string>",
"placeId": "<string>",
"menuId": "<string>",
"channel": "<string>",
"tableName": "<string>",
"time": "<string>",
"deliverAt": "<string>",
"timeLabel": "<string>",
"itsStoreOpenAtTime": true,
"paymentType": "<string>",
"paymentTypeIsIntegration": true,
"cardId": "<string>",
"selectedPaymentMethodKey": "<string>",
"otherPaymentType": "<string>",
"couponCode": "<string>",
"loyaltyProgram": {},
"externalLoyaltyProgram": {},
"useExternalLoyalty": true,
"websiteCoinsToSpend": 123,
"externalLoyaltyCoinsToSpend": 123,
"justoCoinsToSpend": 123,
"tipAmount": 123,
"tipPercentage": 123,
"bagsRequired": 123,
"storeId": "<string>",
"sessionEmail": "<string>",
"sessionEmailHasAccount": true,
"sessionPhone": "<string>",
"isOutOfBounds": true,
"currentReducedDemandMessage": "<string>",
"address": {
"_id": "<string>",
"streetAddress": "<string>",
"extendedAddress": "<string>",
"locality": "<string>",
"countryName": "<string>",
"placeId": "<string>",
"location": {
"lat": -33.43219757080078,
"lng": -70.59982299804688
}
},
"store": {
"_id": "<string>",
"acceptDelivery": true,
"acceptGo": true,
"acceptServe": true,
"name": "<string>",
"minimumAnticipationDays": 123,
"currentExtraDeliveryCost": 123,
"hideTip": true,
"forceHideDeliveryTip": true,
"defaultsManagedDelivery": true,
"availableScheduleDaysOptions": [
{
"label": "<string>",
"value": "<string>"
}
],
"extendedAddress": "<string>",
"streetAddress": "<string>",
"location": {
"lat": -33.43219757080078,
"lng": -70.59982299804688
},
"itsOpenNow": true,
"itsOpenAtTime": true,
"disableNowOrders": true,
"availablePaymentMethods": [
{
"paymentMethodKey": "<string>",
"label": "<string>",
"canDeliver": true,
"isIntegration": true,
"allowedDeliveryTypes": [],
"requiresRoundTrip": true,
"isAvailableInV3": true,
"otherPaymentType": "<string>",
"paymentType": "<string>",
"extraPaymentInformation": {}
}
],
"savedUserCards": [
{
"_id": "<string>",
"brandId": "<string>",
"brandName": "<string>",
"label": "<string>",
"last4": "<string>",
"paymentMethodKey": "<string>",
"paymentType": "<string>",
"cardBin": "<string>"
}
]
},
"cart": {
"deliveryFee": 123,
"deliveryFeeWithoutDiscount": 123,
"freeDeliveryProgress": {
"source": "<string>",
"threshold": 123,
"currentItemsPrice": 123,
"missingAmount": 123,
"isFree": true,
"searchedUntil": "<string>"
},
"serviceFee": 123,
"amountToPay": 123,
"totalPrice": 123,
"calculatedTipAmount": 123,
"benefits": [
{
"benefitPromotionId": "<string>",
"type": "<string>",
"label": "<string>",
"totalDiscount": 123,
"productIds": [
"<string>"
]
}
],
"couponStatus": {
"code": "<string>",
"description": "<string>",
"couponId": "<string>",
"discountOnDeliveryFee": 123,
"discountOnFullPrice": 123,
"discountOnItems": 123,
"errorMessage": "<string>",
"errorType": "<string>",
"errorActionHint": "<string>",
"errorActionLinks": [
{
"label": "<string>",
"url": "<string>"
}
],
"allErrors": [
{
"message": "<string>",
"errorType": "<string>",
"actionHint": "<string>",
"actionLinks": [
{
"label": "<string>",
"url": "<string>"
}
],
"minimumOrderPrice": 123,
"currentItemsPrice": 123
}
],
"name": "<string>",
"minimumOrderPrice": 123,
"currentItemsPrice": 123,
"requiresPaymentTypes": [
"<string>"
],
"requiredBINs": [
"<string>"
],
"requiredPaymentMethodCodes": [
"<string>"
]
},
"itemsPrice": 123,
"itemsPriceWithoutDiscount": 123,
"totalLoyaltyDiscount": 123,
"itemsPriceWithoutLoyaltyDiscount": 123,
"itemsPriceWithOnlyItemsDiscount": 123,
"hasDynamicDeliveryFee": true,
"bagAmount": 123,
"calculatedBagsRequired": 123,
"maxBagsAllowed": 123,
"items": [
{
"_id": "<string>",
"amount": 123,
"totalPrice": 123,
"productId": "<string>",
"isOutOfStock": true,
"unitPrice": 123,
"unitPriceWithoutDiscount": 123,
"comment": "<string>",
"outOfStockMessage": "<string>",
"modifiers": [
{}
],
"descriptionItems": [
{}
],
"product": {
"_id": "<string>",
"name": "<string>",
"images": [
{
"_id": "<string>",
"url": "<string>",
"colorsData": {
"blurhash": "<string>",
"background": "<string>",
"front": "<string>"
},
"dimensions": {
"width": 123,
"height": 123
},
"resizedData": {
"thumbnailURL": "<string>",
"smallURL": "<string>",
"mediumURL": "<string>",
"largeURL": "<string>",
"extraLargeURL": "<string>"
}
}
],
"modifiers": [
{}
]
}
}
]
},
"website": {
"_id": "<string>",
"allowsJustoCoins": true,
"allowsWebsiteCoins": true,
"showStoreName": true
},
"billing": {},
"tip": {},
"cashAmount": 123,
"gift": {},
"orderParams": {},
"termSignatures": [
{
"termType": "termsAndConditions",
"version": "<string>"
}
],
"meta": {},
"sessionBirthday": "<string>",
"options": {
"billing": {
"value": {},
"schema": [
{}
],
"required": true,
"countryCode": "CL"
},
"terms": {
"mode": "auto",
"hidden": true,
"checked": true,
"signatures": [
{
"termType": "termsAndConditions",
"version": "<string>"
}
],
"terms": [
{
"termType": "<string>",
"version": "<string>",
"optional": true,
"title": "<string>",
"checkboxLabel": {}
}
]
}
}
}
}
}Carro y checkout
Update cart item
Actualiza cantidad, modificadores o comentario de un item del carrito. Si cambian comentario o modificadores, el cartItemId puede cambiar; usa el item retornado en la respuesta.
PATCH
/
ordering
/
customers
/
{externalCustomerId}
/
websites
/
{domain}
/
cart
/
items
/
{cartItemId}
Update cart item
curl --request PATCH \
--url https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"productId": "<string>",
"amount": 123,
"modifiers": [
{
"modifierId": "<string>",
"optionsIds": [
"<string>"
]
}
],
"comment": "<string>"
}
'import requests
url = "https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}"
payload = {
"productId": "<string>",
"amount": 123,
"modifiers": [
{
"modifierId": "<string>",
"optionsIds": ["<string>"]
}
],
"comment": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
productId: '<string>',
amount: 123,
modifiers: [{modifierId: '<string>', optionsIds: ['<string>']}],
comment: '<string>'
})
};
fetch('https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}', 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/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'productId' => '<string>',
'amount' => 123,
'modifiers' => [
[
'modifierId' => '<string>',
'optionsIds' => [
'<string>'
]
]
],
'comment' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}"
payload := strings.NewReader("{\n \"productId\": \"<string>\",\n \"amount\": 123,\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\",\n \"optionsIds\": [\n \"<string>\"\n ]\n }\n ],\n \"comment\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"productId\": \"<string>\",\n \"amount\": 123,\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\",\n \"optionsIds\": [\n \"<string>\"\n ]\n }\n ],\n \"comment\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.service.getjusto.com/v3/ordering/customers/{externalCustomerId}/websites/{domain}/cart/items/{cartItemId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"productId\": \"<string>\",\n \"amount\": 123,\n \"modifiers\": [\n {\n \"modifierId\": \"<string>\",\n \"optionsIds\": [\n \"<string>\"\n ]\n }\n ],\n \"comment\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"item": {
"_id": "<string>",
"productId": "<string>",
"menuId": "<string>",
"amount": 123,
"quantity": 123,
"comment": "<string>",
"modifiers": [
{}
],
"product": {},
"unitPrice": 123,
"totalPrice": 123
},
"state": {
"_id": "<string>",
"placeId": "<string>",
"menuId": "<string>",
"channel": "<string>",
"tableName": "<string>",
"time": "<string>",
"deliverAt": "<string>",
"timeLabel": "<string>",
"itsStoreOpenAtTime": true,
"paymentType": "<string>",
"paymentTypeIsIntegration": true,
"cardId": "<string>",
"selectedPaymentMethodKey": "<string>",
"otherPaymentType": "<string>",
"couponCode": "<string>",
"loyaltyProgram": {},
"externalLoyaltyProgram": {},
"useExternalLoyalty": true,
"websiteCoinsToSpend": 123,
"externalLoyaltyCoinsToSpend": 123,
"justoCoinsToSpend": 123,
"tipAmount": 123,
"tipPercentage": 123,
"bagsRequired": 123,
"storeId": "<string>",
"sessionEmail": "<string>",
"sessionEmailHasAccount": true,
"sessionPhone": "<string>",
"isOutOfBounds": true,
"currentReducedDemandMessage": "<string>",
"address": {
"_id": "<string>",
"streetAddress": "<string>",
"extendedAddress": "<string>",
"locality": "<string>",
"countryName": "<string>",
"placeId": "<string>",
"location": {
"lat": -33.43219757080078,
"lng": -70.59982299804688
}
},
"store": {
"_id": "<string>",
"acceptDelivery": true,
"acceptGo": true,
"acceptServe": true,
"name": "<string>",
"minimumAnticipationDays": 123,
"currentExtraDeliveryCost": 123,
"hideTip": true,
"forceHideDeliveryTip": true,
"defaultsManagedDelivery": true,
"availableScheduleDaysOptions": [
{
"label": "<string>",
"value": "<string>"
}
],
"extendedAddress": "<string>",
"streetAddress": "<string>",
"location": {
"lat": -33.43219757080078,
"lng": -70.59982299804688
},
"itsOpenNow": true,
"itsOpenAtTime": true,
"disableNowOrders": true,
"availablePaymentMethods": [
{
"paymentMethodKey": "<string>",
"label": "<string>",
"canDeliver": true,
"isIntegration": true,
"allowedDeliveryTypes": [],
"requiresRoundTrip": true,
"isAvailableInV3": true,
"otherPaymentType": "<string>",
"paymentType": "<string>",
"extraPaymentInformation": {}
}
],
"savedUserCards": [
{
"_id": "<string>",
"brandId": "<string>",
"brandName": "<string>",
"label": "<string>",
"last4": "<string>",
"paymentMethodKey": "<string>",
"paymentType": "<string>",
"cardBin": "<string>"
}
]
},
"cart": {
"deliveryFee": 123,
"deliveryFeeWithoutDiscount": 123,
"freeDeliveryProgress": {
"source": "<string>",
"threshold": 123,
"currentItemsPrice": 123,
"missingAmount": 123,
"isFree": true,
"searchedUntil": "<string>"
},
"serviceFee": 123,
"amountToPay": 123,
"totalPrice": 123,
"calculatedTipAmount": 123,
"benefits": [
{
"benefitPromotionId": "<string>",
"type": "<string>",
"label": "<string>",
"totalDiscount": 123,
"productIds": [
"<string>"
]
}
],
"couponStatus": {
"code": "<string>",
"description": "<string>",
"couponId": "<string>",
"discountOnDeliveryFee": 123,
"discountOnFullPrice": 123,
"discountOnItems": 123,
"errorMessage": "<string>",
"errorType": "<string>",
"errorActionHint": "<string>",
"errorActionLinks": [
{
"label": "<string>",
"url": "<string>"
}
],
"allErrors": [
{
"message": "<string>",
"errorType": "<string>",
"actionHint": "<string>",
"actionLinks": [
{
"label": "<string>",
"url": "<string>"
}
],
"minimumOrderPrice": 123,
"currentItemsPrice": 123
}
],
"name": "<string>",
"minimumOrderPrice": 123,
"currentItemsPrice": 123,
"requiresPaymentTypes": [
"<string>"
],
"requiredBINs": [
"<string>"
],
"requiredPaymentMethodCodes": [
"<string>"
]
},
"itemsPrice": 123,
"itemsPriceWithoutDiscount": 123,
"totalLoyaltyDiscount": 123,
"itemsPriceWithoutLoyaltyDiscount": 123,
"itemsPriceWithOnlyItemsDiscount": 123,
"hasDynamicDeliveryFee": true,
"bagAmount": 123,
"calculatedBagsRequired": 123,
"maxBagsAllowed": 123,
"items": [
{
"_id": "<string>",
"amount": 123,
"totalPrice": 123,
"productId": "<string>",
"isOutOfStock": true,
"unitPrice": 123,
"unitPriceWithoutDiscount": 123,
"comment": "<string>",
"outOfStockMessage": "<string>",
"modifiers": [
{}
],
"descriptionItems": [
{}
],
"product": {
"_id": "<string>",
"name": "<string>",
"images": [
{
"_id": "<string>",
"url": "<string>",
"colorsData": {
"blurhash": "<string>",
"background": "<string>",
"front": "<string>"
},
"dimensions": {
"width": 123,
"height": 123
},
"resizedData": {
"thumbnailURL": "<string>",
"smallURL": "<string>",
"mediumURL": "<string>",
"largeURL": "<string>",
"extraLargeURL": "<string>"
}
}
],
"modifiers": [
{}
]
}
}
]
},
"website": {
"_id": "<string>",
"allowsJustoCoins": true,
"allowsWebsiteCoins": true,
"showStoreName": true
},
"billing": {},
"tip": {},
"cashAmount": 123,
"gift": {},
"orderParams": {},
"termSignatures": [
{
"termType": "termsAndConditions",
"version": "<string>"
}
],
"meta": {},
"sessionBirthday": "<string>",
"options": {
"billing": {
"value": {},
"schema": [
{}
],
"required": true,
"countryCode": "CL"
},
"terms": {
"mode": "auto",
"hidden": true,
"checked": true,
"signatures": [
{
"termType": "termsAndConditions",
"version": "<string>"
}
],
"terms": [
{
"termType": "<string>",
"version": "<string>",
"optional": true,
"title": "<string>",
"checkboxLabel": {}
}
]
}
}
}
}
}Authorizations
JWT Token
Path Parameters
ID del customer en el sistema externo. Es independiente por app.
Dominio canónico del website Justo.
ID del item del carrito.
Body
application/json
Datos actualizados del item.
⌘I