iF returns - Inverse Logistic API (1.2.10)
API to allow the integration with merchants
https://docs.ifreturns.com/_mock/apis/returns/
https://api.dev.ifreturns.com/integration/v1/
https://api.stg.ifreturns.com/integration/v1/
https://api.ifreturns.com/integration/v1/
Shop code which belongs the shipment. 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. This field is mandatory in case the token is associated with two or more merchants
ID of the shipment. The ID must exist in the platform. API will use this value to search the shipment whose status will be updated.
Type of ID that is being reported * RETURN_NAME
- Name of the return. The last active shipment/transport will be searched. This value is generated by iF at the moment the return request is created. It has the format R#-{ORDER_NAME} (R1-64231)
Tracking URL for the shipping
Status of the shipment/transport
Description of the status description
- Mock server
https://docs.ifreturns.com/_mock/apis/returns/shipping_trackings
- Development Server
https://api.dev.ifreturns.com/integration/v1/shipping_trackings
- Staging Server
https://api.stg.ifreturns.com/integration/v1/shipping_trackings
- Production Server
https://api.ifreturns.com/integration/v1/shipping_trackings
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.ifreturns.com/_mock/apis/returns/shipping_trackings \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"shopCode": "marchelacolombine",
"shipmentId": "R1-64231",
"shipmentIdType": "RETURN_NAME",
"carrierName": "UPS",
"trackingNumber": "1Z4E61W19106005862",
"trackingUrl": "https://www.ups.com/tracknum=1Z4E61W19106005862",
"trackingStatus": "SHIPPING_IN_PROGRESS",
"trackingStatusDescription": "Package assigned to the driver",
"trackingDate": "2011-08-12T20:17:46Z"
}'
{ "statusCode": "200", "description": "Your tracking have been registered correctly" }
Shop code which belongs the shipment. 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
ID of the shipment assigned by the merchant. It will be communicated to the carrier in order to be printed in the label
Allow to request a specific label format. In case is not informed, the default format for the carrier will be used. In case the carrier does not support the requested format, the default format for the carrier will be used. The final format will be included in the response
Origin address for the transportation
Destination address for the transportation
- Mock server
https://docs.ifreturns.com/_mock/apis/returns/shipping_labels
- Development Server
https://api.dev.ifreturns.com/integration/v1/shipping_labels
- Staging Server
https://api.stg.ifreturns.com/integration/v1/shipping_labels
- Production Server
https://api.ifreturns.com/integration/v1/shipping_labels
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.ifreturns.com/_mock/apis/returns/shipping_labels \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"shopCode": "marchelacolombine",
"shipmentType": "RETURN",
"clientShipmentId": "SHP123",
"clientShipmentName": "S123",
"carrierServiceCode": "IF-UPS-EXPRESS-SAVER",
"labelFormat": "PDF",
"shipper": {
"fullName": "iF warehouse",
"email": "warehouse@if.com",
"phone": 34666666666,
"address": {
"line1": "Calle de Fortunata y Jacinta 12",
"line2": "",
"city": "Madrid",
"postalCode": "28020",
"region": "Madrid",
"countryCode": "ES"
}
},
"origin": {
"fullName": "Juan Perez",
"code": "Juan Perez",
"email": "customer@if.com",
"phone": 34666666666,
"address": {
"line1": "Calle de Fortunata y Jacinta 12",
"line2": "",
"city": "Madrid",
"postalCode": "28020",
"region": "Madrid",
"countryCode": "ES"
}
},
"destination": {
"fullName": "iF warehouse",
"code": "string",
"email": "warehouse@if.com",
"phone": 34666666666,
"address": {
"line1": "Calle de Fortunata y Jacinta 12",
"line2": "",
"city": "Madrid",
"postalCode": "28020",
"region": "Madrid",
"countryCode": "ES"
}
},
"parcels": [
{
"clientParcelId": "P001",
"description": "Goods",
"weight": 1000,
"height": 10,
"length": 10,
"width": 10
}
],
"customsInfo": [
{
"description": "Goods",
"hsCode": 40159000,
"weight": 1,
"quantity": 1,
"unitPrice": 120,
"currencyCode": "EUR",
"originCountryCode": 120
}
]
}'
{ "carrierCode": "ups", "carrierExternalCode": 20000008, "carrierServiceCode": "IF-UPS-EXPRESS-SAVER", "clientShipmentId": "SHP123", "shippingLabels": [ { … } ] }
- Mock server
https://docs.ifreturns.com/_mock/apis/returns/shipping_labels
- Development Server
https://api.dev.ifreturns.com/integration/v1/shipping_labels
- Staging Server
https://api.stg.ifreturns.com/integration/v1/shipping_labels
- Production Server
https://api.ifreturns.com/integration/v1/shipping_labels
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.ifreturns.com/_mock/apis/returns/shipping_labels?client_shipment_id=SHP123&shopCode=marchelacolombine' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
[ { "carrierCode": "ups", "carrierExternalCode": 20000008, "carrierServiceCode": "IF-UPS-EXPRESS-SAVER", "clientShipmentId": "SHP123", "shippingLabels": [ … ] } ]
Shop code which belongs the shipment. 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. This field is mandatory in case the token is associated with two or more merchants
ID of the shipment. The ID must exist in the platform. Platform will use this value to search the shipment whose status will be updated.
Type of ID that is being reported * RETURN_NAME
- Name of the return. The last active shipment/transport will be searched. This value is generated by iF at the moment the return request is created. It has the format R#-{ORDER_NAME} (R1-64231) * CLIENT_REFERENCE
- Shipping reference assigned for the shipment/transport. This value is generated by iF at the moment the transport is created. It has the format P#R#{MERCHANT-SHORT-CODE}{ORDER_NAME} (P1R1maco64231) * MERCHANT_RETURN_NAME
- Name of the return in the ecommerce platform. The last active shipment/transport will be searched. This value is generated by the merchant system when the return is registered. The format is defined by the merchant (e.g. in Shopify the return name is 64231-R1)
List of shipping labels
Reference assigned by the carrier to the shipment
URL for shipment tracking
Format of the label or free-label code
- Mock server
https://docs.ifreturns.com/_mock/apis/returns/shipping_labels
- Development Server
https://api.dev.ifreturns.com/integration/v1/shipping_labels
- Staging Server
https://api.stg.ifreturns.com/integration/v1/shipping_labels
- Production Server
https://api.ifreturns.com/integration/v1/shipping_labels
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://docs.ifreturns.com/_mock/apis/returns/shipping_labels \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"shopCode": "marchelacolombine",
"shipmentId": "64231-R1",
"shipmentIdType": "MERCHANT_RETURN_NAME",
"shippingLabels": [
{
"carrierTrackingCode": "PARC0001",
"additionalTrackingCodes": [
"S4848554544545"
],
"carrierTrackingUrl": "https://carrier.com/tracking/S4848554544545",
"format": "PDF",
"url": "https://if.com/shippping_label.pdf"
}
]
}'
{ "statusCode": "200", "description": "Your shipping label have been updated correctly" }
Request
Calculate the PUDOs can be used to ship the items. The PUDOs are calculated based on a reference address. Before call this endpoint, the list of avaiable return methods should be calculated in order to obtain the carrier data. It is mandatory to inform either the address or the geolocation data
Shop code which belongs the shipment. 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
List of carrier service connections from which the PUDOs will be obtained
Latitude of the reference address. If this field is informed will have more priority than address
Longitude of the reference address. If this field is informed will have more priority than address
- Mock server
https://docs.ifreturns.com/_mock/apis/returns/pudos
- Development Server
https://api.dev.ifreturns.com/integration/v1/pudos
- Staging Server
https://api.stg.ifreturns.com/integration/v1/pudos
- Production Server
https://api.ifreturns.com/integration/v1/pudos
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.ifreturns.com/_mock/apis/returns/pudos \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"shopCode": "marchelacolombine",
"carrierServices": [
{
"code": "IF-UPS-EXPRESS-SAVER"
},
{
"code": "IF-SEUR-HOME2SHOP"
}
],
"limit": 10,
"address": "C. Juan de Mena 8",
"city": "Madrid",
"postalCode": "28010",
"countryCode": "ES",
"latitude": 40.323132,
"longitude": -3.434343,
"range": 10,
"locationType": "ALL"
}'
[ { "carrierCode": "ups", "carrierExternalCode": "20000008", "pudoPoints": [ … ] } ]