> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.solvimon.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.solvimon.com/_mcp/server.

# Create a product item

POST https://test.api.solvimon.com/v{version}/product-items
Content-Type: application/json

Requires the PRODUCT_ITEM.CREATE permission.

Reference: https://docs.solvimon.com/api-docs/configuration-api/product-items/post-product-items

## Authentication

- `X-API-KEY` header (required) — API Key authentication via header
- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://test.api.solvimon.com` (The TEST environment for our API, default)
- `https://api.solvimon.com` (The live environment for our API)

## Request

### Path parameters

- `version` (string, required, default: 1) — version

### Headers

- `x-platform-id` (string, optional) — Platform ID.

### Body (application/json)

This endpoint expects a ProductItemCreateRequest.

- `product_id` (string, required, nullable) — The resource ID of the product, that belongs to the product item.
- `name` (string, required, nullable)
- `reference` (string, required)
- `model_type` (enum, required, nullable)
  - Allowed values: `USAGE_BASED`, `USAGE_BASED_CONVERSION`, `RECURRING`, `ONE_OFF`, `PER_SEAT`, `CREDITS`
- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `product` (ProductCreateRequest, optional, nullable)
- `status` (enum, optional, nullable)
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `description` (string, optional, nullable)
- `type` (enum, optional, nullable) — The type of the product item.
  - Allowed values: `REVENUE`, `DEDUCTION`
- `usage_based` (ProductItemUsageBasedCreateRequest, optional) — Additional settings in case of a USAGE_BASED type.
- `credits` (ProductItemCreditsCreateRequest, optional) — Additional settings in case of a CREDITS type.
- `meter_value_calculation` (MeterValueCalculationCreateRequest, optional, nullable)
- `tax_category` (enum, optional, nullable) — The default tax category applied to the product item.
  - Allowed values: `STANDARD`, `NO_TAX`, `EXEMPT`
- `display_order` (integer, optional, nullable)
- `unit_name` (UnitNameCreateRequest, optional)
- `custom_fields` (list of CustomFieldValueCreateRequest, optional, nullable) — Custom fields associated to this product item
- `customer_id` (string, optional, nullable)
- `agent_context` (AgentContextCreateRequest, optional) — Context for AI agents about this product item. Intended for agents, not for customer-facing output.
- `meter_value_calculation_id` (string, optional, nullable, deprecated) — The linked meter value calculation, in case of a USAGE_BASED charge type.
- `report_meter_value_calculation_ids` (list of string, optional, nullable, deprecated) — Optional reporting meter value calculations, in case of a USAGE_BASED charge type.

## Response

### 201

Created

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `product_id` (string, optional, nullable) — The resource ID of the product, that belongs to the product item.
- `product` (Product, optional, nullable)
- `name` (string, optional, nullable)
- `status` (enum, optional, nullable)
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `reference` (string, optional)
- `description` (string, optional, nullable)
- `type` (enum, optional, nullable) — The type of the product item.
  - Allowed values: `REVENUE`, `DEDUCTION`
- `model_type` (enum, optional, nullable)
  - Allowed values: `USAGE_BASED`, `USAGE_BASED_CONVERSION`, `RECURRING`, `ONE_OFF`, `PER_SEAT`, `CREDITS`
- `usage_based` (ProductItemUsageBased, optional) — Additional settings in case of a USAGE_BASED type.
- `credits` (ProductItemCredits, optional) — Additional settings in case of a CREDITS type.
- `meter_value_calculation` (MeterValueCalculation, optional, nullable)
- `tax_category` (enum, optional, nullable) — The default tax category applied to the product item.
  - Allowed values: `STANDARD`, `NO_TAX`, `EXEMPT`
- `display_order` (integer, optional, nullable)
- `unit_name` (UnitName, optional)
- `custom_fields` (list of CustomFieldValue, optional, nullable) — Custom fields associated to this product item
- `customer_id` (string, optional, nullable)
- `agent_context` (AgentContext, optional) — Context for AI agents about this product item. Intended for agents, not for customer-facing output.
- `meter_value_calculation_id` (string, optional, nullable, deprecated) — The linked meter value calculation, in case of a USAGE_BASED charge type.
- `report_meter_value_calculation_ids` (list of string, optional, nullable, deprecated) — Optional reporting meter value calculations, in case of a USAGE_BASED charge type.

## Errors

### 400 Bad Request Error

Bad Request

- `type` (enum, required)
  - Allowed values: `API_ERROR`, `INVALID_REQUEST`
- `code` (enum, required)
  - Allowed values: `RESOURCE_NOT_FOUND`, `RESOURCES_NOT_FOUND`, `UNABLE_TO_PROCESS_INSTRUCTIONS`, `BAD_REQUEST`, `UNSUPPORTED_MEDIA_TYPE`, `RESOURCE_ALREADY_EXISTS`, `CUSTOM_FIELD_VALUE_ALREADY_EXISTS`, `COULD_NOT_CREATE_RESOURCE`, `COULD_NOT_UPDATE_RESOURCE`, `COULD_NOT_DELETE_RESOURCE`, `MISSING_VERSION`, `UNSUPPORTED_VERSION`, `UNAUTHORISED`, `CUSTOMER_NOT_FOUND`, `PLATFORM_NOT_FOUND`, `PRICING_PLAN_NOT_FOUND`, `PRODUCT_NOT_FOUND`, `PRODUCT_ITEM_NOT_FOUND`, `PRICING_NOT_FOUND`, `PRICING_ITEM_NOT_FOUND`, `USER_NOT_FOUND`, `METER_NOT_FOUND`, `METER_VALUE_NOT_FOUND`, `METER_PROPERTY_NOT_FOUND`, `PRICING_ITEM_SUMMARIES_NOT_FOUND`, `MISSING_ID`, `INVALID_ID`, `MISSING_REFERENCE`, `MISSING_FIELD`, `INVALID_FIELD`, `INVALID_OPERATION`, `INTERNAL_ERROR`, `USER_NOT_ALLOWED`, `IDEMPOTENCY_CHECK_FAILED`, `INVALID_REQUEST`
- `message` (string, required)
- `field` (string, optional, nullable)
- `resource_id` (string, optional, nullable)
- `resource_type` (enum, optional, nullable)
  - Allowed values: `CUSTOMER`, `CUSTOM_FIELD`, `PLATFORM`, `PLATFORM_UPTODATE`, `METER`, `METER_VALUE`, `METER_PROPERTY`, `METER_PROPERTY_VARIABLE`, `METER_VALUE_CALCULATION`, `INGEST_DATA`, `METER_DATA`, `CHARGE_DATA`, `PERSIST_DATA`, `ADJUSTMENT_DATA`, `PRODUCT_CATEGORY`, `PRODUCT`, `PRODUCT_ITEM`, `PRICING`, `PRICING_GROUP`, `PRICING_ITEM`, `PRICING_ITEM_CONFIG`, `PRICING_PLAN_SUBSCRIPTION`, `PRICING_PLAN_SUBSCRIPTION_GROUP`, `PRICING_PLAN_SCHEDULE`, `SEAT_ASSIGNMENT`, `SHIPPING_ADDRESS`, `PRICING_PLAN`, `PRICING_PLAN_VERSION`, `PRICING_PLAN_GROUP`, `QUOTE`, `QUOTE_VERSION`, `QUOTE_TEMPLATE`, `QUOTE_VERSION_SUMMARY`, `API_KEY`, `USER`, `ROLE`, `PROXY_USER`, `EXTERNAL_CREDENTIALS`, `TOKEN`, `INVOICE`, `E_INVOICE`, `PDF`, `BILLING_ENTITY`, `FEATURE`, `MEMBERSHIP`, `PAYMENT`, `PAYMENT_ACCEPTOR`, `PAYMENT_METHOD`, `PAYMENT_METHOD_OPTIONS`, `PAYMENT_SCHEDULE`, `PAYMENT_REQUEST`, `INTEGRATION`, `WEBHOOK`, `WEBHOOK_EVENT`, `FILE`, `FILE_PROCESSING_SETTINGS`, `TEAM`, `DOWNLOAD_URL`, `CSV_REPORT`, `REPORT`, `REPORT_GENERATE_REQUEST`, `REPORT_CONFIGURATION`, `REPORT_SUBSCRIPTION`, `REPORT_DEFINITION`, `ACCOUNT_GROUP`, `ENTITY`, `EVENT_TRACE`, `EVENT_TRACE_LINK`, `PRICING_CATEGORY`, `CONTACT`, `ALERT_RULE`, `ALERT`, `USAGE_LIMIT`, `AUDIT_RECORD`, `PORTAL_URL`, `AUTHENTICATION_PROVIDER`, `REPROCESS`, `APPROVAL_POLICY`, `APPROVAL_REQUEST`, `BULK_ACTION`, `COUPON`, `PROMOTION_CODE`, `WALLET`, `WALLET_TYPE`, `WALLET_GRANT`, `AUTO_TOPUP_CONFIG`, `WORKFLOW`, `WORKFLOW_TRIGGER`, `WORKFLOW_ACTION`, `WORKFLOW_ACTION_EXECUTION`, `CREDIT_TYPE`, `SIGNATURE_REQUEST`, `ATTACHMENT`, `DOCUMENT`, `EXCHANGE_RATE`

