curl --request POST \
--url https://app.flowglad.com/api/v1/pricing-models/setup \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"features": [
{
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"active": true
}
],
"products": [
{
"product": {
"name": "<string>",
"active": true,
"slug": "<string>",
"description": "<string>",
"imageURL": "<string>",
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"default": true
},
"price": {
"intervalUnit": "day",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"name": "<string>",
"trialPeriodDays": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"active": true,
"slug": "<string>",
"usageMeterId": "<unknown>",
"currency": "USD"
},
"features": [
"<string>"
]
}
],
"usageMeters": [
{
"name": "<string>",
"slug": "<string>",
"aggregationType": "sum"
}
],
"isDefault": false
}
'{
"pricingModel": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"isDefault": true,
"name": "<string>",
"products": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
],
"usageMeters": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum"
}
],
"defaultProduct": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
}
}curl --request POST \
--url https://app.flowglad.com/api/v1/pricing-models/setup \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"features": [
{
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"active": true
}
],
"products": [
{
"product": {
"name": "<string>",
"active": true,
"slug": "<string>",
"description": "<string>",
"imageURL": "<string>",
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"default": true
},
"price": {
"intervalUnit": "day",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"name": "<string>",
"trialPeriodDays": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"active": true,
"slug": "<string>",
"usageMeterId": "<unknown>",
"currency": "USD"
},
"features": [
"<string>"
]
}
],
"usageMeters": [
{
"name": "<string>",
"slug": "<string>",
"aggregationType": "sum"
}
],
"isDefault": false
}
'{
"pricingModel": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"isDefault": true,
"name": "<string>",
"products": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
],
"usageMeters": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"name": "<string>",
"pricingModelId": "<string>",
"slug": "<string>",
"aggregationType": "sum"
}
],
"defaultProduct": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"name": "<string>",
"description": "<string>",
"imageURL": "<string>",
"organizationId": "<string>",
"active": true,
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"pricingModelId": "<string>",
"default": true,
"slug": "<string>",
"prices": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
}
],
"defaultPrice": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"intervalUnit": "day",
"name": "<string>",
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": "<unknown>",
"productId": "<string>",
"active": true,
"currency": "USD",
"slug": "<string>",
"usageMeterId": "<unknown>",
"pricingModelId": "<string>",
"trialPeriodDays": 4503599627370495
},
"features": [
{
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"organizationId": "<string>",
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"pricingModelId": "<string>",
"active": true,
"amount": "<unknown>",
"usageMeterId": "<unknown>",
"renewalFrequency": "<unknown>"
}
]
}
}
}The name of the pricing model
1 - 255A feature that can be granted in a true / false boolean state. When granted to a customer, it will return true.
Show child attributes
Show child attributes
Show child attributes
Whether the pricingModel to be created will be the default pricingModel for all customers moving forward.
Successful response
Show child attributes
Was this page helpful?