Create a service
curl --request POST \ --url https://example.com/api/v1/services \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "baseHourlyRate": 1, "classKind": "FIXED_TEAM", "classTeamId": "example", "currency": "USD", "description": "example", "imageUrl": "https://example.com", "intakeFormId": "example", "isRecurring": false, "metadata": { "additionalProperty": "example" }, "name": "example", "orderTypeId": "example", "periodMonths": 1, "periodRule": "RECURRING", "pricing": { "hours": null, "mode": "single", "rate": 1 }, "recurringInterval": "WEEKLY", "recurringIntervalCount": 1, "revenueAccountId": "example", "reviewReminderDays": 1, "showInPortal": true, "subscriptionTermMonths": 1, "trialDurationDays": 1, "trialRate": 1 }'Creates a catalog service with a single price or a list of pricing options. A trial requires a recurring, single-price service, and intakeFormId must name a non-archived SERVICE_INTAKE order form. revenueAccountId must name an active revenue account, orderTypeId an active order type of the workspace that an invoice can open and classKind FIXED_TEAM a team of the workspace; a periodRule left out defaults from the recurrence and the hours of the prices. A recurring service left without subscriptionTermMonths or reviewReminderDays gets a 12-month term and a 30-day review reminder. Requires the invoices.manage permission; setting revenueAccountId or the class rule also needs accounting.manage (403 otherwise).
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
FIXED_TEAM needs classTeamId; COMPANY_TEAM stores no team; null clears the rule. A change needs the accounting.manage permission, which by default the Owner and Admin roles hold.
What fills the class of a line booked to the account: FIXED_TEAM is one team, COMPANY_TEAM is the team the company has in force on the invoice date.
RECURRING needs a recurring service. A create that leaves it out defaults to RECURRING for a recurring service, FIXED_MONTHS 12 for one-off services whose prices carry hours, and MANUAL otherwise.
How the service period of an invoice line is computed: RECURRING is one renewal interval from the invoice date, FIXED_MONTHS is periodMonths months from it, and MANUAL leaves the dates to the person invoicing.
single sets one price; options replaces the pricing options with this list, in display order. An update drops options it omits, disabling those a submission already references.
An active revenue account of the same workspace the service books to; null clears it. Choosing a new account fills the class rule from the account’s default unless the service holds a rule of its own. A change needs the accounting.manage permission, which by default the Owner and Admin roles hold.
Recurring services only: days, 1 to 365, before the term ends (or each anniversary when it runs until canceled) that the order’s responsibles and the admins get a SUBSCRIPTION_REVIEW_DUE notification; null turns the reminder off. A new recurring service that leaves it out gets 30.
Responses
Section titled “Responses”The created service.
object
A workspace service-catalog entry.
object
Standard hourly rate hour packages are priced at, in the service currency; null when not set.
The fixed class team; null unless classKind is FIXED_TEAM.
Hours the single price includes; null in options mode.
The SERVICE_INTAKE order form a buyer fills in after purchase; null when the service asks for nothing.
False when the service is archived.
The order type an invoice line of this service opens; null leaves the type to be chosen on the invoice, from the hours the service sells.
How a line’s service period is computed; null when no rule is set.
How the service period of an invoice line is computed: RECURRING is one renewal interval from the invoice date, FIXED_MONTHS is periodMonths months from it, and MANUAL leaves the dates to the person invoicing.
single sells one price (rate); options sells one of pricingOptions.
Every option by position, disabled ones included; empty in single mode.
A purchasable pricing option of a service.
object
Hours the option includes, when hour-bound.
Disabled options are not offered to buyers.
Price of the option in the service currency.
Price / hours rounded to cents; null when the option has no hours.
Single price in the service currency; null in options mode.
The revenue account the service books to; null when none is set.
Listed in the client portal; hidden services still sell on forms.
Example
{ "data": { "classKind": "FIXED_TEAM", "periodRule": "RECURRING", "pricingMode": "single", "recurringInterval": "WEEKLY" }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Invalid input, with field-level messages.
Error envelope with field-level messages.
object
object
Stable machine-readable error code.
Message per offending field; a list item is keyed <field>.<index>.<key>.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC