Line Items API - "One-time" Billing Frequency option invalid?

“One-time” is a Billing Frequency option for users when adding Line Items on the frontend:

However, one-time does not show up in the Properties view for Line Items:

I am trying to create line items on a deal using the Line Items API, but when I set Billing Frequency equal to “one_time”, I’m getting an error message in the API response of:

Invalid value ‘one_time’ for property ‘recurringbillingfrequency’"

Any ideas how to identify a Line Items billing frequency as “one_time” using API?

Hey, @DCombs :waving_hand: If we make a request to the Properties API for the Line Items object and the internal value of `recurringbillingfrequency` we get the following detail back —

description": "How often a line item with recurring billing is billed. It informs the pricing calculation for deals and quotes. Line items with one-time billing aren’t included."

Example:

Request

curl --request GET \
 --url 'https://api.hubapi.com/crm/v3/properties/line_items/recurringbillingfrequency?archived=false' \
 --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

Response

HTTP 200

{
 "updatedAt": "2023-10-24T19:45:52.858Z",
 "createdAt": "2019-08-06T02:42:39.570Z",
 "name": "recurringbillingfrequency",
 "label": "Billing frequency",
 "type": "enumeration",
 "fieldType": "select",
 "description": "How often a line item with recurring billing is billed. It informs the pricing calculation for deals and quotes. Line items with one-time billing aren’t included.",
 "groupName": "price",
 "options": [
 {
 "label": "Monthly",
 "value": "monthly",
 "description": "",
 "displayOrder": 0,
 "hidden": false
 },
 {
 "label": "Quarterly",
 "value": "quarterly",
 "description": "",
 "displayOrder": 1,
 "hidden": false
 },
 {
 "label": "Semi-annually",
 "value": "per_six_months",
 "description": "",
 "displayOrder": 2,
 "hidden": false
 },
 {
 "label": "Annually",
 "value": "annually",
 "description": "",
 "displayOrder": 3,
 "hidden": false
 },
 {
 "label": "Every two years",
 "value": "per_two_years",
 "description": "",
 "displayOrder": 4,
 "hidden": false
 },
 {
 "label": "Every three years",
 "value": "per_three_years",
 "description": "",
 "displayOrder": 5,
 "hidden": false
 },
 {
 "label": "Every four years",
 "value": "per_four_years",
 "displayOrder": 6,
 "hidden": false
 },
 {
 "label": "Every five years",
 "value": "per_five_years",
 "displayOrder": 7,
 "hidden": false
 }
 ],
 "displayOrder": -1,
 "calculated": false,
 "externalOptions": false,
 "hasUniqueValue": false,
 "hidden": false,
 "hubspotDefined": true,
 "showCurrencySymbol": false,
 "modificationMetadata": {
 "archivable": true,
 "readOnlyDefinition": true,
 "readOnlyValue": false
 },
 "formField": false,
 "dataSensitivity": "non_sensitive"
}

Question — Can you create a line item and associate it to a deal without including the property —`recurringbillingfrequency`?

Thanks for the additional details! — Jaycee

Thank you for this detailed feedback @Jaycee_Lewis!

I found that if I left the recurringbillingfrequency as blank in the API export, the Line Item defaulted to “One-time” in HubSpot. Not the exact behavior I would have expected, but it makes sense now and is working. Thanks again!

Thank you so much @DCombs for taking the time to loop back and let us know what worked! — Jaycee