Update product
PATCH
https://api.light.inc/v1/products/{productId}
Updates an existing product
Authorization
Send one of these on every request. See Authentication for how to get credentials.
- API key
Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.
- Bearer token
Path parameters
-
productIdstring · uuidrequired
Headers
-
X-Idempotency-Keystring
Request body
application/json;charset=UTF-8
-
namestring -
pricingTypestringFIXED- The product has a single price per unitPACKAGE- The product is sold in packages with a fixed quantity
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
FIXEDPACKAGE -
billingRecurrencestringONE_TIME- The product is billed onceMONTHLY- The product is billed every monthQUARTERLY- The product is billed every three monthsHALF_YEARLY- The product is billed every six monthsYEARLY- The product is billed every year
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
ONE_TIMEMONTHLYQUARTERLYHALF_YEARLYYEARLY -
pricingsarray of object-
currencystring -
amountinteger · int64Price in cents
-
-
customPropertiesarray of object-
groupIdstring · uuidID of the custom property group.
-
valueIdsarray of string · uuidIDs of the selected custom property values. It behaves as a PUT operation, so if empty the existing ones will be effectively deleted.
-
inlineValuesarray of stringInline custom property values (used for TEXT/NUMERIC/DATE/etc. groups). It behaves as a PUT operation, so if empty or null the existing ones will be effectively deleted.
-
-
defaultAvataxCodestring -
defaultTaxIdstring · uuid -
defaultLedgerAccountIdstring · uuid
Response
-
idstring · uuidUnique identifier for the object
-
companyIdstring · uuidID of the company
-
namestringName of the product
-
pricingTypestringPricing type of the product
FIXED- The product has a single price per unitPACKAGE- The product is sold in packages with a fixed quantity
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
FIXEDPACKAGE -
billingRecurrencestringBilling frequency for the product. Used in contracts
ONE_TIME- The product is billed onceMONTHLY- The product is billed every monthQUARTERLY- The product is billed every three monthsHALF_YEARLY- The product is billed every six monthsYEARLY- The product is billed every year
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
ONE_TIMEMONTHLYQUARTERLYHALF_YEARLYYEARLY -
pricingsarray of objectList of product price per currency
-
currencystring -
amountinteger · int64Price in cents
-
-
statestringProduct state
ACTIVE- The product is active and can be used in invoices and contractsARCHIVED- The product is archived and cannot be used in new invoices or contracts
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
ACTIVEARCHIVED -
defaultTaxIdstring · uuidID of the default tax code for this product. Will be assigned to invoice lines when creating a line with this product
-
defaultAvataxCodestringDefault Avalara tax code. Used when the invoice tax engine is
AVATAX. Will be assigned to invoice lines when creating a line with this product -
defaultLedgerAccountIdstring · uuidID of the default ledger account for this product. Will be assigned to invoice lines when creating a line with this product
-
externalSourceobjectThe external system where this product was synced from
-
namestringThe name of the external source
CHARGEBEE- Data synced from ChargebeeHUBSPOT- Data synced from HubSpotSALESFORCE- Data synced from SalesforceSTRIPE- Data synced from Stripe
⚠️ This enum is not exhaustive; new values may be added in the future.
One of
CHARGEBEEHUBSPOTSALESFORCESTRIPE -
externalIdstringThe ID of the object in the external source system
-
-
createdAtstring · date-timeTimestamp when the product was created
-
updatedAtstring · date-timeTimestamp when the product was last updated
-
customPropertiesarray of objectList of custom properties associated with the product
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
valuesarray of objectList of values. Note that this will be a single value unless the group input type supports multiple values
-
idstring · uuidUnique identifier for the object
-
groupIdstring · uuidID of the custom property group
-
groupInternalNamestringInternal name of the custom property group
-
companyIdstring · uuidID of the company
-
internalNamestringInternal name of the custom property value
-
labelstringLabel of the custom property value
-
contextstringContext/description of the custom property value
-
createdAtstring · date-timeTimestamp when the custom property value was created
-
updatedAtstring · date-timeTimestamp when the custom property value was last updated
-
-