Replies: 6 comments 3 replies
|
Hi MarcoWel , Can you share some anonymized requests of the scenarios you described above? |
|
Hi Dan (@danh91),
With "Add A Return Address"Karrio is getting the wrong services - return shipments needs to be UPS Express Saver Worldwide, not Standard or Express EU.
karrio Request: {
"label_type": "PDF",
"options": {
"shipping_date": "2026-02-09T00:17"
},
"parcels": [
{
"dimension_unit": "CM",
"height": 18.2,
"is_document": false,
"length": 10,
"packaging_type": "your_packaging",
"weight": 1,
"weight_unit": "KG",
"width": 33.7
}
],
"payment": {
"paid_by": "sender"
},
"recipient": {
"address_line1": "Teststr. 1",
"city": "Karlsruhe",
"company_name": "Test Company",
"country_code": "DE",
"id": "adr_052cabccc9164ca8aa404c40fa683eb7",
"meta": {
"is_default": false,
"label": "Germany Test"
},
"object_type": "address",
"person_name": "Person Name",
"postal_code": "76131",
"residential": false
},
"return_address": {
"address_line1": "001 Test Blvd",
"city": "San Francisco",
"company_name": "US Company",
"country_code": "US",
"id": "adr_261ac794dc5744aea175f807c03b72fd",
"meta": {
"is_default": false,
"label": "US Test"
},
"object_type": "address",
"person_name": "Test Person",
"postal_code": "94102",
"residential": false,
"state_code": "CA"
},
"shipper": {
"address_line1": "Teststr. 1",
"city": "Karlsruhe",
"company_name": "Test Company",
"country_code": "DE",
"id": "adr_052cabccc9164ca8aa404c40fa683eb7",
"meta": {
"is_default": false,
"label": "Germany Test"
},
"object_type": "address",
"person_name": "Person Name",
"postal_code": "76131",
"residential": false
}
}UPS Request: {
"RateRequest": {
"Request": {
"RequestOption": "Shoptimeintransit",
"SubVersion": "2409",
"TransactionReference": {
"CustomerContext": "fetch rates"
}
},
"Shipment": {
"DeliveryTimeInformation": {
"PackageBillType": "03",
"Pickup": {
"Date": "20260209"
}
},
"InvoiceLineTotal": {
"CurrencyCode": "USD",
"MonetaryValue": "1.0"
},
"Package": [
{
"Dimensions": {
"Height": "18.2",
"Length": "10.0",
"UnitOfMeasurement": {
"Code": "CM",
"Description": "Dimension"
},
"Width": "33.7"
},
"PackageWeight": {
"UnitOfMeasurement": {
"Code": "KGS",
"Description": "Weight"
},
"Weight": "1.0"
},
"PackagingType": {
"Code": "02",
"Description": "Packaging Type"
}
}
],
"PaymentDetails": {
"ShipmentCharge": [
{
"BillShipper": {
"AccountNumber": "xxx"
},
"Type": "01"
}
]
},
"RatingMethodRequestedIndicator": "Y",
"Service": {
"Code": "11",
"Description": "Weight"
},
"ShipFrom": {
"Address": {
"AddressLine": [
"1 Teststr."
],
"City": "Karlsruhe",
"CountryCode": "DE",
"PostalCode": "76131"
},
"AttentionName": "Person Name"
},
"ShipTo": {
"Address": {
"AddressLine": [
"1 Teststr."
],
"City": "Karlsruhe",
"CountryCode": "DE",
"PostalCode": "76131"
},
"AttentionName": "Person Name"
},
"ShipmentDate": "20260209",
"ShipmentRatingOptions": {
"NegotiatedRatesIndicator": "Y"
},
"ShipmentTotalWeight": {
"UnitOfMeasurement": {
"Code": "KGS",
"Description": "Dimension"
},
"Weight": "1.0"
},
"Shipper": {
"Address": {
"AddressLine": [
"1 Teststr."
],
"City": "Karlsruhe",
"CountryCode": "DE",
"PostalCode": "76131"
},
"AttentionName": "Person Name",
"ShipperNumber": "xxx"
},
"TaxInformationIndicator": "Y"
}
}
}karrio Response: {
"rates": [
{
"id": "rat_abb51918a434405d85310afac9ef24b8",
"object_type": "rate",
"carrier_name": "ups",
"carrier_id": "UPS",
"currency": "EUR",
"service": "ups_standard_eu",
"total_charge": x.xx,
"transit_days": 1,
"extra_charges": [
{
"name": "BASE CHARGE",
"amount": x.xx,
"currency": "EUR"
},
{
"name": "FUEL SURCHARGE",
"amount": x.xx,
"currency": "EUR"
},
{
"name": "MWST",
"amount": x.xx,
"currency": "EUR"
}
],
"meta": {
"service_name": "UPS STANDARD EU",
"rate_zone": "1",
"ext": "ups",
"carrier": "ups",
"rate_provider": "ups",
"carrier_connection_id": "car_662a8310b3c740f1909725b60ad7b630"
},
"test_mode": false
},
...
]
}UPS response: {
"RateResponse": {
"Response": {
"ResponseStatus": {
"Code": "1",
"Description": "Success"
},
"Alert": [
{
"Code": "110971",
"Description": "Your invoice may vary from the displayed reference rates"
}
],
"TransactionReference": {
"CustomerContext": "fetch rates"
}
},
"RatedShipment": [
...,
{
"Disclaimer": [
{
"Code": "01",
"Description": "Taxes are included in the shipping cost and apply to the transportation charges but additional duties/taxes may apply and are not reflected in the total amount due."
}
],
"Service": {
"Code": "11",
"Description": ""
},
"Zone": "1",
"RatedShipmentAlert": [
{
"Code": "110971",
"Description": "Your invoice may vary from the displayed reference rates"
}
],
"RatingMethod": "01",
"BillableWeightCalculationMethod": "02",
"BillingWeight": {
"UnitOfMeasurement": {
"Code": "KGS",
"Description": "Kilograms"
},
"Weight": "1.5"
},
"TransportationCharges": {
"CurrencyCode": "EUR",
"MonetaryValue": "17.75"
},
"BaseServiceCharge": {
"CurrencyCode": "EUR",
"MonetaryValue": "14.55"
},
"ItemizedCharges": [
{
"Code": "375",
"CurrencyCode": "EUR",
"MonetaryValue": "x.xx"
}
],
"ServiceOptionsCharges": {
"CurrencyCode": "EUR",
"MonetaryValue": "0.00"
},
"TotalCharges": {
"CurrencyCode": "EUR",
"MonetaryValue": "17.75"
},
"NegotiatedRateCharges": {
"BaseServiceCharge": {
"CurrencyCode": "EUR",
"MonetaryValue": "x.xx"
},
"ItemizedCharges": [
{
"Code": "375",
"CurrencyCode": "EUR",
"MonetaryValue": "x.xx"
}
],
"TaxCharges": [
{
"Type": "MWST",
"MonetaryValue": "x.xx"
}
],
"TotalCharge": {
"CurrencyCode": "EUR",
"MonetaryValue": "x.xx"
},
"TotalChargesWithTaxes": {
"CurrencyCode": "EUR",
"MonetaryValue": "x.xx"
}
},
"RatedPackage": [
{
"NegotiatedCharges": {
"BaseServiceCharge": {
"CurrencyCode": "EUR",
"MonetaryValue": "0.00"
},
"TransportationCharges": {
"CurrencyCode": "EUR",
"MonetaryValue": "0.00"
},
"ServiceOptionsCharges": {
"CurrencyCode": "EUR",
"MonetaryValue": "0.00"
},
"TotalCharge": {
"CurrencyCode": "EUR",
"MonetaryValue": "0.00"
}
},
"Weight": "1.0"
}
],
"TimeInTransit": {
"PickupDate": "20260209",
"PackageBillType": "03",
"AutoDutyCode": "02",
"Disclaimer": "Services listed as guaranteed are backed by a money-back guarantee for transportation charges only. See Terms and Conditions in the Service Guide for details. Certain commodities and high value shipments may require additional transit time for customs clearance.",
"ServiceSummary": {
"Service": {
"Description": "UPS Standard"
},
"EstimatedArrival": {
"Arrival": {
"Date": "20260210",
"Time": "233000"
},
"BusinessDaysInTransit": "1",
"Pickup": {
"Date": "20260209",
"Time": "190000"
},
"DayOfWeek": "TUE",
"CustomerCenterCutoff": "170000",
"TotalTransitDays": "1"
},
"Disclaimer": "UPS Standard is available to UPS Account holders only.",
"SaturdayDelivery": "0"
}
}
}
]
}
}Without "Add A Return Address"
karrio Request: {
"label_type": "PDF",
"options": {
"shipping_date": "2026-02-09T00:17"
},
"parcels": [
{
"dimension_unit": "CM",
"height": 18.2,
"is_document": false,
"length": 10,
"packaging_type": "your_packaging",
"weight": 1,
"weight_unit": "KG",
"width": 33.7
}
],
"payment": {
"paid_by": "sender"
},
"recipient": {
"address_line1": "Teststr. 1",
"city": "Karlsruhe",
"company_name": "Test Company",
"country_code": "DE",
"id": "adr_052cabccc9164ca8aa404c40fa683eb7",
"meta": {
"is_default": false,
"label": "Germany Test"
},
"object_type": "address",
"person_name": "Person Name",
"postal_code": "76131",
"residential": false
},
"shipper": {
"address_line1": "001 Test Blvd",
"city": "San Francisco",
"company_name": "US Company",
"country_code": "US",
"id": "adr_261ac794dc5744aea175f807c03b72fd",
"meta": {
"is_default": false,
"label": "US Test"
},
"object_type": "address",
"person_name": "Test Person",
"postal_code": "94102",
"residential": false,
"state_code": "CA"
}
}UPS Request: {
"RateRequest": {
"Request": {
"RequestOption": "Shoptimeintransit",
"SubVersion": "2409",
"TransactionReference": {
"CustomerContext": "fetch rates"
}
},
"Shipment": {
"DeliveryTimeInformation": {
"PackageBillType": "03",
"Pickup": {
"Date": "20260209"
}
},
"InvoiceLineTotal": {
"CurrencyCode": "USD",
"MonetaryValue": "1.0"
},
"Package": [
{
"Dimensions": {
"Height": "7.17",
"Length": "3.94",
"UnitOfMeasurement": {
"Code": "IN",
"Description": "Dimension"
},
"Width": "13.27"
},
"PackageWeight": {
"UnitOfMeasurement": {
"Code": "LBS",
"Description": "Weight"
},
"Weight": "2.21"
},
"PackagingType": {
"Code": "02",
"Description": "Packaging Type"
}
}
],
"PaymentDetails": {
"ShipmentCharge": [
{
"BillShipper": {
"AccountNumber": "xxxxx"
},
"Type": "01"
}
]
},
"RatingMethodRequestedIndicator": "Y",
"Service": {
"Code": "11",
"Description": "Weight"
},
"ShipFrom": {
"Address": {
"AddressLine": [
"001 Test Blvd"
],
"City": "San Francisco",
"CountryCode": "US",
"PostalCode": "94102",
"StateProvinceCode": "CA"
},
"AttentionName": "Test Person"
},
"ShipTo": {
"Address": {
"AddressLine": [
"1 Teststr."
],
"City": "Karlsruhe",
"CountryCode": "DE",
"PostalCode": "76131"
},
"AttentionName": "Person Name"
},
"ShipmentDate": "20260209",
"ShipmentRatingOptions": {
"NegotiatedRatesIndicator": "Y"
},
"ShipmentTotalWeight": {
"UnitOfMeasurement": {
"Code": "KGS",
"Description": "Dimension"
},
"Weight": "1.0"
},
"Shipper": {
"Address": {
"AddressLine": [
"001 Test Blvd"
],
"City": "San Francisco",
"CountryCode": "US",
"PostalCode": "94102",
"StateProvinceCode": "CA"
},
"AttentionName": "Test Person",
"ShipperNumber": "xxx"
},
"TaxInformationIndicator": "Y"
}
}
}karrio Response: {
"messages": [
{
"carrier_id": "UPS",
"carrier_name": "ups",
"code": "111617",
"level": "error",
"message": "The country associated with Shippers ShipperNumber must be the same as the shipments Shippers country."
}
]
}UPS response: {
"response": {
"errors": [
{
"code": "111617",
"message": "The country associated with Shippers ShipperNumber must be the same as the shipments Shippers country."
}
]
}
} |
|
Hi Dan (@danh91), |
|
Update 2026.1.17: Rate fetching for international return shipments now seems to work for There is still an issue for UPS though. Return shipment US->DE is giving the error Requesting in kg - Error "Invalid Unit of Measurement"karrio request: {
"label_type": "PDF",
"options": {
"shipping_date": "2026-03-04T12:27"
},
"parcels": [
{
"dimension_unit": "CM",
"height": 18.2,
"is_document": false,
"length": 10,
"packaging_type": "your_packaging",
"weight": 1,
"weight_unit": "KG",
"width": 33.7
}
],
"payment": {
"paid_by": "sender"
},
"recipient": {
"address_line1": "Teststr. 1",
"city": "Karlsruhe",
"company_name": "Test Company",
"country_code": "DE",
"id": "adr_052cabccc9164ca8aa404c40fa683eb7",
"meta": {
"is_default": false,
"label": "Germany Test"
},
"object_type": "address",
"person_name": "Person Name",
"postal_code": "76131",
"residential": false
},
"return_address": {
"address_line1": "001 Test Blvd",
"city": "San Francisco",
"company_name": "US Company",
"country_code": "US",
"id": "adr_261ac794dc5744aea175f807c03b72fd",
"meta": {
"is_default": false,
"label": "US Test"
},
"object_type": "address",
"person_name": "Test Person",
"postal_code": "94102",
"residential": false,
"state_code": "CA"
},
"shipper": {
"address_line1": "Teststr. 1",
"city": "Karlsruhe",
"company_name": "Test Company",
"country_code": "DE",
"id": "adr_052cabccc9164ca8aa404c40fa683eb7",
"meta": {
"is_default": false,
"label": "Germany Test"
},
"object_type": "address",
"person_name": "Person Name",
"postal_code": "76131",
"residential": false
}
}UPS request: {
"RateRequest": {
"Request": {
"RequestOption": "Shoptimeintransit",
"SubVersion": "2409",
"TransactionReference": {
"CustomerContext": "fetch rates"
}
},
"Shipment": {
"DeliveryTimeInformation": {
"PackageBillType": "03",
"Pickup": {
"Date": "20260304"
}
},
"InvoiceLineTotal": {
"CurrencyCode": "USD",
"MonetaryValue": "1.0"
},
"Package": [
{
"Dimensions": {
"Height": "18.2",
"Length": "10.0",
"UnitOfMeasurement": {
"Code": "CM",
"Description": "Dimension"
},
"Width": "33.7"
},
"PackageWeight": {
"UnitOfMeasurement": {
"Code": "KGS",
"Description": "Weight"
},
"Weight": "1.0"
},
"PackagingType": {
"Code": "02",
"Description": "Packaging Type"
}
}
],
"PaymentDetails": {
"ShipmentCharge": [
{
"BillShipper": {
"AccountNumber": "xxx"
},
"Type": "01"
}
]
},
"RatingMethodRequestedIndicator": "Y",
"Service": {
"Code": "11",
"Description": "Weight"
},
"ShipFrom": {
"Address": {
"AddressLine": [
"001 Test Blvd"
],
"City": "San Francisco",
"CountryCode": "US",
"PostalCode": "94102",
"StateProvinceCode": "CA"
},
"AttentionName": "Test Person"
},
"ShipTo": {
"Address": {
"AddressLine": [
"1 Teststr."
],
"City": "Karlsruhe",
"CountryCode": "DE",
"PostalCode": "76131"
},
"AttentionName": "Person Name"
},
"ShipmentDate": "20260304",
"ShipmentRatingOptions": {
"NegotiatedRatesIndicator": "Y"
},
"ShipmentTotalWeight": {
"UnitOfMeasurement": {
"Code": "KGS",
"Description": "Dimension"
},
"Weight": "1.0"
},
"Shipper": {
"Address": {
"AddressLine": [
"1 Teststr."
],
"City": "Karlsruhe",
"CountryCode": "DE",
"PostalCode": "76131"
},
"AttentionName": "Person Name",
"ShipperNumber": "xxx"
},
"TaxInformationIndicator": "Y"
}
}
}Requesting in g - works finekarrio request: {
"label_type": "PDF",
"options": {
"shipping_date": "2026-03-04T12:27"
},
"parcels": [
{
"dimension_unit": "CM",
"height": 18.2,
"is_document": false,
"length": 10,
"packaging_type": "your_packaging",
"weight": 1000,
"weight_unit": "G",
"width": 33.7
}
],
"payment": {
"paid_by": "sender"
},
"recipient": {
"address_line1": "Teststr. 1",
"city": "Karlsruhe",
"company_name": "Test Company",
"country_code": "DE",
"id": "adr_052cabccc9164ca8aa404c40fa683eb7",
"meta": {
"is_default": false,
"label": "Germany Test"
},
"object_type": "address",
"person_name": "Person Name",
"postal_code": "76131",
"residential": false
},
"return_address": {
"address_line1": "001 Test Blvd",
"city": "San Francisco",
"company_name": "US Company",
"country_code": "US",
"id": "adr_261ac794dc5744aea175f807c03b72fd",
"meta": {
"is_default": false,
"label": "US Test"
},
"object_type": "address",
"person_name": "Test Person",
"postal_code": "94102",
"residential": false,
"state_code": "CA"
},
"shipper": {
"address_line1": "Teststr. 1",
"city": "Karlsruhe",
"company_name": "Test Company",
"country_code": "DE",
"id": "adr_052cabccc9164ca8aa404c40fa683eb7",
"meta": {
"is_default": false,
"label": "Germany Test"
},
"object_type": "address",
"person_name": "Person Name",
"postal_code": "76131",
"residential": false
}
}UPS request: {
"RateRequest": {
"Request": {
"RequestOption": "Shoptimeintransit",
"SubVersion": "2409",
"TransactionReference": {
"CustomerContext": "fetch rates"
}
},
"Shipment": {
"DeliveryTimeInformation": {
"PackageBillType": "03",
"Pickup": {
"Date": "20260304"
}
},
"InvoiceLineTotal": {
"CurrencyCode": "USD",
"MonetaryValue": "1.0"
},
"Package": [
{
"Dimensions": {
"Height": "7.17",
"Length": "3.94",
"UnitOfMeasurement": {
"Code": "IN",
"Description": "Dimension"
},
"Width": "13.27"
},
"PackageWeight": {
"UnitOfMeasurement": {
"Code": "LBS",
"Description": "Weight"
},
"Weight": "2.2"
},
"PackagingType": {
"Code": "02",
"Description": "Packaging Type"
}
}
],
"PaymentDetails": {
"ShipmentCharge": [
{
"BillShipper": {
"AccountNumber": "xxx"
},
"Type": "01"
}
]
},
"RatingMethodRequestedIndicator": "Y",
"Service": {
"Code": "11",
"Description": "Weight"
},
"ShipFrom": {
"Address": {
"AddressLine": [
"001 Test Blvd"
],
"City": "San Francisco",
"CountryCode": "US",
"PostalCode": "94102",
"StateProvinceCode": "CA"
},
"AttentionName": "Test Person"
},
"ShipTo": {
"Address": {
"AddressLine": [
"1 Teststr."
],
"City": "Karlsruhe",
"CountryCode": "DE",
"PostalCode": "76131"
},
"AttentionName": "Person Name"
},
"ShipmentDate": "20260304",
"ShipmentRatingOptions": {
"NegotiatedRatesIndicator": "Y"
},
"ShipmentTotalWeight": {
"UnitOfMeasurement": {
"Code": "LBS",
"Description": "Dimension"
},
"Weight": "2.2"
},
"Shipper": {
"Address": {
"AddressLine": [
"1 Teststr."
],
"City": "Karlsruhe",
"CountryCode": "DE",
"PostalCode": "76131"
},
"AttentionName": "Person Name",
"ShipperNumber": "xxx"
},
"TaxInformationIndicator": "Y"
}
}
} |
|
Hi MarcoWel, Thanks for the update. We've noted the UPS kg unit conversion issue and will look into it. The return shipment API is still a work in progress; we have yet to finish the full implementation and documentation. We'll let you know once that's done. |
|
Hi MarcoWel, Thanks for the detailed reports - they helped us identify and fix real bugs in both UPS and FedEx return handling. I wanted to clarify how return shipments work in Karrio, since there are two distinct flows that behave differently. Flow 1:
|
| Field | Value |
|---|---|
| Direction | DE → US (unchanged) |
| Pickup from | return_address (Munich, DE) |
| Rates/services | DE → US |
Use case: Your company address (shipper) is in Berlin, but the parcel ships from your warehouse in Munich. The direction and rates stay the same - only the physical pickup location changes.
Flow 2: is_return: true - Actual return shipment
is_returntriggers the return shipment flow. Karrio auto-swaps shipper and recipient internally, so you provide addresses in the same orientation as the original outbound order - Karrio handles the reversal.
For shipment creation:
{
"shipper": { "country_code": "DE" },
"recipient": { "country_code": "US" },
"is_return": true,
"service": "ups_standard"
}For rate fetching:
{
"shipper": { "country_code": "DE" },
"recipient": { "country_code": "US" },
"options": { "is_return": true }
}| Field | Value |
|---|---|
| Direction | US → DE (auto-swapped) |
| Pickup from | Customer (US) |
| Rates/services | US → DE |
| Weight unit | Based on origin country (US → LBS) |
What was happening in your case
From your reports, you were using return_address (Flow 1) to signal a return. Since is_return wasn't set, Karrio treated it as a normal shipment with an alternate pickup - leading to:
- Country mismatches (
ShipFrom country must match Shipper country) - Wrong services (domestic instead of international)
- Wrong weight units (KG rejected for US-origin)
- FedEx auth errors (wrong origin country)
The fix: Use Flow 2 with is_return: true instead.
What we fixed (PR #1016)
We also found and fixed bugs in both flows:
- Shipment creation:
ShipFrom/originwas pointing to the merchant instead of the customer in return shipments — fixed for both UPS and FedEx - Rate fetching:
rate.pyhad nois_returnawareness — rates were fetched in the wrong direction with wrong weight units — fixed for both UPS and FedEx
Note: Currently
is_returnis only available via the API (POST /v1/shipments,POST /v1/proxy/rates). The dashboard UI doesn't have anis_returntoggle yet, that's on our roadmap. In the meantime, you can test return shipments by calling the API directly withis_return: true.


Uh oh!
There was an error while loading. Please reload this page.
Dear karrio Team,
Can we generate import shipments (UPS calls them return shipments)?
Example 1:
Result in karrio:
Example 2:
Result in karrio:
All reactions