Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

80% of the shoppers make buying decisions based on ship cost and delivery speed during pre-purchase. Fenix Delivery Experience Platform enables retailers to offer a personalized delivery experience to their customers through the entire shopping journey from pre-purchase to post-purchase.

Pre-requisites before making API requests to Fenix Delivery Experience Platform

  1. Carrier Information: The retailer should provide the current Carriers, the services opted for, carrier account information, or rate cards ( any specific). Kindly configure the carrier account information for fulfillment location-specific carrier accounts at a fulfillment location to get the most accurate rates. Global Credentials are always on priority.

  2. Fulfillment locations: Configure all the USA Fulfillment locations, including DC/Store, in the Business Console

    1. Lead Time (Time required to pick/pack/ship) for each fulfillment location after the order gets allocated

    2. Shipment Pick-up times for each carrier or by carrier service.

    3. Cut-off Time for the location

    4. Holidays for the location

  3. Inventory and Product: Various channels to share the inventory and product information with Fenix. Fenix's technical team helps you to choose the most appropriate method via SFTP/S3/Rest API.

  4. Integration varies from platform to platform. In the case of Bigcommerce or Shopify Fenix team will install the private app in the checkout, then retailer-specific PDP and CART Rest API endpoints will be provided by the Fenix team.

Integration Architecture

...

Request & Response formats

  • All the request and response formats are accepted in application/JSON

Delivery Estimates Request

API

/fenixdelest/api/v3/deliveryestimates

Method

POST

Request Headers

 

  • tenantId : mdnf79df0n89na1f2ce434b8861c0fab14fb813

  • Content-Type: application/json

  • x-api-key: mdnf79df0n89na1f2ce434b8861c0fab14fb813

Request body sample

Code Block
{
    "buyerZipCode": "string",
    "sessionTrackId": "string",
    "orderId": "string",
    "cartId": "string",
    "pageType": "string",
    "monetaryValue": 0,
    "responseFormat": "string",
    "additionalProcessing": true,
    "skus": [
        {
            "sku": "string",
            "quantity": 0,
            "category": "string",
            "productName":"string",
            "leadTime": 0,
            "dimensions": {
                "height": 0,
                "length": 0,
                "thickness": 0,
                "units": "CM/IN",
                "width": 0
            },
            "skuInventories": [
                {
                    "locationId": "string",
                    "quantity": 0
                }
            ],
            "weight": {
                "units": "LB",
                "value": 0
            }
        }
    ],
    "shippingInfo": {
        "carrier": "string",
        "trackId": "string",
        "shippingDate": "2021-03-02T08:56:39-06:00",
        "service": {
            "name": "string",
            "method": "string"
        }
    }
    "buyerAddress": {
        "name": "string",
        "state": "string",
        "zipcode": "string",
        "address1": "string",
        "address2": "string",
        "city": "string",
        "country": "string"
    }
}

Response body sample

Code Block
{
    "sessionId": null,
    "responseTimeInMs": 0,
    "eddResponses": [
        {
            "webId": "string",
            "hours": "string",
            "minutes": "string",
            "response": "string",
            "shippingCost": {
                "amount": 0,
                "currency": "USD"
            },
            "buyerZipCode": "string",
            "deliveryZone": "string",
            "shippingDateTime": "string",
            "shippingMethodDesc": "string",
            "internationalOrder": false,
            "formattedDeliveryDate": "string",
            "guaranteedDeliveryDate": "string",
            "errorMessage": null,
            "packages": [
                {
                    "carrier": "string",
                    "wrapperType": "string",
                    "shipperLocId": "string",
                    "deliveryDate": "string",
                    "shippingDate": "string",
                    "shipperZipCode": "string",
                    "shippingMethod": "string",
                    "actualMethodDesc": "string",
                    "externalShippingMethod": null,
                    "contents": null
                }
            ],
            "shipCostBreakUp": {
                "breakups": [
                    {
                        "name": "string",
                        "charges": {
                            "amount": 0,
                            "currency": "USD"
                        }
                    }
                ]
            },
            "orderRoutingInfo": [
                {
                    "sku": "string",
                    "location_id": "string"
                }
            ],
            "shippingDeliveryDate": "string"
        }
    ]
}

Request Body Attribute Definitions 

Attribute

