Versions Compared

Key

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

Below are the headers required to trigger Fenix’s Order and Fulfillment API

...

Resource Name

Rest Endpoint to send the order data information Fenix

Resource URL

/api/v2/orders/{order_id}/created

Method

POST

Headers

  • store_name

  • authToken

  • x-api-key

  • x-identity

  • content-type

Request Payload

Code Block
languagejson
{
    "id": "18879048253891", 
    "number": "#859731", 
    "status": "NA", 
    "fulfillment_status": "PARTIALLY_FILLED", 
    "item_quantity": 2, 
    "total_weight": {
        "value": 18, 
        "units": "oz"
    }, 
    "shipping_info": {
        "code": "FEDEX_2_DAY", 
        "title": "Express (Est Delivery by Wednesday, Dec 4 , 2019)", 
        "price": {
            "value": 14.99, 
            "currency": "USD"
        }, 
        "discount": {
            "value": 0, 
            "currency": "USD"
        }, 
        "source": "Fennix Commerce"
    }, 
    "promised_delivery_date": "2020-01-27T00:00:00-05:00", 
    "updated_at": "2020-01-23T10:14:15-05:00", 
    "created_at": "2020-01-23T10:14:15-05:00", 
    "cancelled_at": null, 
    "cancel_reason": null, 
    "closed_at": null, 
    "currency": "USD", 
    "shipping_address": {
        "first_name": "Srinivas", 
        "last_name": "Aluri", 
        "company": null, 
        "address1": "1345  Serenity Street", 
        "address2": "", 
        "country": "United States", 
        "country_code": "US", 
        "province": "North Carolina", 
        "province_code": "NC", 
        "city": "Huntersville", 
        "zip": "28078", 
        "latitude": "35.4234431", 
        "longitude": "-80.85062322"
    }, 
    "billing_address": {
        "first_name": "Srinivas", 
        "last_name": "Aluri", 
        "company": null, 
        "address1": "1345  Serenity Street", 
        "address2": "", 
        "country": "United States", 
        "country_code": "US", 
        "province": "North Carolina", 
        "province_code": "NC", 
        "city": "Huntersville", 
        "zip": "28078", 
        "latitude": "35.4234431", 
        "longitude": "-80.85062322"
    }, 
    "line_items": [
        {
            "sku": "CAAD Optimo 3", 
            "quantity": 1, 
            "title": "Standard (Est Delivery by Monday, Dec 16)", 
            "product_id": "43515734262211", 
            "product_name": "CAAD Optimo", 
            "variant_id": "43515734262211", 
            "variant_name": "fenixcommerce", 
            "vendor": "fenixcommerce", 
            "taxable": true, 
            "gift_card": false, 
            "weight": {
                "value": 0, 
                "units": "oz"
            }, 
            "dimensions": {
                "length": 8, 
                "width": 6, 
                "height": 5, 
                "girth": 3, 
                "thickness": 0, 
                "units": "IN"
            }, 
            "price": {
                "value": 15, 
                "currency": "USD"
            }, 
            "image_url": "", 
            "properties": [
                {
                    "name": "Property Name", 
                    "value": "Property Value"
                }
            ]
        }
    ], 
    "financial_details": {
        "subtotal_price": {
            "value": 145, 
            "currency": "USD"
        }, 
        "total_tax": {
            "value": null, 
            "currency": "USD"
        }, 
        "total_discounts": {
            "value": null, 
            "currency": "USD"
        }, 
        "total_price": {
            "value": 159.99, 
            "currency": "USD"
        }, 
        "taxes_included": false, 
        "financial_status": "paid", 
        "gateway": "shopify_payments"
    }, 
    "customer": {
        "first_name": "John", 
        "last_name": "Corner", 
        "email": "john1234@gmail.com", 
        "phone": 9999000000, 
        "tags": "", 
        "customer_address": {
            "province_code": "SC", 
            "country_code": "US", 
            "country_name": "United States", 
            "zip": "29572", 
            "address1": "704 40th St S", 
            "address2": "", 
            "city": "North Myrtle Beach", 
            "province": "South Carolina", 
            "country": "United States"
        }
    }, 
    "checkout_token": "3513625886",  
    "properties": [
        {
            "name": "Property Name", 
            "value": "Property Value"
        }
    ]
}

