Skip to main content

Product schema

FieldTypeRequiredDescription
namestringYesProduct name
descriptionstringNoProduct description (whitespace-trimmed; blank becomes null)
skustringNoUnique product identifier for business-facing lookups
typeenumYespoint_in_time or period_of_time
subtypeenumYesquantity, credits, or feature (must be compatible with type)
unitobjectNoUnit labels — { singular: "API call", plural: "API calls" }
tax_categorystringNoZenskar tax code for tax resolution
statusenumNoactive (default), inactive, or archived
slugstringNoOptional reference to an external system
custom_attributesobjectNoArbitrary key-value metadata

Type-subtype compatibility

Product typeAllowed subtypes
point_in_timequantity, credits
period_of_timequantity, feature

Product statuses

StatusDescription
activeAvailable for use in new contracts
inactiveNot available for new contracts; existing contracts unaffected
archivedEnd-of-life; can’t be set on creation

API endpoints

MethodPathDescriptionPermissions
POST/v3/productsCreate a new productcan_read_product, can_create_product
GET/v3/productsList products (paginated, filterable)can_read_product
GET/v3/products/pricingsSearch products with nested pricing presetscan_read_product, can_read_product_pricing
GET/v3/products/{product_id}Get a product by IDcan_read_product
PATCH/v3/products/{product_id}Partially update a productcan_read_product, can_update_product
DELETE/v3/products/{product_id}Soft-delete a product and its pricing presetscan_read_product, can_delete_product

Business validation rules

Enforced by validate_product_catalog on create and update.
#RuleApplies toError codeDescription
1Status not archived on createCreatePRODUCT_CREATED_AS_ARCHIVEDNew products can’t be created with archived status; valid initial statuses are active or inactive
2Type-subtype compatibilityCreatePRODUCT_TYPE_SUBTYPE_INCOMPATIBLESubtype must be allowed for the given type
3Product name unique per orgCreatePRODUCT_NAME_DUPLICATECurrently disabled
4SKU unique per orgCreate & updatePRODUCT_SKU_DUPLICATEOn update, the product may keep its own existing SKU; skipped if SKU isn’t provided
5Slug unique per orgCreate & updatePRODUCT_SLUG_DUPLICATEOn update, the product may keep its own existing slug; skipped if slug isn’t provided
6Type immutable with pricingUpdatePRODUCT_TYPE_CHANGE_WITH_PRICINGCan’t change type once pricing presets exist
7Can’t deactivate with contractsUpdatePRODUCT_DEACTIVATE_WITH_CONTRACTSCan’t set status to inactive if the product is used in any active contract

Delete constraints

Separate from validate_product_catalog.
RuleErrorDescription
Can’t delete with contractsCannot delete product as it is being used in {n} contractsA product can’t be deleted while referenced by any contract

Repercussions: product update

ChangeImpact on contractsImpact on invoices
Name / description / SKU / slug changeMetadata-only; contracts reference the product by ID and reflect the change on next readFuture invoices show the updated name; finalized invoices unaffected
Status to inactiveBlocked if any active contract references the product; finalized contracts continue to functionNo impact on existing invoices; product becomes unavailable for new line items
Status to archivedProduct not available for any new usageNo impact on finalized invoices
Type changedBlocked if pricing presets exist; if none exist, only affects how future pricing can be configuredNo impact — pricing must be recreated after a type change
Subtype changedOnly validated on create; changing on update may cause inconsistency with existing pricingIndirect — may cause pricing computation mismatches
Unit changedContracts see updated unit labels, unless a pricing preset overrides the unitFuture invoices reflect the new label; finalized invoices unaffected
Custom attributes changedInformational onlyNo impact

Repercussions: product deletion

ImpactDescription
ContractsDeletion blocked if any contracts reference the product
Pricing presetsAll pricing presets belonging to the product are soft-deleted with it
InvoicesFinalized invoices retain historical data; soft-deleted product and pricing remain in the database for audit purposes

Not yet available

  • Product groups and bundles.
  • Editing pricing on an already-created product.
  • (Placeholder: any additional reference items not yet documented.)