Order feed setup - Custom platform

Setup order feed for Fit Advisor to integrate with your custom e-comm platform using SFTP

Before you begin

If you are using a 3rd party e-comm platform (Shopify, BigCommerce, etc) then please refers to those docs for setting up your order feed.

Requirements

  • Order feed in either JSON (ndjson) or CSV file format
  • Ability to push files (daily) over SFTP

SFTP Transfer

  • Transfer is expected to be pushed daily with full set of orders (does not need to be a diff of changes).
  • We will need a public key and IPs to whitelist

Order feed file formats

Both JSON and CSV file formats are accepted formats to push order feed to Fit Advisor platform. Typically this will depend on how orders are stored in your platform or what available formats are already being exported. The benefit to JSON is that order data can remain structured and does not need to be flattened (denormalized) into variants resulting in a larger amount of data to sync.

Using JSON (preferred)

  • Important to note that the expected file format is ndjson where each file line is a json object.

Order format:

orderId

string

"orderId":"1234541223232"


ID of the order for API/backend purposes. This is different from the orderNumber which is visible to the shopper.

orderNumber

string

"orderNumber":"14212"


The simplified order number (typically sequential).

orderCreatedAt

string

"orderCreatedAt":"2012-02-15T15:12:21-05:00"


Order created timestamp in ISO 8601 format

orderPrice

number

"orderPrice":85.30


Subtotal of order without currency

currency

string

"currency":"USD"


3-digit currency code (ISO 4217)

totalDiscounts

number

"totalDiscounts":15.25


Total discounts applied to order

customerId

String

(optional)

"customerId":"198124982329"


Unique identifier for the customer

customerOrderCount

Number

(optional)

"customerOrderCount":3


Total number of orders for the current customer historically. Include current order in count.

lineItems

array

"lineItems":[...]


Details of individual items in order

 

Order line item format

lineItemId

string

"lineItemId":"13291238292"


Unique identifier for line item.

productId

"productId":"2434234343"


Matching productId from product feed

totalDiscount

number

"totalDiscount":10.50


Discount applied to price of current line item

sku

string

"sku":"SHR-L-30-BLK"


SKU of current line item

variantId

string

"variantId":"192932982"


Unique identifier for the variant of the product that is being ordered

quantity

number

"quantity":2


Count of current item included in order

price

number

"price":35.99


Sub total price of current line item

 

Using CSV

  • Flat files (denormalized) in csv format using data format below.
  • Each row represents a variant. I.e. an order with 10 line items would be represented as 10 rows with orderId repeated in each row.

Order format (order line item per row):

orderId

string

"orderId":"1234541223232"


ID of the order for API/backend purposes. This is different from the orderNumber which is visible to the shopper.

orderNumber

string

"orderNumber":"14212"


The simplified order number (typically sequential).

orderCreatedAt

string

"orderCreatedAt":"2012-02-15T15:12:21-05:00"


Order created timestamp in ISO 8601 format

orderPrice

number

"orderPrice":85.30


Subtotal of order without currency

currency

string

"currency":"USD"


3-digit currency code (ISO 4217)

totalDiscounts

number

"totalDiscounts":15.25


Total discounts applied to order

customerId

String

(optional)

"customerId":"198124982329"


Unique identifier for the customer

customerOrderCount

Number

(optional)

"customerOrderCount":3


Total number of orders for the current customer historically. Include current order in count.

lineItemId

string

"lineItemId":"13291238292"


Unique identifier for line item.

lineItemProductId

string

"lineItemProductId":"2434234343"


Matching productId from product feed

lineItemTotalDiscount

number

"lineItemTotalDiscount":10.50


Discount applied to price of current line item

lineItemSku

string

"lineItemSku":"SHR-L-30-BLK"


SKU of current line item

lineItemVariantId

string

"lineItemVariantId":"192932982"


Unique identifier for the variant of the product that is being ordered

lineItemQuantity

number

"lineItemQuantity":2


Count of current item included in order

lineItemPrice

number

"lineItemPrice":35.99


Sub total price of current line item