Multi Carrier Rate Shopping API ( Pre-Label Print)

 

Fenix Rate Shopping provides the retailers the ability to show the optimal rates on the checkout page to the consumer by comparing the rates across multiple carrier services. At the time of Label printing, it combines the power of its Rate Shopping engine with the Transit Time Models of various carrier services and helps the retailers in scheduling the shipping while still satisfying the customers delivery expectations.

Flow

 

 

Integration Touchpoints

 

Sample API Request and Response

Attribute

Description

Attribute

Description

Endpoint

https://postpurchase.fenixcommerce.com/fenix/oms/crs/v1/rateshopping/get-rateshopping-info

Method

POST

Headers

tenant_id

auth_token

Request Sample

{ "request_id":"cf0d52b7-c214-47b9-8bdf-ea4e30b4299d", "shipment_id":"#128992", "deliver_within_days": 0, "expected_delivery_date": "06-19-2023 08:30", "expected_shipping_date": "06-13-2023 16:30", "from": { "address1": "210 rose ct", "address2": "", "city": "campbell", "country": "US", "fname": "John", "lname": "Doe", "po_box": false, "residential": false, "state": "CA", "zipcode": "95008" }, "reference_id": "Order_id_198", "shipment_info": { "dimensions": { "height": 10, "length": 10, "units": "IN", "width": 10 }, "package_name": "", "product_infos": null, "properties": null, "shipment_id": "#128992", "weight": { "units": "LB", "value": 0.10 } }, "to": { "address1": "5434 castle manor dr", "address2": "", "city": "San jose", "country": "US", "fname": "John", "lname": "Doe", "po_box": false, "residential": true, "state": "CA", "zipcode": "95129" }, "warehouse_id": "" }

Response

{ "request_id": "cf0d52b7-c214-47b9-8bdf-ea4e30b4299d", "to": { "fname": "John", "lname": "Doe", "address1": "5434 castle manor dr", "address2": "", "city": "San jose", "country": "US", "state": "CA", "zipcode": "95129", "residential": true, "po_box": false }, "from": { "fname": "John", "lname": "Doe", "address1": "210 rose ct", "address2": "", "city": "campbell", "country": "US", "state": "CA", "zipcode": "95008", "residential": false, "po_box": false }, "request_dt": "2023-06-13T15:20:56.393701121Z", "fenix_request_id": "90a994f8-f60f-4d8a-8038-781370d80c89", "expected_delivery_date": "06-19-2023 08:30", "expected_shipping_date": "06-13-2023 16:30", "deliver_within_days": 0, "suggested_service_responses": [ { "carrier": "USPS", "service": { "code": "First-Class Package Service", "name": null }, "ship_cost": { "amount": 3.59, "currency": "USD" }, "retail_ship_cost": null, "transit_info": { "delivery_date": "06-16-2023 23:59", "transit_time": 3 }, "ship_by_date": "06-16-2023 16:30", "delivery_accuracy_percent": 0.0, "metainfo": { "included": true, "exclusion_code": null, "exclude_message": null } } ], "excluded_service_responses": [ { "carrier": "FEDEX", "service": { "code": "SMART_POST", "name": "SMART_POST" }, "ship_cost": { "amount": 6.32, "currency": "USD" }, "retail_ship_cost": null, "transit_info": { "delivery_date": "06-15-2023 16:30", "transit_time": 2 }, "ship_by_date": "06-16-2023 16:30", "delivery_accuracy_percent": 0.0, "metainfo": { "included": false, "exclusion_code": "SHIPPING_COST", "exclude_message": "Excluded due to ship cost" } } ] }

Request Attribute Definitions

Attribute

Required

Description

Attribute

Required

Description

request_id

true

A unique identifier of the request

order_id

true

Order id of the shipment

shipment_id

true

Shipment id of the shipment

request.from

true

Address of the shipper

request.from.fname

false

First name of the shipper

request.from.lname

false

Last name of the shipper

request.from.address_line1

true

The line 1 of the shipper address

request.from.address_line2

false

The line 2 of the shipper address

request.from.city

false

The city of the shipper

request.from.state

false

The state of the shipper

request.from.zipcode

true

The zip code of the shipper

request.from.country

true

The country of the shipper (Use ISO code. Ex, US, CA, IN, etc)

request.from.residential

false

Flag to denote if the shipper address is a residential

request.from.po_box

false

Flag to denote if the shipper address is a po box

request.to

true

Address of the buyer

request.to.fname

false

First name of the buyer

request.to.lname

false

Last name of the buyer

request.to.address_line1

true

The line 1 of the buyer address

request.to.address_line2

false

The line 2 of the buyer address

request.to.city

false

The city of the buyer

request.to.state

false

The state of the buyer

request.to.zipcode

true

The zip code of the buyer

request.to.country

true

The country of the buyer (Use ISO code. Ex, US, CA, IN, etc)

request.to.residential

false

Flag to denote if the buyer address is a residential

request.to.po_box

false