Response Payload

Response code: 200 , Payload:

Code Block
{
  "order_id": "333",
  "order_number": "SLS0000",
  "response_message": "Order Created
Successfully
 Sucessfully"
}

Response Code: 500, Payload:

Code Block
{
  "order_id": "333",
  "order_number": "SLS0000",
  "response_message": "Order Failed to Persists"
}

Response Status

201 - Success

400 – Failure

401 - Un-Authentication

Note: Date and time must be associated with zone (e.g., 2020-01-23T10:14:15-05:00)

...

Resource Name

Rest Endpoint to send the fulfilment data Information Fenix

Resource URL

/api/v2/order/{order_id}/fulfillment/{fulfillment_id}/created

Method

POST

Headers

  • store_name

  • authToken

  • x-api-key

  • x-identity

  • content-type

Request Payload

Code Block
languagejson
{
    "id": "17773197066691", 
    "order_id": "18879048253892", 
    "shipment_status": "INTRANSIT", 
    "createdAt": "2019-12-01T00:51:39-05:00", 
    "updatedAt": "2019-12-01T00:51:39-05:00", 
    "shipment_info": {
        "tracking_number": "1Z2FE6220199363003", 
        "tracking_company": "UPS", 
        "shipping_service": "manual", 
        "shipcost": {
            "value": 15, 
            "currency": "USD"
        }
    }, 
    "line_items": [
        {
            "sku": "CAAD Optimo 3", 
            "quantity": 1, 
            "title": "CAAD Optimo", 
            "product_id": "43515734262211", 
            "product_name": "CAAD Optimo", 
            "variant_id": "43515734262211", 
            "variant_name": "fenixcommerce", 
            "vendor": "fenixcommerce", 
            "taxable": true, 
            "gift_card": false,  
            "weight": {
                "value": 0, 
                "units": "oz"
            }, 
            "dimensions": {
                  "girth": 0, 
                  "height": 0, 
                  "length": 0, 
                  "thickness": 0, 
                  "units": "string", 
                  "width": 0 
                }, 
            "price": {
                "value": 15, 
                "currency": "USD"
            }, 
            "image_url": null, 
            "properties": [
                {
                    "name": "Property Name", 
                    "value": "Property Value"
                }
            ]
        }
    ]
}

Response Payload

Response code: 200 , Payload:

Code Block
{
  "fulfillment_id": "333123",
  "order_number": "SLS0000",
  "response_message": "Fulfillment Created
Successfully
 Sucessfully"
}

Response Code: 500, Payload:

Code Block
{
  "fulfillment_id": "333123",
  "order_number": "SLS0000",
  "response_message": "Fulfillment Failed to Persists"
}

Response Status

201 - Success

400 – Failure

401 - Un-Authentication

 Note: Date and time must be associated with zone (e.g., 2020-01-23T10:14:15-05:00)

...

Attribute Name

Data Type

Description

id (*)

String

A unique identifier in the entire data model which represent the order.

number

String

In SAAS based platforms order number would be unique idenfier as per merchants preferences.

Note: If it is blank, we consider order id as number

status (*)

String

Order Status

  • OPEN

  • CANCELLED (Complete order cancelled)

  • PARTIALLY_CANCELLED (Some of the items are cancelled)

fulfillment_status

String

The order's status in terms of fulfilled line items.

  • NOT_FILLED

  • PARTIALLY_FILLED (Some of items are shipped)

  • FULFILLED (All items are shipped)

Note: If it is blnk, we calculate based on the no of shipments and items

item_quantity (*)

String(integer)

