From ecaf442a0f29a69eca4e4a250bab50d971c6f072 Mon Sep 17 00:00:00 2001 From: Kush <3647166+kushsharma@users.noreply.github.com> Date: Sun, 28 Apr 2024 20:18:08 +0530 Subject: [PATCH] docs: build latest (#598) Signed-off-by: Kush Sharma --- .../admin-service-delegated-checkout.api.mdx | 33 ++++++++++++-- ...-service-list-all-billing-accounts.api.mdx | 2 +- .../admin-service-list-all-invoices.api.mdx | 2 +- ...ontier-service-change-subscription.api.mdx | 2 +- ...ier-service-create-billing-account.api.mdx | 2 +- ...ier-service-create-billing-usage-2.api.mdx | 4 +- ...ntier-service-create-billing-usage.api.mdx | 4 +- .../frontier-service-create-checkout.api.mdx | 13 ++++-- .../frontier-service-create-feature.api.mdx | 2 +- .../apis/frontier-service-create-plan.api.mdx | 43 +++++++++++++++---- .../frontier-service-create-product.api.mdx | 39 ++++++++++++++--- ...ontier-service-get-billing-account.api.mdx | 2 +- ...ontier-service-get-billing-balance.api.mdx | 2 +- .../apis/frontier-service-get-feature.api.mdx | 2 +- .../apis/frontier-service-get-plan.api.mdx | 12 +++++- .../apis/frontier-service-get-product.api.mdx | 12 +++++- .../frontier-service-get-subscription.api.mdx | 12 +++++- ...ier-service-get-upcoming-invoice-2.api.mdx | 2 +- ...ntier-service-get-upcoming-invoice.api.mdx | 2 +- ...tier-service-list-billing-accounts.api.mdx | 2 +- ...-service-list-billing-transactions.api.mdx | 2 +- .../frontier-service-list-checkouts.api.mdx | 2 +- .../frontier-service-list-features.api.mdx | 2 +- .../frontier-service-list-invoices-2.api.mdx | 2 +- .../frontier-service-list-invoices.api.mdx | 2 +- .../apis/frontier-service-list-plans.api.mdx | 12 +++++- .../frontier-service-list-products.api.mdx | 12 +++++- ...rontier-service-list-subscriptions.api.mdx | 12 +++++- ...ier-service-update-billing-account.api.mdx | 2 +- .../frontier-service-update-feature.api.mdx | 2 +- .../apis/frontier-service-update-plan.api.mdx | 43 +++++++++++++++---- .../frontier-service-update-product.api.mdx | 39 ++++++++++++++--- ...ontier-service-update-subscription.api.mdx | 12 +++++- docs/docs/reference/api-auth.md | 35 ++++++++++++--- 34 files changed, 299 insertions(+), 74 deletions(-) diff --git a/docs/docs/apis/admin-service-delegated-checkout.api.mdx b/docs/docs/apis/admin-service-delegated-checkout.api.mdx index 7376815fe..b1f742db2 100644 --- a/docs/docs/apis/admin-service-delegated-checkout.api.mdx +++ b/docs/docs/apis/admin-service-delegated-checkout.api.mdx @@ -380,6 +380,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": @@ -564,6 +574,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": { "type": "object" }, @@ -812,7 +832,12 @@ api: { "title": "Product to buy", "type": "object", - "properties": { "product": { "type": "string" } }, + "properties": + { + "product": { "type": "string" }, + "quantity": + { "type": "string", "format": "int64" }, + }, }, }, }, @@ -852,7 +877,7 @@ api: "cancel_after_trial": true, "provider_coupon_id": "string", }, - "product_body": { "product": "string" }, + "product_body": { "product": "string", "quantity": "string" }, }, "info": { @@ -948,11 +973,11 @@ import TabItem from "@theme/TabItem"; Checkout a product to buy it one time or start a subscription plan on a billing account manually. It bypasses billing engine. -
Path Parameters
Request Body required
    subscription_body object
    product_body object
+
Path Parameters
Request Body required
    subscription_body object
    product_body object
A successful response. -
Schema
    subscription object
    phases object[]
  • Array [
  • ]
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
  • product object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
+
Schema
    subscription object
    phases object[]
  • Array [
  • ]
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
  • product object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/admin-service-list-all-billing-accounts.api.mdx b/docs/docs/apis/admin-service-list-all-billing-accounts.api.mdx index 575509fa6..34916c3ad 100644 --- a/docs/docs/apis/admin-service-list-all-billing-accounts.api.mdx +++ b/docs/docs/apis/admin-service-list-all-billing-accounts.api.mdx @@ -403,7 +403,7 @@ Lists all the billing accounts from all the organizations in a Frontier instance A successful response. -
Schema
    billing_accounts object[]
  • Array [
  • address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
+
Schema
    billing_accounts object[]
  • Array [
  • address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/admin-service-list-all-invoices.api.mdx b/docs/docs/apis/admin-service-list-all-invoices.api.mdx index 1897eb0f3..16f0eca49 100644 --- a/docs/docs/apis/admin-service-list-all-invoices.api.mdx +++ b/docs/docs/apis/admin-service-list-all-invoices.api.mdx @@ -462,7 +462,7 @@ Lists all the invoices from all the organizations in a Frontier instance. It can A successful response. -
Schema
    invoices object[]
  • Array [
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
+
Schema
    invoices object[]
  • Array [
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-change-subscription.api.mdx b/docs/docs/apis/frontier-service-change-subscription.api.mdx index 38a460aaf..12438fcdb 100644 --- a/docs/docs/apis/frontier-service-change-subscription.api.mdx +++ b/docs/docs/apis/frontier-service-change-subscription.api.mdx @@ -441,7 +441,7 @@ Change a subscription plan by ID. A successful response. -
Schema
    phase object
+
Schema
    phase object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-create-billing-account.api.mdx b/docs/docs/apis/frontier-service-create-billing-account.api.mdx index 6b4ddc6af..8771d0837 100644 --- a/docs/docs/apis/frontier-service-create-billing-account.api.mdx +++ b/docs/docs/apis/frontier-service-create-billing-account.api.mdx @@ -511,7 +511,7 @@ Billing account to create. A successful response. -
Schema
    billing_account object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
+
Schema
    billing_account object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-create-billing-usage-2.api.mdx b/docs/docs/apis/frontier-service-create-billing-usage-2.api.mdx index f4124f7f8..73c4f5910 100644 --- a/docs/docs/apis/frontier-service-create-billing-usage-2.api.mdx +++ b/docs/docs/apis/frontier-service-create-billing-usage-2.api.mdx @@ -312,8 +312,8 @@ api: "amount": "string", "user_id": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.103Z", - "updated_at": "2024-04-21T12:59:54.103Z", + "created_at": "2024-04-28T13:49:21.323Z", + "updated_at": "2024-04-28T13:49:21.323Z", }, ], }, diff --git a/docs/docs/apis/frontier-service-create-billing-usage.api.mdx b/docs/docs/apis/frontier-service-create-billing-usage.api.mdx index 24a845641..badd08965 100644 --- a/docs/docs/apis/frontier-service-create-billing-usage.api.mdx +++ b/docs/docs/apis/frontier-service-create-billing-usage.api.mdx @@ -320,8 +320,8 @@ api: "amount": "string", "user_id": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.103Z", - "updated_at": "2024-04-21T12:59:54.103Z", + "created_at": "2024-04-28T13:49:21.323Z", + "updated_at": "2024-04-28T13:49:21.323Z", }, ], }, diff --git a/docs/docs/apis/frontier-service-create-checkout.api.mdx b/docs/docs/apis/frontier-service-create-checkout.api.mdx index b3282c9bc..2f7edfcf4 100644 --- a/docs/docs/apis/frontier-service-create-checkout.api.mdx +++ b/docs/docs/apis/frontier-service-create-checkout.api.mdx @@ -289,7 +289,12 @@ api: { "title": "Product to buy", "type": "object", - "properties": { "product": { "type": "string" } }, + "properties": + { + "product": { "type": "string" }, + "quantity": + { "type": "string", "format": "int64" }, + }, }, "setup_body": { @@ -338,7 +343,7 @@ api: "cancel_after_trial": true, "provider_coupon_id": "string", }, - "product_body": { "product": "string" }, + "product_body": { "product": "string", "quantity": "string" }, "setup_body": { "payment_method": true }, }, "info": @@ -434,11 +439,11 @@ import TabItem from "@theme/TabItem"; Checkout a product to buy it one time or start a subscription plan on a billing account. -
Path Parameters
Request Body required
    subscription_body object
    product_body object
    setup_body object
+
Path Parameters
Request Body required
    subscription_body object
    product_body object
    setup_body object
A successful response. -
Schema
    checkout_session object
+
Schema
    checkout_session object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-create-feature.api.mdx b/docs/docs/apis/frontier-service-create-feature.api.mdx index 0f4027ca3..25dd5c266 100644 --- a/docs/docs/apis/frontier-service-create-feature.api.mdx +++ b/docs/docs/apis/frontier-service-create-feature.api.mdx @@ -386,7 +386,7 @@ Create a new feature for platform. A successful response. -
Schema
    feature object
+
Schema
    feature object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-create-plan.api.mdx b/docs/docs/apis/frontier-service-create-plan.api.mdx index 497b6d132..402b37939 100644 --- a/docs/docs/apis/frontier-service-create-plan.api.mdx +++ b/docs/docs/apis/frontier-service-create-plan.api.mdx @@ -197,6 +197,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": @@ -587,6 +597,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": { "type": "object" }, @@ -676,8 +696,8 @@ api: "metered_aggregate": "string", "tier_mode": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "behavior": "string", @@ -689,15 +709,20 @@ api: "product_ids": ["string"], "title": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "behavior_config": - { "credit_amount": "string", "seat_limit": "string" }, + { + "credit_amount": "string", + "seat_limit": "string", + "min_quantity": "string", + "max_quantity": "string", + }, "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "interval": "string", @@ -770,11 +795,11 @@ import TabItem from "@theme/TabItem"; Create a new plan for platform. -
Request Body required
    body object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
+
Request Body required
    body object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
A successful response. -
Schema
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
+
Schema
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-create-product.api.mdx b/docs/docs/apis/frontier-service-create-product.api.mdx index 433ce28ad..1f77a7d96 100644 --- a/docs/docs/apis/frontier-service-create-product.api.mdx +++ b/docs/docs/apis/frontier-service-create-product.api.mdx @@ -160,6 +160,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": { "type": "object" }, @@ -498,6 +508,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": { "type": "object" }, @@ -556,8 +576,8 @@ api: "metered_aggregate": "string", "tier_mode": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "behavior": "string", @@ -569,12 +589,17 @@ api: "product_ids": ["string"], "title": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "behavior_config": - { "credit_amount": "string", "seat_limit": "string" }, + { + "credit_amount": "string", + "seat_limit": "string", + "min_quantity": "string", + "max_quantity": "string", + }, "metadata": {}, }, }, @@ -642,11 +667,11 @@ import TabItem from "@theme/TabItem"; Create a new product for platform. -
Request Body required
    body object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
