DOCS

Tipos de eventos de webhook

Obtenga notificaciones de eventos en tiempo real para su integración con Zonos.

Esta guía detalla los tipos de eventos que Zonos puede enviar como respuesta de webhook. Cada tipo devuelve un objeto GraphQL específico que contiene los datos relevantes para el evento.

ORDER_CREATED 

El evento ORDER_CREATED se activa cuando se crea un nuevo pedido. Siempre devuelve un objeto Order.

1{
2 "data": {
3 "order": {
4 "status": "OPEN",
5 "createdAt": "2024-07-23T16:18:57.104Z",
6 "accountOrderNumber": null,
7 "currencyCode": "HKD",
8 "organization": "organization_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
9 "amountSubtotals": {
10 "duties": 0,
11 "fees": 0,
12 "items": 9999.99,
13 "shipping": 9999.99,
14 "taxes": 0,
15 "variance": -0.01
16 },
17 "root": {
18 "exchangeRates": [
19 {
20 "sourceCurrencyCode": "USD",
21 "targetCurrencyCode": "HKD",
22 "rate": 9.99999,
23 "type": "GUARANTEED"
24 },
25 {
26 "sourceCurrencyCode": "USD",
27 "targetCurrencyCode": "HKD",
28 "rate": 9.9999,
29 "type": "MID_MARKET"
30 },
31 {
32 "sourceCurrencyCode": "USD",
33 "targetCurrencyCode": "HKD",
34 "rate": 9.9999,
35 "type": "MID_MARKET"
36 },
37 {
38 "sourceCurrencyCode": "USD",
39 "targetCurrencyCode": "HKD",
40 "rate": 9.9999,
41 "type": "MID_MARKET"
42 },
43 {
44 "sourceCurrencyCode": "HKD",
45 "targetCurrencyCode": "USD",
46 "rate": 0.9999999999999999,
47 "type": "MID_MARKET"
48 }
49 ]
50 },
51 "items": [
52 {
53 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
54 "name": "Discount",
55 "productId": "",
56 "amount": 0,
57 "imageUrl": "",
58 "currencyCode": "USD",
59 "description": null,
60 "hsCode": "9999.99",
61 "sku": "DISCOUNT_SKU",
62 "countryOfOrigin": "CN",
63 "measurements": [
64 {
65 "type": "WEIGHT",
66 "unitOfMeasure": "POUND",
67 "value": 0
68 }
69 ],
70 "quantity": 1,
71 "attributes": null
72 },
73 {
74 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
75 "name": "Product 1",
76 "productId": "",
77 "amount": 999.99,
78 "imageUrl": "https://example.com/product1-image.jpg",
79 "currencyCode": "USD",
80 "description": "Product 1 Description",
81 "hsCode": "9999.99.99",
82 "sku": "PRODUCT1_SKU",
83 "countryOfOrigin": "US",
84 "measurements": [
85 {
86 "type": "HEIGHT",
87 "unitOfMeasure": "INCH",
88 "value": 99
89 },
90 {
91 "type": "LENGTH",
92 "unitOfMeasure": "INCH",
93 "value": 99
94 },
95 {
96 "type": "WIDTH",
97 "unitOfMeasure": "INCH",
98 "value": 99
99 },
100 {
101 "type": "WEIGHT",
102 "unitOfMeasure": "OUNCE",
103 "value": 999
104 }
105 ],
106 "quantity": 1,
107 "attributes": null
108 },
109 {
110 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
111 "name": "Product 2",
112 "productId": "",
113 "amount": 999.99,
114 "imageUrl": "https://example.com/product2-image.jpg",
115 "currencyCode": "USD",
116 "description": "Product 2 Description",
117 "hsCode": "9999.99.99",
118 "sku": "PRODUCT2_SKU",
119 "countryOfOrigin": "US",
120 "measurements": [
121 {
122 "type": "HEIGHT",
123 "unitOfMeasure": "INCH",
124 "value": 99
125 },
126 {
127 "type": "LENGTH",
128 "unitOfMeasure": "INCH",
129 "value": 99
130 },
131 {
132 "type": "WIDTH",
133 "unitOfMeasure": "INCH",
134 "value": 99
135 },
136 {
137 "type": "WEIGHT",
138 "unitOfMeasure": "OUNCE",
139 "value": 99
140 }
141 ],
142 "quantity": 1,
143 "attributes": null
144 },
145 {
146 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
147 "name": "Insurance",
148 "productId": "",
149 "amount": 99.99,
150 "imageUrl": "",
151 "currencyCode": "USD",
152 "description": null,
153 "hsCode": "",
154 "sku": "INSURANCE_SKU",
155 "countryOfOrigin": "US",
156 "measurements": [
157 {
158 "type": "WEIGHT",
159 "unitOfMeasure": "POUND",
160 "value": 9.999
161 }
162 ],
163 "quantity": 1,
164 "attributes": null
165 }
166 ],
167 "paymentDetail": {
168 "chargeId": "ch_xxxxxxxxxxxxxxxxxxxxxxxxxx",
169 "refunds": []
170 },
171 "landedCosts": [
172 {
173 "method": "DDP",
174 "landedCostGuaranteeCode": "GUARANTEE_CODE",
175 "currencyCode": "USD",
176 "amountSubtotals": {
177 "landedCostTotal": 0,
178 "duties": 0,
179 "fees": 0,
180 "taxes": 0,
181 "items": 999.99,
182 "shipping": 999.99
183 },
184 "remittance": [],
185 "shipmentRating": {
186 "displayName": "Shipping Method",
187 "serviceLevelCode": "shipping.service_code",
188 "amount": 999.99,
189 "currencyCode": "USD",
190 "details": [
191 {
192 "amount": 9999.99,
193 "carrierCode": "Carrier api: standard rate (shipping_rate)",
194 "type": "PUBLISHED_RATE"
195 },
196 {
197 "amount": 999.99,
198 "carrierCode": "Carrier api: fuel surcharge (999)",
199 "type": "FUEL_SURCHARGE"
200 },
201 {
202 "amount": -9999.99,
203 "carrierCode": "negotiated_rate",
204 "type": "DISCOUNT"
205 }
206 ],
207 "appliedRules": []
208 },
209 "deMinimis": [
210 {
211 "type": "DUTY",
212 "threshold": "ABOVE"
213 },
214 {
215 "type": "TAX",
216 "threshold": "ABOVE"
217 }
218 ],
219 "duties": [
220 {
221 "amount": 0,
222 "currencyCode": "USD",
223 "description": "duty",
224 "type": "ITEM",
225 "formula": "0.0 % cif",
226 "note": null,
227 "item": {
228 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
229 "name": "Product 1",
230 "productId": "",
231 "amount": 999.99,
232 "currencyCode": "USD",
233 "quantity": 1,
234 "description": "Product 1 Description"
235 }
236 },
237 {
238 "amount": 0,
239 "currencyCode": "USD",
240 "description": "duty",
241 "type": "SHIPPING",
242 "formula": "0.0 % cif",
243 "note": null,
244 "item": {
245 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
246 "name": "Product 1",
247 "productId": "",
248 "amount": 999.99,
249 "currencyCode": "USD",
250 "quantity": 1,
251 "description": "Product 1 Description"
252 }
253 },
254 {
255 "amount": 0,
256 "currencyCode": "USD",
257 "description": "duty",
258 "type": "ITEM",
259 "formula": "0.0 % cif",
260 "note": null,
261 "item": {
262 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
263 "name": "Discount",
264 "productId": "",
265 "amount": 0,
266 "currencyCode": "USD",
267 "quantity": 1,
268 "description": null
269 }
270 },
271 {
272 "amount": 0,
273 "currencyCode": "USD",
274 "description": "duty",
275 "type": "SHIPPING",
276 "formula": "0.0 % cif",
277 "note": null,
278 "item": {
279 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
280 "name": "Discount",
281 "productId": "",
282 "amount": 0,
283 "currencyCode": "USD",
284 "quantity": 1,
285 "description": null
286 }
287 },
288 {
289 "amount": 0,
290 "currencyCode": "USD",
291 "description": "duty",
292 "type": "ITEM",
293 "formula": "0.0 % cif",
294 "note": null,
295 "item": {
296 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
297 "name": "Product 2",
298 "productId": "",
299 "amount": 999.99,
300 "currencyCode": "USD",
301 "quantity": 1,
302 "description": "Product 2 Description"
303 }
304 },
305 {
306 "amount": 0,
307 "currencyCode": "USD",
308 "description": "duty",
309 "type": "SHIPPING",
310 "formula": "0.0 % cif",
311 "note": null,
312 "item": {
313 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
314 "name": "Product 2",
315 "productId": "",
316 "amount": 999.99,
317 "currencyCode": "USD",
318 "quantity": 1,
319 "description": "Product 2 Description"
320 }
321 }
322 ],
323 "taxes": [
324 {
325 "amount": 0,
326 "currencyCode": "USD",
327 "description": "Tax",
328 "type": "ITEM",
329 "formula": "0%",
330 "note": null,
331 "item": {
332 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
333 "name": "Discount",
334 "productId": "",
335 "amount": 0,
336 "currencyCode": "USD",
337 "quantity": 1,
338 "description": null
339 }
340 },
341 {
342 "amount": 0,
343 "currencyCode": "USD",
344 "description": "Tax",
345 "type": "SHIPPING",
346 "formula": "0%",
347 "note": null,
348 "item": {
349 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
350 "name": "Discount",
351 "productId": "",
352 "amount": 0,
353 "currencyCode": "USD",
354 "quantity": 1,
355 "description": null
356 }
357 },
358 {
359 "amount": 0,
360 "currencyCode": "USD",
361 "description": "Tax",
362 "type": "ITEM",
363 "formula": "0%",
364 "note": null,
365 "item": {
366 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
367 "name": "Product 1",
368 "productId": "",
369 "amount": 999.99,
370 "currencyCode": "USD",
371 "quantity": 1,
372 "description": "Product 1 Description"
373 }
374 },
375 {
376 "amount": 0,
377 "currencyCode": "USD",
378 "description": "Tax",
379 "type": "SHIPPING",
380 "formula": "0%",
381 "note": null,
382 "item": {
383 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
384 "name": "Product 1",
385 "productId": "",
386 "amount": 999.99,
387 "currencyCode": "USD",
388 "quantity": 1,
389 "description": "Product 1 Description"
390 }
391 },
392 {
393 "amount": 0,
394 "currencyCode": "USD",
395 "description": "Tax",
396 "type": "ITEM",
397 "formula": "0%",
398 "note": null,
399 "item": {
400 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
401 "name": "Product 2",
402 "productId": "",
403 "amount": 999.99,
404 "currencyCode": "USD",
405 "quantity": 1,
406 "description": "Product 2 Description"
407 }
408 },
409 {
410 "amount": 0,
411 "currencyCode": "USD",
412 "description": "Tax",
413 "type": "SHIPPING",
414 "formula": "0%",
415 "note": null,
416 "item": {
417 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
418 "name": "Product 2",
419 "productId": "",
420 "amount": 999.99,
421 "currencyCode": "USD",
422 "quantity": 1,
423 "description": "Product 2 Description"
424 }
425 },
426 {
427 "amount": 0,
428 "currencyCode": "USD",
429 "description": "Tax",
430 "type": "DUTY",
431 "formula": "0%",
432 "note": "Tax on the duty of the item",
433 "item": {
434 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
435 "name": "Product 1",
436 "productId": "",
437 "amount": 999.99,
438 "currencyCode": "USD",
439 "quantity": 1,
440 "description": "Product 1 Description"
441 }
442 },
443 {
444 "amount": 0,
445 "currencyCode": "USD",
446 "description": "Tax",
447 "type": "DUTY",
448 "formula": "0%",
449 "note": "Tax on the duty of the shipping",
450 "item": {
451 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
452 "name": "Product 1",
453 "productId": "",
454 "amount": 999.99,
455 "currencyCode": "USD",
456 "quantity": 1,
457 "description": "Product 1 Description"
458 }
459 },
460 {
461 "amount": 0,
462 "currencyCode": "USD",
463 "description": "Tax",
464 "type": "DUTY",
465 "formula": "0%",
466 "note": "Tax on the duty of the item",
467 "item": {
468 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
469 "name": "Discount",
470 "productId": "",
471 "amount": 0,
472 "currencyCode": "USD",
473 "quantity": 1,
474 "description": null
475 }
476 },
477 {
478 "amount": 0,
479 "currencyCode": "USD",
480 "description": "Tax",
481 "type": "DUTY",
482 "formula": "0%",
483 "note": "Tax on the duty of the shipping",
484 "item": {
485 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
486 "name": "Discount",
487 "productId": "",
488 "amount": 0,
489 "currencyCode": "USD",
490 "quantity": 1,
491 "description": null
492 }
493 },
494 {
495 "amount": 0,
496 "currencyCode": "USD",
497 "description": "Tax",
498 "type": "DUTY",
499 "formula": "0%",
500 "note": "Tax on the duty of the item",
501 "item": {
502 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
503 "name": "Product 2",
504 "productId": "",
505 "amount": 999.99,
506 "currencyCode": "USD",
507 "quantity": 1,
508 "description": "Product 2 Description"
509 }
510 },
511 {
512 "amount": 0,
513 "currencyCode": "USD",
514 "description": "Tax",
515 "type": "DUTY",
516 "formula": "0%",
517 "note": "Tax on the duty of the shipping",
518 "item": {
519 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
520 "name": "Product 2",
521 "productId": "",
522 "amount": 999.99,
523 "currencyCode": "USD",
524 "quantity": 1,
525 "description": "Product 2 Description"
526 }
527 }
528 ],
529 "fees": []
530 }
531 ]
532 }
533 }
534}

