---
title: Create or update a plan catalog
slug: amberflo-api/create-or-update-a-plan-catalog
docTags: 
createdAt: 2024-11-07T15:10:16.977Z
---

{
  "id": "8LxfSi5kVKtvgedlcWm5m",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog"
      }
    ],
    "name": "Create or update a plan catalog",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "payment.pricing.plans.catalog.PlanCatalog.in",
          "schema": [
            {
              "name": "id",
              "kind": "optional",
              "type": "string",
              "description": "Unique id to identify a particular plan catalog",
              "example": ""
            },
            {
              "name": "planCatalogItems",
              "kind": "optional",
              "type": "array",
              "description": "List of plan catalog items",
              "modelRef": "#/components/schemas/payment.pricing.plans.catalog.PlanCatalogItem.in",
              "customType": "payment.pricing.plans.catalog.PlanCatalogItem.in[]",
              "schema": [
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "string",
                  "description": "Unique id to identify a particular plan catalog item",
                  "example": ""
                },
                {
                  "name": "planId",
                  "kind": "required",
                  "type": "string",
                  "description": "The product plan id associated with this plan catalog item",
                  "example": ""
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name given to the plan catalog item",
                  "example": ""
                },
                {
                  "name": "entitlements",
                  "kind": "required",
                  "type": "array",
                  "description": "Entitlements (such as services or resources) that are tied to this plan catalog item",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                },
                {
                  "name": "prepaidPaymentsOptions",
                  "kind": "required",
                  "type": "array",
                  "description": "Prepaid payment options that the customer may choose from",
                  "modelRef": "#/components/schemas/payment.pricing.plans.catalog.PrepaidPaymentOption.in",
                  "customType": "payment.pricing.plans.catalog.PrepaidPaymentOption.in[]",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "description": "Unique id associated to the prepaid payment option",
                      "example": ""
                    },
                    {
                      "name": "prepaidPromotionId",
                      "kind": "optional",
                      "type": "string",
                      "description": "The id of the prepaid promotion that this payment option uses",
                      "example": ""
                    },
                    {
                      "name": "price",
                      "kind": "required",
                      "type": "number",
                      "description": "Price associated with the prepaid payment option",
                      "example": ""
                    },
                    {
                      "name": "discountReflected",
                      "kind": "optional",
                      "type": "number",
                      "description": "The discount, if any, reflected for this prepaid payment option",
                      "example": ""
                    },
                    {
                      "name": "expirationInDays",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "description",
                      "kind": "optional",
                      "type": "string",
                      "description": "Optional description for the prepaid payment option",
                      "example": ""
                    },
                    {
                      "name": "futureMoney",
                      "kind": "optional",
                      "type": "number",
                      "description": "An optional value to indicate the worth associated with the prepaid payment option",
                      "example": ""
                    },
                    {
                      "name": "futureUsage",
                      "kind": "optional",
                      "type": "object",
                      "description": "An optional value to indicate the worth, in units of usage, associated with the prepaid payment option",
                      "modelRef": "#/components/schemas/payment.pricing.plans.catalog.FutureUsage.in",
                      "customType": "payment.pricing.plans.catalog.FutureUsage.in",
                      "schema": [
                        {
                          "name": "itemId",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        },
                        {
                          "name": "description",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "trialPeriodInDays",
                  "kind": "required",
                  "type": "number",
                  "description": "Denotes the trial period for this plan catalog item in days",
                  "example": ""
                },
                {
                  "name": "trialPeriodPlanId",
                  "kind": "optional",
                  "type": "string",
                  "description": "The promotion id that is tied to the trial period",
                  "example": ""
                },
                {
                  "name": "isDefault",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "Optional field to mark catalog item as default, false by default",
                  "example": ""
                },
                {
                  "name": "isCreditCardRequired",
                  "kind": "required",
                  "type": "boolean",
                  "description": "Field to indicate if credit card is required",
                  "example": ""
                }
              ]
            },
            {
              "name": "customPlanCatalogItems",
              "kind": "optional",
              "type": "array",
              "description": "List of custom plan catalog items, special offerings that are to be negotiated",
              "modelRef": "#/components/schemas/payment.pricing.plans.catalog.CustomPlanCatalogItem.in",
              "customType": "payment.pricing.plans.catalog.CustomPlanCatalogItem.in[]",
              "schema": [
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "string",
                  "description": "Unique id to identify a particular custom plan catalog item",
                  "example": ""
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name given to the custom plan catalog item",
                  "example": ""
                },
                {
                  "name": "entitlements",
                  "kind": "optional",
                  "type": "array",
                  "description": "Entitlements (such as services or resources) that are tied to this plan catalog item",
                  "example": "",
                  "itemType": "string",
                  "customType": "string[]",
                  "itemExample": "",
                  "itemDefault": ""
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/payment.pricing.plans.catalog.PlanCatalog.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "payment.pricing.plans.catalog.PlanCatalog.out",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "Unique id to identify a particular plan catalog",
                "example": ""
              },
              {
                "name": "planCatalogItems",
                "kind": "optional",
                "type": "array",
                "description": "List of plan catalog items",
                "modelRef": "#/components/schemas/payment.pricing.plans.catalog.PlanCatalogItem.out",
                "customType": "payment.pricing.plans.catalog.PlanCatalogItem.out[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique id to identify a particular plan catalog item",
                    "example": ""
                  },
                  {
                    "name": "planId",
                    "kind": "required",
                    "type": "string",
                    "description": "The product plan id associated with this plan catalog item",
                    "example": ""
                  },
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "Name given to the plan catalog item",
                    "example": ""
                  },
                  {
                    "name": "entitlements",
                    "kind": "required",
                    "type": "array",
                    "description": "Entitlements (such as services or resources) that are tied to this plan catalog item",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "prepaidPaymentsOptions",
                    "kind": "required",
                    "type": "array",
                    "description": "Prepaid payment options that the customer may choose from",
                    "modelRef": "#/components/schemas/payment.pricing.plans.catalog.PrepaidPaymentOption.out",
                    "customType": "payment.pricing.plans.catalog.PrepaidPaymentOption.out[]",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "Unique id associated to the prepaid payment option",
                        "example": ""
                      },
                      {
                        "name": "prepaidPromotionId",
                        "kind": "optional",
                        "type": "string",
                        "description": "The id of the prepaid promotion that this payment option uses",
                        "example": ""
                      },
                      {
                        "name": "price",
                        "kind": "required",
                        "type": "number",
                        "description": "Price associated with the prepaid payment option",
                        "example": ""
                      },
                      {
                        "name": "discountReflected",
                        "kind": "optional",
                        "type": "number",
                        "description": "The discount, if any, reflected for this prepaid payment option",
                        "example": ""
                      },
                      {
                        "name": "expirationInDays",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "description",
                        "kind": "optional",
                        "type": "string",
                        "description": "Optional description for the prepaid payment option",
                        "example": ""
                      },
                      {
                        "name": "futureMoney",
                        "kind": "optional",
                        "type": "number",
                        "description": "An optional value to indicate the worth associated with the prepaid payment option",
                        "example": ""
                      },
                      {
                        "name": "futureUsage",
                        "kind": "optional",
                        "type": "object",
                        "description": "An optional value to indicate the worth, in units of usage, associated with the prepaid payment option",
                        "modelRef": "#/components/schemas/payment.pricing.plans.catalog.FutureUsage.out",
                        "customType": "payment.pricing.plans.catalog.FutureUsage.out",
                        "schema": [
                          {
                            "name": "itemId",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          },
                          {
                            "name": "description",
                            "kind": "optional",
                            "type": "string",
                            "example": ""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "trialPeriodInDays",
                    "kind": "required",
                    "type": "number",
                    "description": "Denotes the trial period for this plan catalog item in days",
                    "example": ""
                  },
                  {
                    "name": "trialPeriodPlanId",
                    "kind": "optional",
                    "type": "string",
                    "description": "The promotion id that is tied to the trial period",
                    "example": ""
                  },
                  {
                    "name": "isDefault",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Optional field to mark catalog item as default, false by default",
                    "example": ""
                  },
                  {
                    "name": "isCreditCardRequired",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Field to indicate if credit card is required",
                    "example": ""
                  }
                ]
              },
              {
                "name": "customPlanCatalogItems",
                "kind": "optional",
                "type": "array",
                "description": "List of custom plan catalog items, special offerings that are to be negotiated",
                "modelRef": "#/components/schemas/payment.pricing.plans.catalog.CustomPlanCatalogItem.out",
                "customType": "payment.pricing.plans.catalog.CustomPlanCatalogItem.out[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique id to identify a particular custom plan catalog item",
                    "example": ""
                  },
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "Name given to the custom plan catalog item",
                    "example": ""
                  },
                  {
                    "name": "entitlements",
                    "kind": "optional",
                    "type": "array",
                    "description": "Entitlements (such as services or resources) that are tied to this plan catalog item",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/payment.pricing.plans.catalog.PlanCatalog.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "N98gziQazUI8GWaG6HguY",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"planCatalogItems\": [\n     {\n     \"planId\": \"\",\n     \"name\": \"\",\n     \"entitlements\": [],\n     \"prepaidPaymentsOptions\": [\n     {\n     \"price\": \"\"\n     }\n     ],\n     \"trialPeriodInDays\": \"\",\n     \"isCreditCardRequired\": \"\"\n     }\n     ],\n     \"customPlanCatalogItems\": [\n     {\n     \"name\": \"\"\n     }\n     ]\n     }'"
        },
        {
          "id": "DvkhPCZKi_uRW7rBHl8v4",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"planCatalogItems\": [\n      {\n         \"planId\": \"\",\n         \"name\": \"\",\n         \"entitlements\": [],\n         \"prepaidPaymentsOptions\": [\n            {\n               \"price\": \"\"\n            }\n         ],\n         \"trialPeriodInDays\": \"\",\n         \"isCreditCardRequired\": \"\"\n      }\n   ],\n   \"customPlanCatalogItems\": [\n      {\n         \"name\": \"\"\n      }\n   ]\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "gSI8-1g3lKPBUDEHNhIfV",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"planCatalogItems\": [\n      {\n         \"planId\": \"\",\n         \"name\": \"\",\n         \"entitlements\": [],\n         \"prepaidPaymentsOptions\": [\n            {\n               \"price\": \"\"\n            }\n         ],\n         \"trialPeriodInDays\": \"\",\n         \"isCreditCardRequired\": \"\"\n      }\n   ],\n   \"customPlanCatalogItems\": [\n      {\n         \"name\": \"\"\n      }\n   ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "4C_YG0Poa2OT9zM6izRAW",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog\"\n\npayload = json.dumps({\n   \"planCatalogItems\": [\n      {\n         \"planId\": \"\",\n         \"name\": \"\",\n         \"entitlements\": [],\n         \"prepaidPaymentsOptions\": [\n            {\n               \"price\": \"\"\n            }\n         ],\n         \"trialPeriodInDays\": \"\",\n         \"isCreditCardRequired\": \"\"\n      }\n   ],\n   \"customPlanCatalogItems\": [\n      {\n         \"name\": \"\"\n      }\n   ]\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "N98gziQazUI8GWaG6HguY"
    },
    "results": {
      "languages": [
        {
          "id": "JVbcnw3ml80z628dBntDr",
          "language": "200",
          "code": "// Successful request\n{\n  \"id\": \"\",\n  \"planCatalogItems\": [\n    {\n      \"id\": \"\",\n      \"planId\": \"\",\n      \"name\": \"\",\n      \"entitlements\": [\n        \"\"\n      ],\n      \"prepaidPaymentsOptions\": [\n        {\n          \"id\": \"\",\n          \"prepaidPromotionId\": \"\",\n          \"price\": 0,\n          \"discountReflected\": 0,\n          \"expirationInDays\": \"\",\n          \"description\": \"\",\n          \"futureMoney\": 0,\n          \"futureUsage\": {\n            \"itemId\": \"\",\n            \"description\": \"\"\n          }\n        }\n      ],\n      \"trialPeriodInDays\": 0,\n      \"trialPeriodPlanId\": \"\",\n      \"isDefault\": false,\n      \"isCreditCardRequired\": false\n    }\n  ],\n  \"customPlanCatalogItems\": [\n    {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"entitlements\": [\n        \"\"\n      ]\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "JVbcnw3ml80z628dBntDr"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}