Description

sessionTrackId

mandatory

"sessionTrackId":"123123-2323-1231-23123"

  • Unique session track id generated on per session basis on client side

orderId

 

"orderId": "123123123"

  • Order Id generated by the retailer system

cartId

"cartId": "123123123"

  • A Cart Id generated by the retailer system

buyerZipCode

mandatory

"buyerZipCode" : "95129"

  • The zip of the item's buyer.

pageType

mandatory

"pageType": "cop"

  • Rules are tied to page type value.

E.g., Show fastest EDD on PDP and show all EDD options on COP.

PDP - Product Detail Page

CART - CART page/shopping Bag page

COP - Check out Page

MC - Mini Cart

CA - Cart Abandonment

OC - Order Confirmation

SC - Shipping Confirmation

Send Values as part of a delivery estimate request

moneytoryValue

mandatory

"monetaryValue": 50.0

  • Item price in PDP or the total cart in cart or total checkout value at checkout

responseFormat

"responseFormat" : "json"

  • The attribute provides the desired delivery estimate response format. Allowed formats are “Json” and “binary.” The default response format is JSON.

additionalProcessing

"additionalProcessing": true

  • True if a particular item required additional processing time than normal SKU

skus

mandatory

Code Block
"skus": [
    {
      "sku": "SKU-001",
      "leadTime": 0,
      "nonShip": false,
      "quantity": 1,
      "dimensions": {
        "height": 3,
        "length": 3,
        "width": 0,
        "thickness": 6,
        "units": "CM/IN"
      },
      "skuInventories": [
        {
          "locationId": "Dc-01",
          "quantity": 1
        }
      ],
      "weight": {
        "units": "LB",
        "value": 0
      }
    }
  ]

  • sku (mandatory): The item's SKU (stock keeping unit).

  • leadTime (optional): The time required to prepare the item to ship

  • productName (optional): The name of the product

  • category (optional): The category name of the product

  • quantity (mandatory): The number of items that were chosen to buy.

  • dimensions (optional):  The dimensions and weight of the item along with unit of measurement. Required only when there is no product & inventory sync integration with Fenix Commerce

  • skuInventories (mandatory): Inventory location and quantity details of SKU. This field serves as the routing information for this order

  • locationId (mandatory): The physical location (DC/Store ID) of the item. Required only when there is no product & inventory sync integration with Fenix Commerce

  • quantity (mandatory):The total quantity

  • weight (optional): The total weight of the item

buyerAddress

mandatory

Code Block
"buyerAddress": {
   "name": "Sharath Chandra",
   "address1": "5437",
   "address2": "castle",
   "city": " San Jose ",
   "state": "CA",
   "country": "USA",
   "zipcode": "95129”
}
  • name (optional): Full name of the buyer

  • address1 (optional): The street address of the buyer address.

  • address2 (optional): An optional additional field for the street address of the buyer address.

  • city (optional): The city, town, or village of the buyer address

  • state (optional): The state of the buyer address

  • country (mandatory): The country code of the buyer address. It should be two letter ISO country code

  • zipcode (mandatory): The postal code (zip, postcode, Eircode, …) of the buyer address.

 

shippingInfo

mandatory

Code Block
"shippingInfo": {
        "carrier": "string",
        "trackId": "string",
        "shippingDate": "2021-03-02T08:56:39-06:00",
        "service": {
            "name": "string",
            "method": "string"
        }
    }
  • carrier (mandatory): The carrier that is being used to ship the order with

  • trackId (optional): The tracking number for the order

  • shippingDate (optional): The actual shipping date for the order

  • service/name (optional): The name of the service being used for shipping

  • service/method (mandatory): The shipping method the order is being shipped with

Response Attribute Definitions

Delivery Estimates response vary from the type of rule configured in the business console.

...

The above request is a Fenix commerce master request with all the attributes the request body will change based on the retailer, such as inventory product feed integration.

PDP Integration Procedure

Precheck

  • Restrict the delivery estimates to only USA region and for only USA Customers

  • Don't make a delivery estimate call if the item is out of stock and other exceptional handling cases

...

