Fenix Label Printing API

 

Fenix Label Printing module will provide the ability to print carrier service labels based on the packaging and the service details provided to it.

Following are the key components necessary to print the label for any carrier.

  1. Packaging details

    1. Dimensions information or package name (incase of carrier provided box)

    2. Weight information

  2. Service details

  3. Customs information (needed only in case on international shipping)

Inputs for label printing

There are two ways the label printing can be triggered.

  1. Identification of the previous rate id in the rate shopping response

As part of the rate shopping response, Fenix provides rate responses of each service for a shipment. Each rate response is associated with a rate id. 

Retailers can call the API with this rate id and Fenix will be able to retrieve the request and service for the label being requested for and print the label.

 

  1. Manually sending the shipment and service details

To print any ad hoc labels, retailers can call the API with the package details and with the carrier service with which they want to print the label.

Carrier support

Fenix supports the majority of the US carriers and uses easypost for printing labels for any carrier it doesn’t support natively. Carriers that will be supported as part of this phase of Rate Shopping are

  1. FedEx

  2. UPS

  3. USPS

  4. DHL

  5. Canada Post

  6. Stamps/Endicia

  7. EasyPost

Sample API Request and Response

Attribute

Description

Attribute

Description

Endpoint

https://postpurchase.fenixcommerce.com/fenix/oms/shipping/label-print/by-package-details

Method

POST

Headers

tenant_id

auth_token

Request Sample

{ label_print_reference_id: "121", shipper_address: { address_line1: "7319 Foxfield Dr", address_line2: "", city: "Reynoldsburg", state: "OH", zip_code: "43068", country: "US" }, buyer_address: { address_line1: "210 Rose Ct", address_line2: "", city: "Campbell", state: "CA", zip_code: "95008", country: "US", residential: true }, shipment_details: [ { dimensions: { length: 5, width: 12, height: 9, units: "IN" }, weight: { value: 1.2, units: "LB" } } ], customs_info: { contents: [ { type: "clothes/electronics/etc", description: "description about the contents" } ], non-deliver: "return to sender", items: [ { sku: "abc", quantity: 0 } ], total_value: { amount: 0, currency: "USD" } }, carrier_service_info: { carrier: "FEDEX", service: { name: "FedEx Ground", code: "FEDEX_GROUND" } } }

Response

{ label_print_reference_id: "212", error_details: { code: null, description: null }, label_details: { carrier: "FEDEX", service: { name: "FedEx Ground", code: "FEDEX_GROUND" }, label_url: "http://s3.aws.com/png", label_format: "png/jpg/pdf", label_size: { height: 6, width: 4, units: "IN" }, label_cost: { base_cost: { amount: 0, currency: "USD" }, taxes: [ { name: "", value: { amount: 0, currency: "USD" } } ], surcharges: [ { name: "", value: { amount: 0, currency: "USD" } } ] } } }

Request Attribute Definitions

Attribute

Required

Description

Attribute

Required

Description

label_print_reference_id

true

A unique identifier of the request

shipper_address

true

The address of the shipping location

shipper_address.address_line1

true

The line 1 of the shipper address

shipper_address.address_line2

true

The line 2 of the shipper address

shipper_address.city

true

The city of the shipper

shipper_address.state

true

The state of the shipper

shipper_address.zipcode

true

The zip code of the shipper

shipper_address.country

true

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

buyer_address

true

Address of the buyer

buyer_address.address_line1

true

The line 1 of the buyer address

buyer_address.address_line2

true

The line 2 of the buyer address

buyer_address.city

false

The city of the buyer

buyer_address.state

false

The state of the buyer

buyer_address.zipcode

true

The zip code of the buyer

buyer_address.country

true

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

shipment_details

true

Details of the shipment

shipment_details.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_details.dimensions

false

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

The dimension details of the shipment

shipment_details.dimensions.length

true

The length of the shipping package

shipment_details.dimensions.width

true

The width of the shipping package

shipment_details.dimensions.height

true

The height of the shipping package

shipment_details.dimensions.units

false

The units of the above dimensions.

Valid Values: IN, CM

Default: IN

shipment_details.weight

false

The weight details of the shipment

shipment_details.weight.value

true

The weight of the shipping package

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

customs_info

false

Provide details about the customs. Only necessary when shipping internationally

customs_info.contents

true

Details about contents of the package

customs_info.contents.type

true

The type of the contents

Ex: clothes, electronics, etc.,

customs_info.contents.description

false

The description about the contents of the package

customs_info.non_deliver

true

Action to take when the package is undelivered.

Ex: return_to_sender, treat_as_abandoned

customs_info.items

true

Item details in the package

customs_info.items.sku

true

The SKU id of the item

customs_info.items.quantity

true

The number of units of the above SKU

customs_info.total_value

true

The monetary value of items in the package

customs_info.total_value

true

The monetary value of items in the package

customs_info.total_value.amount

true

The monetary value of items in the package

customs_info.total_value.currency

true

The currency of the above amount

carrier_service_info

true

The carrier and service details of the intended label

carrier_service_info.carrier

true

The carrier of the requested label

carrier_service_info.service

true

The service details of the requested label

carrier_service_info.service.name

true

The service name of the requested label

carrier_service_info.service.code

true

The service code of the requested label

Response Attribute Definitions

Attribute

Required

Description

Attribute

Required

Description

label_print_reference_id

true

A unique identifier of the request

error_details

true

Error information if any issue happened during the label printing process

error_details.code

true

Error code if any issue happened during the label printing process

error_details.description

true

Error description if any issue happened during the label printing process

label_created_dttm

true

The date and time of the above created label

Date Format: MM-dd-yyyy HH:mm

label_details

true

The label details of the label print request

label_details.carrier

true

The carrier of the requested label

label_details.service

true

The service details of the requested label

label_details.service.name

true

The service name of the requested label

label_details.service.code

true

The service code of the requested label

label_details.label_url

true

The Fenix hosted url of the printed label

label_details.label_format

true

The label format of the requested label

Ex: pdf, jpeg, png

label_details.label_size

true

The label size of the printed label

label_details.label_size.height

true

The label’s height of the printed label

label_details.label_size.width

true

The label’s width of the printed label

label_details.label_size.units

true

The units in which the above two values are specified

Ex: cm, in

label_details.label_cost

true

The label cost information

label_details.label_cost.base_cost

true

The base amount of the label. Additional charges will be returned separately

label_details.label_cost.base_cost.amount

true

The base amount value of the label

label_details.label_cost.base_cost.currency

true

The base amount currency of the label

label_details.label_cost.taxes

true

The tax levied on top of the base cost for the label

label_details.label_cost.taxes.name

true

The tax name

Ex: Fuel Tax, Sales Tax, etc.,

label_details.label_cost.taxes.value

true

The value of the above tax

label_details.label_cost.surcharges

true

The surcharges levied on top of the base cost for the label

label_details.label_cost.taxes.name

true

The surcharges name

Ex: DAS Surcharge

label_details.label_cost.taxes.value

true

The value of the above surcharges