Passer au contenu principal
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",
  "type": "flat_fee",
  "price_configurations": [
    {
      "currency": "EUR",
      "billing_interval": {
        "period": "once"
      },
      "type": "fee",
      "prices": [
        {
          "type": "fee",
          "amount": 123,
          "id": "<string>"
        }
      ],
      "country": "FR",
      "plan_id": "<string>",
      "commitment_interval": {
        "period": "all"
      }
    }
  ],
  "description": "Product internal description",
  "description_display_interval_dates": true,
  "public_description": "Product public description",
  "translations": {},
  "is_available_on_demand": true,
  "is_available_on_subscription": true,
  "custom_properties": {},
  "accounting": {}
}
'
{
  "id": "itm_3kXODDF42QXtnL",
  "name": "Product name",
  "status": "active",
  "description": "Product internal description",
  "description_display_interval_dates": true,
  "public_description": "Product public description",
  "translations": {},
  "properties": null,
  "custom_properties": {},
  "accounting": {},
  "type": "flat_fee",
  "is_available_on_demand": true,
  "is_available_on_subscription": true,
  "price_configurations": [
    {
      "id": "<string>",
      "product_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": "2023-12-25",
      "archived_at": "2023-12-25",
      "type": "fee",
      "prices": [
        {
          "type": "fee",
          "amount": 123,
          "id": "<string>"
        }
      ]
    }
  ]
}

Autorisations

Authorization
string
header
requis

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

Corps

application/json

Create product payload

name
string
requis

Product name.

Exemple:

"Product name"

type
enum<string>
requis

Product type for fixed fee products.

Options disponibles:
flat_fee
price_configurations
object[]
requis

Price configurations for the product.

description
string | null

Product description.

Exemple:

"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 | null

Public description of the product.

Exemple:

"Product public description"

translations
object

Product name and description translations.

is_available_on_demand
boolean
défaut:true
is_available_on_subscription
boolean
défaut: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.

Réponse

201 - application/json

The newly created product

id
string
requis

Product ID.

Exemple:

"itm_3kXODDF42QXtnL"

name
string
requis

Product name.

Exemple:

"Product name"

status
enum<string>
requis

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.
Options disponibles:
active,
archived
Exemple:

"active"

description
string | null
requis

Product description.

Exemple:

"Product internal description"

description_display_interval_dates
boolean
requis

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

public_description
string | null
requis

Public description of the product.

Exemple:

"Product public description"

translations
object
requis

Product name and description translations.

properties
object
requis

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

Exemple:

null

custom_properties
object
requis

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

accounting
object
requis

Mapping invoicing entity ID/accounting settings.

type
enum<string>
requis

Product type.

Options disponibles:
flat_fee
is_available_on_demand
boolean
requis
obsolète

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

Exemple:

true

is_available_on_subscription
boolean
requis
obsolète

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

Exemple:

true

price_configurations
object[]
requis