### 401 Unauthorized Error

Unauthorized

- `type` (enum, required)
  - Allowed values: `API_ERROR`, `INVALID_REQUEST`
- `code` (enum, required)
  - Allowed values: `RESOURCE_NOT_FOUND`, `RESOURCES_NOT_FOUND`, `UNABLE_TO_PROCESS_INSTRUCTIONS`, `BAD_REQUEST`, `UNSUPPORTED_MEDIA_TYPE`, `RESOURCE_ALREADY_EXISTS`, `CUSTOM_FIELD_VALUE_ALREADY_EXISTS`, `COULD_NOT_CREATE_RESOURCE`, `COULD_NOT_UPDATE_RESOURCE`, `COULD_NOT_DELETE_RESOURCE`, `MISSING_VERSION`, `UNSUPPORTED_VERSION`, `UNAUTHORISED`, `CUSTOMER_NOT_FOUND`, `PLATFORM_NOT_FOUND`, `PRICING_PLAN_NOT_FOUND`, `PRODUCT_NOT_FOUND`, `PRODUCT_ITEM_NOT_FOUND`, `PRICING_NOT_FOUND`, `PRICING_ITEM_NOT_FOUND`, `USER_NOT_FOUND`, `METER_NOT_FOUND`, `METER_VALUE_NOT_FOUND`, `METER_PROPERTY_NOT_FOUND`, `PRICING_ITEM_SUMMARIES_NOT_FOUND`, `MISSING_ID`, `INVALID_ID`, `MISSING_REFERENCE`, `MISSING_FIELD`, `INVALID_FIELD`, `INVALID_OPERATION`, `INTERNAL_ERROR`, `USER_NOT_ALLOWED`, `IDEMPOTENCY_CHECK_FAILED`, `INVALID_REQUEST`
- `message` (string, required)
- `field` (string, optional, nullable)
- `resource_id` (string, optional, nullable)
- `resource_type` (enum, optional, nullable)
  - Allowed values: `CUSTOMER`, `CUSTOM_FIELD`, `PLATFORM`, `PLATFORM_UPTODATE`, `METER`, `METER_VALUE`, `METER_PROPERTY`, `METER_PROPERTY_VARIABLE`, `METER_VALUE_CALCULATION`, `INGEST_DATA`, `METER_DATA`, `CHARGE_DATA`, `PERSIST_DATA`, `ADJUSTMENT_DATA`, `PRODUCT_CATEGORY`, `PRODUCT`, `PRODUCT_ITEM`, `PRICING`, `PRICING_GROUP`, `PRICING_ITEM`, `PRICING_ITEM_CONFIG`, `PRICING_PLAN_SUBSCRIPTION`, `PRICING_PLAN_SUBSCRIPTION_GROUP`, `PRICING_PLAN_SCHEDULE`, `SEAT_ASSIGNMENT`, `SHIPPING_ADDRESS`, `PRICING_PLAN`, `PRICING_PLAN_VERSION`, `PRICING_PLAN_GROUP`, `QUOTE`, `QUOTE_VERSION`, `QUOTE_TEMPLATE`, `QUOTE_VERSION_SUMMARY`, `API_KEY`, `USER`, `ROLE`, `PROXY_USER`, `EXTERNAL_CREDENTIALS`, `TOKEN`, `INVOICE`, `E_INVOICE`, `PDF`, `BILLING_ENTITY`, `FEATURE`, `MEMBERSHIP`, `PAYMENT`, `PAYMENT_ACCEPTOR`, `PAYMENT_METHOD`, `PAYMENT_METHOD_OPTIONS`, `PAYMENT_SCHEDULE`, `PAYMENT_REQUEST`, `INTEGRATION`, `WEBHOOK`, `WEBHOOK_EVENT`, `FILE`, `FILE_PROCESSING_SETTINGS`, `TEAM`, `DOWNLOAD_URL`, `CSV_REPORT`, `REPORT`, `REPORT_GENERATE_REQUEST`, `REPORT_CONFIGURATION`, `REPORT_SUBSCRIPTION`, `REPORT_DEFINITION`, `ACCOUNT_GROUP`, `ENTITY`, `EVENT_TRACE`, `EVENT_TRACE_LINK`, `PRICING_CATEGORY`, `CONTACT`, `ALERT_RULE`, `ALERT`, `USAGE_LIMIT`, `AUDIT_RECORD`, `PORTAL_URL`, `AUTHENTICATION_PROVIDER`, `REPROCESS`, `APPROVAL_POLICY`, `APPROVAL_REQUEST`, `BULK_ACTION`, `COUPON`, `PROMOTION_CODE`, `WALLET`, `WALLET_TYPE`, `WALLET_GRANT`, `AUTO_TOPUP_CONFIG`, `WORKFLOW`, `WORKFLOW_TRIGGER`, `WORKFLOW_ACTION`, `WORKFLOW_ACTION_EXECUTION`, `CREDIT_TYPE`, `SIGNATURE_REQUEST`, `ATTACHMENT`, `DOCUMENT`, `EXCHANGE_RATE`

### 403 Forbidden Error

Forbidden

- `type` (enum, required)
  - Allowed values: `API_ERROR`, `INVALID_REQUEST`
- `code` (enum, required)
  - Allowed values: `RESOURCE_NOT_FOUND`, `RESOURCES_NOT_FOUND`, `UNABLE_TO_PROCESS_INSTRUCTIONS`, `BAD_REQUEST`, `UNSUPPORTED_MEDIA_TYPE`, `RESOURCE_ALREADY_EXISTS`, `CUSTOM_FIELD_VALUE_ALREADY_EXISTS`, `COULD_NOT_CREATE_RESOURCE`, `COULD_NOT_UPDATE_RESOURCE`, `COULD_NOT_DELETE_RESOURCE`, `MISSING_VERSION`, `UNSUPPORTED_VERSION`, `UNAUTHORISED`, `CUSTOMER_NOT_FOUND`, `PLATFORM_NOT_FOUND`, `PRICING_PLAN_NOT_FOUND`, `PRODUCT_NOT_FOUND`, `PRODUCT_ITEM_NOT_FOUND`, `PRICING_NOT_FOUND`, `PRICING_ITEM_NOT_FOUND`, `USER_NOT_FOUND`, `METER_NOT_FOUND`, `METER_VALUE_NOT_FOUND`, `METER_PROPERTY_NOT_FOUND`, `PRICING_ITEM_SUMMARIES_NOT_FOUND`, `MISSING_ID`, `INVALID_ID`, `MISSING_REFERENCE`, `MISSING_FIELD`, `INVALID_FIELD`, `INVALID_OPERATION`, `INTERNAL_ERROR`, `USER_NOT_ALLOWED`, `IDEMPOTENCY_CHECK_FAILED`, `INVALID_REQUEST`
