Skip to content

Upsells do Carrinho

GET /cart/upsell/{locationId}

Retorna produtos de upsell sugeridos com base no carrinho atual

Parâmetros da URL

ParâmetroTipoObrigatórioDescrição
locationIdstringSimID da localização do upsell (ex: cart-page, checkout-page)

Parâmetros de Query

ParâmetroTipoObrigatórioDescrição
limitintegerNãoNúmero de itens por página (padrão: 10, máximo: 100)
offsetintegerNãoDeslocamento de registros (padrão: 0)
fieldsarrayNãoArray de campos específicos para retornar
conditionobjectNãoObjeto de condições de filtro
orderarrayNãoArray de objetos de ordenação
variationMaparrayNãoMapa de variações (chave: productId, valor: variationId)

Resposta de Sucesso

HTTP Status: 200 OK

1{
2 "id": 1234,
3 "displayTitle": "Compre agora!",
4 "displayDescription": "Garanta agora seu produto com desconto!",
5 "displayButtonText": "Adicionar ao meu carrinho",
6 "quantity": 3,
7 "upsellProduct": {
8 "id": 1234,
9 "type": "product",
10 "sku": "PGP-MU-001",
11 "name": "Produto Genérico Padrão - Modelo Único",
12 "priority": 1,
13 "basePrice": 0,
14 "active": true,
15 "review": null,
16 "isGiftCard": false,
17 "stock": {
18 "productId": 1234,
19 "productStorageId": 0,
20 "availableStock": 20,
21 "reservedStock": 0,
22 "updatedAt":10"
23 },
24 "stocks": [
25 {
26 "productId": 1234,
27 "productStorageId": 1,
28 "availableStock": 20,
29 "reservedStock": 0,
30 "updatedAt":10"
31 }
32 ],
33 "originalPrice": {
34 "comparisonPrice": 0,
35 "salePrice": 0,
36 "markup": 0,
37 "ruleId": 0,
38 "ruleTrigger": "original",
39 "ruleName": "Original",
40 "availableForSale": true,
41 "basePrice": false,
42 "priceWithDiscount": 0,
43 "installments": []
44 },
45 "price": {
46 "comparisonPrice": 0,
47 "salePrice": 3259,
48 "markup": 0,
49 "ruleId": 1,
50 "ruleTrigger": "automatic",
51 "ruleName": "A product price-rule",
52 "availableForSale": true,
53 "basePrice": false,
54 "priceWithDiscount": 3239,
55 "installments": []
56 },
57 "priceRules": null,
58 "brand": null,
59 "flags": {
60 "subscription": false,
61 "service": false,
62 "showInSite": true,
63 "saleWithoutStock": false,
64 "minimumStock": 1
65 },
66 "tax": {
67 "mpn": "",
68 "ean": "",
69 "ncm": "",
70 "exclusive": false
71 },
72 "indicatedProducts": [],
73 "relatedProducts": [],
74 "filters": [],
75 "seals": [],
76 "mainCategory": {
77 "id": 1,
78 "name": "Utilidades Diversas",
79 "url": "utilidades-diversas"
80 },
81 "categories": [
82 {
83 "id": 1,
84 "name": "Utilidades Diversas",
85 "url": "utilidades-diversas"
86 }
87 ],
88 "categoryBreadcrumb": [
89 {
90 "id": 1,
91 "name": "Utilidades Diversas",
92 "url": "utilidades-diversas"
93 }
94 ],
95 "dimensions": {
96 "shippingCargoTypeId": null,
97 "additionalTime": 0,
98 "width": 34.5,
99 "height": 16.5,
100 "length": 34.5,
101 "weight": 3.52
102 },
103 "parentProductId": null,
104 "combination": [],
105 "currentAttributes": [],
106 "variations": {
107 "valueList": [],
108 "combinations": [],
109 "attributes": []
110 },
111 "medias": [
112 {
113 "id": 123,
114 "type": "image",
115 "title": "",
116 "alternativeText": null,
117 "file": "\/upload\/media\/produto-media.webp",
118 "originalFile": "\/upload\/media\/produto-media.png",
119 "size": null,
120 "originalSize": null,
121 "width": null,
122 "height": null,
123 "url": null
124 }
125 ],
126 "bannerGroups": [],
127 "status": null,
128 "createdAt":28",
129 "updatedAt":42",
130 "url": "produto-generico-padrao-12345.html",
131 "urls": [],
132 "linkedTradePolicies": null,
133 "description": {
134 "id": 1234,
135 "tradePolicyId": 1,
136 "name": "Produto Genérico Padrão",
137 "shortDescription": "Um produto versátil e confiável, ideal para diferentes tipos de uso no dia a dia.",
138 "videoUrl": null,
139 "searchDescription": "Produto multifuncional, feito com materiais de qualidade e design pensado para atender diversas necessidades. Perfeito para quem busca praticidade e bom custo-benefício.",
140 "description": null,
141 "customDescription1": null,
142 "customDescription2": null,
143 "customDescription3": null,
144 "measureTable": null,
145 "seoTitle": null,
146 "seoDescription": null,
147 "seoKeywords": null,
148 "seoCanonical": null,
149 "seoSocialTitle": null,
150 "seoSocialDescription": null,
151 "seoTwitterImageUrl": null,
152 "seoGraphImageUrl": null,
153 "seoGoogleCategoryId": 1,
154 "seoIndexOnGoogle": null,
155 "seoGoogleCondition": "new",
156 "seoGoogleAgeGroup": null,
157 "seoGoogleGender": "unisex",
158 "productId": 1234,
159 "productCategoryId": null,
160 "productBrandId": null,
161 "productPageId": null
162 }
163 },
164 "priceRule": {
165 "id": 1234,
166 "name": "Product price-rule",
167 "trigger": "automatic",
168 "ruleTarget": "product",
169 "origin": "pair-offer",
170 "applyInGroup": false,
171 "updateComparisonPrice": "not-update",
172 "basePriceField": "sale-price",
173 "code": null,
174 "beginQuantity": 0,
175 "endQuantity": 0,
176 "value": 20,
177 "valueType": "value",
178 "priority": 0,
179 "active": true,
180 "scheduling": null,
181 "tradePolicies": [],
182 "productIds": [],
183 "productCategoryIds": [],
184 "productBrandIds": [],
185 "lastUpdateUserName": null,
186 "createdAt":55",
187 "updatedAt":10"
188 }
189}

Uappi is the most productive way to
build, deploy, and monitor software.

;