ORDER_CANCELED 

El evento ORDER_CANCELED se activa cuando se cancela un pedido. Siempre devuelve un objeto Order.

1{
2 "data": {
3 "order": {
4 "status": "OPEN",
5 "createdAt": "2024-07-23T16:18:57.104Z",
6 "accountOrderNumber": null,
7 "currencyCode": "HKD",
8 "organization": "organization_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
9 "amountSubtotals": {
10 "duties": 0,
11 "fees": 0,
12 "items": 9999.99,
13 "shipping": 9999.99,
14 "taxes": 0,
15 "variance": -0.01
16 },
17 "root": {
18 "exchangeRates": [
19 {
20 "sourceCurrencyCode": "USD",
21 "targetCurrencyCode": "HKD",
22 "rate": 9.99999,
23 "type": "GUARANTEED"
24 },
25 {
26 "sourceCurrencyCode": "USD",
27 "targetCurrencyCode": "HKD",
28 "rate": 9.9999,
29 "type": "MID_MARKET"
30 },
31 {
32 "sourceCurrencyCode": "USD",
33 "targetCurrencyCode": "HKD",
34 "rate": 9.9999,
35 "type": "MID_MARKET"
36 },
37 {
38 "sourceCurrencyCode": "USD",
39 "targetCurrencyCode": "HKD",
40 "rate": 9.9999,
41 "type": "MID_MARKET"
42 },
43 {
44 "sourceCurrencyCode": "HKD",
45 "targetCurrencyCode": "USD",
46 "rate": 0.9999999999999999,
47 "type": "MID_MARKET"
48 }
49 ]
50 },
51 "items": [
52 {
53 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
54 "name": "Discount",
55 "productId": "",
56 "amount": 0,
57 "imageUrl": "",
58 "currencyCode": "USD",
59 "description": null,
60 "hsCode": "9999.99",
61 "sku": "DISCOUNT_SKU",
62 "countryOfOrigin": "CN",
63 "measurements": [
64 {
65 "type": "WEIGHT",
66 "unitOfMeasure": "POUND",
67 "value": 0
68 }
69 ],
70 "quantity": 1,
71 "attributes": null
72 },
73 {
74 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
75 "name": "Product 1",
76 "productId": "",
77 "amount": 999.99,
78 "imageUrl": "https://example.com/product1-image.jpg",
79 "currencyCode": "USD",
80 "description": "Product 1 Description",
81 "hsCode": "9999.99.99",
82 "sku": "PRODUCT1_SKU",
83 "countryOfOrigin": "US",
84 "measurements": [
85 {
86 "type": "HEIGHT",
87 "unitOfMeasure": "INCH",
88 "value": 99
89 },
90 {
91 "type": "LENGTH",
92 "unitOfMeasure": "INCH",
93 "value": 99
94 },
95 {
96 "type": "WIDTH",
97 "unitOfMeasure": "INCH",
98 "value": 99
99 },
100 {
101 "type": "WEIGHT",
102 "unitOfMeasure": "OUNCE",
103 "value": 999
104 }
105 ],
106 "quantity": 1,
107 "attributes": null
108 },
109 {
110 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
111 "name": "Product 2",
112 "productId": "",
113 "amount": 999.99,
114 "imageUrl": "https://example.com/product2-image.jpg",
115 "currencyCode": "USD",
116 "description": "Product 2 Description",
117 "hsCode": "9999.99.99",
118 "sku": "PRODUCT2_SKU",
119 "countryOfOrigin": "US",
120 "measurements": [
121 {
122 "type": "HEIGHT",
123 "unitOfMeasure": "INCH",
124 "value": 99
125 },
126 {
127 "type": "LENGTH",
128 "unitOfMeasure": "INCH",
129 "value": 99
130 },
131 {
132 "type": "WIDTH",
133 "unitOfMeasure": "INCH",
134 "value": 99
135 },
136 {
137 "type": "WEIGHT",
138 "unitOfMeasure": "OUNCE",
139 "value": 99
140 }
141 ],
142 "quantity": 1,
143 "attributes": null
144 },
145 {
146 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
147 "name": "Insurance",
148 "productId": "",
149 "amount": 99.99,
150 "imageUrl": "",
151 "currencyCode": "USD",
152 "description": null,
153 "hsCode": "",
154 "sku": "INSURANCE_SKU",
155 "countryOfOrigin": "US",
156 "measurements": [
157 {
158 "type": "WEIGHT",
159 "unitOfMeasure": "POUND",
160 "value": 9.999
161 }
162 ],
163 "quantity": 1,
164 "attributes": null
165 }
166 ],
167 "paymentDetail": {
168 "chargeId": "ch_xxxxxxxxxxxxxxxxxxxxxxxxxx",
169 "refunds": []
170 },
171 "landedCosts": [
172 {
173 "method": "DDP",
174 "landedCostGuaranteeCode": "GUARANTEE_CODE",
175 "currencyCode": "USD",
176 "amountSubtotals": {
177 "landedCostTotal": 0,
178 "duties": 0,
179 "fees": 0,
180 "taxes": 0,
181 "items": 999.99,
182 "shipping": 999.99
183 },
184 "remittance": [],
185 "shipmentRating": {
186 "displayName": "Shipping Method",
187 "serviceLevelCode": "shipping.service_code",
188 "amount": 999.99,
189 "currencyCode": "USD",
190 "details": [
191 {
192 "amount": 9999.99,
193 "carrierCode": "Carrier api: standard rate (shipping_rate)",
194 "type": "PUBLISHED_RATE"
195 },
196 {
197 "amount": 999.99,
198 "carrierCode": "Carrier api: fuel surcharge (999)",
199 "type": "FUEL_SURCHARGE"
200 },
201 {
202 "amount": -9999.99,
203 "carrierCode": "negotiated_rate",
204 "type": "DISCOUNT"
205 }
206 ],
207 "appliedRules": []
208 },
209 "deMinimis": [
210 {
211 "type": "DUTY",
212 "threshold": "ABOVE"
213 },
214 {
215 "type": "TAX",
216 "threshold": "ABOVE"
217 }
218 ],
219 "duties": [
220 {
221 "amount": 0,
222 "currencyCode": "USD",
223 "description": "duty",
224 "type": "ITEM",
225 "formula": "0.0 % cif",
226 "note": null,
227 "item": {
228 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
229 "name": "Product 1",
230 "productId": "",
231 "amount": 999.99,
232 "currencyCode": "USD",
233 "quantity": 1,
234 "description": "Product 1 Description"
235 }
236 },
237 {
238 "amount": 0,
239 "currencyCode": "USD",
240 "description": "duty",
241 "type": "SHIPPING",
242 "formula": "0.0 % cif",
243 "note": null,
244 "item": {
245 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
246 "name": "Product 1",
247 "productId": "",
248 "amount": 999.99,
249 "currencyCode": "USD",
250 "quantity": 1,
251 "description": "Product 1 Description"
252 }
253 },
254 {
255 "amount": 0,
256 "currencyCode": "USD",
257 "description": "duty",
258 "type": "ITEM",
259 "formula": "0.0 % cif",
260 "note": null,
261 "item": {
262 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
263 "name": "Discount",
264 "productId": "",
265 "amount": 0,
266 "currencyCode": "USD",
267 "quantity": 1,
268 "description": null
269 }
270 },
271 {
272 "amount": 0,
273 "currencyCode": "USD",
274 "description": "duty",
275 "type": "SHIPPING",
276 "formula": "0.0 % cif",
277 "note": null,
278 "item": {
279 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
280 "name": "Discount",
281 "productId": "",
282 "amount": 0,
283 "currencyCode": "USD",
284 "quantity": 1,
285 "description": null
286 }
287 },
288 {
289 "amount": 0,
290 "currencyCode": "USD",
291 "description": "duty",
292 "type": "ITEM",
293 "formula": "0.0 % cif",
294 "note": null,
295 "item": {
296 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
297 "name": "Product 2",
298 "productId": "",
299 "amount": 999.99,
300 "currencyCode": "USD",
301 "quantity": 1,
302 "description": "Product 2 Description"
303 }
304 },
305 {
306 "amount": 0,
307 "currencyCode": "USD",
308 "description": "duty",
309 "type": "SHIPPING",
310 "formula": "0.0 % cif",
311 "note": null,
312 "item": {
313 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
314 "name": "Product 2",
315 "productId": "",
316 "amount": 999.99,
317 "currencyCode": "USD",
318 "quantity": 1,
319 "description": "Product 2 Description"
320 }
321 }
322 ],
323 "taxes": [
324 {
325 "amount": 0,
326 "currencyCode": "USD",
327 "description": "Tax",
328 "type": "ITEM",
329 "formula": "0%",
330 "note": null,
331 "item": {
332 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
333 "name": "Discount",
334 "productId": "",
335 "amount": 0,
336 "currencyCode": "USD",
337 "quantity": 1,
338 "description": null
339 }
340 },
341 {
342 "amount": 0,
343 "currencyCode": "USD",
344 "description": "Tax",
345 "type": "SHIPPING",
346 "formula": "0%",
347 "note": null,
348 "item": {
349 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
350 "name": "Discount",
351 "productId": "",
352 "amount": 0,
353 "currencyCode": "USD",
354 "quantity": 1,
355 "description": null
356 }
357 },
358 {
359 "amount": 0,
360 "currencyCode": "USD",
361 "description": "Tax",
362 "type": "ITEM",
363 "formula": "0%",
364 "note": null,
365 "item": {
366 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
367 "name": "Product 1",
368 "productId": "",
369 "amount": 999.99,
370 "currencyCode": "USD",
371 "quantity": 1,
372 "description": "Product 1 Description"
373 }
374 },
375 {
376 "amount": 0,
377 "currencyCode": "USD",
378 "description": "Tax",
379 "type": "SHIPPING",
380 "formula": "0%",
381 "note": null,
382 "item": {
383 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
384 "name": "Product 1",
385 "productId": "",
386 "amount": 999.99,
387 "currencyCode": "USD",
388 "quantity": 1,
389 "description": "Product 1 Description"
390 }
391 },
392 {
393 "amount": 0,
394 "currencyCode": "USD",
395 "description": "Tax",
396 "type": "ITEM",
397 "formula": "0%",
398 "note": null,
399 "item": {
400 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
401 "name": "Product 2",
402 "productId": "",
403 "amount": 999.99,
404 "currencyCode": "USD",
405 "quantity": 1,
406 "description": "Product 2 Description"
407 }
408 },
409 {
410 "amount": 0,
411 "currencyCode": "USD",
412 "description": "Tax",
413 "type": "SHIPPING",
414 "formula": "0%",
415 "note": null,
416 "item": {
417 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
418 "name": "Product 2",
419 "productId": "",
420 "amount": 999.99,
421 "currencyCode": "USD",
422 "quantity": 1,
423 "description": "Product 2 Description"
424 }
425 },
426 {
427 "amount": 0,
428 "currencyCode": "USD",
429 "description": "Tax",
430 "type": "DUTY",
431 "formula": "0%",
432 "note": "Tax on the duty of the item",
433 "item": {
434 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
435 "name": "Product 1",
436 "productId": "",
437 "amount": 999.99,
438 "currencyCode": "USD",
439 "quantity": 1,
440 "description": "Product 1 Description"
441 }
442 },
443 {
444 "amount": 0,
445 "currencyCode": "USD",
446 "description": "Tax",
447 "type": "DUTY",
448 "formula": "0%",
449 "note": "Tax on the duty of the shipping",
450 "item": {
451 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
452 "name": "Product 1",
453 "productId": "",
454 "amount": 999.99,
455 "currencyCode": "USD",
456 "quantity": 1,
457 "description": "Product 1 Description"
458 }
459 },
460 {
461 "amount": 0,
462 "currencyCode": "USD",
463 "description": "Tax",
464 "type": "DUTY",
465 "formula": "0%",
466 "note": "Tax on the duty of the item",
467 "item": {
468 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
469 "name": "Discount",
470 "productId": "",
471 "amount": 0,
472 "currencyCode": "USD",
473 "quantity": 1,
474 "description": null
475 }
476 },
477 {
478 "amount": 0,
479 "currencyCode": "USD",
480 "description": "Tax",
481 "type": "DUTY",
482 "formula": "0%",
483 "note": "Tax on the duty of the shipping",
484 "item": {
485 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
486 "name": "Discount",
487 "productId": "",
488 "amount": 0,
489 "currencyCode": "USD",
490 "quantity": 1,
491 "description": null
492 }
493 },
494 {
495 "amount": 0,
496 "currencyCode": "USD",
497 "description": "Tax",
498 "type": "DUTY",
499 "formula": "0%",
500 "note": "Tax on the duty of the item",
501 "item": {
502 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
503 "name": "Product 2",
504 "productId": "",
505 "amount": 999.99,
506 "currencyCode": "USD",
507 "quantity": 1,
508 "description": "Product 2 Description"
509 }
510 },
511 {
512 "amount": 0,
513 "currencyCode": "USD",
514 "description": "Tax",
515 "type": "DUTY",
516 "formula": "0%",
517 "note": "Tax on the duty of the shipping",
518 "item": {
519 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
520 "name": "Product 2",
521 "productId": "",
522 "amount": 999.99,
523 "currencyCode": "USD",
524 "quantity": 1,
525 "description": "Product 2 Description"
526 }
527 }
528 ],
529 "fees": []
530 }
531 ]
532 }
533 }
534}