- `message` (string, required)
- `field` (string, optional, nullable)
- `resource_id` (string, optional, nullable)
- `resource_type` (enum, optional, nullable)
  - Allowed values: `CUSTOMER`, `CUSTOM_FIELD`, `PLATFORM`, `PLATFORM_UPTODATE`, `METER`, `METER_VALUE`, `METER_PROPERTY`, `METER_PROPERTY_VARIABLE`, `METER_VALUE_CALCULATION`, `INGEST_DATA`, `METER_DATA`, `CHARGE_DATA`, `PERSIST_DATA`, `ADJUSTMENT_DATA`, `PRODUCT_CATEGORY`, `PRODUCT`, `PRODUCT_ITEM`, `PRICING`, `PRICING_GROUP`, `PRICING_ITEM`, `PRICING_ITEM_CONFIG`, `PRICING_PLAN_SUBSCRIPTION`, `PRICING_PLAN_SUBSCRIPTION_GROUP`, `PRICING_PLAN_SCHEDULE`, `SEAT_ASSIGNMENT`, `SHIPPING_ADDRESS`, `PRICING_PLAN`, `PRICING_PLAN_VERSION`, `PRICING_PLAN_GROUP`, `QUOTE`, `QUOTE_VERSION`, `QUOTE_TEMPLATE`, `QUOTE_VERSION_SUMMARY`, `API_KEY`, `USER`, `ROLE`, `PROXY_USER`, `EXTERNAL_CREDENTIALS`, `TOKEN`, `INVOICE`, `E_INVOICE`, `PDF`, `BILLING_ENTITY`, `FEATURE`, `MEMBERSHIP`, `PAYMENT`, `PAYMENT_ACCEPTOR`, `PAYMENT_METHOD`, `PAYMENT_METHOD_OPTIONS`, `PAYMENT_SCHEDULE`, `PAYMENT_REQUEST`, `INTEGRATION`, `WEBHOOK`, `WEBHOOK_EVENT`, `FILE`, `FILE_PROCESSING_SETTINGS`, `TEAM`, `DOWNLOAD_URL`, `CSV_REPORT`, `REPORT`, `REPORT_GENERATE_REQUEST`, `REPORT_CONFIGURATION`, `REPORT_SUBSCRIPTION`, `REPORT_DEFINITION`, `ACCOUNT_GROUP`, `ENTITY`, `EVENT_TRACE`, `EVENT_TRACE_LINK`, `PRICING_CATEGORY`, `CONTACT`, `ALERT_RULE`, `ALERT`, `USAGE_LIMIT`, `AUDIT_RECORD`, `PORTAL_URL`, `AUTHENTICATION_PROVIDER`, `REPROCESS`, `APPROVAL_POLICY`, `APPROVAL_REQUEST`, `BULK_ACTION`, `COUPON`, `PROMOTION_CODE`, `WALLET`, `WALLET_TYPE`, `WALLET_GRANT`, `AUTO_TOPUP_CONFIG`, `WORKFLOW`, `WORKFLOW_TRIGGER`, `WORKFLOW_ACTION`, `WORKFLOW_ACTION_EXECUTION`, `CREDIT_TYPE`, `SIGNATURE_REQUEST`, `ATTACHMENT`, `DOCUMENT`, `EXCHANGE_RATE`

### 409 Conflict Error

Conflict

- `type` (enum, required)
  - Allowed values: `API_ERROR`, `INVALID_REQUEST`
- `code` (enum, required)
  - Allowed values: `RESOURCE_NOT_FOUND`, `RESOURCES_NOT_FOUND`, `UNABLE_TO_PROCESS_INSTRUCTIONS`, `BAD_REQUEST`, `UNSUPPORTED_MEDIA_TYPE`, `RESOURCE_ALREADY_EXISTS`, `CUSTOM_FIELD_VALUE_ALREADY_EXISTS`, `COULD_NOT_CREATE_RESOURCE`, `COULD_NOT_UPDATE_RESOURCE`, `COULD_NOT_DELETE_RESOURCE`, `MISSING_VERSION`, `UNSUPPORTED_VERSION`, `UNAUTHORISED`, `CUSTOMER_NOT_FOUND`, `PLATFORM_NOT_FOUND`, `PRICING_PLAN_NOT_FOUND`, `PRODUCT_NOT_FOUND`, `PRODUCT_ITEM_NOT_FOUND`, `PRICING_NOT_FOUND`, `PRICING_ITEM_NOT_FOUND`, `USER_NOT_FOUND`, `METER_NOT_FOUND`, `METER_VALUE_NOT_FOUND`, `METER_PROPERTY_NOT_FOUND`, `PRICING_ITEM_SUMMARIES_NOT_FOUND`, `MISSING_ID`, `INVALID_ID`, `MISSING_REFERENCE`, `MISSING_FIELD`, `INVALID_FIELD`, `INVALID_OPERATION`, `INTERNAL_ERROR`, `USER_NOT_ALLOWED`, `IDEMPOTENCY_CHECK_FAILED`, `INVALID_REQUEST`
- `message` (string, required)
- `field` (string, optional, nullable)
- `resource_id` (string, optional, nullable)
- `resource_type` (enum, optional, nullable)
  - Allowed values: `CUSTOMER`, `CUSTOM_FIELD`, `PLATFORM`, `PLATFORM_UPTODATE`, `METER`, `METER_VALUE`, `METER_PROPERTY`, `METER_PROPERTY_VARIABLE`, `METER_VALUE_CALCULATION`, `INGEST_DATA`, `METER_DATA`, `CHARGE_DATA`, `PERSIST_DATA`, `ADJUSTMENT_DATA`, `PRODUCT_CATEGORY`, `PRODUCT`, `PRODUCT_ITEM`, `PRICING`, `PRICING_GROUP`, `PRICING_ITEM`, `PRICING_ITEM_CONFIG`, `PRICING_PLAN_SUBSCRIPTION`, `PRICING_PLAN_SUBSCRIPTION_GROUP`, `PRICING_PLAN_SCHEDULE`, `SEAT_ASSIGNMENT`, `SHIPPING_ADDRESS`, `PRICING_PLAN`, `PRICING_PLAN_VERSION`, `PRICING_PLAN_GROUP`, `QUOTE`, `QUOTE_VERSION`, `QUOTE_TEMPLATE`, `QUOTE_VERSION_SUMMARY`, `API_KEY`, `USER`, `ROLE`, `PROXY_USER`, `EXTERNAL_CREDENTIALS`, `TOKEN`, `INVOICE`, `E_INVOICE`, `PDF`, `BILLING_ENTITY`, `FEATURE`, `MEMBERSHIP`, `PAYMENT`, `PAYMENT_ACCEPTOR`, `PAYMENT_METHOD`, `PAYMENT_METHOD_OPTIONS`, `PAYMENT_SCHEDULE`, `PAYMENT_REQUEST`, `INTEGRATION`, `WEBHOOK`, `WEBHOOK_EVENT`, `FILE`, `FILE_PROCESSING_SETTINGS`, `TEAM`, `DOWNLOAD_URL`, `CSV_REPORT`, `REPORT`, `REPORT_GENERATE_REQUEST`, `REPORT_CONFIGURATION`, `REPORT_SUBSCRIPTION`, `REPORT_DEFINITION`, `ACCOUNT_GROUP`, `ENTITY`, `EVENT_TRACE`, `EVENT_TRACE_LINK`, `PRICING_CATEGORY`, `CONTACT`, `ALERT_RULE`, `ALERT`, `USAGE_LIMIT`, `AUDIT_RECORD`, `PORTAL_URL`, `AUTHENTICATION_PROVIDER`, `REPROCESS`, `APPROVAL_POLICY`, `APPROVAL_REQUEST`, `BULK_ACTION`, `COUPON`, `PROMOTION_CODE`, `WALLET`, `WALLET_TYPE`, `WALLET_GRANT`, `AUTO_TOPUP_CONFIG`, `WORKFLOW`, `WORKFLOW_TRIGGER`, `WORKFLOW_ACTION`, `WORKFLOW_ACTION_EXECUTION`, `CREDIT_TYPE`, `SIGNATURE_REQUEST`, `ATTACHMENT`, `DOCUMENT`, `EXCHANGE_RATE`

