# Calculate the available return methods Calculate the return methods the customer can use to ship the returned items. The available return methods are calculated based on the data of the ecoommerce order and the list of the returned items selected by the customer Endpoint: POST /return_methods Version: 1.4.2 Security: bearerAuth ## Request fields (application/json): - `shopCode` (string) Shop code which belongs the retrurn request or rma. In case this field is not informed, it will be obtained from security context. In case it is informed, it will be validated against the security context Example: "marchelacolombine" - `currencyCode` (string, required) Currency in which the order is being returned was placed. All amounts reported must be in this currency Example: "EUR" - `ecommerceOrder` (object) Ecommerce order from which the returns is being generated - `ecommerceOrder.id` (string, required) ID of the ecommerce order Example: 123 - `ecommerceOrder.orderType` (string) Type of the ecommerce order Example: "DTC" - `ecommerceOrder.salesChannel` (string) Channel from which the order was created Example: "web" - `ecommerceOrder.status` (string) Ecommerce order status Example: "COMPLETED" - `ecommerceOrder.totalPaid` (number) Total amount paid for the order Example: 254 - `ecommerceOrder.totalDiscount` (number) Total discount applied to the order - `ecommerceOrder.totalShippingCost` (number) Cost of shipping method Example: 5 - `ecommerceOrder.paymentMethods` (array) methods used to pay the order - `ecommerceOrder.paymentMethods.method` (string) name of the payment method Example: "credit_card" - `ecommerceOrder.paymentMethods.amount` (number) amount paid with the paymenet method Example: 254 - `ecommerceOrder.tags` (array) Tags assigned to the order Example: ["WEB","SUMMER"] - `ecommerceOrder.discountCodes` (array) Discount codes used in the order Example: ["WELCOME10","FREESHIPPING"] - `ecommerceOrder.lineItems` (array) Items included in the order Example: [{"id":"456456","name":"Oxford shirt M","sku":"OSM123","variantOptions":[{"key":"color","value":"blue"},{"key":"size","value":"M"}],"quantity":1,"originalUnitPrice":100,"lineTotalPrice":100,"lineTotalDiscount":0,"lineTotalPaid":100,"productTags":["new","color:blue","collection:summer"],"primaryProductCategory":"shirts","productVendor":"ifreturns"},{"id":"456488","name":"Black trouser 38","sku":"BT038","variantOptions":[{"key":"color","value":"black"},{"key":"size","value":"38"}],"quantity":2,"originalUnitPrice":149,"lineTotalPrice":298,"lineTotalDiscount":10,"lineTotalPaid":198,"productTags":["outlet"],"primaryProductCategory":"trousers","productVendor":"ifreturns"}] - `ecommerceOrder.lineItems.id` (string) ID of the line item - `ecommerceOrder.lineItems.name` (string) Name of the item - `ecommerceOrder.lineItems.sku` (string) SKU of the item - `ecommerceOrder.lineItems.variantOptions` (array) Options that define the product variant - `ecommerceOrder.lineItems.variantOptions.key` (string) Key of the option Example: "color" - `ecommerceOrder.lineItems.variantOptions.value` (string) Value of the option Example: "blue" - `ecommerceOrder.lineItems.quantity` (number) Number of items ordered - `ecommerceOrder.lineItems.originalUnitPrice` (number) original unit price of items ordered - `ecommerceOrder.lineItems.lineTotalPrice` (number) Total price of the line item - `ecommerceOrder.lineItems.lineTotalDiscount` (number) Total discount of the line item - `ecommerceOrder.lineItems.lineTotalPaid` (number) Total paid for the line item - `ecommerceOrder.lineItems.productTags` (array) Tags assigned to the item. Any additional product attribute could be reported using this field - `ecommerceOrder.lineItems.primaryProductCategory` (string) Primary product category which the item belongs - `ecommerceOrder.lineItems.productVendor` (string) Vendor name associated to the item - `ecommerceOrder.fulfillments` (array) List of shipments for the order - `ecommerceOrder.fulfillments.id` (string) Fulfillment ID Example: "2454552154" - `ecommerceOrder.fulfillments.fulfilledAt` (string) Date when the order was fulfilled Example: "2024-07-02" - `ecommerceOrder.fulfillments.deliverAt` (string) Date when the order was delivered Example: "2024-07-04" - `ecommerceOrder.fulfillments.fulfillmentCenter` (string, required) Name of the fulfillment center Example: "MAIN_WAREHOUSE" - `ecommerceOrder.fulfillments.fulfillmentCenterCountryCode` (string) Country code where the fulfillment center is located Example: "ES" - `ecommerceOrder.fulfillments.shipmentCarrier` (string) Carrier name for the shipment Example: "CORREOS" - `ecommerceOrder.fulfillments.shipmentServiceName` (string) Type of the shipment service Example: "Express Delivery" - `ecommerceOrder.fulfillments.fulfillmentLineItems` (array) Example: [{"lineItemid":"456456","quantity":1},{"lineItemid":"456488","quantity":1}] - `ecommerceOrder.fulfillments.fulfillmentLineItems.lineItemid` (string) ID of the line item associated to the fulfillment - `ecommerceOrder.fulfillments.fulfillmentLineItems.quantity` (number) Number of line items in the fulfillment. - `originAddress` (object, required) Origin address for the return - `originAddress.firstName` (string) First Name of the origin address Example: "Paul" - `originAddress.lastName` (string) Last Name of the origin address Example: "Doe" - `originAddress.line1` (number) Origin address information Example: "C. Juan de Mena 8" - `originAddress.line2` (string) Additional information for the origin address Example: "sótano" - `originAddress.city` (string) City of the origin address Example: "Madrid" - `originAddress.postalCode` (string, required) Postal code of the origin address Example: "28010" - `originAddress.regionCode` (string) Region code of the origin address Example: "M" - `originAddress.countryCode` (string, required) Country code of the origin address Example: "ES" - `returnLineItems` (object, required) List of items included in the return - `returnLineItems.id` (string) ID of the returned item Example: 456456 - `returnLineItems.name` (string) Name of returned item Example: "Oxford shirt M" - `returnLineItems.sku` (string, required) SKU of the returned item Example: "OSM123" - `returnLineItems.quantity` (number, required) Items units returned Example: 1 - `returnLineItems.returnReasonCode` (string) Example: "size-bigger" - `returnLineItems.refundTypeCode` (string) Example: "ORIGINAL_PAYMENT_METHOD" - `returnLineItems.productTags` (array) Example: ["new","color:blue","collection:summer"] - `returnLineItems.primaryProductCategory` (string) Example: "shirts" - `returnLineItems.productVendor` (string) Vendor name associated to returned item Example: "iFreturns" - `client` (object, required) - `client.id` (string, required) Customer ID associated with the returned order Example: "2352123" - `client.totalAmountSpent` (number) Amount spent by the customer in the merchant Example: "1000," - `client.totalAmountReturned` (number) Amount returned by the customer in the merchant Example: "100," - `client.quantityPlacedOrders` (number) Number of orders placed by the customer in the merchant Example: 1 - `client.quantityReturns` (number) Number of returns made by the customer in the merchant Example: 1 - `client.tier` (string, required) Customer classification tier Example: "GOLD" ## Response 200 fields (application/json): - `returnMethods` (array) List of available return methods - `returnMethods.code` (string) Code of the return method Example: "marchelacolombinev2-drop-off-es" - `returnMethods.serviceType` (string) Service type for the return method Enum: "drop-off", "pick-up", "direct", "do-it-yourself", "drop-off-store" - `returnMethods.currencyCode` (string) Currency code of the return method. All amounts reported will be in this currency Example: "EUR" - `returnMethods.isLabelFree` (boolean) Flag to indicate if the printing of shipping is required to deliver the return - `returnMethods.returnFee` (number) Fee of the return method Example: 4.99 - `returnMethods.priority` (number) Priority for the return method free Example: 1 - `returnMethods.visible` (boolean) Flag to state the return method should be displayed or hidden Example: true - `returnMethods.carrierService` (object) Carrier service to create the shipping label - `returnMethods.carrierService.code` (number) Code of the carrier service connection Example: "IF-UPS-EXPRESS-SAVER" - `returnMethods.carrierService.carrierDisplayName` (string) carrier name configured for the connection Example: "UPS" - `returnMethods.carrierService.carrierExternalCode` (string) carrier name configured for the connection Example: "20000008" - `returnMethods.destinationLocation` (object) - `returnMethods.destinationLocation.code` (string) Code of the destination Example: "C40" - `returnMethods.destinationLocation.fullName` (string) Name of the destination Example: "MAIN_WAREHOUSE" - `returnMethods.destinationLocation.line1` (string) Destination address Example: "C. Juan de Mena 8" - `returnMethods.destinationLocation.line2` (string) Additional information for the destination address Example: "sótano" - `returnMethods.destinationLocation.city` (string) City of the destination address Example: "Madrid" - `returnMethods.destinationLocation.postalCode` (string) Postal code of the destination address Example: "28010" - `returnMethods.destinationLocation.regionCode` (string) Region code of the destination address Example: "M" - `returnMethods.destinationLocation.countryCode` (string) Country code of the destination address Example: "ES" - `returnMethods.destinationLocation.latitude` (string) Latitude of the destination address Example: 40.3232434 - `returnMethods.destinationLocation.longitude` (string) Longitude of the destination address Example: -3.3232434 - `returnMethods.destinationLocation.phone` (string) Phone of the destination address Example: 34666666666 - `returnMethods.destinationLocation.email` (string) Email of the destination address Example: "warehouse@email.com" - `returnMethods.promotions` (array) List of promotions activated for the return method - `returnMethods.promotions.promoType` (string) Type of the promotion applied Enum: "DISCOUNT_COUPON_FIXED", "DISCOUNT_COUPON_PERCENTAGE", "PRIORITY_REFUND" - `returnMethods.promotions.promoAmount` (number) Amount of promotion applied. It will be informend for the type DISCOUNT_COUPON_XYZ Example: 5.99 - `returnMethods.refundMode` (string) Mode in which the returned item will be refunded Enum: "PRE_VALIDATION", "SHIPPING_COMPLETED", "SHIPPING_IN_PROGRESS", "POST_VALIDATION", "MANUAL", "INSTANT", "DROP_OFF" ## Response 400 fields (application/json): - `errors` (array) - `errors.code` (string) Error code Example: "VA001" - `errors.message` (string) Error message Example: "The origin address is not valid" ## Response 401 fields ## Response 405 fields ## Response 500 fields