POST
/
v1
/
products
Create product
curl --request POST \
  --url https://api.hyperline.co/v1/products \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Product name",
  "description": "Product internal description",
  "description_display_interval_dates": true,
  "public_description": "Product public description",
  "translations": {
    "fr": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "en": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "de": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "it": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "nl": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "es": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "pt": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "pl": {
      "name": "<string>",
      "public_description": "<string>"
    }
  },
  "is_available_on_demand": true,
  "is_available_on_subscription": true,
  "custom_properties": {},
  "accounting": {},
  "type": "flat_fee",
  "price_configurations": [
    {
      "currency": "EUR",
      "country": "FR",
      "plan_id": "<string>",
      "billing_interval": {
        "period": "once"
      },
      "commitment_interval": {
        "period": "all"
      },
      "type": "fee",
      "prices": [
        {
          "type": "fee",
          "id": "<string>",
          "amount": 123
        }
      ]
    }
  ]
}'
{
  "id": "itm_3kXODDF42QXtnL",
  "name": "Product name",
  "status": "active",
  "description": "Product internal description",
  "description_display_interval_dates": true,
  "public_description": "Product public description",
  "translations": {
    "fr": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "en": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "de": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "it": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "nl": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "es": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "pt": {
      "name": "<string>",
      "public_description": "<string>"
    },
    "pl": {
      "name": "<string>",
      "public_description": "<string>"
    }
  },
  "properties": {},
  "custom_properties": {},
  "accounting": {},
  "type": "flat_fee",
  "is_available_on_demand": true,
  "is_available_on_subscription": true,
  "price_configurations": [
    {
      "id": "<string>",
      "price_book_id": "<string>",
      "status": "active",
      "currency": "EUR",
      "country": "FR",
      "plan_id": "<string>",
      "billing_interval": {
        "period": "once"
      },
      "commitment_interval": {
        "period": "all"
      },
      "updated_at": "<string>",
      "archived_at": "<string>",
      "type": "fee",
      "prices": [
        {
          "type": "fee",
          "id": "<string>",
          "amount": 123
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Create product payload

name
string
required

Product name.

Example:

"Product name"

type
enum<string>
required
Available options:
flat_fee
price_configurations
object[]
required
description
string

Product description.

Example:

"Product internal description"

description_display_interval_dates
boolean

Indicates if the dates of the interval should be automatically added in the product description on the invoices.

public_description
string

Public description of the product.

Example:

"Product public description"

translations
object | null

Product name and description translations.

is_available_on_demand
boolean
default:true
is_available_on_subscription
boolean
default:true
custom_properties
object

A list of key value with the slug of the custom property as the key and the custom property value as value.

accounting
object

Mapping invoicing entity ID/accounting settings.

Response

201 - application/json

The newly created product

id
string
required

Product ID.

Example:

"itm_3kXODDF42QXtnL"

name
string
required

Product name.

Example:

"Product name"

status
enum<string>
required

Product status.

  • active: The product is active and can be used in new quotes/subscriptions/invoices.
  • archived: The product is archived and can't be used anymore.
Available options:
active,
archived
Example:

"active"

description
string | null
required

Product description.

Example:

"Product internal description"

description_display_interval_dates
boolean
required

Indicates if the dates of the interval should be automatically added in the product description on the invoices.

public_description
string | null
required

Public description of the product.

Example:

"Product public description"

translations
object | null
required

Product name and description translations.

properties
object | null
required

Key/value pairs to store any metadata useful in your context.

custom_properties
object
required

A list of key value with the slug of the custom property as the key and the custom property value as value.

accounting
object
required

Mapping invoicing entity ID/accounting settings.

type
enum<string>
required

Product type.

Available options:
flat_fee
is_available_on_demand
boolean
required
deprecated

Enable the product to be billed at any time as a one-time payment.

Example:

true

is_available_on_subscription
boolean
required
deprecated

Enable the product to be added as part of a subscription.

Example:

true

price_configurations
object[]
required