Skip to main content
POST
/
v1
/
products
Create product
curl --request POST \
  --url https://api.light.inc/v1/products \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '{
  "name": "<string>",
  "pricingType": "FIXED",
  "billingRecurrence": "ONE_TIME",
  "pricings": [
    {
      "currency": "USD",
      "amount": 123
    }
  ],
  "defaultAvataxCode": "<string>",
  "defaultTaxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "defaultLedgerAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "valueIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "inlineValues": [
        "<string>"
      ]
    }
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "pricingType": "FIXED",
  "billingRecurrence": "ONE_TIME",
  "pricings": [
    {
      "currency": "USD",
      "amount": 123
    }
  ],
  "state": "ACTIVE",
  "defaultTaxId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "defaultAvataxCode": "<string>",
  "defaultLedgerAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "externalSource": {
    "name": "CHARGEBEE",
    "externalId": "<string>"
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "groupInternalName": "<string>",
      "values": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "<string>",
          "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "internalName": "<string>",
          "label": "<string>",
          "context": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

Body

application/json;charset=UTF-8
name
string
pricingType
enum<string>
  • FIXED - The product has a single price per unit
  • PACKAGE - The product is sold in packages with a fixed quantity
Available options:
FIXED,
PACKAGE
billingRecurrence
enum<string>
  • ONE_TIME - The product is billed once
  • MONTHLY - The product is billed every month
  • QUARTERLY - The product is billed every three months
  • HALF_YEARLY - The product is billed every six months
  • YEARLY - The product is billed every year
Available options:
ONE_TIME,
MONTHLY,
QUARTERLY,
HALF_YEARLY,
YEARLY
pricings
object[]
defaultAvataxCode
string | null
defaultTaxId
string<uuid> | null
defaultLedgerAccountId
string<uuid> | null
customProperties
object[] | null

Response

default - application/json;charset=UTF-8

default response

id
string<uuid>

Unique identifier for the object

companyId
string<uuid>

ID of the company

name
string

Name of the product

pricingType
enum<string>

Pricing type of the product

  • FIXED - The product has a single price per unit
  • PACKAGE - The product is sold in packages with a fixed quantity
Available options:
FIXED,
PACKAGE
billingRecurrence
enum<string>

Billing frequency for the product. Used in contracts

  • ONE_TIME - The product is billed once
  • MONTHLY - The product is billed every month
  • QUARTERLY - The product is billed every three months
  • HALF_YEARLY - The product is billed every six months
  • YEARLY - The product is billed every year
Available options:
ONE_TIME,
MONTHLY,
QUARTERLY,
HALF_YEARLY,
YEARLY
pricings
object[]

List of product price per currency

state
enum<string>

Product state

  • ACTIVE - The product is active and can be used in invoices and contracts
  • ARCHIVED - The product is archived and cannot be used in new invoices or contracts
Available options:
ACTIVE,
ARCHIVED
defaultTaxId
string<uuid> | null

ID of the default tax code for this product. Will be assigned to invoice lines when creating a line with this product

defaultAvataxCode
string | null

Default Avalara tax code. Used when the invoice tax engine is AVATAX. Will be assigned to invoice lines when creating a line with this product

defaultLedgerAccountId
string<uuid> | null

ID of the default ledger account for this product. Will be assigned to invoice lines when creating a line with this product

externalSource
object | null

The external system where this product was synced from

createdAt
string<date-time>

Timestamp when the product was created

updatedAt
string<date-time>

Timestamp when the product was last updated

customProperties
object[] | null

List of custom properties associated with the product