---
title: Create an invoice in Netsuite
slug: amberflo-api/create-an-invoice-in-netsuite
docTags: 
createdAt: 2024-11-07T15:10:16.980Z
---

{
  "id": "fUkR0bmvMZwej2YvbjeHG",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/integration/billing/netsuite/create-invoice",
    "servers": [
      {
        "url": "https://app.amberflo.io/integration/billing/netsuite/create-invoice"
      }
    ],
    "name": "Create an invoice in Netsuite",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "com.amberflo.integration.billing.netsuite.NetsuiteCreateInvoiceRequest.in",
          "schema": [
            {
              "name": "integrationSettings",
              "kind": "required",
              "type": "object",
              "description": "The integration setting which contains the Netsuite access token",
              "modelRef": "#/components/schemas/payment.payment.AccountIntegrationSettings.in",
              "customType": "payment.payment.AccountIntegrationSettings.in",
              "schema": [
                {
                  "name": "accountId",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "id",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "createdTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "updatedTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "type",
                  "kind": "required",
                  "type": "string",
                  "description": "Indicates the specific integration. Ex: STRIPE",
                  "example": ""
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Name for the integration settings",
                  "example": ""
                },
                {
                  "name": "description",
                  "kind": "optional",
                  "type": "string",
                  "description": "Optional description for the integration settings",
                  "example": ""
                },
                {
                  "name": "settings",
                  "kind": "required",
                  "type": "map",
                  "description": "Settings specific to the integration",
                  "example": "",
                  "customType": "map<string, string>",
                  "schema": []
                }
              ]
            },
            {
              "name": "detailedInvoice",
              "kind": "required",
              "type": "object",
              "description": "The invoice to send to Netsuite",
              "modelRef": "#/components/schemas/payment.billing.detailed.DetailedCustomerProductInvoice.in",
              "customType": "payment.billing.detailed.DetailedCustomerProductInvoice.in",
              "schema": [
                {
                  "name": "invoiceUri",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "uuid",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "invoiceKey",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.CustomerProductInvoiceKey.in",
                  "customType": "payment.billing.CustomerProductInvoiceKey.in",
                  "schema": [
                    {
                      "name": "accountId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "customerId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "productId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "productPlanId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "year",
                      "kind": "optional",
                      "type": "integer<int32>",
                      "example": 0
                    },
                    {
                      "name": "month",
                      "kind": "optional",
                      "type": "integer<int32>",
                      "example": 0
                    },
                    {
                      "name": "day",
                      "kind": "optional",
                      "type": "integer<int32>",
                      "example": 0
                    }
                  ]
                },
                {
                  "name": "planBillingPeriod",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.BillingPeriod.in",
                  "customType": "payment.pricing.BillingPeriod.in",
                  "schema": [
                    {
                      "name": "interval",
                      "kind": "optional",
                      "type": "string",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.pricing.BillingPeriodInterval.in",
                      "customType": "payment.pricing.BillingPeriodInterval.in",
                      "schema": []
                    },
                    {
                      "name": "intervalsCount",
                      "kind": "optional",
                      "type": "integer<int32>",
                      "example": 0
                    }
                  ]
                },
                {
                  "name": "planName",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "invoiceStartTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "invoiceEndTimeInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "gracePeriodInHours",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "example": 0
                },
                {
                  "name": "productItemInvoices",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.detailed.DetailedCustomerProductItemInvoice.in",
                  "customType": "payment.billing.detailed.DetailedCustomerProductItemInvoice.in[]",
                  "schema": [
                    {
                      "name": "key",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.CustomerProductItemInvoiceKey.in",
                      "customType": "payment.billing.CustomerProductItemInvoiceKey.in",
                      "schema": [
                        {
                          "name": "accountId",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        },
                        {
                          "name": "customerId",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        },
                        {
                          "name": "productId",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        },
                        {
                          "name": "productPlanId",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        },
                        {
                          "name": "year",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "example": 0
                        },
                        {
                          "name": "month",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "example": 0
                        },
                        {
                          "name": "day",
                          "kind": "optional",
                          "type": "integer<int32>",
                          "example": 0
                        },
                        {
                          "name": "productItemKey",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        }
                      ]
                    },
                    {
                      "name": "productItemId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "productItemName",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "meterApiName",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "productPlanName",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "productItemInvoiceLabel",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "scalar",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "productItemVariants",
                      "kind": "optional",
                      "type": "array",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.detailed.DetailedProductItemVariantInvoice.in",
                      "customType": "payment.billing.detailed.DetailedProductItemVariantInvoice.in[]",
                      "schema": [
                        {
                          "name": "key",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        },
                        {
                          "name": "itemDimensions",
                          "kind": "optional",
                          "type": "map",
                          "example": "",
                          "customType": "map<string, string>",
                          "schema": []
                        },
                        {
                          "name": "dimensionLabel",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        },
                        {
                          "name": "hourlyBillInfos",
                          "kind": "optional",
                          "type": "array",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.billing.detailed.DetailedItemVariantBill.in",
                          "customType": "payment.billing.detailed.DetailedItemVariantBill.in[]",
                          "schema": [
                            {
                              "name": "startTimeInSeconds",
                              "kind": "optional",
                              "type": "integer<int64>",
                              "example": 0
                            },
                            {
                              "name": "endTimeInSeconds",
                              "kind": "optional",
                              "type": "integer<int64>",
                              "example": 0
                            },
                            {
                              "name": "meterUnits",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            },
                            {
                              "name": "price",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            },
                            {
                              "name": "meteredUnitsPerTier",
                              "kind": "optional",
                              "type": "map",
                              "example": "",
                              "customType": "map<string, number>",
                              "schema": []
                            },
                            {
                              "name": "pricePerTier",
                              "kind": "optional",
                              "type": "map",
                              "example": "",
                              "customType": "map<string, number>",
                              "schema": []
                            },
                            {
                              "name": "primaryMeterUnitName",
                              "kind": "optional",
                              "type": "string",
                              "example": ""
                            },
                            {
                              "name": "secondaryMeterUnitsPerTier",
                              "kind": "optional",
                              "type": "map",
                              "example": "",
                              "customType": "map<string, object>",
                              "schema": []
                            },
                            {
                              "name": "secondaryPricePerTier",
                              "kind": "optional",
                              "type": "map",
                              "example": "",
                              "customType": "map<string, object>",
                              "schema": []
                            },
                            {
                              "name": "priceInCredits",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            },
                            {
                              "name": "priceInBaseCurrency",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            }
                          ]
                        },
                        {
                          "name": "totalBill",
                          "kind": "optional",
                          "type": "object",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.billing.detailed.DetailedItemVariantBill.in",
                          "customType": "payment.billing.detailed.DetailedItemVariantBill.in",
                          "schema": [
                            {
                              "name": "startTimeInSeconds",
                              "kind": "optional",
                              "type": "integer<int64>",
                              "example": 0
                            },
                            {
                              "name": "endTimeInSeconds",
                              "kind": "optional",
                              "type": "integer<int64>",
                              "example": 0
                            },
                            {
                              "name": "meterUnits",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            },
                            {
                              "name": "price",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            },
                            {
                              "name": "meteredUnitsPerTier",
                              "kind": "optional",
                              "type": "map",
                              "example": "",
                              "customType": "map<string, number>",
                              "schema": []
                            },
                            {
                              "name": "pricePerTier",
                              "kind": "optional",
                              "type": "map",
                              "example": "",
                              "customType": "map<string, number>",
                              "schema": []
                            },
                            {
                              "name": "primaryMeterUnitName",
                              "kind": "optional",
                              "type": "string",
                              "example": ""
                            },
                            {
                              "name": "secondaryMeterUnitsPerTier",
                              "kind": "optional",
                              "type": "map",
                              "example": "",
                              "customType": "map<string, object>",
                              "schema": []
                            },
                            {
                              "name": "secondaryPricePerTier",
                              "kind": "optional",
                              "type": "map",
                              "example": "",
                              "customType": "map<string, object>",
                              "schema": []
                            },
                            {
                              "name": "priceInCredits",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            },
                            {
                              "name": "priceInBaseCurrency",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            }
                          ]
                        },
                        {
                          "name": "lateArrivalMeters",
                          "kind": "optional",
                          "type": "number",
                          "example": ""
                        }
                      ]
                    },
                    {
                      "name": "totalBill",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.detailed.DetailedItemVariantBill.in",
                      "customType": "payment.billing.detailed.DetailedItemVariantBill.in",
                      "schema": [
                        {
                          "name": "startTimeInSeconds",
                          "kind": "optional",
                          "type": "integer<int64>",
                          "example": 0
                        },
                        {
                          "name": "endTimeInSeconds",
                          "kind": "optional",
                          "type": "integer<int64>",
                          "example": 0
                        },
                        {
                          "name": "meterUnits",
                          "kind": "optional",
                          "type": "number",
                          "example": ""
                        },
                        {
                          "name": "price",
                          "kind": "optional",
                          "type": "number",
                          "example": ""
                        },
                        {
                          "name": "meteredUnitsPerTier",
                          "kind": "optional",
                          "type": "map",
                          "example": "",
                          "customType": "map<string, number>",
                          "schema": []
                        },
                        {
                          "name": "pricePerTier",
                          "kind": "optional",
                          "type": "map",
                          "example": "",
                          "customType": "map<string, number>",
                          "schema": []
                        },
                        {
                          "name": "primaryMeterUnitName",
                          "kind": "optional",
                          "type": "string",
                          "example": ""
                        },
                        {
                          "name": "secondaryMeterUnitsPerTier",
                          "kind": "optional",
                          "type": "map",
                          "example": "",
                          "customType": "map<string, object>",
                          "schema": []
                        },
                        {
                          "name": "secondaryPricePerTier",
                          "kind": "optional",
                          "type": "map",
                          "example": "",
                          "customType": "map<string, object>",
                          "schema": []
                        },
                        {
                          "name": "priceInCredits",
                          "kind": "optional",
                          "type": "number",
                          "example": ""
                        },
                        {
                          "name": "priceInBaseCurrency",
                          "kind": "optional",
                          "type": "number",
                          "example": ""
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "appliedPromotions",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.detailed.DetailedInvoiceAppliedPromotion.in",
                  "customType": "payment.billing.detailed.DetailedInvoiceAppliedPromotion.in[]",
                  "schema": [
                    {
                      "name": "customerAppliedPromotionId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "promotionId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "promotionName",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "promotionType",
                      "kind": "optional",
                      "type": "string",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.pricing.promotions.attributes.PromotionType.in",
                      "customType": "payment.pricing.promotions.attributes.PromotionType.in",
                      "schema": []
                    },
                    {
                      "name": "discount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "hourlyDiscounts",
                      "kind": "optional",
                      "type": "map",
                      "example": "",
                      "customType": "map<string, number>",
                      "schema": []
                    },
                    {
                      "name": "promotionAppliedTimeInSeconds",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "maxDiscountPossible",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "canBeUsedForPayAsYouGo",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "granularity",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "entityTd",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "dimensions",
                      "kind": "optional",
                      "type": "map",
                      "example": "",
                      "customType": "map<string, string>",
                      "schema": []
                    },
                    {
                      "name": "promotionAppliedTimeRange",
                      "kind": "optional",
                      "type": "object",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.common.TimeRange.in",
                      "customType": "payment.common.TimeRange.in",
                      "schema": [
                        {
                          "name": "startTimeInSeconds",
                          "kind": "optional",
                          "type": "integer<int64>",
                          "example": 0
                        },
                        {
                          "name": "endTimeInSeconds",
                          "kind": "optional",
                          "type": "integer<int64>",
                          "example": 0
                        }
                      ]
                    },
                    {
                      "name": "discountInCredits",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "discountInBaseCurrency",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "maxDiscountInBaseCurrency",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "appliedPrepaids",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.detailed.DetailedInvoiceAppliedPrepaid.in",
                  "customType": "payment.billing.detailed.DetailedInvoiceAppliedPrepaid.in[]",
                  "schema": [
                    {
                      "name": "prepaidUri",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "productPlanFees",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.detailed.DetailedProductPlanFee.in",
                  "customType": "payment.billing.detailed.DetailedProductPlanFee.in[]",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "name",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "description",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "cost",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "isOneTimeFee",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "isProrated",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "prorateToDay",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "discountable",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "prepayable",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "costInCredits",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "costInBaseCurrency",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "appliedInvoiceBasedFees",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.detailed.DetailedInvoiceBasedAppliedFee.in",
                  "customType": "payment.billing.detailed.DetailedInvoiceBasedAppliedFee.in[]",
                  "schema": [
                    {
                      "name": "feeId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "feeName",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "feeAmount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "feeByTimeInSeconds",
                      "kind": "optional",
                      "type": "map",
                      "example": "",
                      "customType": "map<string, number>",
                      "schema": []
                    },
                    {
                      "name": "feeInCredits",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "feeInBaseCurrency",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "appliedInvoiceSpendingLimitFees",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.detailed.DetailedInvoiceAppliedSpendingLimitFee.in",
                  "customType": "payment.billing.detailed.DetailedInvoiceAppliedSpendingLimitFee.in[]",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "label",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "feeAmount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "feeAmountInCredits",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "feeAmountInBaseCurrency",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "appliedCommitments",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.detailed.DetailedInvoiceAppliedCommitmentFee.in",
                  "customType": "payment.billing.detailed.DetailedInvoiceAppliedCommitmentFee.in[]",
                  "schema": [
                    {
                      "name": "commitmentId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "obligationId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "obligationName",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "feeAmount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "feeInCredits",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "feeInBaseCurrency",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "itemSubscriptionDetails",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.SubscriptionItemDetail.in",
                  "customType": "payment.billing.SubscriptionItemDetail.in[]",
                  "schema": [
                    {
                      "name": "productItemId",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "variantSubscriptionDetails",
                      "kind": "optional",
                      "type": "array",
                      "description": "",
                      "modelRef": "#/components/schemas/payment.billing.SubscriptionVariantDetail.in",
                      "customType": "payment.billing.SubscriptionVariantDetail.in[]",
                      "schema": [
                        {
                          "name": "groupInfo",
                          "kind": "optional",
                          "type": "object",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.meters.GroupInfo.in",
                          "customType": "payment.meters.GroupInfo.in",
                          "schema": [
                            {
                              "name": "gi",
                              "kind": "optional",
                              "type": "map",
                              "example": "",
                              "customType": "map<string, string>",
                              "schema": []
                            }
                          ]
                        },
                        {
                          "name": "hourlyUsage",
                          "kind": "optional",
                          "type": "array",
                          "description": "",
                          "modelRef": "#/components/schemas/payment.billing.SubscriptionUsage.in",
                          "customType": "payment.billing.SubscriptionUsage.in[]",
                          "schema": [
                            {
                              "name": "startTimeInSeconds",
                              "kind": "optional",
                              "type": "integer<int64>",
                              "example": 0
                            },
                            {
                              "name": "endTimeInSeconds",
                              "kind": "optional",
                              "type": "integer<int64>",
                              "example": 0
                            },
                            {
                              "name": "subscriptionUnits",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            },
                            {
                              "name": "overageUnits",
                              "kind": "optional",
                              "type": "number",
                              "example": ""
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "name": "totalBill",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.ProductPlanBill.in",
                  "customType": "payment.billing.ProductPlanBill.in",
                  "schema": [
                    {
                      "name": "startTimeInSeconds",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "endTimeInSeconds",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "totalPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "itemPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "fixPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "invoiceBasedFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "invoiceSpendingLimitFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "commitmentsFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepaid",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalDiscount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforeDiscount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforePrepaid",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforeCommitments",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforeSalesTax",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "discountableFixPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "discountableBasePrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepayableFixPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepayableNotDiscountableFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepayableCommitmentsFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPrepayablePrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "invoicePriceStatus",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.InvoiceStatus.in",
                  "customType": "payment.billing.InvoiceStatus.in",
                  "schema": []
                },
                {
                  "name": "creditUnit",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.pricing.CreditUnit.in",
                  "customType": "payment.pricing.CreditUnit.in",
                  "schema": [
                    {
                      "name": "id",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "shortName",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "name",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "ratioToCurrency",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "description",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "active",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "lastUpdateTimeInMillis",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    }
                  ]
                },
                {
                  "name": "paymentStatus",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.payment.PaymentStatus.in",
                  "customType": "payment.payment.PaymentStatus.in",
                  "schema": []
                },
                {
                  "name": "paymentCreatedInSeconds",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "externalSystemStatus",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "invoiceBillInBaseCurrency",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.ProductPlanBill.in",
                  "customType": "payment.billing.ProductPlanBill.in",
                  "schema": [
                    {
                      "name": "startTimeInSeconds",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "endTimeInSeconds",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "totalPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "itemPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "fixPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "invoiceBasedFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "invoiceSpendingLimitFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "commitmentsFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepaid",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalDiscount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforeDiscount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforePrepaid",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforeCommitments",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforeSalesTax",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "discountableFixPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "discountableBasePrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepayableFixPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepayableNotDiscountableFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepayableCommitmentsFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPrepayablePrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "invoiceBillInCredits",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.ProductPlanBill.in",
                  "customType": "payment.billing.ProductPlanBill.in",
                  "schema": [
                    {
                      "name": "startTimeInSeconds",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "endTimeInSeconds",
                      "kind": "optional",
                      "type": "integer<int64>",
                      "example": 0
                    },
                    {
                      "name": "totalPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "itemPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "fixPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "invoiceBasedFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "invoiceSpendingLimitFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "commitmentsFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepaid",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalDiscount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforeDiscount",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforePrepaid",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforeCommitments",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPriceBeforeSalesTax",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "discountableFixPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "discountableBasePrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepayableFixPrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepayableNotDiscountableFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "prepayableCommitmentsFees",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    },
                    {
                      "name": "totalPrepayablePrice",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "prepaidPriceUsedBaseCurrency",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "prepaidPriceUsed",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "availablePrepaidLeft",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "availablePrepaidLeftBaseCurrency",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "prepaidUsageUsed",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "availablePrepaidUsageLeft",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "availablePrepaidLeftInCredits",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "invoiceSalesTax",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/com.amberflo.integration.tax.InvoiceSalesTax.in",
                  "customType": "com.amberflo.integration.tax.InvoiceSalesTax.in",
                  "schema": [
                    {
                      "name": "totalTaxAmount",
                      "kind": "optional",
                      "type": "number",
                      "description": "The total tax for all lines in this transaction",
                      "example": ""
                    },
                    {
                      "name": "totalTaxableAmount",
                      "kind": "optional",
                      "type": "number",
                      "description": "The portion of the total amount of this transaction that was taxable",
                      "example": ""
                    },
                    {
                      "name": "totalExemptAmount",
                      "kind": "optional",
                      "type": "number",
                      "description": "The amount of this transaction that was exempt",
                      "example": ""
                    },
                    {
                      "name": "combinedTaxRate",
                      "kind": "optional",
                      "type": "number",
                      "description": "The rate of taxation, as a fraction of the amount",
                      "example": ""
                    },
                    {
                      "name": "hasNexus",
                      "kind": "optional",
                      "type": "boolean",
                      "description": "Has nexus",
                      "example": ""
                    },
                    {
                      "name": "taxCode",
                      "kind": "optional",
                      "type": "string",
                      "description": "The tax code",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "availablePayAsYouGoMoney",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "availablePayAsYouGoMoneyInBaseCurrency",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "availablePayAsYouGoMoneyInCredits",
                  "kind": "optional",
                  "type": "number",
                  "example": ""
                },
                {
                  "name": "paymentCurrencyInfo",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.PaymentCurrencyInfo.in",
                  "customType": "payment.billing.PaymentCurrencyInfo.in",
                  "schema": [
                    {
                      "name": "basePlanCurrency",
                      "kind": "optional",
                      "type": "string",
                      "description": "Currency code in ISO 4217 format.",
                      "example": "USD"
                    },
                    {
                      "name": "paymentCurrency",
                      "kind": "optional",
                      "type": "string",
                      "description": "Currency code in ISO 4217 format.",
                      "example": "USD"
                    },
                    {
                      "name": "exchangeRate",
                      "kind": "optional",
                      "type": "number",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "paymentMethod",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.payment.PaymentMethod.in",
                  "customType": "payment.payment.PaymentMethod.in",
                  "schema": [
                    {
                      "name": "methodType",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "last4",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "brand",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "messages",
                  "kind": "optional",
                  "type": "array",
                  "description": "",
                  "modelRef": "#/components/schemas/com.amberflo.service.common.log_message.LogMessage.in",
                  "customType": "com.amberflo.service.common.log_message.LogMessage.in[]",
                  "schema": [
                    {
                      "name": "level",
                      "kind": "optional",
                      "type": "string",
                      "description": "",
                      "modelRef": "#/components/schemas/com.amberflo.service.common.log_message.MessageLevel.in",
                      "customType": "com.amberflo.service.common.log_message.MessageLevel.in",
                      "schema": []
                    },
                    {
                      "name": "code",
                      "kind": "optional",
                      "type": "string",
                      "description": "",
                      "modelRef": "#/components/schemas/com.amberflo.service.common.log_message.MessageCode.in",
                      "customType": "com.amberflo.service.common.log_message.MessageCode.in",
                      "schema": []
                    },
                    {
                      "name": "message",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "invoiceStartTime",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "invoiceEndTime",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "voided",
                  "kind": "optional",
                  "type": "boolean",
                  "example": ""
                }
              ]
            },
            {
              "name": "customerDetails",
              "kind": "required",
              "type": "object",
              "description": "The customer for the invoice",
              "modelRef": "#/components/schemas/metadata.customer.client.CustomerDetails.in",
              "customType": "metadata.customer.client.CustomerDetails.in",
              "schema": [
                {
                  "name": "customerId",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "customerName",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "customerEmail",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "description",
                  "kind": "optional",
                  "type": "string",
                  "example": ""
                },
                {
                  "name": "lifecycleStage",
                  "kind": "optional",
                  "type": "string",
                  "description": "",
                  "modelRef": "#/components/schemas/metadata.customer.CustomerLifecycleStage.in",
                  "customType": "metadata.customer.CustomerLifecycleStage.in",
                  "schema": []
                },
                {
                  "name": "enabled",
                  "kind": "optional",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "name": "test",
                  "kind": "optional",
                  "type": "boolean",
                  "example": ""
                },
                {
                  "name": "deactivateTimeStamp",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "traits",
                  "kind": "optional",
                  "type": "map",
                  "example": "",
                  "customType": "map<string, string>",
                  "schema": []
                },
                {
                  "name": "address",
                  "kind": "optional",
                  "type": "object",
                  "description": "",
                  "modelRef": "#/components/schemas/metadata.customer.client.CustomerAddress.in",
                  "customType": "metadata.customer.client.CustomerAddress.in",
                  "schema": [
                    {
                      "name": "verified",
                      "kind": "optional",
                      "type": "boolean",
                      "example": ""
                    },
                    {
                      "name": "line1",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "state",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "city",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "postalCode",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    },
                    {
                      "name": "country",
                      "kind": "optional",
                      "type": "string",
                      "example": ""
                    }
                  ]
                },
                {
                  "name": "createTime",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "updateTime",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                },
                {
                  "name": "deleteTime",
                  "kind": "optional",
                  "type": "integer<int64>",
                  "example": 0
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/com.amberflo.integration.billing.netsuite.NetsuiteCreateInvoiceRequest.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": "com.amberflo.integration.billing.netsuite.NetsuiteCreateInvoiceResponse.out",
            "schema": [
              {
                "name": "status",
                "kind": "optional",
                "type": "boolean",
                "description": "A flag to indicate if the invoice was created successfully",
                "example": ""
              },
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "The invoice id returned from Netsuite when succeeded",
                "example": ""
              },
              {
                "name": "errorMessage",
                "kind": "optional",
                "type": "string",
                "description": "The error message when failed",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/com.amberflo.integration.billing.netsuite.NetsuiteCreateInvoiceResponse.out",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "VZqBrZq9fJTxw3TVTgBYz",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/integration/billing/netsuite/create-invoice \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"integrationSettings\": {\n     \"type\": \"\",\n     \"name\": \"\",\n     \"settings\": \"\"\n     },\n     \"detailedInvoice\": {},\n     \"customerDetails\": {}\n     }'"
        },
        {
          "id": "BcMNoOG3HWa7q0JN-US3Z",
          "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   \"integrationSettings\": {\n      \"type\": \"\",\n      \"name\": \"\",\n      \"settings\": \"\"\n   },\n   \"detailedInvoice\": {},\n   \"customerDetails\": {}\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/integration/billing/netsuite/create-invoice\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "cigzH3WZ1DX2TvT3jXkvM",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/integration/billing/netsuite/create-invoice\")\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   \"integrationSettings\": {\n      \"type\": \"\",\n      \"name\": \"\",\n      \"settings\": \"\"\n   },\n   \"detailedInvoice\": {},\n   \"customerDetails\": {}\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Myp-okuAxUQboPqqjO-nW",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/integration/billing/netsuite/create-invoice\"\n\npayload = json.dumps({\n   \"integrationSettings\": {\n      \"type\": \"\",\n      \"name\": \"\",\n      \"settings\": \"\"\n   },\n   \"detailedInvoice\": {},\n   \"customerDetails\": {}\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": "VZqBrZq9fJTxw3TVTgBYz"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful request\n{\n  \"status\": false,\n  \"id\": \"\",\n  \"errorMessage\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}