Total no of items in the order

total_weight.value (*)

Integer

Total weight of the order

total_weight.units (*)

String

Units for the order weight (oz,grms)

shipping_info.title (*)

String

Shipping option selected by the shoppers in checkout.

shipping_info.code

String

Shipping service Name

shipping_info.price.value (*)

Integer

Shipcost paid by the customer.

shipping_info.price.currency

String

Currency (default: USD)

shipping_info.discount.value

Integer

Shipcost discount

shipping_info.discount.currency

String

Currency (default: USD)

shipping_info.source (*)

String

Source of shipping info

  • Fenix Commerce

  • Shopify

  • Other Shipping Providers

promised_delivery_date

String (offset datetime)

Promised delivery date on checkout page ("2020-01-27T00:00:00-05:00")


Note: It would be helpful to send delivery delay notifications based on what date shoppers saw in checkout page

created_at

String (offset datetime)

Order created dateTime ("2020-01-22T00:00:00-05:00")

updated_at

String (offset datetime)

Order updated dateTime ("2020-01-23T00:00:00-05:00")

cancelled_at

String (offset datetime)

Order Canclled dateTime ("2020-01-24T00:00:00-05:00")

cancel_reason

String

Cancelled reason

currency

String

Currency (default: USD)

shipping_address (*)

Object

Address to where items should be delivered

shipping_address.first_name

String

The first name of the person associated with the shipping address

shipping_address.last_name

String

The last name of the person associated with the shipping address

shipping_address.address1

String

The street address of the shipping address.

shipping_address.address1

String

optional additional field for the street address

shipping_address.city

String

The city, town, or village of the shipping address

shipping_address.company

String

The company of the person associated with the shipping address. optional

shipping_address.country

String

CountryName

shipping_address.zip

String

zipcode

shipping_address.latitude

String

Optional

shipping_address.longitude

String

Optional

line_items (*)

List

A list of line item objects, each containing information about an item in the order

line_item.sku (*)

String

The item's SKU

line_item.quantity (*)

Integer

Item quantity

line_item.title (*)

String

The title of the product.
Note: If SKU is empty, trcaking page use this title to display product info.

line_item.variant_id

String

The ID of the product variant.

line_item.variant_title

String

The title of the product variant.

line_item.vendor

String

The name of the item's supplier

line_item.name

The name of the product variant

line_item.gift_card

boolean

Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges

line_item.taxable

boolean

Whether the item is taxable or not.

line_item.weight.value

integer

weight of the particular item

line_item.weight.unit

String

oz/grms

line_item.dimensions

line_items.dimensions.length

integer

Length of the item

line_items.dimensions.width

integer

Width of the item

line_items.dimensions.height

integer

Height of the item.

line_items.dimensions.grith

integer

Grith of the item.

line_items.dimensions.thickness

integer

Thickness of the item.

line_items.dimensions.units

String

No. of units

price.value (*)

Integer

Price of the item

price.currency (*)

String

Currency (default: USD)

line_items.image_url (*)

String

Image Url.
Note: Fenix displays item images on the Tracking Page.

line_items.routing_url

String

URL where it route to the website product details page.

Note1: Route to website product details page when anyone clicked on images displayed on tracking page.

Note2: If it is null, there won’t be a route to websites PDP.

properties

ARRAY

An array to pass additional information about line item

properties.name

String

Name of the property

properties.value

String

Value of the property

financial_details.subtotal_price.value

Integer

The price of the order in the shop currency after discounts but before shipping, duties, taxes, and tips

financial_details.subtotal_price.currency

Currency (default: USD)

financial_details.total_tax

integer

The sum of all the taxes applied to the order in the shop currency. Must be positive.

financial_details.total_discounts

integer

The total discounts applied to the price of the order in the shop currency.

financial_details.total_price

integer

The total prices for that item

financial_details.taxes_included

boolean

wether taxes included or not

financial_details.financial_status

String