ORDER_STATUS_CHANGED 

El evento ORDER_STATUS_CHANGED se activa cada vez que cambia el estado de un pedido. Siempre devuelve un objeto Order. Los estados posibles se encuentran en el enum OrderStatus.

1{
2 "data": {
3 "order": {
4 "status": "OPEN",
5 "createdAt": "2024-07-23T16:18:57.104Z",
6 "accountOrderNumber": null,
7 "currencyCode": "HKD",
8 "organization": "organization_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
9 "amountSubtotals": {
10 "duties": 0,
11 "fees": 0,
12 "items": 9999.99,
13 "shipping": 9999.99,
14 "taxes": 0,
15 "variance": -0.01
16 },
17 "root": {
18 "exchangeRates": [
19 {
20 "sourceCurrencyCode": "USD",
21 "targetCurrencyCode": "HKD",
22 "rate": 9.99999,
23 "type": "GUARANTEED"
24 },
25 {
26 "sourceCurrencyCode": "USD",
27 "targetCurrencyCode": "HKD",
28 "rate": 9.9999,
29 "type": "MID_MARKET"
30 },
31 {
32 "sourceCurrencyCode": "USD",
33 "targetCurrencyCode": "HKD",
34 "rate": 9.9999,
35 "type": "MID_MARKET"
36 },
37 {
38 "sourceCurrencyCode": "USD",
39 "targetCurrencyCode": "HKD",
40 "rate": 9.9999,
41 "type": "MID_MARKET"
42 },
43 {
44 "sourceCurrencyCode": "HKD",
45 "targetCurrencyCode": "USD",
46 "rate": 0.9999999999999999,
47 "type": "MID_MARKET"
48 }
49 ]
50 },
51 "items": [
52 {
53 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
54 "name": "Discount",
55 "productId": "",
56 "amount": 0,
57 "imageUrl": "",
58 "currencyCode": "USD",
59 "description": null,
60 "hsCode": "9999.99",
61 "sku": "DISCOUNT_SKU",
62 "countryOfOrigin": "CN",
63 "measurements": [
64 {
65 "type": "WEIGHT",
66 "unitOfMeasure": "POUND",
67 "value": 0
68 }
69 ],
70 "quantity": 1,
71 "attributes": null
72 },
73 {
74 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
75 "name": "Product 1",
76 "productId": "",
77 "amount": 999.99,
78 "imageUrl": "https://example.com/product1-image.jpg",
79 "currencyCode": "USD",
80 "description": "Product 1 Description",
81 "hsCode": "9999.99.99",
82 "sku": "PRODUCT1_SKU",
83 "countryOfOrigin": "US",
84 "measurements": [
85 {
86 "type": "HEIGHT",
87 "unitOfMeasure": "INCH",
88 "value": 99
89 },
90 {
91 "type": "LENGTH",
92 "unitOfMeasure": "INCH",
93 "value": 99
94 },
95 {
96 "type": "WIDTH",
97 "unitOfMeasure": "INCH",
98 "value": 99
99 },
100 {
101 "type": "WEIGHT",
102 "unitOfMeasure": "OUNCE",
103 "value": 999
104 }
105 ],
106 "quantity": 1,
107 "attributes": null
108 },
109 {
110 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
111 "name": "Product 2",
112 "productId": "",
113 "amount": 999.99,
114 "imageUrl": "https://example.com/product2-image.jpg",
115 "currencyCode": "USD",
116 "description": "Product 2 Description",
117 "hsCode": "9999.99.99",
118 "sku": "PRODUCT2_SKU",
119 "countryOfOrigin": "US",
120 "measurements": [
121 {
122 "type": "HEIGHT",
123 "unitOfMeasure": "INCH",
124 "value": 99
125 },
126 {
127 "type": "LENGTH",
128 "unitOfMeasure": "INCH",
129 "value": 99
130 },
131 {
132 "type": "WIDTH",
133 "unitOfMeasure": "INCH",
134 "value": 99
135 },
136 {
137 "type": "WEIGHT",
138 "unitOfMeasure": "OUNCE",
139 "value": 99
140 }
141 ],
142 "quantity": 1,
143 "attributes": null
144 },
145 {
146 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
147 "name": "Insurance",
148 "productId": "",
149 "amount": 99.99,
150 "imageUrl": "",
151 "currencyCode": "USD",
152 "description": null,
153 "hsCode": "",
154 "sku": "INSURANCE_SKU",
155 "countryOfOrigin": "US",
156 "measurements": [
157 {
158 "type": "WEIGHT",
159 "unitOfMeasure": "POUND",
160 "value": 9.999
161 }
162 ],
163 "quantity": 1,
164 "attributes": null
165 }
166 ],
167 "paymentDetail": {
168 "chargeId": "ch_xxxxxxxxxxxxxxxxxxxxxxxxxx",
169 "refunds": []
170 },
171 "landedCosts": [
172 {
173 "method": "DDP",
174 "landedCostGuaranteeCode": "GUARANTEE_CODE",
175 "currencyCode": "USD",
176 "amountSubtotals": {
177 "landedCostTotal": 0,
178 "duties": 0,
179 "fees": 0,
180 "taxes": 0,
181 "items": 999.99,
182 "shipping": 999.99
183 },
184 "remittance": [],
185 "shipmentRating": {
186 "displayName": "Shipping Method",
187 "serviceLevelCode": "shipping.service_code",
188 "amount": 999.99,
189 "currencyCode": "USD",
190 "details": [
191 {
192 "amount": 9999.99,
193 "carrierCode": "Carrier api: standard rate (shipping_rate)",
194 "type": "PUBLISHED_RATE"
195 },
196 {
197 "amount": 999.99,
198 "carrierCode": "Carrier api: fuel surcharge (999)",
199 "type": "FUEL_SURCHARGE"
200 },
201 {
202 "amount": -9999.99,
203 "carrierCode": "negotiated_rate",
204 "type": "DISCOUNT"
205 }
206 ],
207 "appliedRules": []
208 },
209 "deMinimis": [
210 {
211 "type": "DUTY",
212 "threshold": "ABOVE"
213 },
214 {
215 "type": "TAX",
216 "threshold": "ABOVE"
217 }
218 ],
219 "duties": [
220 {
221 "amount": 0,
222 "currencyCode": "USD",
223 "description": "duty",
224 "type": "ITEM",
225 "formula": "0.0 % cif",
226 "note": null,
227 "item": {
228 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
229 "name": "Product 1",
230 "productId": "",
231 "amount": 999.99,
232 "currencyCode": "USD",
233 "quantity": 1,
234 "description": "Product 1 Description"
235 }
236 },
237 {
238 "amount": 0,
239 "currencyCode": "USD",
240 "description": "duty",
241 "type": "SHIPPING",
242 "formula": "0.0 % cif",
243 "note": null,
244 "item": {
245 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
246 "name": "Product 1",
247 "productId": "",
248 "amount": 999.99,
249 "currencyCode": "USD",
250 "quantity": 1,
251 "description": "Product 1 Description"
252 }
253 },
254 {
255 "amount": 0,
256 "currencyCode": "USD",
257 "description": "duty",
258 "type": "ITEM",
259 "formula": "0.0 % cif",
260 "note": null,
261 "item": {
262 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
263 "name": "Discount",
264 "productId": "",
265 "amount": 0,
266 "currencyCode": "USD",
267 "quantity": 1,
268 "description": null
269 }
270 },
271 {
272 "amount": 0,
273 "currencyCode": "USD",
274 "description": "duty",
275 "type": "SHIPPING",
276 "formula": "0.0 % cif",
277 "note": null,
278 "item": {
279 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
280 "name": "Discount",
281 "productId": "",
282 "amount": 0,
283 "currencyCode": "USD",
284 "quantity": 1,
285 "description": null
286 }
287 },
288 {
289 "amount": 0,
290 "currencyCode": "USD",
291 "description": "duty",
292 "type": "ITEM",
293 "formula": "0.0 % cif",
294 "note": null,
295 "item": {
296 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
297 "name": "Product 2",
298 "productId": "",
299 "amount": 999.99,
300 "currencyCode": "USD",
301 "quantity": 1,
302 "description": "Product 2 Description"
303 }
304 },
305 {
306 "amount": 0,
307 "currencyCode": "USD",
308 "description": "duty",
309 "type": "SHIPPING",
310 "formula": "0.0 % cif",
311 "note": null,
312 "item": {
313 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
314 "name": "Product 2",
315 "productId": "",
316 "amount": 999.99,
317 "currencyCode": "USD",
318 "quantity": 1,
319 "description": "Product 2 Description"
320 }
321 }
322 ],
323 "taxes": [
324 {
325 "amount": 0,
326 "currencyCode": "USD",
327 "description": "Tax",
328 "type": "ITEM",
329 "formula": "0%",
330 "note": null,
331 "item": {
332 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
333 "name": "Discount",
334 "productId": "",
335 "amount": 0,
336 "currencyCode": "USD",
337 "quantity": 1,
338 "description": null
339 }
340 },
341 {
342 "amount": 0,
343 "currencyCode": "USD",
344 "description": "Tax",
345 "type": "SHIPPING",
346 "formula": "0%",
347 "note": null,
348 "item": {
349 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
350 "name": "Discount",
351 "productId": "",
352 "amount": 0,
353 "currencyCode": "USD",
354 "quantity": 1,
355 "description": null
356 }
357 },
358 {
359 "amount": 0,
360 "currencyCode": "USD",
361 "description": "Tax",
362 "type": "ITEM",
363 "formula": "0%",
364 "note": null,
365 "item": {
366 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
367 "name": "Product 1",
368 "productId": "",
369 "amount": 999.99,
370 "currencyCode": "USD",
371 "quantity": 1,
372 "description": "Product 1 Description"
373 }
374 },
375 {
376 "amount": 0,
377 "currencyCode": "USD",
378 "description": "Tax",
379 "type": "SHIPPING",
380 "formula": "0%",
381 "note": null,
382 "item": {
383 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
384 "name": "Product 1",
385 "productId": "",
386 "amount": 999.99,
387 "currencyCode": "USD",
388 "quantity": 1,
389 "description": "Product 1 Description"
390 }
391 },
392 {
393 "amount": 0,
394 "currencyCode": "USD",
395 "description": "Tax",
396 "type": "ITEM",
397 "formula": "0%",
398 "note": null,
399 "item": {
400 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
401 "name": "Product 2",
402 "productId": "",
403 "amount": 999.99,
404 "currencyCode": "USD",
405 "quantity": 1,
406 "description": "Product 2 Description"
407 }
408 },
409 {
410 "amount": 0,
411 "currencyCode": "USD",
412 "description": "Tax",
413 "type": "SHIPPING",
414 "formula": "0%",
415 "note": null,
416 "item": {
417 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
418 "name": "Product 2",
419 "productId": "",
420 "amount": 999.99,
421 "currencyCode": "USD",
422 "quantity": 1,
423 "description": "Product 2 Description"
424 }
425 },
426 {
427 "amount": 0,
428 "currencyCode": "USD",
429 "description": "Tax",
430 "type": "DUTY",
431 "formula": "0%",
432 "note": "Tax on the duty of the item",
433 "item": {
434 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
435 "name": "Product 1",
436 "productId": "",
437 "amount": 999.99,
438 "currencyCode": "USD",
439 "quantity": 1,
440 "description": "Product 1 Description"
441 }
442 },
443 {
444 "amount": 0,
445 "currencyCode": "USD",
446 "description": "Tax",
447 "type": "DUTY",
448 "formula": "0%",
449 "note": "Tax on the duty of the shipping",
450 "item": {
451 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
452 "name": "Product 1",
453 "productId": "",
454 "amount": 999.99,
455 "currencyCode": "USD",
456 "quantity": 1,
457 "description": "Product 1 Description"
458 }
459 },
460 {
461 "amount": 0,
462 "currencyCode": "USD",
463 "description": "Tax",
464 "type": "DUTY",
465 "formula": "0%",
466 "note": "Tax on the duty of the item",
467 "item": {
468 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
469 "name": "Discount",
470 "productId": "",
471 "amount": 0,
472 "currencyCode": "USD",
473 "quantity": 1,
474 "description": null
475 }
476 },
477 {
478 "amount": 0,
479 "currencyCode": "USD",
480 "description": "Tax",
481 "type": "DUTY",
482 "formula": "0%",
483 "note": "Tax on the duty of the shipping",
484 "item": {
485 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
486 "name": "Discount",
487 "productId": "",
488 "amount": 0,
489 "currencyCode": "USD",
490 "quantity": 1,
491 "description": null
492 }
493 },
494 {
495 "amount": 0,
496 "currencyCode": "USD",
497 "description": "Tax",
498 "type": "DUTY",
499 "formula": "0%",
500 "note": "Tax on the duty of the item",
501 "item": {
502 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
503 "name": "Product 2",
504 "productId": "",
505 "amount": 999.99,
506 "currencyCode": "USD",
507 "quantity": 1,
508 "description": "Product 2 Description"
509 }
510 },
511 {
512 "amount": 0,
513 "currencyCode": "USD",
514 "description": "Tax",
515 "type": "DUTY",
516 "formula": "0%",
517 "note": "Tax on the duty of the shipping",
518 "item": {
519 "id": "item_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
520 "name": "Product 2",
521 "productId": "",
522 "amount": 999.99,
523 "currencyCode": "USD",
524 "quantity": 1,
525 "description": "Product 2 Description"
526 }
527 }
528 ],
529 "fees": []
530 }
531 ]
532 }
533 }
534}