+
Request Body required
    body object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
A successful response. -
Schema
    product object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
+
Schema
    product object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-get-billing-account.api.mdx b/docs/docs/apis/frontier-service-get-billing-account.api.mdx index 7a2826d71..06b998831 100644 --- a/docs/docs/apis/frontier-service-get-billing-account.api.mdx +++ b/docs/docs/apis/frontier-service-get-billing-account.api.mdx @@ -478,7 +478,7 @@ Get a billing account by ID. A successful response. -
Schema
    billing_account object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    payment_methods object[]
  • Array [
  • ]
+
Schema
    billing_account object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    payment_methods object[]
  • Array [
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-get-billing-balance.api.mdx b/docs/docs/apis/frontier-service-get-billing-balance.api.mdx index afe88c9d7..9a8d40276 100644 --- a/docs/docs/apis/frontier-service-get-billing-balance.api.mdx +++ b/docs/docs/apis/frontier-service-get-billing-balance.api.mdx @@ -351,7 +351,7 @@ Get the balance of a billing account by ID. A successful response. -
Schema
    balance object
+
Schema
    balance object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-get-feature.api.mdx b/docs/docs/apis/frontier-service-get-feature.api.mdx index 9f602df18..4c67790f8 100644 --- a/docs/docs/apis/frontier-service-get-feature.api.mdx +++ b/docs/docs/apis/frontier-service-get-feature.api.mdx @@ -345,7 +345,7 @@ Get a feature by ID. A successful response. -
Schema
    feature object
+
Schema
    feature object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-get-plan.api.mdx b/docs/docs/apis/frontier-service-get-plan.api.mdx index 099cbfa8d..585dd5cf7 100644 --- a/docs/docs/apis/frontier-service-get-plan.api.mdx +++ b/docs/docs/apis/frontier-service-get-plan.api.mdx @@ -197,6 +197,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": @@ -522,7 +532,7 @@ Get a plan by ID. A successful response. -
Schema
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
+
Schema
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-get-product.api.mdx b/docs/docs/apis/frontier-service-get-product.api.mdx index 9d7822ab1..08698bf1c 100644 --- a/docs/docs/apis/frontier-service-get-product.api.mdx +++ b/docs/docs/apis/frontier-service-get-product.api.mdx @@ -160,6 +160,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": { "type": "object" }, @@ -462,7 +472,7 @@ Get a product by ID. A successful response. -
Schema
    product object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
+
Schema
    product object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-get-subscription.api.mdx b/docs/docs/apis/frontier-service-get-subscription.api.mdx index 600c7fc4e..bb3c73efd 100644 --- a/docs/docs/apis/frontier-service-get-subscription.api.mdx +++ b/docs/docs/apis/frontier-service-get-subscription.api.mdx @@ -379,6 +379,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": @@ -761,7 +771,7 @@ Get a subscription by ID. A successful response. -
Schema
    subscription object
    phases object[]
  • Array [
  • ]
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
+
Schema
    subscription object
    phases object[]
  • Array [
  • ]
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-get-upcoming-invoice-2.api.mdx b/docs/docs/apis/frontier-service-get-upcoming-invoice-2.api.mdx index a0877a198..c227def34 100644 --- a/docs/docs/apis/frontier-service-get-upcoming-invoice-2.api.mdx +++ b/docs/docs/apis/frontier-service-get-upcoming-invoice-2.api.mdx @@ -488,7 +488,7 @@ Get the upcoming invoice of a billing account. A successful response. -
Schema
    invoice object
    customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
+
Schema
    invoice object
    customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-get-upcoming-invoice.api.mdx b/docs/docs/apis/frontier-service-get-upcoming-invoice.api.mdx index 54a8fc03a..02b0dd063 100644 --- a/docs/docs/apis/frontier-service-get-upcoming-invoice.api.mdx +++ b/docs/docs/apis/frontier-service-get-upcoming-invoice.api.mdx @@ -488,7 +488,7 @@ Get the upcoming invoice of a billing account. A successful response. -
Schema
    invoice object
    customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
+
Schema
    invoice object
    customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-list-billing-accounts.api.mdx b/docs/docs/apis/frontier-service-list-billing-accounts.api.mdx index e3b0acd1e..590afa023 100644 --- a/docs/docs/apis/frontier-service-list-billing-accounts.api.mdx +++ b/docs/docs/apis/frontier-service-list-billing-accounts.api.mdx @@ -425,7 +425,7 @@ List billing accounts of an organization. A successful response. -
Schema
    billing_accounts object[]
  • Array [
  • address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
+
Schema
    billing_accounts object[]
  • Array [
  • address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-list-billing-transactions.api.mdx b/docs/docs/apis/frontier-service-list-billing-transactions.api.mdx index 8479ea150..cb231c351 100644 --- a/docs/docs/apis/frontier-service-list-billing-transactions.api.mdx +++ b/docs/docs/apis/frontier-service-list-billing-transactions.api.mdx @@ -557,7 +557,7 @@ List all transactions of a billing account. A successful response. -
Schema
    transactions object[]
  • Array [
  • user object
    customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
+
Schema
    transactions object[]
  • Array [
  • user object
    customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-list-checkouts.api.mdx b/docs/docs/apis/frontier-service-list-checkouts.api.mdx index 576256aaa..3cf6a451d 100644 --- a/docs/docs/apis/frontier-service-list-checkouts.api.mdx +++ b/docs/docs/apis/frontier-service-list-checkouts.api.mdx @@ -370,7 +370,7 @@ List all checkouts of a billing account. A successful response. -
Schema
    checkout_sessions object[]
  • Array [
  • ]
+
Schema
    checkout_sessions object[]
  • Array [
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-list-features.api.mdx b/docs/docs/apis/frontier-service-list-features.api.mdx index 239d54013..4758a40a1 100644 --- a/docs/docs/apis/frontier-service-list-features.api.mdx +++ b/docs/docs/apis/frontier-service-list-features.api.mdx @@ -324,7 +324,7 @@ List all features A successful response. -
Schema
    features object[]
  • Array [
  • ]
+
Schema
    features object[]
  • Array [
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-list-invoices-2.api.mdx b/docs/docs/apis/frontier-service-list-invoices-2.api.mdx index 90c34d92c..21e0302bd 100644 --- a/docs/docs/apis/frontier-service-list-invoices-2.api.mdx +++ b/docs/docs/apis/frontier-service-list-invoices-2.api.mdx @@ -512,7 +512,7 @@ List all invoices of a billing account. A successful response. -
Schema
    invoices object[]
  • Array [
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
+
Schema
    invoices object[]
  • Array [
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-list-invoices.api.mdx b/docs/docs/apis/frontier-service-list-invoices.api.mdx index 91896b177..0213d92cc 100644 --- a/docs/docs/apis/frontier-service-list-invoices.api.mdx +++ b/docs/docs/apis/frontier-service-list-invoices.api.mdx @@ -520,7 +520,7 @@ List all invoices of a billing account. A successful response. -
Schema
    invoices object[]
  • Array [
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
+
Schema
    invoices object[]
  • Array [
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-list-plans.api.mdx b/docs/docs/apis/frontier-service-list-plans.api.mdx index 186db7694..e73b73299 100644 --- a/docs/docs/apis/frontier-service-list-plans.api.mdx +++ b/docs/docs/apis/frontier-service-list-plans.api.mdx @@ -202,6 +202,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": @@ -512,7 +522,7 @@ List all plans. A successful response. -
Schema
    plans object[]
  • Array [
  • products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
  • ]
+
Schema
    plans object[]
  • Array [
  • products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-list-products.api.mdx b/docs/docs/apis/frontier-service-list-products.api.mdx index 063fc5db9..eea84afc3 100644 --- a/docs/docs/apis/frontier-service-list-products.api.mdx +++ b/docs/docs/apis/frontier-service-list-products.api.mdx @@ -164,6 +164,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": { "type": "object" }, @@ -448,7 +458,7 @@ List all products of a platform. A successful response. -
Schema
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
+
Schema
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-list-subscriptions.api.mdx b/docs/docs/apis/frontier-service-list-subscriptions.api.mdx index bbc64869b..fd49a0de6 100644 --- a/docs/docs/apis/frontier-service-list-subscriptions.api.mdx +++ b/docs/docs/apis/frontier-service-list-subscriptions.api.mdx @@ -401,6 +401,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": @@ -799,7 +809,7 @@ List subscriptions of a billing account. A successful response. -
Schema
    subscriptions object[]
  • Array [
  • phases object[]
  • Array [
  • ]
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
  • ]
+
Schema
    subscriptions object[]
  • Array [
  • phases object[]
  • Array [
  • ]
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-update-billing-account.api.mdx b/docs/docs/apis/frontier-service-update-billing-account.api.mdx index 9a501a408..aa5adeedd 100644 --- a/docs/docs/apis/frontier-service-update-billing-account.api.mdx +++ b/docs/docs/apis/frontier-service-update-billing-account.api.mdx @@ -525,7 +525,7 @@ Billing account to update. A successful response. -
Schema
    billing_account object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
+
Schema
    billing_account object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-update-feature.api.mdx b/docs/docs/apis/frontier-service-update-feature.api.mdx index f7d103c6e..b129b4f54 100644 --- a/docs/docs/apis/frontier-service-update-feature.api.mdx +++ b/docs/docs/apis/frontier-service-update-feature.api.mdx @@ -406,7 +406,7 @@ Update a feature by ID. A successful response. -
Schema
    feature object
+
Schema
    feature object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-update-plan.api.mdx b/docs/docs/apis/frontier-service-update-plan.api.mdx index 55d606f17..0d420bad2 100644 --- a/docs/docs/apis/frontier-service-update-plan.api.mdx +++ b/docs/docs/apis/frontier-service-update-plan.api.mdx @@ -197,6 +197,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": @@ -597,6 +607,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": { "type": "object" }, @@ -686,8 +706,8 @@ api: "metered_aggregate": "string", "tier_mode": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "behavior": "string", @@ -699,15 +719,20 @@ api: "product_ids": ["string"], "title": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "behavior_config": - { "credit_amount": "string", "seat_limit": "string" }, + { + "credit_amount": "string", + "seat_limit": "string", + "min_quantity": "string", + "max_quantity": "string", + }, "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "interval": "string", @@ -790,11 +815,11 @@ import TabItem from "@theme/TabItem"; Update a plan by ID. -
Path Parameters
Request Body required
    body object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
+
Path Parameters
Request Body required
    body object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
A successful response. -
Schema
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
+
Schema
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-update-product.api.mdx b/docs/docs/apis/frontier-service-update-product.api.mdx index 9b8dfa005..73195add9 100644 --- a/docs/docs/apis/frontier-service-update-product.api.mdx +++ b/docs/docs/apis/frontier-service-update-product.api.mdx @@ -160,6 +160,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": { "type": "object" }, @@ -508,6 +518,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": { "type": "object" }, @@ -566,8 +586,8 @@ api: "metered_aggregate": "string", "tier_mode": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "behavior": "string", @@ -579,12 +599,17 @@ api: "product_ids": ["string"], "title": "string", "metadata": {}, - "created_at": "2024-04-21T12:59:54.102Z", - "updated_at": "2024-04-21T12:59:54.102Z", + "created_at": "2024-04-28T13:49:21.322Z", + "updated_at": "2024-04-28T13:49:21.322Z", }, ], "behavior_config": - { "credit_amount": "string", "seat_limit": "string" }, + { + "credit_amount": "string", + "seat_limit": "string", + "min_quantity": "string", + "max_quantity": "string", + }, "metadata": {}, }, }, @@ -662,11 +687,11 @@ import TabItem from "@theme/TabItem"; Update a product by ID. -
Path Parameters
Request Body required
    body object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
+
Path Parameters
Request Body required
    body object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
A successful response. -
Schema
    product object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
+
Schema
    product object
    prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/apis/frontier-service-update-subscription.api.mdx b/docs/docs/apis/frontier-service-update-subscription.api.mdx index 74b2dcbf1..6f7bb32bd 100644 --- a/docs/docs/apis/frontier-service-update-subscription.api.mdx +++ b/docs/docs/apis/frontier-service-update-subscription.api.mdx @@ -379,6 +379,16 @@ api: "type": "string", "format": "int64", }, + "min_quantity": + { + "type": "string", + "format": "int64", + }, + "max_quantity": + { + "type": "string", + "format": "int64", + }, }, }, "metadata": @@ -781,7 +791,7 @@ Update a subscription by ID. A successful response. -
Schema
    subscription object
    phases object[]
  • Array [
  • ]
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
+
Schema
    subscription object
    phases object[]
  • Array [
  • ]
  • customer object
    address object
    tax_data object[]
  • Array [
  • ]
  • organization object
    plan object
    products object[]
  • Array [
  • prices object[]
  • Array [
  • ]
  • features object[]
  • Array [
  • ]
  • behavior_config object
  • ]
Bad Request - The request was malformed or contained invalid parameters. diff --git a/docs/docs/reference/api-auth.md b/docs/docs/reference/api-auth.md index 0eca453f9..d72a0b558 100644 --- a/docs/docs/reference/api-auth.md +++ b/docs/docs/reference/api-auth.md @@ -4,7 +4,26 @@ import CodeBlock from '@theme/CodeBlock'; # Authorization for APIs -Client ID and Secret or Access Tokens are used to authorize privileged actions one can take on Frontier APIs. It ensures that the action being performed in a Frontier instance is by a user is already authenticated for it's identity in Frontier and these actions are executed only when the user holds valid permissions to do so. +There are 3 ways to authenticate in Frontier via APIs +1. API Token +2. Client Credentials +3. JWK Token + +## API Token + +API Token is a long-lived token that can be used to authenticate requests to Frontier APIs. +1. Create a service account inside an organization using [Create Service User](../apis/frontier-service-create-service-user.api.mdx) API +2. Create the token using [Create Service User Token](../apis/frontier-service-create-service-user-token.api.mdx) API + +:::caution +The client secret you have created is never persisted in the database and will only be displayed once. If you happen to lose the secret, you will need to generate a new one. It is crucial to save the client secret before closing the response. +::: + +Use the generated value in header for subsequent requests. + +``` +Authorization: "Basic " + base64( client_id + ":" + client_token ) +``` ## Client ID and Secret @@ -14,10 +33,16 @@ When using client id and secret on token or introspection endpoints, provide an Authorization: "Basic " + base64( client_id + ":" + client_secret ) ``` +Using this header on AuthToken(/v1beta1/auth/token) endpoint will provide a short-lived access token which should be used in the Authorization header for further requests. + +``` +Authorization: "Bearer " + +``` + #### Creating a client id and secret 1. Create a service account inside an organization using [Create Service User](../apis/frontier-service-create-service-user.api.mdx) API -2. Create the secret using [Create Service User Secret](../apis/frontier-service-create-service-user-secret) API +2. Create the secret using [Create Service User Secret](../apis/frontier-service-create-service-user-credential.api.mdx) API :::caution The client secret you have created is never persisted in the database and will only be displayed once. If you happen to lose the secret, you will need to generate a new one. It is crucial to save the client secret before closing the response. @@ -42,15 +67,15 @@ One can use this token as the Bearer token in Authorization headers. #### Creating JWT token from Private Keys for a service user 1. Create a service account inside an organization using [Create Service User](../apis/frontier-service-create-service-user.api.mdx) API -2. Create using [Create Service User Keys](../apis/frontier-service-create-service-user-key) API +2. Create using [Create Service User Keys](../apis/frontier-service-create-service-user-jwk.api.mdx) API :::caution -The private key you created never persists in Frontier and is only returned once. If you lose the private key, you will have to generate a new one. Public keys for a service user can be retrieved using [**this**](../apis/frontier-service-get-service-user-key) API +The private key you created never persists in Frontier and is only returned once. If you lose the private key, you will have to generate a new one. Public keys for a service user can be retrieved using [**this**](../apis/frontier-service-get-service-user-jwk.api.mdx) API ::: 3. Refer [frontier-go](https://github.com/raystack/frontier-go/blob/01b6fc925b355e69d79fcde66e1f6bb5bfd475ab/pkg/serviceuser.go) to see a Golang implementation to get a JWT token from private key using various libraries. This JWT token can be used in headers for user verification. -4. Alternatively, Frontier also exposes a [Create Access Token](../apis/frontier-service-auth-token) API from Client ID and Secret. Use the access token returned from the API response in the headers for authentication as discussed above. +4. Alternatively, Frontier also exposes a [Create Access Token](../apis/frontier-service-auth-token.api.mdx) API from Client ID and Secret. Use the access token returned from the API response in the headers for authentication as discussed above. ---