### 500 Internal Server Error

Internal Server Error

- `type` (enum, required)
  - Allowed values: `API_ERROR`, `INVALID_REQUEST`
- `code` (enum, required)
  - Allowed values: `RESOURCE_NOT_FOUND`, `RESOURCES_NOT_FOUND`, `UNABLE_TO_PROCESS_INSTRUCTIONS`, `BAD_REQUEST`, `UNSUPPORTED_MEDIA_TYPE`, `RESOURCE_ALREADY_EXISTS`, `CUSTOM_FIELD_VALUE_ALREADY_EXISTS`, `COULD_NOT_CREATE_RESOURCE`, `COULD_NOT_UPDATE_RESOURCE`, `COULD_NOT_DELETE_RESOURCE`, `MISSING_VERSION`, `UNSUPPORTED_VERSION`, `UNAUTHORISED`, `CUSTOMER_NOT_FOUND`, `PLATFORM_NOT_FOUND`, `PRICING_PLAN_NOT_FOUND`, `PRODUCT_NOT_FOUND`, `PRODUCT_ITEM_NOT_FOUND`, `PRICING_NOT_FOUND`, `PRICING_ITEM_NOT_FOUND`, `USER_NOT_FOUND`, `METER_NOT_FOUND`, `METER_VALUE_NOT_FOUND`, `METER_PROPERTY_NOT_FOUND`, `PRICING_ITEM_SUMMARIES_NOT_FOUND`, `MISSING_ID`, `INVALID_ID`, `MISSING_REFERENCE`, `MISSING_FIELD`, `INVALID_FIELD`, `INVALID_OPERATION`, `INTERNAL_ERROR`, `USER_NOT_ALLOWED`, `IDEMPOTENCY_CHECK_FAILED`, `INVALID_REQUEST`
- `message` (string, required)
- `field` (string, optional, nullable)
- `resource_id` (string, optional, nullable)
- `resource_type` (enum, optional, nullable)
  - Allowed values: `CUSTOMER`, `CUSTOM_FIELD`, `PLATFORM`, `PLATFORM_UPTODATE`, `METER`, `METER_VALUE`, `METER_PROPERTY`, `METER_PROPERTY_VARIABLE`, `METER_VALUE_CALCULATION`, `INGEST_DATA`, `METER_DATA`, `CHARGE_DATA`, `PERSIST_DATA`, `ADJUSTMENT_DATA`, `PRODUCT_CATEGORY`, `PRODUCT`, `PRODUCT_ITEM`, `PRICING`, `PRICING_GROUP`, `PRICING_ITEM`, `PRICING_ITEM_CONFIG`, `PRICING_PLAN_SUBSCRIPTION`, `PRICING_PLAN_SUBSCRIPTION_GROUP`, `PRICING_PLAN_SCHEDULE`, `SEAT_ASSIGNMENT`, `SHIPPING_ADDRESS`, `PRICING_PLAN`, `PRICING_PLAN_VERSION`, `PRICING_PLAN_GROUP`, `QUOTE`, `QUOTE_VERSION`, `QUOTE_TEMPLATE`, `QUOTE_VERSION_SUMMARY`, `API_KEY`, `USER`, `ROLE`, `PROXY_USER`, `EXTERNAL_CREDENTIALS`, `TOKEN`, `INVOICE`, `E_INVOICE`, `PDF`, `BILLING_ENTITY`, `FEATURE`, `MEMBERSHIP`, `PAYMENT`, `PAYMENT_ACCEPTOR`, `PAYMENT_METHOD`, `PAYMENT_METHOD_OPTIONS`, `PAYMENT_SCHEDULE`, `PAYMENT_REQUEST`, `INTEGRATION`, `WEBHOOK`, `WEBHOOK_EVENT`, `FILE`, `FILE_PROCESSING_SETTINGS`, `TEAM`, `DOWNLOAD_URL`, `CSV_REPORT`, `REPORT`, `REPORT_GENERATE_REQUEST`, `REPORT_CONFIGURATION`, `REPORT_SUBSCRIPTION`, `REPORT_DEFINITION`, `ACCOUNT_GROUP`, `ENTITY`, `EVENT_TRACE`, `EVENT_TRACE_LINK`, `PRICING_CATEGORY`, `CONTACT`, `ALERT_RULE`, `ALERT`, `USAGE_LIMIT`, `AUDIT_RECORD`, `PORTAL_URL`, `AUTHENTICATION_PROVIDER`, `REPROCESS`, `APPROVAL_POLICY`, `APPROVAL_REQUEST`, `BULK_ACTION`, `COUPON`, `PROMOTION_CODE`, `WALLET`, `WALLET_TYPE`, `WALLET_GRANT`, `AUTO_TOPUP_CONFIG`, `WORKFLOW`, `WORKFLOW_TRIGGER`, `WORKFLOW_ACTION`, `WORKFLOW_ACTION_EXECUTION`, `CREDIT_TYPE`, `SIGNATURE_REQUEST`, `ATTACHMENT`, `DOCUMENT`, `EXCHANGE_RATE`

## Types

### ProductCreateRequest

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `category_id` (string, optional) — The resource ID of the product category, that belongs to the product.
- `category` (ProductCategory, optional, nullable)
- `parent_product_id` (string, optional, nullable) — The resource ID of the original product, to which the product will belong to.
- `name` (string, optional)
- `reference` (string, optional)
- `description` (string, optional, nullable)
- `status` (enum, optional, nullable) — The status of the product.
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `product_type` (enum, optional)
  - Allowed values: `DEFAULT`, `ADDON`
- `tax_category` (enum, optional, nullable) — The default tax category applied to the product.
  - Allowed values: `STANDARD`, `NO_TAX`, `EXEMPT`
- `features` (list of FeatureResourceReference, optional, nullable) — The features associated with the product.
- `custom_fields` (list of CustomFieldValue, optional, nullable)
- `display_order` (integer, optional, nullable) — Determines the order in which products are displayed on overview pages and invoices. The lowest number gets the highest priority.
- `linked_integrations` (list of LinkedIntegration, optional, nullable)
- `billing_entity_id` (string, optional, nullable) — The resource ID of the billing entity linked to this product.
- `customer_id` (string, optional, nullable)
- `agent_context` (AgentContext, optional) — Context for AI agents about this product. Intended for agents, not for customer-facing output.

### ProductItemUsageBasedCreateRequest

