json icon

Product Updated

v1events

Se actualizó un producto (Activity o Box) elegible para indexarse. Lleva el documento completo. También es el evento del resync masivo.

1{
2  "type": "record",
3  "name": "ProductUpdated",
4  "namespace": "search.product",
5  "doc": "Emitido cuando se actualiza un producto indexable (Activity o Box) en bigbox-backend, y tambien por el resync masivo SearchIndexer.index_async. Payload = documento de producto serializado, identico al de search.product.created.v1. Consumido por el servicio search para indexar en Elasticsearch.",
6  "fields": [
7    {
8      "name": "id",
9      "type": "int",
10      "doc": "Id del producto."
11    },
12    {
13      "name": "type",
14      "type": {
15        "type": "enum",
16        "name": "ProductType",
17        "symbols": ["Activity", "Box"]
18      },
19      "doc": "Discriminador. El consumer rutea a ActivityDocument o BoxDocument segun este campo; un valor desconocido lanza error y el mensaje se nackea."
20    },
21    {
22      "name": "country_id",
23      "type": ["null", "int"],
24      "default": null,
25      "doc": "Id del pais del producto."
26    },
27    {
28      "name": "name",
29      "type": "string",
30      "doc": "Nombre del producto."
31    },
32    {
33      "name": "description",
34      "type": ["null", "string"],
35      "default": null
36    },
37    {
38      "name": "short_description",
39      "type": ["null", "string"],
40      "default": null
41    },
42    {
43      "name": "price",
44      "type": ["null", "double"],
45      "default": null,
46      "doc": "Precio. En Box se toma del campo de precio del pais (Box.price_fields[country_id])."
47    },
48    {
49      "name": "participants",
50      "type": { "type": "array", "items": "string" },
51      "doc": "Buckets de participantes: '1', '2', '2+'."
52    },
53    {
54      "name": "landing_slugs",
55      "type": { "type": "array", "items": "string" },
56      "doc": "Slugs de landings donde aparece el producto (directas + por product tag)."
57    },
58    {
59      "name": "category",
60      "type": [
61        "null",
62        {
63          "type": "record",
64          "name": "Category",
65          "fields": [
66            { "name": "id", "type": ["null", "int"], "default": null },
67            { "name": "name", "type": "string" },
68            { "name": "slug", "type": "string" }
69          ]
70        }
71      ],
72      "default": null
73    },
74    {
75      "name": "category_visible",
76      "type": "boolean"
77    },
78    {
79      "name": "slug",
80      "type": "string"
81    },
82    {
83      "name": "most_sold",
84      "type": "boolean"
85    },
86    {
87      "name": "most_sold_order",
88      "type": ["null", "int"],
89      "default": null
90    },
91    {
92      "name": "rating",
93      "type": ["null", "double"],
94      "default": null,
95      "doc": "score_satisfaction del producto."
96    },
97    {
98      "name": "individual_purchase_order",
99      "type": ["null", "int"],
100      "default": null
101    },
102    {
103      "name": "units_sold_last_30_days",
104      "type": "int"
105    },
106    {
107      "name": "units_validated_last_30_days",
108      "type": "int"
109    },
110    {
111      "name": "campaign_slugs",
112      "type": { "type": "array", "items": "string" },
113      "doc": "Slugs de todas las campanas activas que incluyen al producto. No implica descuento."
114    },
115    {
116      "name": "product_tag_slugs",
117      "type": { "type": "array", "items": "string" }
118    },
119    {
120      "name": "has_campaign_discount",
121      "type": "boolean",
122      "doc": "True si el producto esta en al menos una campana activa con descuento > 0."
123    },
124    {
125      "name": "has_deal_today",
126      "type": "boolean",
127      "doc": "True si hay un ActivityDiscount aprobado aplicable hoy. Siempre false para Box."
128    },
129
130    {
131      "name": "individual_purchase_available",
132      "type": ["null", "boolean"],
133      "default": null,
134      "doc": "Solo Activity. null cuando type = Box."
135    },
136    {
137      "name": "visible",
138      "type": ["null", "boolean"],
139      "default": null,
140      "doc": "Solo Activity. null cuando type = Box."
141    },
142    {
143      "name": "box_names",
144      "type": ["null", { "type": "array", "items": "string" }],
145      "default": null,
146      "doc": "Solo Activity: nombres de los boxes que la contienen. null cuando type = Box."
147    },
148    {
149      "name": "box_ids",
150      "type": ["null", { "type": "array", "items": "int" }],
151      "default": null,
152      "doc": "Solo Activity. null cuando type = Box."
153    },
154    {
155      "name": "partner_fantasy_name",
156      "type": ["null", "string"],
157      "default": null,
158      "doc": "Solo Activity. null cuando type = Box."
159    },
160    {
161      "name": "has_online_reservation",
162      "type": ["null", "boolean"],
163      "default": null,
164      "doc": "Solo Activity. null cuando type = Box."
165    },
166    {
167      "name": "reviews_qty",
168      "type": ["null", "int"],
169      "default": null,
170      "doc": "Solo Activity (survey_qty). null cuando type = Box — ver observaciones del .md."
171    },
172    {
173      "name": "visible_catalog",
174      "type": ["null", "boolean"],
175      "default": null,
176      "doc": "Solo Activity. null cuando type = Box."
177    },
178    {
179      "name": "country_delivery",
180      "type": ["null", "boolean"],
181      "default": null,
182      "doc": "Solo Activity. null cuando type = Box."
183    },
184    {
185      "name": "is_online_activity",
186      "type": ["null", "boolean"],
187      "default": null,
188      "doc": "Solo Activity. null cuando type = Box."
189    },
190    {
191      "name": "can_purchase_a_reservation",
192      "type": ["null", "boolean"],
193      "default": null,
194      "doc": "Solo Activity. null cuando type = Box."
195    },
196    {
197      "name": "activity_type",
198      "type": ["null", "string"],
199      "default": null,
200      "doc": "Solo Activity: Activity | PartnerActivity | ComboActivity | TravelActivity. null cuando type = Box."
201    },
202    {
203      "name": "province",
204      "type": ["null", {
205        "type": "array",
206        "items": {
207          "type": "record",
208          "name": "Province",
209          "fields": [
210            { "name": "id", "type": "int" },
211            { "name": "name", "type": "string" },
212            { "name": "slug", "type": "string" }
213          ]
214        }
215      }],
216      "default": null,
217      "doc": "Provincias del producto. Activity: derivadas de sus locations (o todas las del pais si es online / country_delivery). Box: derivadas de sus activities activas."
218    },
219    {
220      "name": "cities",
221      "type": ["null", {
222        "type": "array",
223        "items": {
224          "type": "record",
225          "name": "City",
226          "fields": [
227            { "name": "id", "type": "int" },
228            { "name": "name", "type": "string" },
229            { "name": "province_id", "type": ["null", "int"], "default": null }
230          ]
231        }
232      }],
233      "default": null
234    },
235    {
236      "name": "subfilters",
237      "type": ["null", {
238        "type": "array",
239        "items": {
240          "type": "record",
241          "name": "SubFilter",
242          "fields": [
243            { "name": "id", "type": "int" },
244            { "name": "name", "type": "string" },
245            { "name": "parent_id", "type": ["null", "int"], "default": null },
246            { "name": "parent_name", "type": ["null", "string"], "default": null },
247            { "name": "parent_order", "type": ["null", "int"], "default": null }
248          ]
249        }
250      }],
251      "default": null
252    },
253    {
254      "name": "availability",
255      "type": ["null", {
256        "type": "array",
257        "items": {
258          "type": "record",
259          "name": "AvailabilitySlot",
260          "doc": "Slots con disponibilidad desde hoy hasta el maximo rango de ActivityAvailabilityService.",
261          "fields": [
262            { "name": "location_id", "type": "int" },
263            { "name": "province_id", "type": ["null", "int"], "default": null },
264            { "name": "city_id", "type": ["null", "int"], "default": null },
265            { "name": "date", "type": ["null", "string"], "default": null },
266            { "name": "time", "type": ["null", "string"], "default": null },
267            { "name": "bookable_until", "type": ["null", "string"], "default": null }
268          ]
269        }
270      }],
271      "default": null,
272      "doc": "Solo Activity. null cuando type = Box."
273    },
274
275    {
276      "name": "has_an_activity_with_visible_catalog",
277      "type": ["null", "boolean"],
278      "default": null,
279      "doc": "Solo Box. null cuando type = Activity."
280    },
281    {
282      "name": "activities_count",
283      "type": ["null", "int"],
284      "default": null,
285      "doc": "Solo Box. null cuando type = Activity."
286    },
287    {
288      "name": "activities_visible_catalog_count",
289      "type": ["null", "int"],
290      "default": null,
291      "doc": "Solo Box. null cuando type = Activity."
292    },
293
294    {
295      "name": "occurred_at",
296      "type": "string",
297      "doc": "ISO-8601 naive en hora local del proceso. Lo inyecta events.event.Event.__init__."
298    }
299  ]
300}
301

Details

Format
JSON Schema
Resource
events
Filename
schema.json

Versions