Fenix Unified Shipping API

Fenix Unified Shipping API

 

Fenix Unified Shipping API combines three important aspects of post purchase journey into a single API. This API includes the following functionality.

  • Cartonization

  • Order Sourcing

  • Rate Shopping

Fenix Order Sourcing is basically a means to route the order to a fulfillment location that can deliver the order to the customer as fast as possible in a cost effective way. Fenix Order Sourcing rules can be prioritized and can be chosen which rule should be applied before another. A user friendly rules screen will help the business user to change the rules, prioritize and add/remove them with ease and any change that is made to the rules will effect immediately.

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-shipping-info

Method

POST

Headers

tenantId

authToken (

x-identity

Request Sample

{ "request_id": "4ba0d463-6476-47f8-b67a-5c8c4bbcf3da", "shipment_id": "b7866a89-8dc1-4bac-8c4b-be1fabb56cb7", "order_id":"b7866a89-8dc1-4bac-8c4b-be1fabb56cb7", "to": { "fname": "", "lname": "", "address1": "4320 Stevens Creek Blvd", "address2": "", "city": "San Jose", "country": "US", "state": "CA", "zipcode": "95129", "residential": true, "po_box": false }, "from": { "fname": "", "lname": "", "address1": "2325 Enborg Ln", "address2": "", "city": "San Jose", "country": "US", "state": "CA", "zipcode": "95128", "residential": false, "po_box": false }, "warehouse_id": "3bcde514-c7d7-40d5-9e41-2d0c1303810f", "product_infos": [ { "sku": "abc", "quantity": 1, "variant_id": 123, "product_id": 123, "dimensions": { "length": 6, "width": 8, "height": 6, "units": "IN" }, "weight": { "value": 1, "units": "LB" } } ], "shipment_info": { "package_name": null, "dimensions": { "length": 6, "width": 8, "height": 6, "units": "IN" }, "weight": { "value": 1, "units": "LB" }, "product_infos": [ { "sku": "abc", "quantity": 1, "variant_id": 123, "product_id": 123, "dimensions": { "length": 6, "width": 8, "height": 6, "units": "IN" }, "weight": { "value": 1, "units": "LB" } } ] }, "expected_delivery_date": "2023-10-31T01:30+01:00", "expected_shipping_date": "2023-10-31T01:30+01:00", "deliver_within_days": 10, "shipping_method": "Expedited", "shipping_profile": "general_profile" }

Response

{ "request_id": "string", "shipment_id": "string", "order_id": "string", "to": { "fname": "string", "lname": "string", "address1": "string", "address2": "string", "city": "string", "country": "string", "state": "string", "zipcode": "string", "residential": false, "po_box": false }, "deliver_within_days": 0, "error_info": { "error_code": "string", "identifier": "string", "error_message": "string", "description": "string", "error_messages": [ "string" ] }, "shipment_infos": [ { "fulfillment_info": { "loc_id": "string", "zone": "string", "address": { "originalZipcode": "string", "fname": "string", "lname": "string", "address1": "string", "address2": "string", "city": "string", "country": "string", "state": "string", "zipcode": "string", "residential": false, "po_box": false } }, "shipment_info": [ { "rateShoppingInfo": { "recommended_service": { "carrier": "string", "service": { "code": "string", "name": "string" }, "billed_weight": { "value": 0.0, "units": "string" }, "transit_time_summary": { "expected_shipping_date": "yyyy-MM-ddTHH:mm:ss", "expected_delivery_date": "yyyy-MM-ddTHH:mm:ss", "transit_time": 0 }, "total_price": { "amount": 0.00, "currency": "string" }, "base_price": { "amount": 0.00, "currency": "string" }, "total_discount": { "amount": 0.00, "currency": "string" }, "total_taxes": { "amount": 0.00, "currency": "string" }, "total_surcharges": { "amount": 0.00, "currency": "string" }, "total_duties_and_taxes": { "amount": 0.00, "currency": "string" }, "surcharge_summary": { "fuel_surcharge": { "name": "string", "code": "string", "description": "string", "amount": { "amount": 0.0, "currency": "string" } }, "das_surcharge": null, "additional_handling_surcharge": null, "residential_surcharge": null, "dry_ice_surcharge": null, "oversize_surcharge": null, "saturday_delivery_surcharge": null, "address_correction_surcharge": null, "dangerous_goods_surcharge": null, "holiday_delivery_surcharge": null, "overweight_surcharge": null, "residential_pickup_surcharge": null, "saturday_pickup_surcharge": null, "demand_surcharge": null } }, "services_excluded": [ { "carrier": "string", "service": { "code": "string", "name": "string" }, "billed_weight": { "value": 1.0, "units": "string" }, "transit_time_summary": { "expected_shipping_date": "yyyy-MM-ddTHH:mm:ss", "expected_delivery_date": "yyyy-MM-ddTHH:mm:ss", "transit_time": 0 }, "total_price": { "amount": 12.25, "currency": "string" }, "base_price": { "amount": 12.25, "currency": "string" }, "total_discount": { "amount": 0.00, "currency": "string" }, "total_taxes": { "amount": 0.00, "currency": "string" }, "total_surcharges": { "amount": 0.00, "currency": "string" }, "total_duties_and_taxes": { "amount": 0.00, "currency": "string" }, "surcharge_summary": { "fuel_surcharge": { "name": "string", "code": "string", "description": "string", "amount": { "amount": 0.0, "currency": "string" } }, "das_surcharge": null, "additional_handling_surcharge": null, "residential_surcharge": null, "dry_ice_surcharge": null, "oversize_surcharge": null, "saturday_delivery_surcharge": null, "address_correction_surcharge": null, "dangerous_goods_surcharge": null, "holiday_delivery_surcharge": null, "overweight_surcharge": null, "residential_pickup_surcharge": null, "saturday_pickup_surcharge": null, "demand_surcharge": null } } ] }, "shipment_id": "string", "cartonization_info": { "package_name": "string", "dimensions": { "length": 0, "width": 0, "height": 0, "units": "string" }, "space_utilization": 0.0, "weight": { "value": 0.0, "units": "string" }, "billed_weight": { "value": 0.0, "units": "string" } }, "allocation_info": [ { "sku_id": "string", "product_id": "string", "variant_id": "string", "line_item_id": "string", "requested_quantity": 0, "allocated_quantity": 0 } ] } ] } ] }

Request Attribute Definitions

Attribute

Required

Description

Attribute

Required

Description

request_id

true

A unique identifier of the request

shipment_id

true

Shipment id of the shipment

request.from

true

Address of the shipper

from.fname

false

First name of the shipper

from.lname

false

Last name of the shipper

from.address_line1

true

The line 1 of the shipper address

from.address_line2

false

The line 2 of the shipper address

from.city

false

The city of the shipper

from.state

false

The state of the shipper

from.zipcode

true

The zip code of the shipper

from.country

true

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

from.residential

false

Flag to denote if the shipper address is a residential

from.po_box

false

Flag to denote if the shipper address is a po box

to

true

Address of the buyer

to.fname

false

First name of the buyer

to.lname

false

Last name of the buyer

to.address_line1

true

The line 1 of the buyer address

to.address_line2

false

The line 2 of the buyer address

to.city

false

The city of the buyer

to.state

false

The state of the buyer

to.zipcode

true

The zip code of the buyer

to.country

true

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

to.residential

false

Flag to denote if the buyer address is a residential

to.po_box

false

Flag to denote if the buyer address is a po box

warehouse_id

false

The warehouse id if the details are configured it in Fenix

shipment_info

true

Details of the shipment

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.,

 

shipment_info.dimensions

false

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

The dimension details of the shipment

shipment_info.dimensions.length

true

The length of the shipping package

shipment_info.dimensions.width

true

The width of the shipping package

shipment_info.dimensions.height

true

The height of the shipping package

shipment_info.dimensions.units

false

The units of the above dimensions.

Valid Values: IN, CM

Default: IN

shipment_info.weight

false

The weight details of the shipment

shipment_info.weight.value

true

The weight of the shipping package

shipment_info.weight.units

false

The units of the above weight.

Valid Values: LB, KG, OZ

Default: LB

shipment_info.product_infos

false

The SKUs and their quantities shipping as part of the shipment

shipment_info.product_infos.sku

false

The SKU Id

shipment_info.product_infos.quantity

false

The number of units of the above SKU

shipment_info.product_infos.variant_id

false

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

shipment_info.product_infos.product_id

false

The product id of the above SKU

shipment_info.product_infos.weight

false

The weight details of the above SKU

shipment_info.product_infos.weight.value

true

The weight of the above SKU

shipment_info.product_infos.weight.units

false

The units of the above weight.

Valid Values: LB, KG, OZ

Default: LB

shipment_info.product_infos.dimensions

false

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

The dimension details of the SKU

shipment_info.product_infos.dimensions.length

true

The length of the SKU

shipment_info.product_infos.dimensions.width

true

The width of the SKU

shipment_info.product_infos.dimensions.height

true

The height of the SKU

shipment_info.product_infos.dimensions.units

false

The units of the above dimensions.

Valid Values: IN, CM

Default: IN

expected_delivery_date

false

Expected delivery date of the shipment

ISO Date Time Format: yyyy-MM-dd'T'HH:mmXXX

Example: 2000-10-31T01:30:00.000-05:00

expected_shipping_date

false

Expected shipping date of the shipment

ISO Date Time Format: yyyy-MM-dd'T'HH:mmXXX

Example: 2000-10-31T01:30:00.000-05:00

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

deliver_within_days

false

Expected days to deliver the shipment

shipping_method

false

The customer selected shipping method at the checkout

 

Response Attribute Definitions

Attribute

Required

Description

Attribute

Required

Description

response.request_id

true

A unique identifier of the request

shipment_id

true

Shipment id of the shipment

order_id

true

Order id related to the shipment

to

true

Same as the request’s buyer address

expected_delivery_date

false

Expected delivery date of the shipment

ISO Date Time Format: yyyy-MM-dd'T'HH:mmXXX

Example: 2000-10-31T01:30:00.000-05:00

expected_shipping_date

false

Expected shipping date of the shipment

ISO Date Time Format: yyyy-MM-dd'T'HH:mmXXX

Example: 2000-10-31T01:30:00.000-05:00

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

deliver_within_days

false

Expected days to deliver the shipment

shipment_infos

true

Complete details of individual shipments. The details may contain one or more attributes

  • Fulfillment location

  • Shipment Information

    • Carton details

    • Rate Shopping service details

shipment_infos.fulfillment_info

true

Fulfillment location details

shipment_infos.fulfillment_info.loc_id

false

The warehouse location id

shipment_infos.fulfillment_info.address

true

The address information about the fulfillment location

shipment_infos.shipment_info

true

The shipping information of this shipment for this location

shipment_infos.shipment_info.allocation_info

false

The allocation details of this shipment. The details contains the following information

  • SKU Id

  • Product Id

  • Variant Id

  • Line Item Id

  • Request Quantity

  • Allocated Quantity

shipment_infos.shipment_info.cartonization_info

true

The carton/packaging details of this shipment

shipment_infos.shipment_info.cartonization_info.dimensions

true

The dimensions of this shipment. They contains the following information

  • length

  • width

  • height

shipment_infos.shipment_info.cartonization_info.weight

true

The weight of this shipment.

shipment_infos.shipment_info.cartonization_info.billed_weight

true

The billed weight for the recommended service of this shipment.

shipment_infos.shipment_info.rate_shopping_info

true

The rate shopping information of this shipment

shipment_infos.shipment_info.rate_shopping_info.recommended_service

true

Fenix suggested service for the request

shipment_infos.shipment_info.rate_shopping_info.recommended_service.carrier

true

The carrier of the shipping service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.service

true

The service details of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.service.code

true

The service code of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.service.name

false

The service name of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_price

true

The estimated shipping cost of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_price.amount

true

The shipping cost amount of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_price.currency

true

The currency of the shipping cost

shipment_infos.shipment_info.rate_shopping_info.recommended_service.base_price

true

The base shipping price of the shipment

shipment_infos.shipment_info.rate_shopping_info.recommended_service.base_price.amount

true

The base shipping amount of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.base_price.currency

true

The currency of the base shipping price

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_discount

false

The discount price of the shipment

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_discount.amount

false

The discount amount of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_discount.currency

false

The currency of the discount price

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_taxes

false

Total taxes of the shipment

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_taxes.amount

false

The total taxes of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_taxes.currency

false

The currency of the total taxes

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_surcharges

false

Total Surcharges of the shipment

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_surcharges.amount

false

The total surcharges of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_surcharges.currency

false

The currency of the total surcharges

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_duties_and_taxes

false

Total Duties and Taxes of the shipment.

Applicable for international shipments

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_duties_and_taxes.amount

false

The total duties and taxes of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.total_duties_and_taxes.currency

false

The currency of the total duties and taxes

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary

false

Surcharge summary breakdown

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.fuel_surcharge

false

Fuel Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.fuel_surcharge.name

false

Surcharge Name

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.fuel_surcharge.code

false

Surcharge Code

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.fuel_surcharge.description

false

Surcharge description

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.fuel_surcharge.amount

false

Surcharge amount

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.fuel_surcharge.amount.amount

false

Surcharge amount value

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.fuel_surcharge.amount.currency

false

Surcharge amount currency

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.das_surcharge

false

Delivery Area Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.additional_handling_surcharge

false

Additional Handling Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.residential_surcharge

false

Residential Area Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.dry_ice_surcharge

false

Dry Ice Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.oversize_surcharge

false

Oversize Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.saturday_delivery_surcharge

false

Saturday Delivery Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.address_correction_surcharge

false

Address Correction Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.dangerous_goods_surcharge

false

Dangerous Goods Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.holiday_delivery_surcharge

false

Fuel Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.overweight_surcharge

false

Overweight Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.residential_pickup_surcharge

false

Residential Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.saturday_pickup_surcharge

false

Saturday Pickup Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.recommended_service.surcharge_summary.demand_surcharge

false

Demand Surcharge summary

shipment_infos.shipment_info.rate_shopping_info.services_excluded

true

This field is similar to a list of recommended service object. This field contains all the other services that Fenix checked while rate shopping.

shipment_infos.shipment_info.rate_shopping_info.recommended_service.transit_info

true

The transit time information of the service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.transit_info.delivery_date

true

The Fenix estimated delivery date of the above service

ISO Date Time Format: yyyy-MM-dd'T'HH:mmXXX

Example: 2000-10-31T01:30:00.000-05:00

shipment_infos.shipment_info.rate_shopping_info.recommended_service.transit_info.transit_time

true

The Fenix estimated transit time of the above service

shipment_infos.shipment_info.rate_shopping_info.recommended_service.ship_by_date

true

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

ISO Date Time Format: yyyy-MM-dd'T'HH:mmXXX

Example: 2000-10-31T01:30:00.000-05:00

shipment_infos.shipment_info.rate_shopping_info.recommended_service.delivery_accuracy_percent

false

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

shipment_infos.shipment_info.rate_shopping_info.recommended_service.metainfo

false

Additional information about the service

response.suggested_service_responses.metainfo.included

true