Skip to content

iF returns - Inverse Logistic API (1.2.10)

API to allow the integration with merchants

Download OpenAPI description
Overview
Languages
Servers
Mock server

https://docs.ifreturns.com/_mock/apis/returns/

Development Server

https://api.dev.ifreturns.com/integration/v1/

Staging Server

https://api.stg.ifreturns.com/integration/v1/

Production Server

https://api.ifreturns.com/integration/v1/

iFreturns REST API

integration with merchants

Returns

Operations

Order Cancellation Returns

Operations

Store Returns

Operations

Gradings of Return

Operations

Transportations

Operations

Return Methods

Operations

Calculate the available return methods

Request

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

Security
bearerAuth
Bodyapplication/json
shopCodestring

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"
currencyCodestringrequired

Currency in which the order is being returned was placed. All amounts reported must be in this currency

Example: "EUR"
ecommerceOrderobject

Ecommerce order from which the returns is being generated

originAddressobjectrequired

Origin address for the return

originAddress.​firstNamestring

First Name of the origin address

Example: "Paul"
originAddress.​lastNamestring

Last Name of the origin address

Example: "Doe"
originAddress.​line1number

Origin address information

Example: "C. Juan de Mena 8"
originAddress.​line2string

Additional information for the origin address

Example: "sótano"
originAddress.​citystring

City of the origin address

Example: "Madrid"
originAddress.​postalCodestringrequired

Postal code of the origin address

Example: "28010"
originAddress.​regionCodestring

Region code of the origin address

Example: "M"
originAddress.​countryCodestringrequired

Country code of the origin address

Example: "ES"
returnLineItemsobjectrequired

List of items included in the return

returnLineItems.​idstring

ID of the returned item

Example: 456456
returnLineItems.​namestring

Name of returned item

Example: "Oxford shirt M"
returnLineItems.​skustringrequired

SKU of the returned item

Example: "OSM123"
returnLineItems.​variantOptionsArray of objects

Options that define the product variant

returnLineItems.​quantitynumber(int)required

Items units returned

Example: 1
returnLineItems.​originalUnitPricenumber(float)

original unit price of items ordered

Example: 100
returnLineItems.​lineTotalPricenumber(float)

Total price of the line item

Example: 100
returnLineItems.​lineTotalDiscountnumber(float)

Total discount of the line item

Example: 0
returnLineItems.​lineTotalPaidnumber(float)required

Total paid for the line item

Example: 100
returnLineItems.​returnReasonCodestring
Example: "size-bigger"
returnLineItems.​refundTypeCodestring
Example: "ORIGINAL_PAYMENT_METHOD"
returnLineItems.​productTagsArray of strings
Example: ["new","color:blue","collection:summer"]
returnLineItems.​primaryProductCategorystring
Example: "shirts"
returnLineItems.​productVendorstring

Vendor name associated to returned item

Example: "iFreturns"
clientobjectrequired
client.​idstringrequired

Customer ID associated with the returned order

Example: "2352123"
client.​totalAmountSpentnumber(float)

Amount spent by the customer in the merchant

Example: "1000,"
client.​totalAmountReturnednumber(float)

Amount returned by the customer in the merchant

Example: "100,"
client.​quantityPlacedOrdersnumber

Number of orders placed by the customer in the merchant

Example: 1
client.​quantityReturnsnumber

Number of returns made by the customer in the merchant

Example: 1
client.​tierstringrequired

Customer classification tier

Example: "GOLD"
curl -i -X POST \
  https://docs.ifreturns.com/_mock/apis/returns/return_methods \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "shopCode": "marchelacolombine",
    "currencyCode": "EUR",
    "ecommerceOrder": {
      "id": 123,
      "orderType": "DTC",
      "salesChannel": "web",
      "status": "COMPLETED",
      "totalPaid": 254,
      "totalDiscount": 0,
      "totalShippingCost": 5,
      "paymentMethods": [
        {
          "method": "credit_card",
          "amount": 254
        }
      ],
      "tags": [
        "WEB",
        "SUMMER"
      ],
      "discountCodes": [
        "WELCOME10",
        "FREESHIPPING"
      ],
      "lineItems": [
        {
          "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"
        }
      ],
      "fulfillments": [
        {
          "id": "2454552154",
          "fulfilledAt": "2024-07-02",
          "deliverAt": "2024-07-04",
          "fulfillmentCenter": "MAIN_WAREHOUSE",
          "fulfillmentCenterCountryCode": "ES",
          "shipmentCarrier": "CORREOS",
          "shipmentServiceName": "Express Delivery",
          "fulfillmentLineItems": [
            {
              "lineItemid": "456456",
              "quantity": 1
            },
            {
              "lineItemid": "456488",
              "quantity": 1
            }
          ]
        }
      ]
    },
    "originAddress": {
      "firstName": "Paul",
      "lastName": "Doe",
      "line1": "C. Juan de Mena 8",
      "line2": "sótano",
      "city": "Madrid",
      "postalCode": "28010",
      "regionCode": "M",
      "countryCode": "ES"
    },
    "returnLineItems": {
      "id": 456456,
      "name": "Oxford shirt M",
      "sku": "OSM123",
      "variantOptions": [
        {
          "key": "color",
          "value": "blue"
        }
      ],
      "quantity": 1,
      "originalUnitPrice": 100,
      "lineTotalPrice": 100,
      "lineTotalDiscount": 0,
      "lineTotalPaid": 100,
      "returnReasonCode": "size-bigger",
      "refundTypeCode": "ORIGINAL_PAYMENT_METHOD",
      "productTags": [
        "new",
        "color:blue",
        "collection:summer"
      ],
      "primaryProductCategory": "shirts",
      "productVendor": "iFreturns"
    },
    "client": {
      "id": "2352123",
      "totalAmountSpent": "1000,",
      "totalAmountReturned": "100,",
      "quantityPlacedOrders": 1,
      "quantityReturns": 1,
      "tier": "GOLD"
    }
  }'

Responses

Successful operation

Bodyapplication/json
returnMethodsArray of objects(CalculatedReturnMethod)

List of available return methods

Response
application/json
{ "returnMethods": [ {} ] }