Skip to main content
POST
/
v1
/
products
Create a product
curl --request POST \
  --url https://api.yorlet.com/v1/products \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "active": true,
  "description": "<string>",
  "metadata": {},
  "statement_descriptor": "<string>"
}
'
{
  "id": "<string>",
  "created": 123,
  "object": "product",
  "active": true,
  "default_price": "<string>",
  "description": "<string>",
  "name": "<string>",
  "statement_descriptor": "<string>",
  "account": "<string>",
  "deleted": false,
  "metadata": {}
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Body

application/json
name
string
required

The name of the product.

active
boolean

Whether the product is active.

default_price_data
object

The default price data for the product.

description
string

The description of the product.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

statement_descriptor
string

The statement descriptor for the product.

Response

200 - application/json

Returns the product object if the request succeeded.

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
product
active
boolean
required

Whether the product is active.

default_price
required

The default price for the product.

description
string | null
required

The description of the product.

name
string
required

The name of the product.

statement_descriptor
string | null
required

The statement descriptor for the product.

account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

metadata
object

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.