AlphaCount Developers
API referenceProducts

Create or update a product (building block)

PUT
/products/by-ref/{source}/{external_ref}

Creates or updates a product by your reference: name, net unit price, VAT rate and how it is priced and billed — flat, per unit, tiered (volume or graduated) or by package; one-off or per month, quarter or year; in advance or in arrears; with an optional quota and an overage price. Invoice lines and contract items can then name it. An unsuitable combination is refused with a pricing.* code. Scope partner:products:write.

Authorization

apiKey partner:products:write
headerAuthorizationBearer <ab_…>

An API key from Integrations → Connect AI assistants (MCP) → New access, bound to exactly one company. Each operation names the scope the key must carry.

Scope: partner:products:write

Path Parameters

source*Source
Match^[a-z0-9][a-z0-9_-]{0,49}$
external_ref*External Ref
Match^[A-Za-z0-9][A-Za-z0-9._:@+-]{0,254}$

Header Parameters

AlphaCount-Version?string

The API version to use. Default: the current one.

Request Body

application/json
  1. body

PUT /products/by-ref/{source}/{external_ref}. Replaces the fields listed here; the article number is AlphaCount's (given on create, else assigned).

article_number?|null
billing_interval?Billing Interval
Default"one_off"
Value in"one_off""month""quarter""year"
billing_timing?Billing Timing
Default"advance"
Value in"advance""arrears"
included_quantity?||null
kind?Kind
Default"service"
Value in"base_fee""seats""usage""credits""sla""service"
name*Name
Length1 <= length <= 255
overage_unit_price?|null
price_tiers?array<>|null
pricing_model?Pricing Model
Default"per_unit"
Value in"flat""per_unit""tiered_volume""tiered_graduated""package"
unit?|null
unit_price_net*Unit Price Net
Match^\d{1,9}(\.\d{1,4})?$
vat_rate*Vat Rate
Value in0719

Response Body

OK

application/json
  1. response
article_number*Article Number

Article number in the company's books.

billing_interval*|null
billing_timing*|null
external_ref*string|null
external_source*string|null
id*Id
included_quantity*|

Quota per period; for package, the package size.

kind*|null
name*Name
overage_unit_price*|

Price per unit above the quota.

price_tiers*array<>|null
pricing_model*|null
revenue_account*|

Revenue account the lines of this product are booked to.

unit*string|null
unit_price_net*|

Price of one unit (of the whole block for flat, of one package for package).

vat_rate*Vat Rate
Example Request
curl -X PUT 'https://app.alphacount.ai/api/partner/v1/products/by-ref/string/string' \  -H 'Authorization: Bearer ab_...' \  -H 'Content-Type: application/json' \  -d '{  "billing_interval": "month",  "billing_timing": "arrears",  "kind": "usage",  "name": "1 Mio. Token",  "pricing_model": "per_unit",  "unit": "Paket",  "unit_price_net": "40.00",  "vat_rate": 19}'
Example Response
{  "article_number": "ART-0001",  "billing_interval": "month",  "billing_timing": "arrears",  "external_ref": "tokens-1m",  "external_source": "alphalearn",  "id": "00000000-0000-4000-8000-000000000001",  "included_quantity": null,  "kind": "usage",  "name": "1 Mio. Token",  "overage_unit_price": null,  "price_tiers": null,  "pricing_model": "per_unit",  "revenue_account": null,  "unit": "Paket",  "unit_price_net": "40.00",  "vat_rate": 19}