- `meter_value_calculation_id` (string, optional, nullable) — The linked meter value calculation
- `meter_value_calculation` (MeterValueCalculation, optional, nullable)
- `tiering_meter_value_calculation_id` (string, optional, nullable) — The optional alternative linked meter value calculation for tiering
- `tiering_meter_value_calculation` (MeterValueCalculation, optional, nullable)
- `report_meter_value_calculation_ids` (list of string, optional, nullable) — Optional reporting meter value calculations.
- `conditions` (MeterConditions, optional) — Optional conditions.

### ProductItemCreditsCreateRequest

- `credit_type_id` (string, optional, nullable) — The linked meter value calculation
- `credit_type` (CreditType, optional, nullable)

### MeterValueCalculationCreateRequest

- `reference` (string, required)
- `calculation_type` (enum, required, nullable) — The type of calculation used for this billable metric.
  - Allowed values: `SUM`, `MAX`, `MIN`, `AVERAGE`, `UNIQUE`
- `meter_id` (string, required, nullable) — The ID of the meter.
- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `name` (string, optional, nullable)
- `description` (string, optional, nullable)
- `persist` (boolean, optional, nullable) — Indicate if the data of the billable metric must be persisted to the next billing period of the schedule (default is false).
- `meter` (MeterCreateRequest, optional, nullable)
- `meter_value_id` (string, optional, nullable) — The ID of the meter value.
- `meter_value` (MeterValueCreateRequest, optional, nullable)
- `meter_property_id` (string, optional, nullable) — The ID of the meter property.
- `meter_property` (MeterPropertyCreateRequest, optional, nullable)

### UnitNameCreateRequest

- `singular` (string, optional)
- `plural` (string, optional, nullable)

### CustomFieldValueCreateRequest

- `id` (string, optional, nullable) — Resource ID of type CUSTOM_FIELD
- `reference` (string, optional, nullable)
- `value` (string, optional, nullable)
- `values` (list of string, optional, nullable)
- `integration_details` (IntegrationDetails, optional, nullable)
- `integration_id` (string, optional) — The resource ID of the integration linked to the custom field

### AgentContextCreateRequest

- `guidance` (string, optional, nullable) — Free-text guidance for AI agents on how to interpret and use this resource.

### Product

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `category_id` (string, optional) — The resource ID of the product category, that belongs to the product.
- `category` (ProductCategory, optional, nullable)
- `parent_product_id` (string, optional, nullable) — The resource ID of the original product, to which the product will belong to.
- `name` (string, optional)
- `reference` (string, optional)
- `description` (string, optional, nullable)
- `status` (enum, optional, nullable) — The status of the product.
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `product_type` (enum, optional)
  - Allowed values: `DEFAULT`, `ADDON`
- `tax_category` (enum, optional, nullable) — The default tax category applied to the product.
  - Allowed values: `STANDARD`, `NO_TAX`, `EXEMPT`
- `features` (list of FeatureResourceReference, optional, nullable) — The features associated with the product.
- `custom_fields` (list of CustomFieldValue, optional, nullable)
- `display_order` (integer, optional, nullable) — Determines the order in which products are displayed on overview pages and invoices. The lowest number gets the highest priority.
- `linked_integrations` (list of LinkedIntegration, optional, nullable)
- `billing_entity_id` (string, optional, nullable) — The resource ID of the billing entity linked to this product.
- `customer_id` (string, optional, nullable)
- `agent_context` (AgentContext, optional) — Context for AI agents about this product. Intended for agents, not for customer-facing output.

### ProductItemUsageBased

- `meter_value_calculation_id` (string, optional, nullable) — The linked meter value calculation
- `meter_value_calculation` (MeterValueCalculation, optional, nullable)
- `tiering_meter_value_calculation_id` (string, optional, nullable) — The optional alternative linked meter value calculation for tiering
- `tiering_meter_value_calculation` (MeterValueCalculation, optional, nullable)
- `report_meter_value_calculation_ids` (list of string, optional, nullable) — Optional reporting meter value calculations.
- `conditions` (MeterConditions, optional) — Optional conditions.

### ProductItemCredits

- `credit_type_id` (string, optional, nullable) — The linked meter value calculation
- `credit_type` (CreditType, optional, nullable)

### MeterValueCalculation

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `reference` (string, optional)
- `name` (string, optional, nullable)
- `description` (string, optional, nullable)
- `calculation_type` (enum, optional, nullable) — The type of calculation used for this billable metric.
  - Allowed values: `SUM`, `MAX`, `MIN`, `AVERAGE`, `UNIQUE`
- `persist` (boolean, optional, nullable) — Indicate if the data of the billable metric must be persisted to the next billing period of the schedule (default is false).
- `meter_id` (string, optional, nullable) — The ID of the meter.
- `meter` (Meter, optional, nullable)
- `meter_value_id` (string, optional, nullable) — The ID of the meter value.
- `meter_value` (MeterValue, optional, nullable)
- `meter_property_id` (string, optional, nullable) — The ID of the meter property.
- `meter_property` (MeterProperty, optional, nullable)

### UnitName

- `singular` (string, optional)
- `plural` (string, optional, nullable)

### CustomFieldValue

- `id` (string, optional, nullable) — Resource ID of type CUSTOM_FIELD
- `reference` (string, optional, nullable)
- `value` (string, optional, nullable)
- `values` (list of string, optional, nullable)
- `integration_details` (IntegrationDetails, optional, nullable)
- `integration_id` (string, optional) — The resource ID of the integration linked to the custom field

### AgentContext

- `guidance` (string, optional, nullable) — Free-text guidance for AI agents on how to interpret and use this resource.

### ProductCategory

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `name` (string, optional)
- `reference` (string, optional)
- `description` (string, optional, nullable)
- `tax_category` (enum, optional, nullable) — The default tax category applied to the products in the product category.
  - Allowed values: `STANDARD`, `NO_TAX`, `EXEMPT`
- `display_order` (integer, optional, nullable)
- `customer_id` (string, optional, nullable) — Resource ID of type CUSTOMER

### FeatureResourceReference

- `id` (string, optional, nullable) — The ID of the feature.
- `reference` (string, optional) — The reference of the feature.

### LinkedIntegration

- `id` (string, optional)
- `link_details` (list of LinkDetail, optional)

### MeterConditions

- `name` (string, optional, nullable)
- `expression` (MeterConditionExpression, optional)
- `meter_properties` (list of MeterPropertyCondition, optional, nullable, deprecated)

### CreditType

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `reference` (string, optional)
- `status` (enum, optional, nullable)
  - Allowed values: `DRAFT`, `ACTIVE`, `INACTIVE`, `DEPRECATED`, `ARCHIVED`
- `name` (string, optional)
- `description` (string, optional, nullable)
- `unit_name` (UnitName, optional)
- `created_at` (string, optional, nullable)
- `updated_at` (string, optional, nullable)

### MeterCreateRequest

- `reference` (string, required)
- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `name` (string, optional, nullable)
- `description` (string, optional, nullable)
- `status` (enum, optional, nullable) — The status of the meter indicating the activity of the meter and the ability to update properties.
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `meter_values` (list of MeterMeterValueCreateRequest, optional, nullable) — The values used as input to calculate billable units, used in the meter.
- `meter_properties` (list of MeterMeterPropertyCreateRequest, optional, nullable) — The properties that provide information to give context to an event, used in the meter.

### MeterValueCreateRequest

- `reference` (string, required)
- `name` (string, required, nullable)
- `type` (enum, required, nullable) — The type of the meter value.
  - Allowed values: `NUMBER`, `AMOUNT`
- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `description` (string, optional, nullable)
- `status` (enum, optional, nullable) — The status of the meter value indicating the activity and the ability to update properties.
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`

### MeterPropertyCreateRequest

- `reference` (string, required)
- `name` (string, required, nullable)
- `type` (enum, required, nullable) — The type of the meter property.
  - Allowed values: `NUMBER`, `ENUM`, `STRING`
- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `description` (string, optional, nullable)
- `status` (enum, optional) — The status of the meter property indicating the activity and the ability to update properties.
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `enum_values` (list of string, optional, nullable) — The list of available ENUM values.

### IntegrationDetails

- `id` (string, optional, nullable)
- `reference` (string, optional, nullable)
- `payment_gateway_variant` (enum, optional)
  - Allowed values: `ADYEN`, `STRIPE`
- `adyen` (AdyenIntegrationDetails, optional)
- `stripe` (StripeIntegrationDetails, optional)

### Meter

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `reference` (string, optional)
- `name` (string, optional, nullable)
- `description` (string, optional, nullable)
- `status` (enum, optional, nullable) — The status of the meter indicating the activity of the meter and the ability to update properties.
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `meter_values` (list of MeterMeterValue, optional, nullable) — The values used as input to calculate billable units, used in the meter.
- `meter_properties` (list of MeterMeterProperty, optional, nullable) — The properties that provide information to give context to an event, used in the meter.

### MeterValue

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `reference` (string, optional)
- `name` (string, optional, nullable)
- `description` (string, optional, nullable)
- `status` (enum, optional, nullable) — The status of the meter value indicating the activity and the ability to update properties.
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `type` (enum, optional, nullable) — The type of the meter value.
  - Allowed values: `NUMBER`, `AMOUNT`

### MeterProperty

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `reference` (string, optional)
- `name` (string, optional, nullable)
- `description` (string, optional, nullable)
- `status` (enum, optional) — The status of the meter property indicating the activity and the ability to update properties.
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `type` (enum, optional, nullable) — The type of the meter property.
  - Allowed values: `NUMBER`, `ENUM`, `STRING`
- `enum_values` (list of string, optional, nullable) — The list of available ENUM values.

### LinkDetail

- `url` (string, optional, nullable)
- `custom_field_name` (string, optional, nullable)

### MeterConditionExpression

- `operator` (enum, optional)
  - Allowed values: `AND`, `OR`, `XOR`
- `operands` (list of MeterConditionOperand, optional, nullable)

### MeterPropertyCondition

- `id` (string, optional, nullable) — Resource ID of type METER_PROPERTY
- `reference` (string, optional, nullable)
- `meter_property` (MeterProperty, optional, nullable)
- `value` (string, optional, nullable)
- `values` (list of string, optional, nullable)
- `meter_property_variable_id` (string, optional, nullable) — Resource ID of type METER_PROPERTY_VARIABLE
- `meter_property_variable` (MeterPropertyVariable, optional, nullable)
- `comparator` (enum, optional)
  - Allowed values: `EQUALS`, `NOT_EQUALS`, `IN`, `NOT_IN`, `GREATER_THAN`, `GREATER_THAN_OR_EQUALS`, `LESS_THAN`, `LESS_THAN_OR_EQUALS`, `EMPTY`, `NOT_EMPTY`, `CONTAINS`, `NOT_CONTAINS`

### MeterMeterValueCreateRequest

- `id` (string, optional, nullable) — Resource ID of type METER_VALUE
- `object` (MeterValue, optional, nullable)
- `reference` (string, optional, nullable)
- `required` (boolean, optional, nullable)

### MeterMeterPropertyCreateRequest

- `id` (string, optional, nullable) — Resource ID of type METER_PROPERTY
- `object` (MeterProperty, optional, nullable)
- `reference` (string, optional, nullable)
- `required` (boolean, optional, nullable)

### AdyenIntegrationDetails

- `recurring_detail_reference` (string, optional)

### StripeIntegrationDetails

- `payment_method_id` (string, optional)

### MeterMeterValue

- `id` (string, optional, nullable) — Resource ID of type METER_VALUE
- `object` (MeterValue, optional, nullable)
- `reference` (string, optional, nullable)
- `required` (boolean, optional, nullable)

### MeterMeterProperty

- `id` (string, optional, nullable) — Resource ID of type METER_PROPERTY
- `object` (MeterProperty, optional, nullable)
- `reference` (string, optional, nullable)
- `required` (boolean, optional, nullable)

### MeterConditionOperand

- `meter_property` (MeterPropertyCondition, optional)
- `expression` (MeterConditionOperandExpression, optional, nullable)

### MeterPropertyVariable

- `object_type` (string, optional, nullable)
- `id` (string, optional, nullable)
- `reference` (string, optional)
- `name` (string, optional, nullable)
- `description` (string, optional, nullable)
- `meter_property_id` (string, optional, nullable) — The meter property whose values this variable lists. Set on create only.
- `meter_property_reference` (string, optional, nullable) — Alternative to meter_property_id on create.
- `type` (enum, optional, nullable)
  - Allowed values: `LIST`
- `status` (enum, optional, nullable)
  - Allowed values: `DRAFT`, `ACTIVE`, `ARCHIVED`, `DEPRECATED`
- `values` (list of string, optional, nullable) — The initial values, on create only. Edit them afterwards through the values endpoint.
- `value_count` (integer, optional, nullable)
- `created_at` (string, optional, nullable)
- `updated_at` (string, optional, nullable)

### MeterConditionOperandExpression

## Examples

**Request**

```json
{
  "product_id": "prod_nwDeeN0vxxHxTtCv0Z1E",
  "name": "lumen-4 output tokens",
  "reference": "lumen_4_output_tokens",
  "model_type": "USAGE_BASED",
  "description": "Completion tokens generated by lumen-4",
  "type": "REVENUE",
  "usage_based": {
    "meter_value_calculation_id": "mvca_pwDeeN0vxxHxSHCa0d1I",
    "conditions": {
      "meter_properties": [
        {
          "id": "metp_fwDeeN0vxxHxQWCs9L1w",
          "value": "lumen-4",
          "comparator": "EQUALS"
        }
      ]
    }
  },
  "tax_category": "STANDARD",
  "unit_name": {
    "singular": "token",
    "plural": "tokens"
  }
}
```

**Response**

```json
{
  "object_type": "string",
  "id": "string",
  "product_id": "string",
  "product": {
    "object_type": "string",
    "id": "string",
    "category_id": "string",
    "category": {
      "object_type": "string",
      "id": "string",
      "name": "string",
      "reference": "string",
      "description": "string",
      "tax_category": "STANDARD",
      "display_order": 1,
      "customer_id": "string"
    },
    "parent_product_id": "string",
    "name": "string",
    "reference": "string",
    "description": "string",
    "status": "DRAFT",
    "product_type": "DEFAULT",
    "tax_category": "STANDARD",
    "features": [
      {
        "id": "string",
        "reference": "string"
      }
    ],
    "custom_fields": [
      {
        "id": "string",
        "reference": "string",
        "value": "string",
        "values": [
          "string"
        ],
        "integration_details": {
          "id": "string",
          "reference": "string",
          "payment_gateway_variant": "ADYEN",
          "adyen": {
            "recurring_detail_reference": "string"
          },
          "stripe": {
            "payment_method_id": "string"
          }
        },
        "integration_id": "string"
      }
    ],
    "display_order": 1,
    "linked_integrations": [
      {
        "id": "string",
        "link_details": [
          {
            "url": "string",
            "custom_field_name": "string"
          }
        ]
      }
    ],
    "billing_entity_id": "string",
    "customer_id": "string",
    "agent_context": {
      "guidance": "string"
    }
  },
  "name": "string",
  "status": "DRAFT",
  "reference": "string",
  "description": "string",
  "type": "REVENUE",
  "model_type": "USAGE_BASED",
  "usage_based": {
    "meter_value_calculation_id": "string",
    "meter_value_calculation": {
      "object_type": "string",
      "id": "string",
      "reference": "string",
      "name": "string",
      "description": "string",
      "calculation_type": "SUM",
      "persist": true,
      "meter_id": "string",
      "meter": {
        "object_type": "string",
        "id": "string",
        "reference": "string",
        "name": "string",
        "description": "string",
        "status": "DRAFT",
        "meter_values": [
          {
            "id": "string",
            "object": {
              "object_type": "string",
              "id": "string",
              "reference": "string",
              "name": "string",
              "description": "string",
              "status": "DRAFT",
              "type": "NUMBER"
            },
            "required": true
          }
        ],
        "meter_properties": [
          {
            "id": "string",
            "object": {
              "object_type": "string",
              "id": "string",
              "reference": "string",
              "name": "string",
              "description": "string",
              "status": "DRAFT",
              "type": "NUMBER",
              "enum_values": [
                "string"
              ]
            },
            "required": true
          }
        ]
      },
      "meter_value_id": "string",
      "meter_value": {
        "object_type": "string",
        "id": "string",
        "reference": "string",
        "name": "string",
        "description": "string",
        "status": "DRAFT",
        "type": "NUMBER"
      },
      "meter_property_id": "string",
      "meter_property": {
        "object_type": "string",
        "id": "string",
        "reference": "string",
        "name": "string",
        "description": "string",
        "status": "DRAFT",
        "type": "NUMBER",
        "enum_values": [
          "string"
        ]
      }
    },
    "tiering_meter_value_calculation_id": "string",
    "tiering_meter_value_calculation": {
      "object_type": "string",
      "id": "string",
      "reference": "string",
      "name": "string",
      "description": "string",
      "calculation_type": "SUM",
      "persist": true,
      "meter_id": "string",
      "meter": {
        "object_type": "string",
        "id": "string",
        "reference": "string",
        "name": "string",
        "description": "string",
        "status": "DRAFT",
        "meter_values": [
          {
            "id": "string",
            "object": {
              "object_type": "string",
              "id": "string",
              "reference": "string",
              "name": "string",
              "description": "string",
              "status": "DRAFT",
              "type": "NUMBER"
            },
            "required": true
          }
        ],
        "meter_properties": [
          {
            "id": "string",
            "object": {
              "object_type": "string",
              "id": "string",
              "reference": "string",
              "name": "string",
              "description": "string",
              "status": "DRAFT",
              "type": "NUMBER",
              "enum_values": [
                "string"
              ]
            },
            "required": true
          }
        ]
      },
      "meter_value_id": "string",
      "meter_value": {
        "object_type": "string",
        "id": "string",
        "reference": "string",
        "name": "string",
        "description": "string",
        "status": "DRAFT",
        "type": "NUMBER"
      },
      "meter_property_id": "string",
      "meter_property": {
        "object_type": "string",
        "id": "string",
        "reference": "string",
        "name": "string",
        "description": "string",
        "status": "DRAFT",
        "type": "NUMBER",
        "enum_values": [
          "string"
        ]
      }
    },
    "report_meter_value_calculation_ids": [
      "string"
    ],
    "conditions": {
      "name": "string",
      "expression": {
        "operator": "AND",
        "operands": [
          {
            "meter_property": {
              "id": "string",
              "reference": "string",
              "meter_property": {
                "object_type": "string",
                "id": "string",
                "reference": "string",
                "name": "string",
                "description": "string",
                "status": "DRAFT",
                "type": "NUMBER",
                "enum_values": [
                  "string"
                ]
              },
              "value": "string",
              "values": [
                "string"
              ],
              "meter_property_variable_id": "string",
              "meter_property_variable": {
                "object_type": "string",
                "id": "string",
                "reference": "string",
                "name": "string",
                "description": "string",
                "meter_property_id": "string",
                "type": "LIST",
                "status": "DRAFT",
                "value_count": 1,
                "created_at": "string",
                "updated_at": "string"
              },
              "comparator": "EQUALS"
            },
            "expression": {}
          }
        ]
      },
      "meter_properties": [
        {
          "id": "string",
          "reference": "string",
          "meter_property": {
            "object_type": "string",
            "id": "string",
            "reference": "string",
            "name": "string",
            "description": "string",
            "status": "DRAFT",
            "type": "NUMBER",
            "enum_values": [
              "string"
            ]
          },
          "value": "string",
          "values": [
            "string"
          ],
          "meter_property_variable_id": "string",
          "meter_property_variable": {
            "object_type": "string",
            "id": "string",
            "reference": "string",
            "name": "string",
            "description": "string",
            "meter_property_id": "string",
            "type": "LIST",
            "status": "DRAFT",
            "value_count": 1,
            "created_at": "string",
            "updated_at": "string"
          },
          "comparator": "EQUALS"
        }
      ]
    }
  },
  "credits": {
    "credit_type_id": "string",
    "credit_type": {
      "object_type": "string",
      "id": "string",
      "reference": "string",
      "status": "DRAFT",
      "name": "string",
      "description": "string",
      "unit_name": {
        "singular": "string",
        "plural": "string"
      },
      "created_at": "string",
      "updated_at": "string"
    }
  },
  "meter_value_calculation": {
    "object_type": "string",
    "id": "string",
    "reference": "string",
    "name": "string",
    "description": "string",
    "calculation_type": "SUM",
    "persist": true,
    "meter_id": "string",
    "meter": {
      "object_type": "string",
      "id": "string",
      "reference": "string",
      "name": "string",
      "description": "string",
      "status": "DRAFT",
      "meter_values": [
        {
          "id": "string",
          "object": {
            "object_type": "string",
            "id": "string",
            "reference": "string",
            "name": "string",
            "description": "string",
            "status": "DRAFT",
            "type": "NUMBER"
          },
          "required": true
        }
      ],
      "meter_properties": [
        {
          "id": "string",
          "object": {
            "object_type": "string",
            "id": "string",
            "reference": "string",
            "name": "string",
            "description": "string",
            "status": "DRAFT",
            "type": "NUMBER",
            "enum_values": [
              "string"
            ]
          },
          "required": true
        }
      ]
    },
    "meter_value_id": "string",
    "meter_value": {
      "object_type": "string",
      "id": "string",
      "reference": "string",
      "name": "string",
      "description": "string",
      "status": "DRAFT",
      "type": "NUMBER"
    },
    "meter_property_id": "string",
    "meter_property": {
      "object_type": "string",
      "id": "string",
      "reference": "string",
      "name": "string",
      "description": "string",
      "status": "DRAFT",
      "type": "NUMBER",
      "enum_values": [
        "string"
      ]
    }
  },
  "tax_category": "STANDARD",
  "display_order": 1,
  "unit_name": {
    "singular": "string",
    "plural": "string"
  },
  "custom_fields": [
    {
      "id": "string",
      "reference": "string",
      "value": "string",
      "values": [
        "string"
      ],
      "integration_details": {
        "id": "string",
        "reference": "string",
        "payment_gateway_variant": "ADYEN",
        "adyen": {
          "recurring_detail_reference": "string"
        },
        "stripe": {
          "payment_method_id": "string"
        }
      },
      "integration_id": "string"
    }
  ],
  "customer_id": "string",
  "agent_context": {
    "guidance": "string"
  },
  "meter_value_calculation_id": "string",
  "report_meter_value_calculation_ids": [
    "string"
  ]
}
```

**SDK Code**

```python ProductItems_postProductItems_example
import requests

