Webhooks to allow the integration with merchants
Operations
RECEIVE return.created
The event is published when the return is requested from the portal or by API ivocation
Operation IDpublishAccepts the following message:
Message IDReturnCreatedobjectExamples
{ "id": "c5b6ba94-5b15-4911-90b0-e6dca0ffcd78", "time": "2018-04-05T17:31:02.735Z", "type": "return.created", "dataContentType": "application/json", "data": { "resource": { "id": "8e1b8c92-37a9-44c6-952a-b86bce1d8cfb", "shopCode": "marchelacolombine", "name": "R1-7848", "createdAt": "2022-11-17 12:01:02.735Z", "updatedAt": "2022-11-17 12:01:02.735Z", "cancelledAt": "2022-11-17 12:01:02.735Z", "status": "PENDING", "totalReturnFee": 5, "totalReturnAmount": 121, "totalTax": 21, "totalRefund": 116, "currency": "EUR", "baseTotalReturnFee": 5, "baseTotalReturnAmount": 121, "baseTotalTax": 21, "baseTotalRefund": 116, "baseCurrency": "EUR", "customer": { "fullName": "Juan Perez", "email": "customer@if.com", "phone": 34666666666, "address": { "line1": "Calle de Fortunate y Jacinta 12", "line2": "", "city": "Madrid", "postalCode": "28020", "region": "Madrid", "countryCode": "ES" } }, "ecommerceOrder": { "id": "4243234", "name": "7848", "customerId": "23423" }, "returnLineItems": [ { "id": "54048ad6-af97-417c-a8a6-7b19a154c135", "productName": "Camisa", "variantName": "XL Roja", "sku": "1234567", "barcode": "8893892", "vendor": "iFLastmile", "price": 141, "discount": 20, "paid": 121, "tax": 21, "returnAmount": 121, "currency": "EUR", "basePrice": 141, "baseDiscount": 20, "basePaid": 121, "baseTax": 21, "baseReturnAmount": 121, "baseCurrency": "EUR", "quantity": 1, "evidenceImgUrls": [ "https://ifreturns.com/imagen/producto_evidence1.jpg" ], "imageUrl": "https://ifreturns.com/imagen/producto.jpg", "ecommerceLineItem": { "lineItemId": "8e1b8c92", "productId": "1234", "variantId": "XS1234" }, "returnReason": { "code": "dont-like", "reason": "No me gusta", "additionalInfo": "Presenta un fallo en la cremallera" }, "refundType": "ORIGINAL_PAYMENT_METHOD", "refundMode": "PRE_VALIDATION", "exchangeLineItems": [ { "id": "8e1b8c92-37a9-44c6-952a-b86bce1d8cfb", "productName": "Product/12345", "variantName": "Blue Sweater XL Size", "sku": "1234557", "price": 120, "quantity": 1, "vendor": "iFLastmile", "ecommerceProductId": "1234", "ecommerceVariantId": "XL1234" } ] } ] } } }
This example has been generated automatically.
RECEIVE return.scheduled
The event is published when the transport for returned items has been scheduled (pick-up, delivery at drop-off point, etc.)
Operation IDpublishAccepts the following message:
Message IDReturnScheduledobjectExamples
{ "id": "c5b6ba94-5b15-4911-90b0-e6dca0ffcd78", "time": "2018-04-05T17:31:02.735Z", "type": "return.scheduled", "dataContentType": "application/json", "data": { "resource": { "id": "8e1b8c92-37a9-44c6-952a-b86bce1d8cfb", "shopCode": "marchelacolombine", "name": "R1-7848", "createdAt": "2022-11-17 12:01:02.735Z", "updatedAt": "2022-11-17 12:01:02.735Z", "cancelledAt": "2022-11-17 12:01:02.735Z", "status": "PENDING", "totalReturnFee": 5, "totalReturnAmount": 121, "totalTax": 21, "totalRefund": 116, "currency": "EUR", "baseTotalReturnFee": 5, "baseTotalReturnAmount": 121, "baseTotalTax": 21, "baseTotalRefund": 116, "baseCurrency": "EUR", "customer": { "fullName": "Juan Perez", "email": "customer@if.com", "phone": 34666666666, "address": { "line1": "Calle de Fortunate y Jacinta 12", "line2": "", "city": "Madrid", "postalCode": "28020", "region": "Madrid", "countryCode": "ES" } }, "ecommerceOrder": { "id": "4243234", "name": "7848", "customerId": "23423" }, "returnLineItems": [ { "id": "54048ad6-af97-417c-a8a6-7b19a154c135", "productName": "Camisa", "variantName": "XL Roja", "sku": "1234567", "barcode": "8893892", "vendor": "iFLastmile", "price": 141, "discount": 20, "paid": 121, "tax": 21, "returnAmount": 121, "currency": "EUR", "basePrice": 141, "baseDiscount": 20, "basePaid": 121, "baseTax": 21, "baseReturnAmount": 121, "baseCurrency": "EUR", "quantity": 1, "evidenceImgUrls": [ "https://ifreturns.com/imagen/producto_evidence1.jpg" ], "imageUrl": "https://ifreturns.com/imagen/producto.jpg", "ecommerceLineItem": { "lineItemId": "8e1b8c92", "productId": "1234", "variantId": "XS1234" }, "returnReason": { "code": "dont-like", "reason": "No me gusta", "additionalInfo": "Presenta un fallo en la cremallera" }, "refundType": "ORIGINAL_PAYMENT_METHOD", "refundMode": "PRE_VALIDATION", "exchangeLineItems": [ { "id": "8e1b8c92-37a9-44c6-952a-b86bce1d8cfb", "productName": "Product/12345", "variantName": "Blue Sweater XL Size", "sku": "1234557", "price": 120, "quantity": 1, "vendor": "iFLastmile", "ecommerceProductId": "1234", "ecommerceVariantId": "XL1234" } ] } ], "transportations": [ { "id": "38885822-8d44-4819-8358-345b4d83be70", "returnId": "38885822-8d44-4819-8358-345b4d83be70", "createdAt": "2022-11-17 12:05:02.735Z", "status": "REQUESTED", "currentActive": true, "serviceMessage": "Recogida programada", "serviceType": "pickup", "carrierCode": "CORREOS-EXPRESS", "carrierServiceCode": "correos-epaq-24", "carrierLabel": "https://if.com/P1R1mlc7848.pdf", "carrierTrackingUrl": "https://if.com/tracking/3230006199506927", "carrierPickupReference": "125172899", "carrierReference": "3230006199506927", "clientReference": "P1R1mlc7848", "pickupDate": "2022-11-22", "origin": { "fullName": "Juan Perez", "email": "customer@if.com", "phone": 34666666666, "address": { "line1": "Calle de Fortunate y Jacinta 12", "line2": "", "city": "Madrid", "postalCode": "28020", "region": "Madrid", "countryCode": "ES" } }, "destination": { "fullName": "iF warehouse", "email": "warehouse@if.com", "phone": 34666666666, "address": { "line1": "Calle de Fortunate y Jacinta 12", "line2": "", "city": "Madrid", "postalCode": "28020", "region": "Madrid", "countryCode": "ES" } } } ] } } }
This example has been generated automatically.
RECEIVE return.cancelled
The event is published when the return is cancelled
Operation IDpublishAccepts the following message:
Message IDReturnCancelledobjectExamples
{ "id": "c5b6ba94-5b15-4911-90b0-e6dca0ffcd78", "time": "2018-04-05T17:31:02.735Z", "type": "return.cancelled", "dataContentType": "application/json", "data": { "resource": { "id": "8e1b8c92-37a9-44c6-952a-b86bce1d8cfb", "shopCode": "marchelacolombine", "name": "R1-7848", "createdAt": "2022-11-17 12:01:02.735Z", "updatedAt": "2022-11-17 12:01:02.735Z", "cancelledAt": "2022-11-17 12:01:02.735Z", "status": "PENDING", "totalReturnFee": 5, "totalReturnAmount": 121, "totalTax": 21, "totalRefund": 116, "currency": "EUR", "baseTotalReturnFee": 5, "baseTotalReturnAmount": 121, "baseTotalTax": 21, "baseTotalRefund": 116, "baseCurrency": "EUR", "customer": { "fullName": "Juan Perez", "email": "customer@if.com", "phone": 34666666666, "address": { "line1": "Calle de Fortunate y Jacinta 12", "line2": "", "city": "Madrid", "postalCode": "28020", "region": "Madrid", "countryCode": "ES" } }, "ecommerceOrder": { "id": "4243234", "name": "7848", "customerId": "23423" }, "returnLineItems": [ { "id": "54048ad6-af97-417c-a8a6-7b19a154c135", "productName": "Camisa", "variantName": "XL Roja", "sku": "1234567", "barcode": "8893892", "vendor": "iFLastmile", "price": 141, "discount": 20, "paid": 121, "tax": 21, "returnAmount": 121, "currency": "EUR", "basePrice": 141, "baseDiscount": 20, "basePaid": 121, "baseTax": 21, "baseReturnAmount": 121, "baseCurrency": "EUR", "quantity": 1, "evidenceImgUrls": [ "https://ifreturns.com/imagen/producto_evidence1.jpg" ], "imageUrl": "https://ifreturns.com/imagen/producto.jpg", "ecommerceLineItem": { "lineItemId": "8e1b8c92", "productId": "1234", "variantId": "XS1234" }, "returnReason": { "code": "dont-like", "reason": "No me gusta", "additionalInfo": "Presenta un fallo en la cremallera" }, "refundType": "ORIGINAL_PAYMENT_METHOD", "refundMode": "PRE_VALIDATION", "exchangeLineItems": [ { "id": "8e1b8c92-37a9-44c6-952a-b86bce1d8cfb", "productName": "Product/12345", "variantName": "Blue Sweater XL Size", "sku": "1234557", "price": 120, "quantity": 1, "vendor": "iFLastmile", "ecommerceProductId": "1234", "ecommerceVariantId": "XL1234" } ] } ] } } }
This example has been generated automatically.
RECEIVE return.expired
The event is published when the return is expired
Operation IDpublishAccepts the following message:
Message IDReturnExpiredobjectExamples
{ "id": "c5b6ba94-5b15-4911-90b0-e6dca0ffcd78", "time": "2018-04-05T17:31:02.735Z", "type": "return.expired", "dataContentType": "application/json", "data": { "resource": { "id": "8e1b8c92-37a9-44c6-952a-b86bce1d8cfb", "shopCode": "marchelacolombine", "name": "R1-7848", "createdAt": "2022-11-17 12:01:02.735Z", "updatedAt": "2022-11-17 12:01:02.735Z", "cancelledAt": "2022-11-17 12:01:02.735Z", "status": "PENDING", "totalReturnFee": 5, "totalReturnAmount": 121, "totalTax": 21, "totalRefund": 116, "currency": "EUR", "baseTotalReturnFee": 5, "baseTotalReturnAmount": 121, "baseTotalTax": 21, "baseTotalRefund": 116, "baseCurrency": "EUR", "customer": { "fullName": "Juan Perez", "email": "customer@if.com", "phone": 34666666666, "address": { "line1": "Calle de Fortunate y Jacinta 12", "line2": "", "city": "Madrid", "postalCode": "28020", "region": "Madrid", "countryCode": "ES" } }, "ecommerceOrder": { "id": "4243234", "name": "7848", "customerId": "23423" }, "returnLineItems": [ { "id": "54048ad6-af97-417c-a8a6-7b19a154c135", "productName": "Camisa", "variantName": "XL Roja", "sku": "1234567", "barcode": "8893892", "vendor": "iFLastmile", "price": 141, "discount": 20, "paid": 121, "tax": 21, "returnAmount": 121, "currency": "EUR", "basePrice": 141, "baseDiscount": 20, "basePaid": 121, "baseTax": 21, "baseReturnAmount": 121, "baseCurrency": "EUR", "quantity": 1, "evidenceImgUrls": [ "https://ifreturns.com/imagen/producto_evidence1.jpg" ], "imageUrl": "https://ifreturns.com/imagen/producto.jpg", "ecommerceLineItem": { "lineItemId": "8e1b8c92", "productId": "1234", "variantId": "XS1234" }, "returnReason": { "code": "dont-like", "reason": "No me gusta", "additionalInfo": "Presenta un fallo en la cremallera" }, "refundType": "ORIGINAL_PAYMENT_METHOD", "refundMode": "PRE_VALIDATION", "exchangeLineItems": [ { "id": "8e1b8c92-37a9-44c6-952a-b86bce1d8cfb", "productName": "Product/12345", "variantName": "Blue Sweater XL Size", "sku": "1234557", "price": 120, "quantity": 1, "vendor": "iFLastmile", "ecommerceProductId": "1234", "ecommerceVariantId": "XL1234" } ] } ] } } }
This example has been generated automatically.
RECEIVE transportation.updated
The event is published when the transportation status of the return has changed.
Operation IDpublishAccepts the following message:
Message IDTransportationUpdatedobjectExamples
{ "id": "c5b6ba94-5b15-4911-90b0-e6dca0ffcd78", "time": "2018-04-05T17:31:02.735Z", "type": "transportation.updated", "dataContentType": "application/json", "data": { "resource": { "id": "38885822-8d44-4819-8358-345b4d83be70", "returnId": "38885822-8d44-4819-8358-345b4d83be70", "createdAt": "2022-11-17 12:05:02.735Z", "status": "REQUESTED", "currentActive": true, "serviceMessage": "Recogida programada", "serviceType": "pickup", "carrierCode": "CORREOS-EXPRESS", "carrierServiceCode": "correos-epaq-24", "carrierLabel": "https://if.com/P1R1mlc7848.pdf", "carrierTrackingUrl": "https://if.com/tracking/3230006199506927", "carrierPickupReference": "125172899", "carrierReference": "3230006199506927", "clientReference": "P1R1mlc7848", "pickupDate": "2022-11-22", "origin": { "fullName": "Juan Perez", "email": "customer@if.com", "phone": 34666666666, "address": { "line1": "Calle de Fortunate y Jacinta 12", "line2": "", "city": "Madrid", "postalCode": "28020", "region": "Madrid", "countryCode": "ES" } }, "destination": { "fullName": "iF warehouse", "email": "warehouse@if.com", "phone": 34666666666, "address": { "line1": "Calle de Fortunate y Jacinta 12", "line2": "", "city": "Madrid", "postalCode": "28020", "region": "Madrid", "countryCode": "ES" } }, "statusHistory": [ { "id": "38885822-8d44-4819-8358-345b4d83be70", "status": "REQUESTED", "createdAt": "2022-11-17 12:15:02.735Z", "carrierStatusDate": "2022-11-17 12:05:02.735Z", "carrierStatusCode": "01", "carrierStatusDescription": "RECEIVED AT THE OFFICE", "carrierIncidentDescription": "CUSTOMER DOES NOT HAVE READY THE PARCEL" } ] } } }
This example has been generated automatically.
RECEIVE refund.created
The event is published when the refund is created
Operation IDpublishAccepts the following message:
Message IDRefundCreatedobjectExamples
{ "id": "c5b6ba94-5b15-4911-90b0-e6dca0ffcd78", "time": "2018-04-05T17:31:02.735Z", "type": "refund.created", "dataContentType": "application/json", "data": { "resource": { "id": "ef4f03ce-ed26-4bf3-a4e3-3d9f1adf9bd8", "name": "R1-MC-9091", "previousEcommerceOrder": "MC-9090", "processedAt": "2022-11-17 12:05:02Z", "returnModelKind": "STANDARD", "ecommerceOrder": { "customerId": "8662555197771", "id": "6593099039051", "name": "MC-9091", "return": { "id": "13863289163", "name": "MC-9091-R1" } }, "refunds": [ { "id": "2025-03-06T14:27:11.481Z", "createdAt": "2025-03-06T14:27:11Z", "amount": 120, "currency": "EUR", "baseAmount": 120, "baseCurrency": "EUR", "approvedBy": "operator@ifeturns.com", "exchangeAmountPaid": 0, "baseExchangeAmountPaid": 0, "ecommerceDiscountCouponCode": null, "ecommerceDiscountCouponId": null, "ecommerceGiftCardCode": null, "ecommerceGiftCardId": "", "ecommerceExchangeOrderName": null, "ecommerceExchangeOrderId": null, "ecommerceRefundId": "1041273454923", "mode": "PRE_VALIDATION", "type": "ORIGINAL_PAYMENT_METHOD", "subType": "", "refundLineItems": [ { "id": "54048ad6-af97-417c-a8a6-7b19a154c135", "productName": "Camisa", "variantName": "XL Roja", "sku": "1234567", "barcode": "8893892", "vendor": "iFLastmile", "price": 141, "discount": 20, "paid": 121, "tax": 21, "returnAmount": 121, "currency": "EUR", "basePrice": 141, "baseDiscount": 20, "basePaid": 121, "baseTax": 21, "baseReturnAmount": 121, "baseCurrency": "EUR", "quantity": 1, "evidenceImgUrls": [ "https://ifreturns.com/imagen/producto_evidence1.jpg" ], "imageUrl": "https://ifreturns.com/imagen/producto.jpg", "ecommerceLineItem": { "lineItemId": "8e1b8c92", "productId": "1234", "variantId": "XS1234" }, "returnReason": { "code": "dont-like", "reason": "No me gusta", "additionalInfo": "Presenta un fallo en la cremallera" }, "refundType": "ORIGINAL_PAYMENT_METHOD", "refundMode": "PRE_VALIDATION", "exchangeLineItems": [ { "id": "8e1b8c92-37a9-44c6-952a-b86bce1d8cfb", "productName": "Product/12345", "variantName": "Blue Sweater XL Size", "sku": "1234557", "price": 120, "quantity": 1, "vendor": "iFLastmile", "ecommerceProductId": "1234", "ecommerceVariantId": "XL1234" } ] } ] } ] } } }
This example has been generated automatically.
Messages
- #1Message IDReturnScheduledobject
- #2Message IDReturnCreatedobject
- #3Message IDReturnCancelledobject
- #4Message IDReturnExpiredobject
- #5Message IDTransportationUpdatedobject
- #6Message IDRefundCreatedobject
Schemas
- object
- object
- object
- object
- object
- object
- object
Return request object
- object
Customer who is requesting the return
- object
Ecommerce order from where the return was requested
- object
- object
Ecommerce order line item that is returned
- object
- object
- object
Transport scheduled to collect the return order
- object
Detailed status of the transportation
- object
Refund object
- object
- ReturnStatusstring
Status of the return order
- Allowed values:
- "PENDING"
- "RECEPTION_IN_PROGRESS"
- "RECEPTION_COMPLETED"
- "RECEIVED"
- "CHECKED"
- "CLOSED"
- "DISCARDED"
- TransportationStatusstring
Status of the transport
- Allowed values:
- "REQUESTED"
- "PICK_UP_IN_PROGRESS"
- "PICK_UP_COMPLETED"
- "SHIPPING_IN_PROGRESS"
- "SHIPPING_COMPLETED"
- "PICK_UP_FAILED"
- "PICK_UP_CANCELLED"
- "SHIPPING_FAILED"
- "SHIPPING_CANCELLED"
- RefundTypestring
Refund type selected by customer for the returned item
- Allowed values:
- "ORIGINAL_PAYMENT_METHOD"
- "STORE_CREDIT"
- "EXCHANGE"
- "GIFT_CARD"
- RefundSubTypestring
Refund sub type selected by customer for the returned item
- Allowed values:
- "OTHER_PRODUCT_SAME"
- "OTHER_PRODUCT_HIGHER"
- "OTHER_PRODUCT_LOWER"
- "OTHER_VARIANT"
- RefundModestring
Mode in which the returned item will be refunded
- Allowed values:
- "PRE_VALIDATION"
- "SHIPPING_COMPLETED"
- "SHIPPING_IN_PROGRESS"
- "POST_VALIDATION"
- "MANUAL"
- "INSTANT"
- "DROP_OFF"
- ReturnModelKindstring
Kind of return requested by the customer
- Allowed values:
- "STANDARD"
- "RETURN_OF_EXCHANGE"
- "RETURN_BY_CANCELLATION"
- "WARRANTY"