Products
Products describe the goods and services your business can sell. Create a product first, then use its returned id when requesting an invoice.
Create a product
POST /CatalogItem/create creates a product, service, ticket product, or subscription in the authenticated business catalog.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Customer-facing item name. |
price | number | Yes | Selling price. Must be greater than zero, except a ticket product may have a price of 0. |
quantity | number | No | Starting inventory quantity. Defaults to 0. |
description | string | No | A short description of the item. |
min_stock | number | No | Inventory level at which the item is considered low in stock. |
cost_price | number | No | Internal cost price. Must be zero or greater. |
picture | string | No | File name of an image uploaded beforehand. |
parent_id | ID | No | ID of the parent product when creating a variant. |
collection_ids | array | No | Collection IDs to assign the catalog item to. |
type | string | No | product, service, ticket, or subscription. Defaults to product. See Choose an item type for more details. |
subscription_interval_days | number | Conditional | Billing interval in days when type is subscription. |
The request and response panel shows a complete product example. Store the returned data.id; it becomes the product_id in invoice line items.
Choose an item type
The type controls what the catalog item represents and which Xara features apply to it.
product
Use product for a standard item the business sells, such as clothing, food, equipment, or another catalog good. This is the default when type is omitted.
Set quantity when you want Xara to track how many units are available, and use min_stock to define when the item is running low. Completed sales update the available stock, and invoice responses can include stock_warnings.
service
Use service for work or a service the business charges for, such as a consultation, installation, lesson, or professional fee. A service receives its own catalog ID and can be added to an invoice through its product_id, just like the other item types.
ticket
Use type: "ticket" for a simple admission item that does not need a full event page or multiple tiers. Its price may be 0. When a customer pays, Xara issues a scannable ticket and updates the available stock.
For an event with a venue, date, shareable page, and levels such as Regular and VIP, use the Tickets API. Xara creates a separate ticket product for each event tier, and you use the tier's product_id when creating the invoice.
subscription
Use type: "subscription" and set subscription_interval_days to the number of days between billing cycles. This works for memberships and other payments collected on a schedule.
For example, use 30 for a plan whose billing cycle is every 30 days. The subscription still receives a catalog ID, which you pass as product_id when creating the customer's invoice.
Validation and errors
Xara checks the required fields and number values before creating the item. Invalid product data returns 422. A missing or invalid API token returns an authentication error.
Retrieve products
GET /CatalogItem/getAll retrieves catalog items for the authenticated business.
Pass type=product to retrieve products only:
curl --request GET \
--url 'https://graph.usexara.ai/rest/CatalogItem/getAll?type=product' \
--header 'Authorization: Bearer YOUR_API_TOKEN'
The optional type filter accepts product, service, ticket, or subscription. When omitted, Xara returns all active catalog items except tickets, ordered from newest to oldest.