url = "https://test.api.solvimon.com/v1/product-items"

payload = {
    "product_id": "prod_nwDeeN0vxxHxTtCv0Z1E",
    "name": "lumen-4 output tokens",
    "reference": "lumen_4_output_tokens",
    "model_type": "USAGE_BASED",
    "description": "Completion tokens generated by lumen-4",
    "type": "REVENUE",
    "usage_based": {
        "meter_value_calculation_id": "mvca_pwDeeN0vxxHxSHCa0d1I",
        "conditions": { "meter_properties": [
                {
                    "id": "metp_fwDeeN0vxxHxQWCs9L1w",
                    "value": "lumen-4",
                    "comparator": "EQUALS"
                }
            ] }
    },
    "tax_category": "STANDARD",
    "unit_name": {
        "singular": "token",
        "plural": "tokens"
    }
}
headers = {
    "X-API-KEY": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ProductItems_postProductItems_example
const url = 'https://test.api.solvimon.com/v1/product-items';
const options = {
  method: 'POST',
  headers: {'X-API-KEY': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"product_id":"prod_nwDeeN0vxxHxTtCv0Z1E","name":"lumen-4 output tokens","reference":"lumen_4_output_tokens","model_type":"USAGE_BASED","description":"Completion tokens generated by lumen-4","type":"REVENUE","usage_based":{"meter_value_calculation_id":"mvca_pwDeeN0vxxHxSHCa0d1I","conditions":{"meter_properties":[{"id":"metp_fwDeeN0vxxHxQWCs9L1w","value":"lumen-4","comparator":"EQUALS"}]}},"tax_category":"STANDARD","unit_name":{"singular":"token","plural":"tokens"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ProductItems_postProductItems_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://test.api.solvimon.com/v1/product-items"

	payload := strings.NewReader("{\n  \"product_id\": \"prod_nwDeeN0vxxHxTtCv0Z1E\",\n  \"name\": \"lumen-4 output tokens\",\n  \"reference\": \"lumen_4_output_tokens\",\n  \"model_type\": \"USAGE_BASED\",\n  \"description\": \"Completion tokens generated by lumen-4\",\n  \"type\": \"REVENUE\",\n  \"usage_based\": {\n    \"meter_value_calculation_id\": \"mvca_pwDeeN0vxxHxSHCa0d1I\",\n    \"conditions\": {\n      \"meter_properties\": [\n        {\n          \"id\": \"metp_fwDeeN0vxxHxQWCs9L1w\",\n          \"value\": \"lumen-4\",\n          \"comparator\": \"EQUALS\"\n        }\n      ]\n    }\n  },\n  \"tax_category\": \"STANDARD\",\n  \"unit_name\": {\n    \"singular\": \"token\",\n    \"plural\": \"tokens\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-KEY", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ProductItems_postProductItems_example
require 'uri'
require 'net/http'

url = URI("https://test.api.solvimon.com/v1/product-items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"product_id\": \"prod_nwDeeN0vxxHxTtCv0Z1E\",\n  \"name\": \"lumen-4 output tokens\",\n  \"reference\": \"lumen_4_output_tokens\",\n  \"model_type\": \"USAGE_BASED\",\n  \"description\": \"Completion tokens generated by lumen-4\",\n  \"type\": \"REVENUE\",\n  \"usage_based\": {\n    \"meter_value_calculation_id\": \"mvca_pwDeeN0vxxHxSHCa0d1I\",\n    \"conditions\": {\n      \"meter_properties\": [\n        {\n          \"id\": \"metp_fwDeeN0vxxHxQWCs9L1w\",\n          \"value\": \"lumen-4\",\n          \"comparator\": \"EQUALS\"\n        }\n      ]\n    }\n  },\n  \"tax_category\": \"STANDARD\",\n  \"unit_name\": {\n    \"singular\": \"token\",\n    \"plural\": \"tokens\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java ProductItems_postProductItems_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://test.api.solvimon.com/v1/product-items")
  .header("X-API-KEY", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"product_id\": \"prod_nwDeeN0vxxHxTtCv0Z1E\",\n  \"name\": \"lumen-4 output tokens\",\n  \"reference\": \"lumen_4_output_tokens\",\n  \"model_type\": \"USAGE_BASED\",\n  \"description\": \"Completion tokens generated by lumen-4\",\n  \"type\": \"REVENUE\",\n  \"usage_based\": {\n    \"meter_value_calculation_id\": \"mvca_pwDeeN0vxxHxSHCa0d1I\",\n    \"conditions\": {\n      \"meter_properties\": [\n        {\n          \"id\": \"metp_fwDeeN0vxxHxQWCs9L1w\",\n          \"value\": \"lumen-4\",\n          \"comparator\": \"EQUALS\"\n        }\n      ]\n    }\n  },\n  \"tax_category\": \"STANDARD\",\n  \"unit_name\": {\n    \"singular\": \"token\",\n    \"plural\": \"tokens\"\n  }\n}")
  .asString();
```

```php ProductItems_postProductItems_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://test.api.solvimon.com/v1/product-items', [
  'body' => '{
  "product_id": "prod_nwDeeN0vxxHxTtCv0Z1E",
  "name": "lumen-4 output tokens",
  "reference": "lumen_4_output_tokens",
  "model_type": "USAGE_BASED",
  "description": "Completion tokens generated by lumen-4",
  "type": "REVENUE",
  "usage_based": {
    "meter_value_calculation_id": "mvca_pwDeeN0vxxHxSHCa0d1I",
    "conditions": {
      "meter_properties": [
        {
          "id": "metp_fwDeeN0vxxHxQWCs9L1w",
          "value": "lumen-4",
          "comparator": "EQUALS"
        }
      ]
    }
  },
  "tax_category": "STANDARD",
  "unit_name": {
    "singular": "token",
    "plural": "tokens"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp ProductItems_postProductItems_example
using RestSharp;

var client = new RestClient("https://test.api.solvimon.com/v1/product-items");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-KEY", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"product_id\": \"prod_nwDeeN0vxxHxTtCv0Z1E\",\n  \"name\": \"lumen-4 output tokens\",\n  \"reference\": \"lumen_4_output_tokens\",\n  \"model_type\": \"USAGE_BASED\",\n  \"description\": \"Completion tokens generated by lumen-4\",\n  \"type\": \"REVENUE\",\n  \"usage_based\": {\n    \"meter_value_calculation_id\": \"mvca_pwDeeN0vxxHxSHCa0d1I\",\n    \"conditions\": {\n      \"meter_properties\": [\n        {\n          \"id\": \"metp_fwDeeN0vxxHxQWCs9L1w\",\n          \"value\": \"lumen-4\",\n          \"comparator\": \"EQUALS\"\n        }\n      ]\n    }\n  },\n  \"tax_category\": \"STANDARD\",\n  \"unit_name\": {\n    \"singular\": \"token\",\n    \"plural\": \"tokens\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ProductItems_postProductItems_example
import Foundation

let headers = [
  "X-API-KEY": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "product_id": "prod_nwDeeN0vxxHxTtCv0Z1E",
  "name": "lumen-4 output tokens",
  "reference": "lumen_4_output_tokens",
  "model_type": "USAGE_BASED",
  "description": "Completion tokens generated by lumen-4",
  "type": "REVENUE",
  "usage_based": [
    "meter_value_calculation_id": "mvca_pwDeeN0vxxHxSHCa0d1I",
    "conditions": ["meter_properties": [
        [
          "id": "metp_fwDeeN0vxxHxQWCs9L1w",
          "value": "lumen-4",
          "comparator": "EQUALS"
        ]
      ]]
  ],
  "tax_category": "STANDARD",
  "unit_name": [
    "singular": "token",
    "plural": "tokens"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://test.api.solvimon.com/v1/product-items")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```