ORDER_RETURN_CREATED 

El evento ORDER_RETURN_CREATED se activa cuando se crea una devolución en un pedido. La nueva devolución comienza en el estado REQUESTED.

Crear una devolución no envía también ORDER_RETURN_STATUS_CHANGED. Todos los cambios de estado posteriores sí lo envían.

1{
2 "eventType": "ORDER_RETURN_CREATED",
3 "orderReturnId": "order_return_[ID]"
4}

Obtener los detalles de la devolución

Los eventos de devolución solo incluyen el tipo de evento y el ID de la devolución. Para obtener el estado, los artículos, la etiqueta y el historial de la devolución, consúltela con orderReturn y solicite los campos que necesita su integración. Devuelve un objeto OrderReturn.

1query OrderReturn($id: ID!) {
2 orderReturn(id: $id) {
3 id
4 status
5 order {
6 id
7 accountOrderNumber
8 }
9 lines {
10 id
11 itemId
12 quantity
13 reason
14 disposition
15 note
16 }
17 labelSource
18 carrier
19 trackingNumber
20 statusTransitions {
21 fromStatus
22 toStatus
23 actor
24 note
25 createdAt
26 }
27 updatedAt
28 }
29}

Nota: La consulta devuelve la devolución tal como está en el momento en que la solicita, no como estaba cuando se activó el evento. Si una devolución cambia de nuevo rápidamente, es posible que ya haya superado el estado al que se refería el evento. Trate status como el estado actual de la devolución y use statusTransitions para su historial. No se garantiza que las entradas de statusTransitions estén en orden, así que ordénelas por createdAt.