Code Block
{
    "sessionId": null,
    "responseTimeInMs": 1065,
    "eddResponses": [
        {
            "webId": "black-leather-bag",
            "hours": "1",
            "minutes": "55",
            "response": "Order within <b>1 Hrs 55 Mins</b> to get it by <b>Mon, Jul 18</b>",
            "shippingCost": {
                "amount": 4.99,
                "currency": "USD"
            },
            "buyerZipCode": "10002",
            "deliveryZone": "DEFAULT",
            "shippingDateTime": "15 Jul 2022, 16:30",
            "shippingMethodDesc": "Standard",
            "internationalOrder": false,
            "formattedDeliveryDate": "Mon, Jul 18",
            "guaranteedDeliveryDate": "Mon, 18 Jul 2022",
            "errorMessage": null,
            "packages": [
                {
                    "carrier": "FEDEX",
                    "wrapperType": "DEFAULT",
                    "shipperLocId": "64364413079",
                    "deliveryDate": "Mon, Jul 18",
                    "shippingDate": "15 Jul 2022, 16:30",
                    "shipperZipCode": "10011",
                    "shippingMethod": "FEDEX_GROUND",
                    "actualMethodDesc": "FEDEX_GROUND",
                    "externalShippingMethod": null,
                    "contents": {
                        "black-leather-bag": 1
                    }
                }
            ],
            "shipCostBreakUp": {
                "breakups": [
                    {
                        "name": "BASE_CHARGES",
                        "charges": {
                            "amount": 11.16,
                            "currency": "USD"
                        }
                    }
                ]
            },
            "orderRoutingInfo": [
                {
                    "sku": "black-leather-bag",
                    "location_id": "64364413079"
                }
            ],
            "prePurchaseShippingInfos": null,
            "shippingDeliveryDate": "Mon, 18 Jul 2022",
            "code": null
        }
    ],
    "smartShippingResponses": null,
    "pickFromStoreResponse": {
        "locationsWithIn": "50.0 miles",
        "storeInfos": [
            {
                "locId": "64364413079",
                "address": {
                    "id": null,
                    "address1": "156 10th Avenue",
                    "address2": "",
                    "city": "New York",
                    "country": "US",
                    "state": "NY",
                    "zipcode": "10011",
                    "phone": null,
                    "timeZone": null,
                    "shortZone": "CT"
                },
                "distance": "0.00 miles",
                "pickUpCost": 0.0,
                "mapsRoute": null,
                "leadTimeForPickUp": 4,
                "lineItems": {
                    "black-leather-bag": 1
                },
                "workingHours": {
                    "Sunday": "09:00 - 18:00",
                    "Monday": "09:00 - 18:00",
                    "Tuesday": "09:00 - 18:00",
                    "Wednesday": "09:00 - 18:00",
                    "Thursday": "09:00 - 18:00",
                    "Friday": "09:00 - 18:00",
                    "Saturday": "09:00 - 18:00"
                },
                "pickUpTitle": "Pick  at New York in 4 hrs",
                "pickUpDescription": "156 10th Avenue,New York,NY,10011"
            }
        ]
    }
}

Exception Use Cases :

Use Case

HTTP Status Code

Response Payload

Invalid Inventory

400

{
"error_code": "600",
"identifier": "INVALID_INVENTORY",
"error_message": "Inventory is not found for these items: 11001-BU-345",
"description": "Invalid Inventory"
}

Invalid TenantId

400

{
"error_code": "400",
"identifier": "INVALID_PARAMETERS",
"error_message": "Organization or Organization Config is null for tenantId: 986ca45fb2254e9f9cf1faf4c8c103501\n",
"description": "Delivery Estimates requested parameters should not be null"
}

Invalid Zipcode

400

{
"error_code": "400",
"identifier": "INVALID_PARAMETERS",
"error_message": "Invalid Buyer Zipcode: 101\n",
"description": "Delivery Estimates requested parameters should not be null"
}

Invalid Page Type

400

{
"error_code": "400",
"identifier": "INVALID_PARAMETERS",
"error_message": "Please provide a valid page type, it should be any of PDP/CART/COP/MC/CA/OC/SC",
"description": "Delivery Estimates requested parameters should not be null"
}

Invalid Product Info

400

{
"error_code": "400",
"identifier": "INVALID_PARAMETERS",
"error_message": "Product Info should not be null/empty",
"description": "Delivery Estimates requested parameters should not be null"
}