Flag to denote if the buyer address is a po box

request.warehouse_id

false

The warehouse id if the details are configured it in Fenix

request.shipment_info

true

Details of the shipment

request.shipment_info.package_name

false

Note: Must be specified when the dimensions are not specified

Specify the kind of package. You can specify CUSTOM for your own packaging dims or else specify the carrier’s own packaging info.

Examples of carrier packaging info

  • FEDEX_ENVELOPE

  • FEDEX_SMALL_BOX

  • FEDEX_MEDIUM_BOX

  • etc.,

 

request.shipment_info.dimensions

false

Note: Must be specified when the package name is not specified

The dimension details of the shipment

request.shipment_info.dimensions.length

true

The length of the shipping package

request.shipment_info.dimensions.width

true

The width of the shipping package

request.shipment_info.dimensions.height

true

The height of the shipping package

request.shipment_info.dimensions.units

false

The units of the above dimensions.

Valid Values: IN, CM

Default: IN

request.shipment_info.weight

false

The weight details of the shipment

request.shipment_info.weight.value

true

The weight of the shipping package

request.shipment_info.weight.units

false

The units of the above weight.

Valid Values: LB, KG, OZ

Default: LB

request.shipment_info.product_infos

false

The SKUs and their quantities shipping as part of the shipment

request.shipment_info.product_infos.sku

false

The SKU Id

request.shipment_info.product_infos.quantity

false

The number of units of the above SKU

request.shipment_info.product_infos.variant_id

false

The variant id of the above SKU (applies only to shopify platform)

request.shipment_info.product_infos.product_id

false

The product id of the above SKU

request.shipment_info.product_infos.weight

false

The weight details of the above SKU

request.shipment_info.product_infos.weight.value

true

The weight of the above SKU

request.shipment_info.product_infos.weight.units

false

The units of the above weight.

Valid Values: LB, KG, OZ

Default: LB

request.shipment_info.product_infos.dimensions

false

Note: Must be specified when the package name is not specified

The dimension details of the SKU

request.shipment_info.product_infos.dimensions.length

true

The length of the SKU

request.shipment_info.product_infos.dimensions.width

true

The width of the SKU

request.shipment_info.product_infos.dimensions.height

true

The height of the SKU

request.shipment_info.product_infos.dimensions.units

false

The units of the above dimensions.

Valid Values: IN, CM

Default: IN

request.expected_delivery_date

false

Expected delivery date of the shipment

Date Format: MM-dd-yyyy HH:mm

request.expected_shipping_date

false

Expected shipping date of the shipment

Date Format: MM-dd-yyyy HH:mm

If the date is not specified, the current date and time will be taken as the shipping date

request.deliver_within_days

false

Expected days to deliver the shipment

Response Attribute Definitions

Attribute

Required

Description

Attribute

Required

Description

response.from

true

Same as the request’s shipper address

response.to

true

Same as the request’s buyer address

response.request_id

true

A unique identifier of the request

response.request_dt

true

The date and time the API is called

Date Format: yyyy-MM-ddTHH:mm:ss

response.fenix_request_id

true

A unique id for the request generated by Fenix for its internal tracking

response.expected_delivery_date

false

Expected delivery date of the shipment

response.expected_shipping_date

false

Expected shipping date of the shipment

If the date is not specified, the current date and time will be taken as the shipping date

response.deliver_within_days

false

Expected days to deliver the shipment

response.suggested_service_responses

true

Fenix suggested service for the request

response.suggested_service_responses.carrier

true

The carrier of the shipping service

response.suggested_service_responses.service

true

The service details of the service

response.suggested_service_responses.service.code

true

The service code of the service

response.suggested_service_responses.service.name

false

The service name of the service

response.suggested_service_responses.ship_cost

true

The estimated shipping cost of the service

response.suggested_service_responses.ship_cost.amount

true

The shipping cost amount of the service

response.suggested_service_responses.ship_cost.currency

true

The currency of the shipping cost

response.suggested_service_responses.transit_info

true

The transit time information of the service

response.suggested_service_responses.transit_info.delivery_date

true

The Fenix estimated delivery date of the above service

response.suggested_service_responses.transit_info.transit_time

true

The Fenix estimated transit time of the above service

response.suggested_service_responses.ship_by_date

true

The maximum shipping date by when the service can still deliver the shipment

response.suggested_service_responses.delivery_accuracy_percent

false

The delivery accuracy percent of the service based on the historic delivery information

response.suggested_service_responses.metainfo

false

Additional information about the service

response.suggested_service_responses.metainfo.included

true

Flag to represent the service suggested by Fenix.

True if suggested service, False if not

response.suggested_service_responses.metainfo.exclusion_code

true

Exclusion code if the service is rejected as part of Fenix’s rate shopping

response.suggested_service_responses.metainfo.exclude_message

true

Exclusion description if the service is rejected as part of Fenix’s rate shopping

response.excluded_service_responses

false

Contains a list of services rejected by Fenix as part of Fenix’s rate shopping

Â