paid/notpaid

financial_details.gateway

String

payment gateway name.

customer (*)

Object

Customer details who placed an order.

Note: Fenix use this to send delivery status notifications via Email or SMS.

customer.first_name

String

customers firstname

customer.last_name

String

customers lastname

customer.email (*)

String

customers email

customer.phone (*)

String

customers.phone

customer.tags

String

customer tags

customer.customer_address

String

customer.customer_address.province_code

String

Province code of the customer address

customer.customer_address.country_code

String

country code of customer address

customer.customer_address.country_name

String

country name of customer address

customer.customer_address.zip

String

zipcode of customer address

customer.customer_address.address1

String

address1 of customer

customer.customer_address.address2

String

Optional

customer.customer_address.city

String

customer's city

customer.customer_address.province

String

customer's province

customer.customer_address.country

String

cusomers countryname

checkout_token

String

A unique value which refers the checkout page that associated with the order.

properties

ARRAY

An array to pass additional information about an order.

properties.name

String

Name of the property

properties.value

String

Value of the property

Fulfillment API Request Payload Data Model:

id (*)

String

A unique identifier in the entire data model which represent the fulfillment.

order_id (*)

String

Order Id

shipment_status

String

Current Shipment Status

  • READY_TO_SHIP

  • PICKED_BY_CARRIER

  • SHIPMENT_EXCEPTION

  • SHIPMENT_STALLED

  • OUT_FOR_DELIVERED

  • DELIVERY_EXCEPTION

  • RETURN_TO_SENDER

  • RETURNED_TO_SENDER

  • DELIVERED

Note: Fenix will update the status based on trackhistory event from carrier.

shipment_info (*)

Object

Shipment details through which packages has beed shipped.

shipment_info.tracking_number (*)

String

Tracking Number which is used to track the shipment track history

shipment_info.tracking_company (*)

String

Carrier name through which package shipped

shipment_info.shipping_service (*)

Integer

Carrie Service thugh which package shipped

shipment_info.shipcost.currency

String

Currency (default: USD)

shipment_info.shipcost.value (*)

Integer

Shipcost paid by the retailer to the carrier.

created_at

String (offset datetime)

Order created dateTime ("2020-01-22T00:00:00-05:00")

updated_at

String (offset datetime)

Order updated dateTime ("2020-01-23T00:00:00-05:00")

line_items (*)

List

A list of line item objects, each containing information about an item in the order

line_item.sku (*)

String

The item's SKU

line_item.quantity (*)

Integer

Item quantity

line_item.title (*)

String

The title of the product.
Note: If SKU is empty, trcaking page use this title to display product info.

line_item.variant_id

String

The ID of the product variant.

line_item.variant_title

String

The title of the product variant.

line_item.vendor

String

The name of the item's supplier

line_item.name

The name of the product variant

line_item.gift_card

boolean

Whether the item is a gift card. If true, then the item is not taxed or considered for shipping charges

line_item.taxable

boolean

Whether the item is taxable or not.

line_item.weight.value

integer

weight of the particular item

line_item.weight.unit

String

oz/grms

line_item.dimensions

line_items.dimensions.length

integer

Length of the item

line_items.dimensions.width

integer

Width of the item

line_items.dimensions.height

integer

Height of the item.

line_items.dimensions.grith

integer

Grith of the item.

line_items.dimensions.thickness

integer

Thickness of the item.

line_items.dimensions.units

String

No. of units

price.value (*)

Integer

Price of the item

price.currency (*)

String

Currency (default: USD)

line_items.image_url (*)

String

Image Url.
Note: Fenix displays item images on the Tracking Page.

line_items.routing_url

String

URL where it route to the website product details page.

Note1: Route to website product details page when anyone clicked on images displayed on tracking page.

Note2: If it is null, there won’t be a route to websites PDP.

properties

ARRAY

An array to pass additional information about line item

properties.name

String

Name of the property

properties.value

String

Value of the property