ORDER_RETURN_STATUS_CHANGED 

El evento ORDER_RETURN_STATUS_CHANGED se activa cada vez que una devolución pasa a un nuevo estado: aprobada, etiqueta emitida, en tránsito, recibida, inspeccionada, completada, rechazada o cancelada.

La entrada más reciente de statusTransitions de la devolución, según createdAt, muestra el cambio: su fromStatus, su toStatus, quién lo realizó y cualquier nota que haya dejado, como el motivo por el que se rechazó una devolución. Para leerla, consulte la devolución como se muestra en Obtener los detalles de la devolución más arriba.

1{
2 "eventType": "ORDER_RETURN_STATUS_CHANGED",
3 "orderReturnId": "order_return_[ID]"
4}

ORDER_RETURN_COMPLETED 

El evento ORDER_RETURN_COMPLETED se activa cuando una devolución se completa y se cierra.

Completar una devolución también envía ORDER_RETURN_STATUS_CHANGED. Si solo necesita saber cuándo se cierran las devoluciones, suscríbase únicamente a ORDER_RETURN_COMPLETED en lugar de gestionar cada cambio de estado. Si se suscribe a ambos, espere dos webhooks cuando se complete una devolución.

ORDER_RETURN_COMPLETED no se envía para devoluciones rechazadas o canceladas. Estas terminan solo con ORDER_RETURN_STATUS_CHANGED.

