Overview

The Products data type provides the company's product inventory, and includes the price and quantity of all products, and product variants, available for sale.

From the Products endpoints you can retrieve:

  • A list of all the products available for sale by the company:
    GET /companies/{companyId}/connections/{connectionId}/data/commerce-products.
  • The details of an individual product:
    GET /companies/{companyId}/connections/{connectionId}/data/commerce-products/{productId}.

Data model

Field

Type

Description

id

string

Identifier of the product, unique to the company.

categorization

string

Retail category that the product is assigned to.

name

string

Name of the product recorded in the commerce or point of sale platform.

description

string

Description of the product recorded in the commerce or point of sale platform.

isGiftCard

boolean

Whether or not the product is a gift card or voucher that can be redeemed.

variants

*array of product variants

For example, different colours, sizes, and specifications of a product.

createdDate

string
See date

Date on which the product was created in the commerce or point of sale platform.

modifiedDate

string
See date

Date the product was last updated in the Codat system.

sourceModifiedDate

string
See date

Date the product was last changed in the commerce or point of sale platform.

status

string

Current status of the product in the commerce system, including:

  • Unknown

  • Published

  • Unpublished

Product variants

Variations of a product available for sale. For example, the product in a different size or colour.

Field

Type

Description

id

string

Identifier of the product variant, unique to the company.

name

string

Name of the product recorded in the commerce or point of sale platform.

quantity

decimal

Number of units of the product variant available for sale.

isTaxEnabled

boolean

Whether sales taxes are enabled for this product variant.

vatPercentage

decimal

VAT rate for the product variant if sales taxes are enabled.

prices

array of product variant prices

Prices for the product variants in different currencies.

inventory

product variant inventory

Information about the total inventory as well as the locations inventory is in.

shippingRequired

boolean

Whether or not the product requires delivery with associated costs. For example, a voucher or gift card may be sent electronically and not require any shipping.

createdDate

string
See date

Date on which the product variant was created in the commerce or point of sale platform.

Product variant price

Price of the product variant in the base currency of the commerce or point of sale platform.

Field

Type

Description

currency

string
See currency

Currency of the product variant price.

unitPrice

decimal

Price of each unit of the product variant.

Product variant inventory

Inventory object providing information on the total inventory quantity as well as detailed quantities across several locations.

Field

Type

Description

totalQuantity

decimal

The total inventory across all locations.

locations

array of product variant inventory locations

Details of the locations of each quantity of the inventory.

Product variant inventory locations

Inventory quantity in a location

Field

Type

Description

quantity

decimal

The quantity of inventory at this location.

locationRef

reference type

The location of the inventory.

Example data

{
   "products":[
      {
         "id":"e2b56d6c-4724-4ab6-84e9-495765c0df82",
         "categorization":"Hardware",
         "name":"Anvil (10,000lb)",
         "description":"An excellent Anvil (10,000lb)",
         "isGiftCard":false,
         "variants":[
            {
               "id":"d459cfcf-a208-41ad-be45-aeaeee1403d3",
               "name":"Small",
               "quantity":1.0,
               "isTaxEnabled":true,
               "vatPercentage":20.0,
               "prices":[
                  {
                     "currency":"GBP",
                     "unitPrice":10.09
                  },
                  {
                     "currency":"EUR",
                     "unitPrice":11.30
                  },
                  {
                     "currency":"USD",
                     "unitPrice":13.42
                  }
               ],
               "shippingRequired":true,
               "createdDate":"0001-01-01T00:00:00"
            },
            {
               "id":"5ae824f4-0100-4fff-aa37-526c19b87c55",
               "name":"Large",
               "quantity":1.0,
               "isTaxEnabled":true,
               "vatPercentage":20.0,
               "prices":[
                  {
                     "currency":"GBP",
                     "unitPrice":18.57
                  },
                  {
                     "currency":"EUR",
                     "unitPrice":20.80
                  },
                  {
                     "currency":"USD",
                     "unitPrice":24.70
                  }
               ],
               "shippingRequired":true,
               "createdDate":"0001-01-01T00:00:00"
            }
         ],
         "createdDate":"0001-01-01T00:00:00",
         "modifiedDate":"2018-10-01T08:42:41.491Z",
         "sourceModifiedDate":"2018-10-01T08:42:41.491Z",
         "status":"Published"
      },
      {
         "id":"7013d344-d012-4da7-90e6-0c3e15bdd91b",
         "categorization":"General",
         "name":"ACME Dynamite",
         "description":"An excellent ACME Dynamite",
         "isGiftCard":false,
         "variants":[
            {
               "id":"edd73224-f4e0-4e3e-835a-49260ae349a8",
               "name":"Small",
               "quantity":1.0,
               "isTaxEnabled":true,
               "vatPercentage":20.0,
               "prices":[
                  {
                     "currency":"GBP",
                     "unitPrice":7.13
                  },
                  {
                     "currency":"EUR",
                     "unitPrice":7.99
                  },
                  {
                     "currency":"USD",
                     "unitPrice":9.49
                  }
               ],
               "shippingRequired":true,
               "createdDate":"0001-01-01T00:00:00"
            },
            {
               "id":"9371bc9c-46ae-4f19-afa9-b4ed608d101a",
               "name":"Large",
               "quantity":1.0,
               "isTaxEnabled":true,
               "vatPercentage":20.0,
               "prices":[
                  {
                     "currency":"GBP",
                     "unitPrice":12.47
                  },
                  {
                     "currency":"EUR",
                     "unitPrice":13.97
                  },
                  {
                     "currency":"USD",
                     "unitPrice":16.59
                  }
               ],
               "shippingRequired":true,
               "createdDate":"0001-01-01T00:00:00"
            }
         ],
         "createdDate":"0001-01-01T00:00:00",
         "modifiedDate":"2018-10-01T08:42:41.491Z",
         "sourceModifiedDate":"2018-10-01T08:42:41.491Z",
         "status":"Published"
      }
   ]
}

Did this page help you?