Product

Product model schema

Attributes

Attribute

Type

Example

Description

id

*required

String or Integer

"product-123"

Your platform's ID of the product.

name

*required

String

"Product 123"

Name of the product (aka the title).

url

*required

String

https://a.co/p123

URl to the product in the store's frontend.

thumbnail_url

*required

String

https://cdn.b.co /p123/i.png

URL to the product's thumbnail image that can be displayed.

status

optional

String

"published", "draft"

The status of the product. If draft then the product will be treated as unpublished.

Default: published

price

optional

Float

99.89

Regular price of the product.

tags

optional

Array of String

['Buy One Get One Free', 'drop-shipped', some other tag']

Add some tags that you can filter later with custom skills.

created_at

optional

ISO 8601 format DateTime String

"2019-03-18T21:01:10+00:00"

Date the product was created in the store/platform system

Default: Current date/time when product first seen by Fera

modified_at

optional

ISO 8601 format DateTime String

"2019-03-18T21:01:10+00:00"

Date the product was last modified in the store/platform system

Default: Value ofcreated_at

stock

optional

Integer

5

The amount of inventory available for the current product.

Default: unlimited

in_stock

optional

Boolean

true, false

Whether or not the product is current in or out of stock.

Default: true

needs_shipping

optional

Boolean

true, false

Whether or not this product needs to be shipped (is it digital?)

Default: false

hidden

optional

Boolean

true, false

Is this product hidden from your store/platform's catalog, collection, category and/or search views?

Default: false

variants

optional

Array of Variant‚Äč

[Variant, Variant]

What variant options exist for this product?

Default: [] empty array (no variants)

platform_data

optional

Hash/Object

{ foo: "bar" }

This field allows you to store some extra attributes about the product that can later be referenced that are not part of the list above.

Sample Payload

{
"id": "product-123", // String
"name": "Product 123", // String
"status": "published", // (Optional) String
"price": 99.89, // (Optional) Float
"created_at": "2019-03-18T21:01:10+00:00", // (Optional) String (ISO 8601 format DateTime)
"modified_at": "2019-03-18T21:01:10+00:00", // (Optional) String (ISO 8601 format DateTime)
"stock": 123, // (Optional) Integer, If null assumed to be infinite.
"in_stock": true, // (Optional) Boolean
"url": "https://www.example.com/products/product-123", // String
"thumbnail_url": "https://cdn.example.com/products/product-123/image.png", // String
"needs_shipping": true, // (Optional) Boolean
"hidden": false, // (Optional) Boolean
"variants": [Variant], // (Optional) Array<Variant>: Variants that are applicable to this product.
"platform_data": { "any": "data" } // (Optional) Hash/Object of attributes to store about the product specific to the integration platform (can be used in future filters)
}

How Variants Are Handled

Fera will fall back on product attributes in the variants array if data cannot be found in on of the attributes listed above. For example, if an request specifies the specific variant_id when requesting things like in_stock then Fera will first look in the variant for the data. If the variant did not specify the data then it falls back to the product data.

It also works the other way too. If a request for in_stock is made on the product with no specific variant_id then Fera will first look in the product attributes. If product attributes do not specify an in_stock status then it will look to see if any variants are in_stock. If so, it will return true, otherwise, false.