1{
2 "eventType": "ORDER_RETURN_COMPLETED",
3 "orderReturnId": "order_return_[ID]"
4}

Nota: Completar una devolución nunca reembolsa al comprador. El campo linkedRefunds de una devolución completada enumera los reembolsos que usted emitió en el pedido y vinculó a la devolución. No significa que Zonos los haya emitido.

SHIPMENT_CANCELED 

El evento SHIPMENT_CANCELED se activa cada vez que se anula un envío. Siempre devuelve un objeto Shipment.

1{
2 "createdAt": 1758753664.363,
3 "shipmentCartons": [],
4 "createdBy": "organization_[ID]",
5 "level": "info",
6 "parties": [
7 {
8 "person": {
9 "firstName": "[FIRST_NAME]",
10 "lastName": "[LAST_NAME]",
11 "email": "[EMAIL]"
12 },
13 "location": {
14 "countryCode": "CA",
15 "postalCode": "[POSTAL_CODE]",
16 "locality": "[LOCALITY]",
17 "line1": "[ADDRESS_LINE1]"
18 },
19 "id": "party_[ID]",
20 "type": "PAYOR"
21 },
22 {
23 "person": {
24 "firstName": "[FIRST_NAME]",
25 "lastName": "[LAST_NAME]",
26 "email": "[EMAIL]"
27 },
28 "location": {
29 "countryCode": "CA",
30 "postalCode": "[POSTAL_CODE]",
31 "locality": "[LOCALITY]",
32 "line1": "[ADDRESS_LINE1]"
33 },
34 "id": "party_[ID]",
35 "type": "DESTINATION"
36 },
37 {
38 "location": {
39 "countryCode": "US",
40 "postalCode": "[POSTAL_CODE]",
41 "locality": "[LOCALITY]",
42 "line2": "",
43 "line1": "[ADDRESS_LINE1]"
44 },
45 "id": "party_[ID]",
46 "type": "ORIGIN"
47 },
48 {
49 "person": {
50 "firstName": "[FIRST_NAME]",
51 "lastName": "[LAST_NAME]",
52 "email": "[EMAIL]"
53 },
54 "location": {
55 "countryCode": "CA",
56 "postalCode": "[POSTAL_CODE]",
57 "locality": "[LOCALITY]",
58 "line1": "[ADDRESS_LINE1]"
59 },
60 "id": "party_[ID]",
61 "type": "DESTINATION"
62 }
63 ],
64 "id": "shipment_level_[ID]",
65 "trackingDetails": [],
66 "serviceLevel": {
67 "carrier": {
68 "code": "ups",
69 "name": "UPS"
70 },
71 "name": "Worldwide Economy DDP",
72 "id": "service_level_[ID]"
73 },
74 "order": {
75 "accountOrderNumber": "[ACCOUNT_NUMBER]",
76 "mode": "LIVE",
77 "references": [],
78 "zonosOrderId": "zonos_order_[ID]",
79 "organization": "organization_[ID]",
80 "id": "order_[ID]"
81 },
82 "timestamp": "2025-09-24T22:41:04.904Z"
83}

SHIPMENT_CREATED 

El evento SHIPMENT_CREATED se activa cada vez que se crea un envío. Siempre devuelve un objeto Shipment.

1{
2 "data": {
3 "shipment": {
4 "id": "shipment_[ID]",
5 "order": {
6 "accountOrderNumber": "[ACCOUNT_NUMBER]",
7 "id": "order_[ID]"
8 },
9 "parties": [
10 {
11 "type": "ORIGIN",
12 "location": {
13 "countryCode": "ID",
14 "administrativeArea": null,
15 "administrativeAreaCode": "[AREA_CODE]",
16 "line1": "[ADDRESS_LINE1]",
17 "line2": "",
18 "line3": "",
19 "locality": "[LOCALITY]",
20 "postalCode": "[POSTAL_CODE]"
21 },
22 "person": {
23 "firstName": "[FIRST_NAME]",
24 "lastName": "[LAST_NAME]",
25 "email": "[EMAIL]",
26 "phone": "[PHONE]",
27 "companyName": "[COMPANY_NAME]"
28 }
29 },
30 {
31 "type": "DESTINATION",
32 "location": {
33 "countryCode": "US",
34 "administrativeArea": null,
35 "administrativeAreaCode": "NY",
36 "line1": "[ADDRESS_LINE1]",
37 "line2": "[LINE2]",
38 "line3": null,
39 "locality": "New York",
40 "postalCode": "[POSTAL_CODE]"
41 },
42 "person": {
43 "firstName": "[FIRST_NAME]",
44 "lastName": "[LAST_NAME]",
45 "email": "[EMAIL]",
46 "phone": "[PHONE]",
47 "companyName": ""
48 }
49 }
50 ],
51 "serviceLevel": {
52 "carrier": {
53 "name": "DHL"
54 },
55 "name": "DHL Express Worldwide",
56 "code": "dhl.express_worldwide"
57 },
58 "shipmentCartons": [
59 {
60 "id": "shipment_carton_[ID]",
61 "carton": {
62 "length": 5.9055,
63 "width": 7.874,
64 "height": 3.937,
65 "dimensionalUnit": "INCH",
66 "weight": 0.23,
67 "weightUnit": "POUND",
68 "items": [
69 {
70 "quantity": 1,
71 "item": {
72 "id": "item_[ID]",
73 "sku": "",
74 "name": "Caraco Black - S / Black",
75 "description": null,
76 "hsCode": "6109.10.0027",
77 "amount": 125,
78 "currencyCode": "USD"
79 }
80 }
81 ]
82 },
83 "tracking": {
84 "number": "[TRACKING_NUMBER]"
85 },
86 "label": {
87 "labelAmounts": [
88 {
89 "amount": 22.71,
90 "amountType": "QUOTE",
91 "currencyCode": "USD"
92 }
93 ],
94 "labelFileType": "PDF",
95 "url": "[URL]",
96 "statusTransitions": [
97 {
98 "changedAt": "[DATE_TIME]",
99 "status": "CREATED"
100 }
101 ]
102 }
103 }
104 ],
105 "createdAt": "[DATE_TIME]",
106 "status": "CREATED",
107 "customsDocuments": [
108 {
109 "documentType": "COMMERCIAL_INVOICE",
110 "fileUrl": "[URL]"
111 }
112 ],
113 "shipmentConsolidation": null
114 }
115 }
116}

¿Fue útil esta página?