{
  "openapi" : "3.0.0",
  "info" : {
    "title" : "Billing",
    "description" : "Manage Billing",
    "version" : ""
  },
  "servers" : [ {
    "url" : "https://dev.seqhq.io",
    "description" : "E2E"
  }, {
    "url" : "https://dev.seqhq.io",
    "description" : "DEV"
  }, {
    "url" : "https://sandbox.sequencehq.com",
    "description" : "SANDBOX"
  }, {
    "url" : "https://eu.sequencehq.com",
    "description" : "PRODUCTION"
  } ],
  "tags" : [ {
    "name" : "Prices"
  }, {
    "name" : "Billing Schedules"
  }, {
    "name" : "Credits"
  }, {
    "name" : "Discounts"
  } ],
  "paths" : {
    "/prices" : {
      "get" : {
        "tags" : [ "Prices" ],
        "summary" : "List all Prices",
        "description" : "List all Prices",
        "operationId" : "getPrices",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "description" : "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).",
          "required" : false,
          "schema" : {
            "type" : "integer"
          }
        }, {
          "name" : "after",
          "in" : "query",
          "description" : "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "before",
          "in" : "query",
          "description" : "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sortOrder",
          "in" : "query",
          "description" : "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "currency",
          "in" : "query",
          "description" : "Filter by currency.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "name",
          "in" : "query",
          "description" : "Filter by name.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "billingFrequency",
          "in" : "query",
          "description" : "Filter by billing frequency.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "productId",
          "in" : "query",
          "description" : "Filter by product ID.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "example" : {
                    "items" : [ {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "tiers" : [ {
                          "upperBound" : "200",
                          "price" : "1.00",
                          "fee" : "50.00",
                          "isPricePercentage" : false
                        }, {
                          "upperBound" : "400",
                          "price" : "0.75",
                          "fee" : "25.00",
                          "isPricePercentage" : false
                        }, {
                          "price" : "0.50",
                          "fee" : "0.00",
                          "isPricePercentage" : false
                        } ],
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "usageCalculationMode" : "BILLING_PERIOD",
                        "pricingType" : "GRADUATED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  },
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/PriceResponsePaginatedPriceResponseModel"
                  } ]
                },
                "examples" : {
                  "PriceResponsePaginatedPriceResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                        "name" : "Demo Product",
                        "currency" : "GBP",
                        "structure" : {
                          "price" : "150.00",
                          "pricingType" : "ONE_TIME"
                        },
                        "billingFrequency" : "MONTHLY",
                        "billingType" : "IN_ARREARS",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "integrationIds" : [ {
                          "service" : "Xero",
                          "id" : "123",
                          "isPending" : false
                        } ],
                        "customMetricParameters" : [ {
                          "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                          "value" : "10"
                        } ],
                        "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                        "status" : "ACTIVE"
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Prices" ],
        "summary" : "Create a new Price",
        "description" : "Create a new Price",
        "operationId" : "postPrices",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "example" : {
                  "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                  "name" : "Demo Product",
                  "currency" : "GBP",
                  "structure" : {
                    "tiers" : [ {
                      "upperBound" : "200",
                      "price" : "1.00",
                      "fee" : "50.00",
                      "isPricePercentage" : false
                    }, {
                      "upperBound" : "400",
                      "price" : "0.75",
                      "fee" : "25.00",
                      "isPricePercentage" : false
                    }, {
                      "price" : "0.50",
                      "fee" : "0.00",
                      "isPricePercentage" : false
                    } ],
                    "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                    "usageCalculationMode" : "BILLING_PERIOD",
                    "pricingType" : "GRADUATED"
                  },
                  "billingFrequency" : "MONTHLY",
                  "billingType" : "IN_ARREARS",
                  "integrationIds" : [ {
                    "service" : "Xero",
                    "id" : "123"
                  } ],
                  "customMetricParameters" : [ {
                    "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                    "value" : "10"
                  } ],
                  "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                  "usageCalculationPeriod" : {
                    "frequency" : "MONTHLY",
                    "interval" : 1
                  },
                  "status" : "ACTIVE"
                },
                "oneOf" : [ {
                  "$ref" : "#/components/schemas/OneTimePriceRequest"
                }, {
                  "$ref" : "#/components/schemas/FixedPriceRequest"
                }, {
                  "$ref" : "#/components/schemas/LinearPriceRequest"
                }, {
                  "$ref" : "#/components/schemas/PackagePriceRequest"
                }, {
                  "$ref" : "#/components/schemas/SeatBasedPriceRequest"
                }, {
                  "$ref" : "#/components/schemas/GraduatedPriceRequest"
                }, {
                  "$ref" : "#/components/schemas/VolumePriceRequest"
                } ]
              },
              "examples" : {
                "GraduatedPriceRequest" : {
                  "summary" : "",
                  "value" : {
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "tiers" : [ {
                        "upperBound" : "200",
                        "price" : "1.00",
                        "fee" : "50.00",
                        "isPricePercentage" : false
                      }, {
                        "upperBound" : "400",
                        "price" : "0.75",
                        "fee" : "25.00",
                        "isPricePercentage" : false
                      }, {
                        "price" : "0.50",
                        "fee" : "0.00",
                        "isPricePercentage" : false
                      } ],
                      "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                      "usageCalculationMode" : "BILLING_PERIOD",
                      "pricingType" : "GRADUATED"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123"
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "usageCalculationPeriod" : {
                      "frequency" : "MONTHLY",
                      "interval" : 1
                    },
                    "status" : "ACTIVE"
                  }
                },
                "VolumePriceRequest" : {
                  "summary" : "",
                  "value" : {
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "tiers" : [ {
                        "upperBound" : "100",
                        "price" : "1.00",
                        "fee" : "50.00",
                        "isPricePercentage" : true,
                        "maxPrice" : "10",
                        "minPrice" : "5"
                      }, {
                        "price" : "0.75",
                        "fee" : "25.00",
                        "isPricePercentage" : true,
                        "maxPrice" : "10",
                        "minPrice" : "5"
                      } ],
                      "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                      "pricingType" : "VOLUME"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123"
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "status" : "ACTIVE"
                  }
                },
                "SeatBasedPriceRequest" : {
                  "summary" : "",
                  "value" : {
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "seatMetricId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "pricePerSeat" : "0.25",
                      "prorationStrategy" : "USE_MAXIMUM",
                      "contractedMinimumSeats" : 10,
                      "overagesBillingFrequency" : "YEARLY",
                      "tiers" : [ {
                        "upperBound" : "100",
                        "price" : "1.00",
                        "fee" : "50.00"
                      }, {
                        "price" : "0.75",
                        "fee" : "25.00"
                      } ],
                      "prorateFlatFees" : false,
                      "pricingType" : "SEAT_BASED"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123"
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "status" : "ACTIVE"
                  }
                },
                "PackagePriceRequest" : {
                  "summary" : "",
                  "value" : {
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "packageSize" : "50",
                      "pricePerPackage" : "2.00",
                      "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                      "pricingType" : "PACKAGE"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123"
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "status" : "ACTIVE"
                  }
                },
                "LinearPriceRequest" : {
                  "summary" : "",
                  "value" : {
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "pricePerUnit" : "0.25",
                      "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                      "isPricePercentage" : false,
                      "pricingType" : "LINEAR"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123"
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "status" : "ACTIVE"
                  }
                },
                "FixedPriceRequest" : {
                  "summary" : "",
                  "value" : {
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "price" : "20.00",
                      "pricingType" : "FIXED"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123"
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "status" : "ACTIVE"
                  }
                },
                "OneTimePriceRequest" : {
                  "summary" : "",
                  "value" : {
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "price" : "150.00",
                      "pricingType" : "ONE_TIME"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123"
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "status" : "ACTIVE"
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "201" : {
            "description" : "Created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "example" : {
                    "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "tiers" : [ {
                        "upperBound" : "200",
                        "price" : "1.00",
                        "fee" : "50.00",
                        "isPricePercentage" : false
                      }, {
                        "upperBound" : "400",
                        "price" : "0.75",
                        "fee" : "25.00",
                        "isPricePercentage" : false
                      }, {
                        "price" : "0.50",
                        "fee" : "0.00",
                        "isPricePercentage" : false
                      } ],
                      "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                      "usageCalculationMode" : "BILLING_PERIOD",
                      "pricingType" : "GRADUATED"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123",
                      "isPending" : false
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "usageCalculationPeriod" : {
                      "frequency" : "MONTHLY",
                      "interval" : 1
                    },
                    "status" : "ACTIVE"
                  },
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/OneTimePriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/FixedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/LinearPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/PackagePriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/SeatBasedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/GraduatedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/VolumePriceResponse"
                  } ]
                },
                "examples" : {
                  "GraduatedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "tiers" : [ {
                          "upperBound" : "200",
                          "price" : "1.00",
                          "fee" : "50.00",
                          "isPricePercentage" : false
                        }, {
                          "upperBound" : "400",
                          "price" : "0.75",
                          "fee" : "25.00",
                          "isPricePercentage" : false
                        }, {
                          "price" : "0.50",
                          "fee" : "0.00",
                          "isPricePercentage" : false
                        } ],
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "usageCalculationMode" : "BILLING_PERIOD",
                        "pricingType" : "GRADUATED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    }
                  },
                  "VolumePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "tiers" : [ {
                          "upperBound" : "100",
                          "price" : "1.00",
                          "fee" : "50.00",
                          "isPricePercentage" : true,
                          "maxPrice" : "10",
                          "minPrice" : "5"
                        }, {
                          "price" : "0.75",
                          "fee" : "25.00",
                          "isPricePercentage" : true,
                          "maxPrice" : "10",
                          "minPrice" : "5"
                        } ],
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "pricingType" : "VOLUME"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "SeatBasedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "seatMetricId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "pricePerSeat" : "0.25",
                        "prorationStrategy" : "USE_MAXIMUM",
                        "contractedMinimumSeats" : 10,
                        "overagesBillingFrequency" : "YEARLY",
                        "tiers" : [ {
                          "upperBound" : "100",
                          "price" : "1.00",
                          "fee" : "50.00"
                        }, {
                          "price" : "0.75",
                          "fee" : "25.00"
                        } ],
                        "prorateFlatFees" : false,
                        "pricingType" : "SEAT_BASED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "PackagePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "packageSize" : "50",
                        "pricePerPackage" : "2.00",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "pricingType" : "PACKAGE"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "LinearPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "FixedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "price" : "20.00",
                        "pricingType" : "FIXED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "OneTimePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "price" : "150.00",
                        "pricingType" : "ONE_TIME"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/billing-schedules" : {
      "get" : {
        "tags" : [ "Billing Schedules" ],
        "summary" : "List all Billing Schedules",
        "description" : "List all Billing Schedules.",
        "operationId" : "getBillingSchedules",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "customerId",
          "in" : "query",
          "description" : "Filter by customer ID.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "billingScheduleStatus",
          "in" : "query",
          "description" : "Filter by status.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "autoSendInvoices",
          "in" : "query",
          "description" : "Filter by auto send invoices.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "label",
          "in" : "query",
          "description" : "Filter by label.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "includeArchivedSchedules",
          "in" : "query",
          "description" : "Include archived schedules.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "startingBefore",
          "in" : "query",
          "description" : "Filter by schedule starting before. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "startingAfter",
          "in" : "query",
          "description" : "Filter by schedule starting after. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "endingBefore",
          "in" : "query",
          "description" : "Filter by schedule ending before. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "endingAfter",
          "in" : "query",
          "description" : "Filter by schedule ending after. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "includeOpenEndedSchedules",
          "in" : "query",
          "description" : "Include open-ended schedules.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "recurrenceDayOfMonth",
          "in" : "query",
          "description" : "Filter by recurrence day of month (1-31). Comma-separated for multiple days.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sortBy",
          "in" : "query",
          "description" : "Sort column. Default: creation time. Use customFields.<key> to sort by a custom field value.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "before",
          "in" : "query",
          "description" : "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "after",
          "in" : "query",
          "description" : "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "description" : "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).",
          "required" : false,
          "schema" : {
            "type" : "integer"
          }
        }, {
          "name" : "sortOrder",
          "in" : "query",
          "description" : "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ListBillingSchedulesResponse",
                  "example" : {
                    "items" : [ {
                      "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                      "status" : "ACTIVE",
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-12-01",
                      "taxRates" : [ {
                        "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                      } ],
                      "firstBillingDate" : "2022-02-02",
                      "autoIssueInvoices" : false,
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "label" : "label",
                      "recurrenceDayOfMonth" : 1,
                      "prices" : [ {
                        "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                        "name" : "Demo Product",
                        "currency" : "GBP",
                        "structure" : {
                          "pricePerUnit" : "0.25",
                          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                          "isPricePercentage" : false,
                          "pricingType" : "LINEAR"
                        },
                        "billingFrequency" : "MONTHLY",
                        "billingType" : "IN_ARREARS",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "integrationIds" : [ {
                          "service" : "Xero",
                          "id" : "123",
                          "isPending" : false
                        } ],
                        "customMetricParameters" : [ {
                          "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                          "value" : "10"
                        } ],
                        "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                        "usageCalculationPeriod" : {
                          "frequency" : "MONTHLY",
                          "interval" : 1
                        },
                        "status" : "ACTIVE"
                      } ],
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                      "phases" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "name" : "Onboarding",
                        "externalContractRef" : "ACME-2022-MSA",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "startDate" : "2022-01-01",
                        "endDate" : "2022-06-30",
                        "discounts" : [ {
                          "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "type" : "PERCENTAGE",
                          "amount" : 15,
                          "message" : "15% Discount",
                          "separateLineItem" : true,
                          "seatDiscountType" : "ALL_SEATS"
                        } ],
                        "minimums" : [ {
                          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                          "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "amount" : 100,
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "createdAt" : "2022-06-28T16:47:00Z",
                          "updatedAt" : "2022-06-28T16:47:00Z"
                        } ],
                        "creditGrants" : [ {
                          "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                          "name" : "Monthly usage credits",
                          "creditUnitType" : "CURRENCY",
                          "currency" : "GBP",
                          "amount" : 100,
                          "costOfCredit" : 0,
                          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                          "grantRefreshFrequency" : "MONTHLY",
                          "billingFrequency" : "MONTHLY",
                          "rolloverMode" : "NONE",
                          "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                        } ],
                        "integrationIds" : [ {
                          "service" : "NetSuite",
                          "id" : "SO-1024",
                          "lastSynced" : "2022-06-28T16:47:00Z",
                          "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                          "isPending" : false
                        } ],
                        "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                        "phasePriceMetadata" : [ {
                          "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "arrCalculation" : "INCLUDE"
                        } ]
                      } ],
                      "archivedAt" : "2022-06-28T16:47:00Z",
                      "rollUpBilling" : false,
                      "integrationIds" : [ {
                        "service" : "Salesforce",
                        "id" : "a0CQy00000Ipz5VMAR",
                        "lastSynced" : "2024-08-14T17:14:17Z",
                        "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                        "isPending" : false
                      } ],
                      "attachmentAssets" : [ {
                        "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "type" : "IMAGE",
                        "format" : "PNG",
                        "fileName" : "my-image.png",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                      "defaultDueDateDays" : 30,
                      "memo" : "Example Billing Schedule",
                      "customFields" : {
                        "key" : "value"
                      },
                      "paymentProvider" : "STRIPE",
                      "autoCharge" : true
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "ListBillingSchedulesResponse" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                        "status" : "ACTIVE",
                        "startDate" : "2022-01-01",
                        "endDate" : "2022-12-01",
                        "taxRates" : [ {
                          "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                          "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                        } ],
                        "firstBillingDate" : "2022-02-02",
                        "autoIssueInvoices" : false,
                        "purchaseOrderNumber" : "PO123",
                        "reference" : "ref",
                        "label" : "label",
                        "recurrenceDayOfMonth" : 1,
                        "prices" : [ {
                          "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                          "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                          "name" : "Demo Product",
                          "currency" : "GBP",
                          "structure" : {
                            "pricePerUnit" : "0.25",
                            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                            "isPricePercentage" : false,
                            "pricingType" : "LINEAR"
                          },
                          "billingFrequency" : "MONTHLY",
                          "billingType" : "IN_ARREARS",
                          "createdAt" : "2022-06-28T16:47:00Z",
                          "updatedAt" : "2022-06-28T16:47:00Z",
                          "integrationIds" : [ {
                            "service" : "Xero",
                            "id" : "123",
                            "isPending" : false
                          } ],
                          "customMetricParameters" : [ {
                            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                            "value" : "10"
                          } ],
                          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                          "usageCalculationPeriod" : {
                            "frequency" : "MONTHLY",
                            "interval" : 1
                          },
                          "status" : "ACTIVE"
                        } ],
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                        "phases" : [ {
                          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "name" : "Onboarding",
                          "externalContractRef" : "ACME-2022-MSA",
                          "createdAt" : "2022-06-28T16:47:00Z",
                          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                          "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "startDate" : "2022-01-01",
                          "endDate" : "2022-06-30",
                          "discounts" : [ {
                            "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                            "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                            "type" : "PERCENTAGE",
                            "amount" : 15,
                            "message" : "15% Discount",
                            "separateLineItem" : true,
                            "seatDiscountType" : "ALL_SEATS"
                          } ],
                          "minimums" : [ {
                            "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                            "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                            "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                            "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                            "amount" : 100,
                            "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                            "createdAt" : "2022-06-28T16:47:00Z",
                            "updatedAt" : "2022-06-28T16:47:00Z"
                          } ],
                          "creditGrants" : [ {
                            "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                            "name" : "Monthly usage credits",
                            "creditUnitType" : "CURRENCY",
                            "currency" : "GBP",
                            "amount" : 100,
                            "costOfCredit" : 0,
                            "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                            "grantRefreshFrequency" : "MONTHLY",
                            "billingFrequency" : "MONTHLY",
                            "rolloverMode" : "NONE",
                            "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                          } ],
                          "integrationIds" : [ {
                            "service" : "NetSuite",
                            "id" : "SO-1024",
                            "lastSynced" : "2022-06-28T16:47:00Z",
                            "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                            "isPending" : false
                          } ],
                          "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                          "phasePriceMetadata" : [ {
                            "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                            "arrCalculation" : "INCLUDE"
                          } ]
                        } ],
                        "archivedAt" : "2022-06-28T16:47:00Z",
                        "rollUpBilling" : false,
                        "integrationIds" : [ {
                          "service" : "Salesforce",
                          "id" : "a0CQy00000Ipz5VMAR",
                          "lastSynced" : "2024-08-14T17:14:17Z",
                          "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                          "isPending" : false
                        } ],
                        "attachmentAssets" : [ {
                          "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                          "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                          "type" : "IMAGE",
                          "format" : "PNG",
                          "fileName" : "my-image.png",
                          "fileSizeBytes" : 12345,
                          "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                          "createdAt" : "2022-06-28T16:47:00Z"
                        } ],
                        "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                        "defaultDueDateDays" : 30,
                        "memo" : "Example Billing Schedule",
                        "customFields" : {
                          "key" : "value"
                        },
                        "paymentProvider" : "STRIPE",
                        "autoCharge" : true
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Billing Schedules" ],
        "summary" : "Create Billing Schedule",
        "description" : "Create a new [Billing Schedule](/billing/create-billing-schedules).",
        "operationId" : "postBillingSchedules",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateBillingScheduleRequest",
                "example" : {
                  "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                  "startDate" : "2022-01-01",
                  "endDate" : "2022-12-31",
                  "recurrenceDayOfMonth" : 1,
                  "taxRates" : [ {
                    "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                    "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                  } ],
                  "autoIssueInvoices" : false,
                  "purchaseOrderNumber" : "PO123",
                  "reference" : "Example reference",
                  "label" : "Example label",
                  "paymentProvider" : "STRIPE",
                  "isDraft" : true,
                  "rollUpBilling" : false,
                  "phases" : [ {
                    "name" : "Trial Period",
                    "externalContractRef" : "ACME-2022-MSA",
                    "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-06-30",
                    "discounts" : [ {
                      "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "type" : "PERCENTAGE",
                      "amount" : 8,
                      "message" : "8% Discount",
                      "separateLineItem" : true,
                      "seatDiscountType" : "ALL_SEATS"
                    } ],
                    "minimums" : [ {
                      "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                      "amount" : 100
                    } ],
                    "creditGrants" : [ {
                      "name" : "Monthly usage credits",
                      "creditUnitType" : "CURRENCY",
                      "currency" : "GBP",
                      "amount" : 100,
                      "costOfCredit" : 0,
                      "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                      "grantRefreshFrequency" : "MONTHLY",
                      "billingFrequency" : "MONTHLY",
                      "rolloverMode" : "NONE",
                      "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                    } ],
                    "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
                    "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                    "phasePriceMetadata" : [ {
                      "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "arrCalculation" : "INCLUDE"
                    } ],
                    "phaseListPriceMetadata" : [ {
                      "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                      "arrCalculation" : "INCLUDE"
                    } ]
                  }, {
                    "priceIds" : [ ],
                    "startDate" : "2022-07-01",
                    "endDate" : "2022-12-31",
                    "discounts" : [ ],
                    "minimums" : [ {
                      "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                      "amount" : 100
                    } ],
                    "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
                    "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                    "phasePriceMetadata" : [ {
                      "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "arrCalculation" : "INCLUDE"
                    } ],
                    "phaseListPriceMetadata" : [ {
                      "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                      "arrCalculation" : "INCLUDE"
                    } ]
                  } ],
                  "attachmentAssetIds" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
                  "autoCharge" : true,
                  "defaultDueDateDays" : 30,
                  "memo" : "Example Billing Schedule",
                  "customFields" : {
                    "key" : "value"
                  }
                }
              },
              "examples" : {
                "CreateBillingScheduleRequest" : {
                  "summary" : "",
                  "value" : {
                    "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-31",
                    "recurrenceDayOfMonth" : 1,
                    "taxRates" : [ {
                      "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                    } ],
                    "autoIssueInvoices" : false,
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "Example reference",
                    "label" : "Example label",
                    "paymentProvider" : "STRIPE",
                    "isDraft" : true,
                    "rollUpBilling" : false,
                    "phases" : [ {
                      "name" : "Trial Period",
                      "externalContractRef" : "ACME-2022-MSA",
                      "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-06-30",
                      "discounts" : [ {
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "type" : "PERCENTAGE",
                        "amount" : 8,
                        "message" : "8% Discount",
                        "separateLineItem" : true,
                        "seatDiscountType" : "ALL_SEATS"
                      } ],
                      "minimums" : [ {
                        "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                        "amount" : 100
                      } ],
                      "creditGrants" : [ {
                        "name" : "Monthly usage credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "amount" : 100,
                        "costOfCredit" : 0,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "grantRefreshFrequency" : "MONTHLY",
                        "billingFrequency" : "MONTHLY",
                        "rolloverMode" : "NONE",
                        "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                      } ],
                      "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ],
                      "phaseListPriceMetadata" : [ {
                        "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    }, {
                      "priceIds" : [ ],
                      "startDate" : "2022-07-01",
                      "endDate" : "2022-12-31",
                      "discounts" : [ ],
                      "minimums" : [ {
                        "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                        "amount" : 100
                      } ],
                      "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ],
                      "phaseListPriceMetadata" : [ {
                        "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    } ],
                    "attachmentAssetIds" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
                    "autoCharge" : true,
                    "defaultDueDateDays" : 30,
                    "memo" : "Example Billing Schedule",
                    "customFields" : {
                      "key" : "value"
                    }
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "201" : {
            "description" : "Created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingScheduleResponse",
                  "example" : {
                    "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                    "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                    "status" : "ACTIVE",
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-01",
                    "taxRates" : [ {
                      "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                    } ],
                    "firstBillingDate" : "2022-02-02",
                    "autoIssueInvoices" : false,
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "label" : "label",
                    "recurrenceDayOfMonth" : 1,
                    "prices" : [ {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    } ],
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                    "phases" : [ {
                      "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "name" : "Onboarding",
                      "externalContractRef" : "ACME-2022-MSA",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-06-30",
                      "discounts" : [ {
                        "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "type" : "PERCENTAGE",
                        "amount" : 15,
                        "message" : "15% Discount",
                        "separateLineItem" : true,
                        "seatDiscountType" : "ALL_SEATS"
                      } ],
                      "minimums" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "amount" : 100,
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "creditGrants" : [ {
                        "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                        "name" : "Monthly usage credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "amount" : 100,
                        "costOfCredit" : 0,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "grantRefreshFrequency" : "MONTHLY",
                        "billingFrequency" : "MONTHLY",
                        "rolloverMode" : "NONE",
                        "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                      } ],
                      "integrationIds" : [ {
                        "service" : "NetSuite",
                        "id" : "SO-1024",
                        "lastSynced" : "2022-06-28T16:47:00Z",
                        "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                        "isPending" : false
                      } ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    } ],
                    "archivedAt" : "2022-06-28T16:47:00Z",
                    "rollUpBilling" : false,
                    "integrationIds" : [ {
                      "service" : "Salesforce",
                      "id" : "a0CQy00000Ipz5VMAR",
                      "lastSynced" : "2024-08-14T17:14:17Z",
                      "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                      "isPending" : false
                    } ],
                    "attachmentAssets" : [ {
                      "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                      "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "type" : "IMAGE",
                      "format" : "PNG",
                      "fileName" : "my-image.png",
                      "fileSizeBytes" : 12345,
                      "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                      "createdAt" : "2022-06-28T16:47:00Z"
                    } ],
                    "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                    "defaultDueDateDays" : 30,
                    "memo" : "Example Billing Schedule",
                    "customFields" : {
                      "key" : "value"
                    },
                    "paymentProvider" : "STRIPE",
                    "autoCharge" : true
                  }
                },
                "examples" : {
                  "BillingScheduleResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                      "status" : "ACTIVE",
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-12-01",
                      "taxRates" : [ {
                        "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                      } ],
                      "firstBillingDate" : "2022-02-02",
                      "autoIssueInvoices" : false,
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "label" : "label",
                      "recurrenceDayOfMonth" : 1,
                      "prices" : [ {
                        "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                        "name" : "Demo Product",
                        "currency" : "GBP",
                        "structure" : {
                          "pricePerUnit" : "0.25",
                          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                          "isPricePercentage" : false,
                          "pricingType" : "LINEAR"
                        },
                        "billingFrequency" : "MONTHLY",
                        "billingType" : "IN_ARREARS",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "integrationIds" : [ {
                          "service" : "Xero",
                          "id" : "123",
                          "isPending" : false
                        } ],
                        "customMetricParameters" : [ {
                          "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                          "value" : "10"
                        } ],
                        "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                        "usageCalculationPeriod" : {
                          "frequency" : "MONTHLY",
                          "interval" : 1
                        },
                        "status" : "ACTIVE"
                      } ],
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                      "phases" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "name" : "Onboarding",
                        "externalContractRef" : "ACME-2022-MSA",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "startDate" : "2022-01-01",
                        "endDate" : "2022-06-30",
                        "discounts" : [ {
                          "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "type" : "PERCENTAGE",
                          "amount" : 15,
                          "message" : "15% Discount",
                          "separateLineItem" : true,
                          "seatDiscountType" : "ALL_SEATS"
                        } ],
                        "minimums" : [ {
                          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                          "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "amount" : 100,
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "createdAt" : "2022-06-28T16:47:00Z",
                          "updatedAt" : "2022-06-28T16:47:00Z"
                        } ],
                        "creditGrants" : [ {
                          "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                          "name" : "Monthly usage credits",
                          "creditUnitType" : "CURRENCY",
                          "currency" : "GBP",
                          "amount" : 100,
                          "costOfCredit" : 0,
                          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                          "grantRefreshFrequency" : "MONTHLY",
                          "billingFrequency" : "MONTHLY",
                          "rolloverMode" : "NONE",
                          "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                        } ],
                        "integrationIds" : [ {
                          "service" : "NetSuite",
                          "id" : "SO-1024",
                          "lastSynced" : "2022-06-28T16:47:00Z",
                          "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                          "isPending" : false
                        } ],
                        "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                        "phasePriceMetadata" : [ {
                          "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "arrCalculation" : "INCLUDE"
                        } ]
                      } ],
                      "archivedAt" : "2022-06-28T16:47:00Z",
                      "rollUpBilling" : false,
                      "integrationIds" : [ {
                        "service" : "Salesforce",
                        "id" : "a0CQy00000Ipz5VMAR",
                        "lastSynced" : "2024-08-14T17:14:17Z",
                        "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                        "isPending" : false
                      } ],
                      "attachmentAssets" : [ {
                        "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "type" : "IMAGE",
                        "format" : "PNG",
                        "fileName" : "my-image.png",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                      "defaultDueDateDays" : 30,
                      "memo" : "Example Billing Schedule",
                      "customFields" : {
                        "key" : "value"
                      },
                      "paymentProvider" : "STRIPE",
                      "autoCharge" : true
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/prices/{id}" : {
      "get" : {
        "tags" : [ "Prices" ],
        "summary" : "Get a Price by ID",
        "description" : "Get a Price by ID",
        "operationId" : "getPricesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Unique Price ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "example" : {
                    "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "tiers" : [ {
                        "upperBound" : "200",
                        "price" : "1.00",
                        "fee" : "50.00",
                        "isPricePercentage" : false
                      }, {
                        "upperBound" : "400",
                        "price" : "0.75",
                        "fee" : "25.00",
                        "isPricePercentage" : false
                      }, {
                        "price" : "0.50",
                        "fee" : "0.00",
                        "isPricePercentage" : false
                      } ],
                      "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                      "usageCalculationMode" : "BILLING_PERIOD",
                      "pricingType" : "GRADUATED"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123",
                      "isPending" : false
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "usageCalculationPeriod" : {
                      "frequency" : "MONTHLY",
                      "interval" : 1
                    },
                    "status" : "ACTIVE"
                  },
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/OneTimePriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/FixedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/LinearPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/PackagePriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/SeatBasedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/GraduatedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/VolumePriceResponse"
                  } ]
                },
                "examples" : {
                  "GraduatedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "tiers" : [ {
                          "upperBound" : "200",
                          "price" : "1.00",
                          "fee" : "50.00",
                          "isPricePercentage" : false
                        }, {
                          "upperBound" : "400",
                          "price" : "0.75",
                          "fee" : "25.00",
                          "isPricePercentage" : false
                        }, {
                          "price" : "0.50",
                          "fee" : "0.00",
                          "isPricePercentage" : false
                        } ],
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "usageCalculationMode" : "BILLING_PERIOD",
                        "pricingType" : "GRADUATED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    }
                  },
                  "VolumePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "tiers" : [ {
                          "upperBound" : "100",
                          "price" : "1.00",
                          "fee" : "50.00",
                          "isPricePercentage" : true,
                          "maxPrice" : "10",
                          "minPrice" : "5"
                        }, {
                          "price" : "0.75",
                          "fee" : "25.00",
                          "isPricePercentage" : true,
                          "maxPrice" : "10",
                          "minPrice" : "5"
                        } ],
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "pricingType" : "VOLUME"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "SeatBasedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "seatMetricId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "pricePerSeat" : "0.25",
                        "prorationStrategy" : "USE_MAXIMUM",
                        "contractedMinimumSeats" : 10,
                        "overagesBillingFrequency" : "YEARLY",
                        "tiers" : [ {
                          "upperBound" : "100",
                          "price" : "1.00",
                          "fee" : "50.00"
                        }, {
                          "price" : "0.75",
                          "fee" : "25.00"
                        } ],
                        "prorateFlatFees" : false,
                        "pricingType" : "SEAT_BASED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "PackagePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "packageSize" : "50",
                        "pricePerPackage" : "2.00",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "pricingType" : "PACKAGE"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "LinearPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "FixedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "price" : "20.00",
                        "pricingType" : "FIXED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "OneTimePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "price" : "150.00",
                        "pricingType" : "ONE_TIME"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put" : {
        "tags" : [ "Prices" ],
        "summary" : "Update a Price",
        "description" : "Update a Price",
        "operationId" : "putPricesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Unique Price ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdatePriceRequest",
                "example" : {
                  "name" : "Demo Product",
                  "status" : "ACTIVE"
                }
              },
              "examples" : {
                "UpdatePriceRequest" : {
                  "summary" : "",
                  "value" : {
                    "name" : "Demo Product",
                    "status" : "ACTIVE"
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "example" : {
                    "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "tiers" : [ {
                        "upperBound" : "200",
                        "price" : "1.00",
                        "fee" : "50.00",
                        "isPricePercentage" : false
                      }, {
                        "upperBound" : "400",
                        "price" : "0.75",
                        "fee" : "25.00",
                        "isPricePercentage" : false
                      }, {
                        "price" : "0.50",
                        "fee" : "0.00",
                        "isPricePercentage" : false
                      } ],
                      "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                      "usageCalculationMode" : "BILLING_PERIOD",
                      "pricingType" : "GRADUATED"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123",
                      "isPending" : false
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "usageCalculationPeriod" : {
                      "frequency" : "MONTHLY",
                      "interval" : 1
                    },
                    "status" : "ACTIVE"
                  },
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/OneTimePriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/FixedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/LinearPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/PackagePriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/SeatBasedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/GraduatedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/VolumePriceResponse"
                  } ]
                },
                "examples" : {
                  "GraduatedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "tiers" : [ {
                          "upperBound" : "200",
                          "price" : "1.00",
                          "fee" : "50.00",
                          "isPricePercentage" : false
                        }, {
                          "upperBound" : "400",
                          "price" : "0.75",
                          "fee" : "25.00",
                          "isPricePercentage" : false
                        }, {
                          "price" : "0.50",
                          "fee" : "0.00",
                          "isPricePercentage" : false
                        } ],
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "usageCalculationMode" : "BILLING_PERIOD",
                        "pricingType" : "GRADUATED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    }
                  },
                  "VolumePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "tiers" : [ {
                          "upperBound" : "100",
                          "price" : "1.00",
                          "fee" : "50.00",
                          "isPricePercentage" : true,
                          "maxPrice" : "10",
                          "minPrice" : "5"
                        }, {
                          "price" : "0.75",
                          "fee" : "25.00",
                          "isPricePercentage" : true,
                          "maxPrice" : "10",
                          "minPrice" : "5"
                        } ],
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "pricingType" : "VOLUME"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "SeatBasedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "seatMetricId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "pricePerSeat" : "0.25",
                        "prorationStrategy" : "USE_MAXIMUM",
                        "contractedMinimumSeats" : 10,
                        "overagesBillingFrequency" : "YEARLY",
                        "tiers" : [ {
                          "upperBound" : "100",
                          "price" : "1.00",
                          "fee" : "50.00"
                        }, {
                          "price" : "0.75",
                          "fee" : "25.00"
                        } ],
                        "prorateFlatFees" : false,
                        "pricingType" : "SEAT_BASED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "PackagePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "packageSize" : "50",
                        "pricePerPackage" : "2.00",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "pricingType" : "PACKAGE"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "LinearPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "FixedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "price" : "20.00",
                        "pricingType" : "FIXED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "OneTimePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "price" : "150.00",
                        "pricingType" : "ONE_TIME"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Prices" ],
        "summary" : "Delete a Price",
        "description" : "Delete a Price",
        "operationId" : "deletePricesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Unique Price ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "example" : {
                    "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                    "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                    "name" : "Demo Product",
                    "currency" : "GBP",
                    "structure" : {
                      "tiers" : [ {
                        "upperBound" : "200",
                        "price" : "1.00",
                        "fee" : "50.00",
                        "isPricePercentage" : false
                      }, {
                        "upperBound" : "400",
                        "price" : "0.75",
                        "fee" : "25.00",
                        "isPricePercentage" : false
                      }, {
                        "price" : "0.50",
                        "fee" : "0.00",
                        "isPricePercentage" : false
                      } ],
                      "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                      "usageCalculationMode" : "BILLING_PERIOD",
                      "pricingType" : "GRADUATED"
                    },
                    "billingFrequency" : "MONTHLY",
                    "billingType" : "IN_ARREARS",
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "123",
                      "isPending" : false
                    } ],
                    "customMetricParameters" : [ {
                      "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "value" : "10"
                    } ],
                    "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                    "usageCalculationPeriod" : {
                      "frequency" : "MONTHLY",
                      "interval" : 1
                    },
                    "status" : "ACTIVE"
                  },
                  "oneOf" : [ {
                    "$ref" : "#/components/schemas/OneTimePriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/FixedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/LinearPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/PackagePriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/SeatBasedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/GraduatedPriceResponse"
                  }, {
                    "$ref" : "#/components/schemas/VolumePriceResponse"
                  } ]
                },
                "examples" : {
                  "GraduatedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "tiers" : [ {
                          "upperBound" : "200",
                          "price" : "1.00",
                          "fee" : "50.00",
                          "isPricePercentage" : false
                        }, {
                          "upperBound" : "400",
                          "price" : "0.75",
                          "fee" : "25.00",
                          "isPricePercentage" : false
                        }, {
                          "price" : "0.50",
                          "fee" : "0.00",
                          "isPricePercentage" : false
                        } ],
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "usageCalculationMode" : "BILLING_PERIOD",
                        "pricingType" : "GRADUATED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    }
                  },
                  "VolumePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "tiers" : [ {
                          "upperBound" : "100",
                          "price" : "1.00",
                          "fee" : "50.00",
                          "isPricePercentage" : true,
                          "maxPrice" : "10",
                          "minPrice" : "5"
                        }, {
                          "price" : "0.75",
                          "fee" : "25.00",
                          "isPricePercentage" : true,
                          "maxPrice" : "10",
                          "minPrice" : "5"
                        } ],
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "pricingType" : "VOLUME"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "SeatBasedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "seatMetricId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "pricePerSeat" : "0.25",
                        "prorationStrategy" : "USE_MAXIMUM",
                        "contractedMinimumSeats" : 10,
                        "overagesBillingFrequency" : "YEARLY",
                        "tiers" : [ {
                          "upperBound" : "100",
                          "price" : "1.00",
                          "fee" : "50.00"
                        }, {
                          "price" : "0.75",
                          "fee" : "25.00"
                        } ],
                        "prorateFlatFees" : false,
                        "pricingType" : "SEAT_BASED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "PackagePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "packageSize" : "50",
                        "pricePerPackage" : "2.00",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "pricingType" : "PACKAGE"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "LinearPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "FixedPriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "price" : "20.00",
                        "pricingType" : "FIXED"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  },
                  "OneTimePriceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "price" : "150.00",
                        "pricingType" : "ONE_TIME"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "status" : "ACTIVE"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credits/{id}" : {
      "get" : {
        "tags" : [ "Credits" ],
        "summary" : "Get a credit grant",
        "description" : "Get a credit grant by ID",
        "operationId" : "getCreditsById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit grant ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CreditGrant",
                  "example" : {
                    "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
                    "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "name" : "On-boarding Credits",
                    "creditUnitType" : "CURRENCY",
                    "currency" : "GBP",
                    "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                    "amount" : 10,
                    "costOfCredit" : 10,
                    "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                    "effectiveDate" : "2023-01-01",
                    "expiryDate" : "2023-01-31",
                    "createdAt" : "2022-10-07T14:12:08.826121Z",
                    "creditNoteId" : "73086198-8752-4ec9-a99b-16209a32dc6c",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "74ed2615-4730-49ab-9445-74f31723a206",
                      "isPending" : false
                    } ]
                  }
                },
                "examples" : {
                  "CreditGrant" : {
                    "summary" : "",
                    "value" : {
                      "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
                      "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "name" : "On-boarding Credits",
                      "creditUnitType" : "CURRENCY",
                      "currency" : "GBP",
                      "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                      "amount" : 10,
                      "costOfCredit" : 10,
                      "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                      "effectiveDate" : "2023-01-01",
                      "expiryDate" : "2023-01-31",
                      "createdAt" : "2022-10-07T14:12:08.826121Z",
                      "creditNoteId" : "73086198-8752-4ec9-a99b-16209a32dc6c",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "74ed2615-4730-49ab-9445-74f31723a206",
                        "isPending" : false
                      } ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Credits" ],
        "summary" : "Delete a credit grant",
        "description" : "Delete a credit grant by ID",
        "operationId" : "deleteCreditsById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit grant ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CreditGrantResponse2",
                  "example" : {
                    "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
                    "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "name" : "Onboarding Credits",
                    "creditUnitType" : "CURRENCY",
                    "currency" : "GBP",
                    "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                    "amount" : 10,
                    "costOfCredit" : 10,
                    "effectiveDate" : "2023-01-01",
                    "expiryDate" : "2023-01-31",
                    "createdAt" : "2022-10-07T14:12:08.826121Z",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "74ed2615-4730-49ab-9445-74f31723a206",
                      "isPending" : false
                    } ]
                  }
                },
                "examples" : {
                  "CreditGrantResponse2" : {
                    "summary" : "",
                    "value" : {
                      "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
                      "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "name" : "Onboarding Credits",
                      "creditUnitType" : "CURRENCY",
                      "currency" : "GBP",
                      "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                      "amount" : 10,
                      "costOfCredit" : 10,
                      "effectiveDate" : "2023-01-01",
                      "expiryDate" : "2023-01-31",
                      "createdAt" : "2022-10-07T14:12:08.826121Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "74ed2615-4730-49ab-9445-74f31723a206",
                        "isPending" : false
                      } ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/billing-schedules/{billingScheduleId}" : {
      "get" : {
        "tags" : [ "Billing Schedules" ],
        "summary" : "Get Billing Schedule",
        "description" : "Retrieve the details of one of your Billing Schedules.",
        "operationId" : "getBillingSchedulesByBillingScheduleId",
        "parameters" : [ {
          "name" : "billingScheduleId",
          "in" : "path",
          "description" : "Billing Schedule ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingScheduleResponse",
                  "example" : {
                    "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                    "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                    "status" : "ACTIVE",
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-01",
                    "taxRates" : [ {
                      "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                    } ],
                    "firstBillingDate" : "2022-02-02",
                    "autoIssueInvoices" : false,
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "label" : "label",
                    "recurrenceDayOfMonth" : 1,
                    "prices" : [ {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    } ],
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                    "phases" : [ {
                      "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "name" : "Onboarding",
                      "externalContractRef" : "ACME-2022-MSA",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-06-30",
                      "discounts" : [ {
                        "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "type" : "PERCENTAGE",
                        "amount" : 15,
                        "message" : "15% Discount",
                        "separateLineItem" : true,
                        "seatDiscountType" : "ALL_SEATS"
                      } ],
                      "minimums" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "amount" : 100,
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "creditGrants" : [ {
                        "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                        "name" : "Monthly usage credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "amount" : 100,
                        "costOfCredit" : 0,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "grantRefreshFrequency" : "MONTHLY",
                        "billingFrequency" : "MONTHLY",
                        "rolloverMode" : "NONE",
                        "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                      } ],
                      "integrationIds" : [ {
                        "service" : "NetSuite",
                        "id" : "SO-1024",
                        "lastSynced" : "2022-06-28T16:47:00Z",
                        "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                        "isPending" : false
                      } ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    } ],
                    "archivedAt" : "2022-06-28T16:47:00Z",
                    "rollUpBilling" : false,
                    "integrationIds" : [ {
                      "service" : "Salesforce",
                      "id" : "a0CQy00000Ipz5VMAR",
                      "lastSynced" : "2024-08-14T17:14:17Z",
                      "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                      "isPending" : false
                    } ],
                    "attachmentAssets" : [ {
                      "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                      "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "type" : "IMAGE",
                      "format" : "PNG",
                      "fileName" : "my-image.png",
                      "fileSizeBytes" : 12345,
                      "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                      "createdAt" : "2022-06-28T16:47:00Z"
                    } ],
                    "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                    "defaultDueDateDays" : 30,
                    "memo" : "Example Billing Schedule",
                    "customFields" : {
                      "key" : "value"
                    },
                    "paymentProvider" : "STRIPE",
                    "autoCharge" : true
                  }
                },
                "examples" : {
                  "BillingScheduleResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                      "status" : "ACTIVE",
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-12-01",
                      "taxRates" : [ {
                        "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                      } ],
                      "firstBillingDate" : "2022-02-02",
                      "autoIssueInvoices" : false,
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "label" : "label",
                      "recurrenceDayOfMonth" : 1,
                      "prices" : [ {
                        "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                        "name" : "Demo Product",
                        "currency" : "GBP",
                        "structure" : {
                          "pricePerUnit" : "0.25",
                          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                          "isPricePercentage" : false,
                          "pricingType" : "LINEAR"
                        },
                        "billingFrequency" : "MONTHLY",
                        "billingType" : "IN_ARREARS",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "integrationIds" : [ {
                          "service" : "Xero",
                          "id" : "123",
                          "isPending" : false
                        } ],
                        "customMetricParameters" : [ {
                          "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                          "value" : "10"
                        } ],
                        "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                        "usageCalculationPeriod" : {
                          "frequency" : "MONTHLY",
                          "interval" : 1
                        },
                        "status" : "ACTIVE"
                      } ],
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                      "phases" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "name" : "Onboarding",
                        "externalContractRef" : "ACME-2022-MSA",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "startDate" : "2022-01-01",
                        "endDate" : "2022-06-30",
                        "discounts" : [ {
                          "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "type" : "PERCENTAGE",
                          "amount" : 15,
                          "message" : "15% Discount",
                          "separateLineItem" : true,
                          "seatDiscountType" : "ALL_SEATS"
                        } ],
                        "minimums" : [ {
                          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                          "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "amount" : 100,
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "createdAt" : "2022-06-28T16:47:00Z",
                          "updatedAt" : "2022-06-28T16:47:00Z"
                        } ],
                        "creditGrants" : [ {
                          "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                          "name" : "Monthly usage credits",
                          "creditUnitType" : "CURRENCY",
                          "currency" : "GBP",
                          "amount" : 100,
                          "costOfCredit" : 0,
                          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                          "grantRefreshFrequency" : "MONTHLY",
                          "billingFrequency" : "MONTHLY",
                          "rolloverMode" : "NONE",
                          "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                        } ],
                        "integrationIds" : [ {
                          "service" : "NetSuite",
                          "id" : "SO-1024",
                          "lastSynced" : "2022-06-28T16:47:00Z",
                          "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                          "isPending" : false
                        } ],
                        "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                        "phasePriceMetadata" : [ {
                          "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "arrCalculation" : "INCLUDE"
                        } ]
                      } ],
                      "archivedAt" : "2022-06-28T16:47:00Z",
                      "rollUpBilling" : false,
                      "integrationIds" : [ {
                        "service" : "Salesforce",
                        "id" : "a0CQy00000Ipz5VMAR",
                        "lastSynced" : "2024-08-14T17:14:17Z",
                        "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                        "isPending" : false
                      } ],
                      "attachmentAssets" : [ {
                        "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "type" : "IMAGE",
                        "format" : "PNG",
                        "fileName" : "my-image.png",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                      "defaultDueDateDays" : 30,
                      "memo" : "Example Billing Schedule",
                      "customFields" : {
                        "key" : "value"
                      },
                      "paymentProvider" : "STRIPE",
                      "autoCharge" : true
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put" : {
        "tags" : [ "Billing Schedules" ],
        "summary" : "Update Billing Schedule",
        "description" : "Update an existing [Billing Schedule](/billing/create-billing-schedules).",
        "operationId" : "putBillingSchedulesByBillingScheduleId",
        "parameters" : [ {
          "name" : "billingScheduleId",
          "in" : "path",
          "description" : "Billing Schedule ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateBillingScheduleRequest",
                "example" : {
                  "startDate" : "2022-01-01",
                  "endDate" : "2022-12-01",
                  "recurrenceDayOfMonth" : 1,
                  "taxRates" : [ {
                    "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                    "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                  } ],
                  "autoIssueInvoices" : true,
                  "purchaseOrderNumber" : "PO123",
                  "rollUpBilling" : false,
                  "phases" : [ {
                    "externalContractRef" : "ACME-2022-MSA",
                    "priceIds" : [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ],
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-01",
                    "discounts" : [ ],
                    "minimums" : [ ],
                    "creditGrants" : [ {
                      "id" : "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40",
                      "name" : "Monthly usage credits",
                      "creditUnitType" : "CURRENCY",
                      "currency" : "GBP",
                      "amount" : 100,
                      "costOfCredit" : 0,
                      "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                      "grantRefreshFrequency" : "MONTHLY",
                      "billingFrequency" : "MONTHLY",
                      "rolloverMode" : "NONE",
                      "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                    } ],
                    "listPriceIds" : [ "b4d7e884-e007-4183-8355-4771865c5100" ],
                    "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                    "phasePriceMetadata" : [ {
                      "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "arrCalculation" : "INCLUDE"
                    } ],
                    "phaseListPriceMetadata" : [ {
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "arrCalculation" : "INCLUDE"
                    } ]
                  } ],
                  "attachmentAssetIds" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
                  "defaultDueDateDays" : 30,
                  "memo" : "Example Billing Schedule",
                  "customFields" : {
                    "key" : "value"
                  }
                }
              },
              "examples" : {
                "UpdateBillingScheduleRequest" : {
                  "summary" : "",
                  "value" : {
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-01",
                    "recurrenceDayOfMonth" : 1,
                    "taxRates" : [ {
                      "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                    } ],
                    "autoIssueInvoices" : true,
                    "purchaseOrderNumber" : "PO123",
                    "rollUpBilling" : false,
                    "phases" : [ {
                      "externalContractRef" : "ACME-2022-MSA",
                      "priceIds" : [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ],
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-12-01",
                      "discounts" : [ ],
                      "minimums" : [ ],
                      "creditGrants" : [ {
                        "id" : "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40",
                        "name" : "Monthly usage credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "amount" : 100,
                        "costOfCredit" : 0,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "grantRefreshFrequency" : "MONTHLY",
                        "billingFrequency" : "MONTHLY",
                        "rolloverMode" : "NONE",
                        "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                      } ],
                      "listPriceIds" : [ "b4d7e884-e007-4183-8355-4771865c5100" ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ],
                      "phaseListPriceMetadata" : [ {
                        "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    } ],
                    "attachmentAssetIds" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
                    "defaultDueDateDays" : 30,
                    "memo" : "Example Billing Schedule",
                    "customFields" : {
                      "key" : "value"
                    }
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingScheduleResponse",
                  "example" : {
                    "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                    "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                    "status" : "ACTIVE",
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-01",
                    "taxRates" : [ {
                      "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                    } ],
                    "firstBillingDate" : "2022-02-02",
                    "autoIssueInvoices" : false,
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "label" : "label",
                    "recurrenceDayOfMonth" : 1,
                    "prices" : [ {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    } ],
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                    "phases" : [ {
                      "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "name" : "Onboarding",
                      "externalContractRef" : "ACME-2022-MSA",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-06-30",
                      "discounts" : [ {
                        "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "type" : "PERCENTAGE",
                        "amount" : 15,
                        "message" : "15% Discount",
                        "separateLineItem" : true,
                        "seatDiscountType" : "ALL_SEATS"
                      } ],
                      "minimums" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "amount" : 100,
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "creditGrants" : [ {
                        "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                        "name" : "Monthly usage credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "amount" : 100,
                        "costOfCredit" : 0,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "grantRefreshFrequency" : "MONTHLY",
                        "billingFrequency" : "MONTHLY",
                        "rolloverMode" : "NONE",
                        "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                      } ],
                      "integrationIds" : [ {
                        "service" : "NetSuite",
                        "id" : "SO-1024",
                        "lastSynced" : "2022-06-28T16:47:00Z",
                        "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                        "isPending" : false
                      } ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    } ],
                    "archivedAt" : "2022-06-28T16:47:00Z",
                    "rollUpBilling" : false,
                    "integrationIds" : [ {
                      "service" : "Salesforce",
                      "id" : "a0CQy00000Ipz5VMAR",
                      "lastSynced" : "2024-08-14T17:14:17Z",
                      "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                      "isPending" : false
                    } ],
                    "attachmentAssets" : [ {
                      "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                      "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "type" : "IMAGE",
                      "format" : "PNG",
                      "fileName" : "my-image.png",
                      "fileSizeBytes" : 12345,
                      "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                      "createdAt" : "2022-06-28T16:47:00Z"
                    } ],
                    "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                    "defaultDueDateDays" : 30,
                    "memo" : "Example Billing Schedule",
                    "customFields" : {
                      "key" : "value"
                    },
                    "paymentProvider" : "STRIPE",
                    "autoCharge" : true
                  }
                },
                "examples" : {
                  "BillingScheduleResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                      "status" : "ACTIVE",
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-12-01",
                      "taxRates" : [ {
                        "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                      } ],
                      "firstBillingDate" : "2022-02-02",
                      "autoIssueInvoices" : false,
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "label" : "label",
                      "recurrenceDayOfMonth" : 1,
                      "prices" : [ {
                        "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                        "name" : "Demo Product",
                        "currency" : "GBP",
                        "structure" : {
                          "pricePerUnit" : "0.25",
                          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                          "isPricePercentage" : false,
                          "pricingType" : "LINEAR"
                        },
                        "billingFrequency" : "MONTHLY",
                        "billingType" : "IN_ARREARS",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "integrationIds" : [ {
                          "service" : "Xero",
                          "id" : "123",
                          "isPending" : false
                        } ],
                        "customMetricParameters" : [ {
                          "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                          "value" : "10"
                        } ],
                        "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                        "usageCalculationPeriod" : {
                          "frequency" : "MONTHLY",
                          "interval" : 1
                        },
                        "status" : "ACTIVE"
                      } ],
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                      "phases" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "name" : "Onboarding",
                        "externalContractRef" : "ACME-2022-MSA",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "startDate" : "2022-01-01",
                        "endDate" : "2022-06-30",
                        "discounts" : [ {
                          "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "type" : "PERCENTAGE",
                          "amount" : 15,
                          "message" : "15% Discount",
                          "separateLineItem" : true,
                          "seatDiscountType" : "ALL_SEATS"
                        } ],
                        "minimums" : [ {
                          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                          "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "amount" : 100,
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "createdAt" : "2022-06-28T16:47:00Z",
                          "updatedAt" : "2022-06-28T16:47:00Z"
                        } ],
                        "creditGrants" : [ {
                          "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                          "name" : "Monthly usage credits",
                          "creditUnitType" : "CURRENCY",
                          "currency" : "GBP",
                          "amount" : 100,
                          "costOfCredit" : 0,
                          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                          "grantRefreshFrequency" : "MONTHLY",
                          "billingFrequency" : "MONTHLY",
                          "rolloverMode" : "NONE",
                          "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                        } ],
                        "integrationIds" : [ {
                          "service" : "NetSuite",
                          "id" : "SO-1024",
                          "lastSynced" : "2022-06-28T16:47:00Z",
                          "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                          "isPending" : false
                        } ],
                        "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                        "phasePriceMetadata" : [ {
                          "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "arrCalculation" : "INCLUDE"
                        } ]
                      } ],
                      "archivedAt" : "2022-06-28T16:47:00Z",
                      "rollUpBilling" : false,
                      "integrationIds" : [ {
                        "service" : "Salesforce",
                        "id" : "a0CQy00000Ipz5VMAR",
                        "lastSynced" : "2024-08-14T17:14:17Z",
                        "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                        "isPending" : false
                      } ],
                      "attachmentAssets" : [ {
                        "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "type" : "IMAGE",
                        "format" : "PNG",
                        "fileName" : "my-image.png",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                      "defaultDueDateDays" : 30,
                      "memo" : "Example Billing Schedule",
                      "customFields" : {
                        "key" : "value"
                      },
                      "paymentProvider" : "STRIPE",
                      "autoCharge" : true
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/discounts/{id}" : {
      "get" : {
        "tags" : [ "Discounts" ],
        "summary" : "Get a discount by ID",
        "description" : "Get a discount by ID",
        "operationId" : "getDiscountsById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Discount ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DiscountResponse",
                  "example" : {
                    "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
                    "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
                    "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                    "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
                    "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                    "separateLineItem" : false,
                    "amount" : 25,
                    "discountCalculationType" : "PERCENTAGE",
                    "message" : "Loyalty Discount",
                    "validFrom" : "2023-01-01",
                    "validTo" : "2023-01-31",
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "seatDiscountType" : "ALL_SEATS"
                  }
                },
                "examples" : {
                  "DiscountResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
                      "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
                      "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                      "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
                      "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                      "separateLineItem" : false,
                      "amount" : 25,
                      "discountCalculationType" : "PERCENTAGE",
                      "message" : "Loyalty Discount",
                      "validFrom" : "2023-01-01",
                      "validTo" : "2023-01-31",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "seatDiscountType" : "ALL_SEATS"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put" : {
        "tags" : [ "Discounts" ],
        "summary" : "Update a discount",
        "description" : "Update a discount",
        "operationId" : "putDiscountsById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Discount ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateDiscountRequest",
                "example" : {
                  "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                  "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                  "separateLineItem" : false,
                  "amount" : 25,
                  "discountCalculationType" : "PERCENTAGE",
                  "message" : "Loyalty Discount",
                  "validFrom" : "2023-01-01",
                  "validTo" : "2023-01-31"
                }
              },
              "examples" : {
                "UpdateDiscountRequest" : {
                  "summary" : "",
                  "value" : {
                    "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                    "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                    "separateLineItem" : false,
                    "amount" : 25,
                    "discountCalculationType" : "PERCENTAGE",
                    "message" : "Loyalty Discount",
                    "validFrom" : "2023-01-01",
                    "validTo" : "2023-01-31"
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DiscountResponse",
                  "example" : {
                    "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
                    "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
                    "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                    "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
                    "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                    "separateLineItem" : false,
                    "amount" : 25,
                    "discountCalculationType" : "PERCENTAGE",
                    "message" : "Loyalty Discount",
                    "validFrom" : "2023-01-01",
                    "validTo" : "2023-01-31",
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "seatDiscountType" : "ALL_SEATS"
                  }
                },
                "examples" : {
                  "DiscountResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
                      "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
                      "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                      "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
                      "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                      "separateLineItem" : false,
                      "amount" : 25,
                      "discountCalculationType" : "PERCENTAGE",
                      "message" : "Loyalty Discount",
                      "validFrom" : "2023-01-01",
                      "validTo" : "2023-01-31",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "seatDiscountType" : "ALL_SEATS"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Discounts" ],
        "summary" : "Delete a discount",
        "description" : "Delete a discount",
        "operationId" : "deleteDiscountsById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Discount ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/DiscountResponse",
                  "example" : {
                    "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
                    "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
                    "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                    "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
                    "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                    "separateLineItem" : false,
                    "amount" : 25,
                    "discountCalculationType" : "PERCENTAGE",
                    "message" : "Loyalty Discount",
                    "validFrom" : "2023-01-01",
                    "validTo" : "2023-01-31",
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "seatDiscountType" : "ALL_SEATS"
                  }
                },
                "examples" : {
                  "DiscountResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
                      "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
                      "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                      "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
                      "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                      "separateLineItem" : false,
                      "amount" : 25,
                      "discountCalculationType" : "PERCENTAGE",
                      "message" : "Loyalty Discount",
                      "validFrom" : "2023-01-01",
                      "validTo" : "2023-01-31",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "seatDiscountType" : "ALL_SEATS"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/billing-schedules/{billingScheduleId}/activate" : {
      "put" : {
        "tags" : [ "Billing Schedules" ],
        "summary" : "Activate Billing Schedule",
        "description" : "Activate an existing draft [Billing Schedule](/billing/create-billing-schedules).",
        "operationId" : "putBillingSchedulesByBillingScheduleIdActivate",
        "parameters" : [ {
          "name" : "billingScheduleId",
          "in" : "path",
          "description" : "Billing Schedule ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingScheduleResponse",
                  "example" : {
                    "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                    "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                    "status" : "ACTIVE",
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-01",
                    "taxRates" : [ {
                      "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                    } ],
                    "firstBillingDate" : "2022-02-02",
                    "autoIssueInvoices" : false,
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "label" : "label",
                    "recurrenceDayOfMonth" : 1,
                    "prices" : [ {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    } ],
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                    "phases" : [ {
                      "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "name" : "Onboarding",
                      "externalContractRef" : "ACME-2022-MSA",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-06-30",
                      "discounts" : [ {
                        "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "type" : "PERCENTAGE",
                        "amount" : 15,
                        "message" : "15% Discount",
                        "separateLineItem" : true,
                        "seatDiscountType" : "ALL_SEATS"
                      } ],
                      "minimums" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "amount" : 100,
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "creditGrants" : [ {
                        "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                        "name" : "Monthly usage credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "amount" : 100,
                        "costOfCredit" : 0,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "grantRefreshFrequency" : "MONTHLY",
                        "billingFrequency" : "MONTHLY",
                        "rolloverMode" : "NONE",
                        "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                      } ],
                      "integrationIds" : [ {
                        "service" : "NetSuite",
                        "id" : "SO-1024",
                        "lastSynced" : "2022-06-28T16:47:00Z",
                        "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                        "isPending" : false
                      } ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    } ],
                    "archivedAt" : "2022-06-28T16:47:00Z",
                    "rollUpBilling" : false,
                    "integrationIds" : [ {
                      "service" : "Salesforce",
                      "id" : "a0CQy00000Ipz5VMAR",
                      "lastSynced" : "2024-08-14T17:14:17Z",
                      "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                      "isPending" : false
                    } ],
                    "attachmentAssets" : [ {
                      "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                      "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "type" : "IMAGE",
                      "format" : "PNG",
                      "fileName" : "my-image.png",
                      "fileSizeBytes" : 12345,
                      "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                      "createdAt" : "2022-06-28T16:47:00Z"
                    } ],
                    "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                    "defaultDueDateDays" : 30,
                    "memo" : "Example Billing Schedule",
                    "customFields" : {
                      "key" : "value"
                    },
                    "paymentProvider" : "STRIPE",
                    "autoCharge" : true
                  }
                },
                "examples" : {
                  "BillingScheduleResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                      "status" : "ACTIVE",
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-12-01",
                      "taxRates" : [ {
                        "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                      } ],
                      "firstBillingDate" : "2022-02-02",
                      "autoIssueInvoices" : false,
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "label" : "label",
                      "recurrenceDayOfMonth" : 1,
                      "prices" : [ {
                        "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                        "name" : "Demo Product",
                        "currency" : "GBP",
                        "structure" : {
                          "pricePerUnit" : "0.25",
                          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                          "isPricePercentage" : false,
                          "pricingType" : "LINEAR"
                        },
                        "billingFrequency" : "MONTHLY",
                        "billingType" : "IN_ARREARS",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "integrationIds" : [ {
                          "service" : "Xero",
                          "id" : "123",
                          "isPending" : false
                        } ],
                        "customMetricParameters" : [ {
                          "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                          "value" : "10"
                        } ],
                        "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                        "usageCalculationPeriod" : {
                          "frequency" : "MONTHLY",
                          "interval" : 1
                        },
                        "status" : "ACTIVE"
                      } ],
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                      "phases" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "name" : "Onboarding",
                        "externalContractRef" : "ACME-2022-MSA",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "startDate" : "2022-01-01",
                        "endDate" : "2022-06-30",
                        "discounts" : [ {
                          "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "type" : "PERCENTAGE",
                          "amount" : 15,
                          "message" : "15% Discount",
                          "separateLineItem" : true,
                          "seatDiscountType" : "ALL_SEATS"
                        } ],
                        "minimums" : [ {
                          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                          "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "amount" : 100,
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "createdAt" : "2022-06-28T16:47:00Z",
                          "updatedAt" : "2022-06-28T16:47:00Z"
                        } ],
                        "creditGrants" : [ {
                          "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                          "name" : "Monthly usage credits",
                          "creditUnitType" : "CURRENCY",
                          "currency" : "GBP",
                          "amount" : 100,
                          "costOfCredit" : 0,
                          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                          "grantRefreshFrequency" : "MONTHLY",
                          "billingFrequency" : "MONTHLY",
                          "rolloverMode" : "NONE",
                          "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                        } ],
                        "integrationIds" : [ {
                          "service" : "NetSuite",
                          "id" : "SO-1024",
                          "lastSynced" : "2022-06-28T16:47:00Z",
                          "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                          "isPending" : false
                        } ],
                        "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                        "phasePriceMetadata" : [ {
                          "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "arrCalculation" : "INCLUDE"
                        } ]
                      } ],
                      "archivedAt" : "2022-06-28T16:47:00Z",
                      "rollUpBilling" : false,
                      "integrationIds" : [ {
                        "service" : "Salesforce",
                        "id" : "a0CQy00000Ipz5VMAR",
                        "lastSynced" : "2024-08-14T17:14:17Z",
                        "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                        "isPending" : false
                      } ],
                      "attachmentAssets" : [ {
                        "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "type" : "IMAGE",
                        "format" : "PNG",
                        "fileName" : "my-image.png",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                      "defaultDueDateDays" : 30,
                      "memo" : "Example Billing Schedule",
                      "customFields" : {
                        "key" : "value"
                      },
                      "paymentProvider" : "STRIPE",
                      "autoCharge" : true
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/billing-schedules/{billingScheduleId}/archive" : {
      "post" : {
        "tags" : [ "Billing Schedules" ],
        "summary" : "Archive Billing Schedule",
        "description" : "Archive a [Billing Schedule](/billing/create-billing-schedules).",
        "operationId" : "postBillingSchedulesByBillingScheduleIdArchive",
        "parameters" : [ {
          "name" : "billingScheduleId",
          "in" : "path",
          "description" : "Billing Schedule ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingScheduleResponse",
                  "example" : {
                    "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                    "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                    "status" : "ACTIVE",
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-01",
                    "taxRates" : [ {
                      "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                    } ],
                    "firstBillingDate" : "2022-02-02",
                    "autoIssueInvoices" : false,
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "label" : "label",
                    "recurrenceDayOfMonth" : 1,
                    "prices" : [ {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    } ],
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                    "phases" : [ {
                      "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "name" : "Onboarding",
                      "externalContractRef" : "ACME-2022-MSA",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-06-30",
                      "discounts" : [ {
                        "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "type" : "PERCENTAGE",
                        "amount" : 15,
                        "message" : "15% Discount",
                        "separateLineItem" : true,
                        "seatDiscountType" : "ALL_SEATS"
                      } ],
                      "minimums" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "amount" : 100,
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "creditGrants" : [ {
                        "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                        "name" : "Monthly usage credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "amount" : 100,
                        "costOfCredit" : 0,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "grantRefreshFrequency" : "MONTHLY",
                        "billingFrequency" : "MONTHLY",
                        "rolloverMode" : "NONE",
                        "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                      } ],
                      "integrationIds" : [ {
                        "service" : "NetSuite",
                        "id" : "SO-1024",
                        "lastSynced" : "2022-06-28T16:47:00Z",
                        "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                        "isPending" : false
                      } ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    } ],
                    "archivedAt" : "2022-06-28T16:47:00Z",
                    "rollUpBilling" : false,
                    "integrationIds" : [ {
                      "service" : "Salesforce",
                      "id" : "a0CQy00000Ipz5VMAR",
                      "lastSynced" : "2024-08-14T17:14:17Z",
                      "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                      "isPending" : false
                    } ],
                    "attachmentAssets" : [ {
                      "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                      "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "type" : "IMAGE",
                      "format" : "PNG",
                      "fileName" : "my-image.png",
                      "fileSizeBytes" : 12345,
                      "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                      "createdAt" : "2022-06-28T16:47:00Z"
                    } ],
                    "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                    "defaultDueDateDays" : 30,
                    "memo" : "Example Billing Schedule",
                    "customFields" : {
                      "key" : "value"
                    },
                    "paymentProvider" : "STRIPE",
                    "autoCharge" : true
                  }
                },
                "examples" : {
                  "BillingScheduleResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                      "status" : "ACTIVE",
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-12-01",
                      "taxRates" : [ {
                        "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                      } ],
                      "firstBillingDate" : "2022-02-02",
                      "autoIssueInvoices" : false,
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "label" : "label",
                      "recurrenceDayOfMonth" : 1,
                      "prices" : [ {
                        "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                        "name" : "Demo Product",
                        "currency" : "GBP",
                        "structure" : {
                          "pricePerUnit" : "0.25",
                          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                          "isPricePercentage" : false,
                          "pricingType" : "LINEAR"
                        },
                        "billingFrequency" : "MONTHLY",
                        "billingType" : "IN_ARREARS",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "integrationIds" : [ {
                          "service" : "Xero",
                          "id" : "123",
                          "isPending" : false
                        } ],
                        "customMetricParameters" : [ {
                          "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                          "value" : "10"
                        } ],
                        "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                        "usageCalculationPeriod" : {
                          "frequency" : "MONTHLY",
                          "interval" : 1
                        },
                        "status" : "ACTIVE"
                      } ],
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                      "phases" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "name" : "Onboarding",
                        "externalContractRef" : "ACME-2022-MSA",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "startDate" : "2022-01-01",
                        "endDate" : "2022-06-30",
                        "discounts" : [ {
                          "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "type" : "PERCENTAGE",
                          "amount" : 15,
                          "message" : "15% Discount",
                          "separateLineItem" : true,
                          "seatDiscountType" : "ALL_SEATS"
                        } ],
                        "minimums" : [ {
                          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                          "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "amount" : 100,
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "createdAt" : "2022-06-28T16:47:00Z",
                          "updatedAt" : "2022-06-28T16:47:00Z"
                        } ],
                        "creditGrants" : [ {
                          "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                          "name" : "Monthly usage credits",
                          "creditUnitType" : "CURRENCY",
                          "currency" : "GBP",
                          "amount" : 100,
                          "costOfCredit" : 0,
                          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                          "grantRefreshFrequency" : "MONTHLY",
                          "billingFrequency" : "MONTHLY",
                          "rolloverMode" : "NONE",
                          "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                        } ],
                        "integrationIds" : [ {
                          "service" : "NetSuite",
                          "id" : "SO-1024",
                          "lastSynced" : "2022-06-28T16:47:00Z",
                          "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                          "isPending" : false
                        } ],
                        "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                        "phasePriceMetadata" : [ {
                          "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "arrCalculation" : "INCLUDE"
                        } ]
                      } ],
                      "archivedAt" : "2022-06-28T16:47:00Z",
                      "rollUpBilling" : false,
                      "integrationIds" : [ {
                        "service" : "Salesforce",
                        "id" : "a0CQy00000Ipz5VMAR",
                        "lastSynced" : "2024-08-14T17:14:17Z",
                        "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                        "isPending" : false
                      } ],
                      "attachmentAssets" : [ {
                        "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "type" : "IMAGE",
                        "format" : "PNG",
                        "fileName" : "my-image.png",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                      "defaultDueDateDays" : 30,
                      "memo" : "Example Billing Schedule",
                      "customFields" : {
                        "key" : "value"
                      },
                      "paymentProvider" : "STRIPE",
                      "autoCharge" : true
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/billing-products" : {
      "get" : {
        "tags" : [ "Prices" ],
        "summary" : "List all billing products",
        "description" : "List all products with billing prices",
        "operationId" : "getBillingProducts",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "description" : "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).",
          "required" : false,
          "schema" : {
            "type" : "integer"
          }
        }, {
          "name" : "after",
          "in" : "query",
          "description" : "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "before",
          "in" : "query",
          "description" : "Pagination cursor. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "name",
          "in" : "query",
          "description" : "Filter products by name (partial, case-insensitive match).",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "taxCategoryId",
          "in" : "query",
          "description" : "Filter products by tax category id (comma-separated).",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "recognitionMethod",
          "in" : "query",
          "description" : "Filter products by revenue recognition method (comma-separated). Options: STRAIGHT_LINE, USAGE, MILESTONE, POINT_IN_TIME",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ListBillingProductsResponse",
                  "example" : {
                    "items" : [ {
                      "id" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                      "name" : "Fixed priced product",
                      "label" : "Fixed priced product - UK",
                      "sequenceAccountId" : "683fe518-60c8-429f-9320-8aa7efc20bcc",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "prices" : [ ],
                      "taxCategoryName" : "SaaS",
                      "recognitionMethod" : "USAGE"
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "ListBillingProductsResponse" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                        "name" : "Fixed priced product",
                        "label" : "Fixed priced product - UK",
                        "sequenceAccountId" : "683fe518-60c8-429f-9320-8aa7efc20bcc",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "prices" : [ ],
                        "taxCategoryName" : "SaaS",
                        "recognitionMethod" : "USAGE"
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credits" : {
      "get" : {
        "tags" : [ "Credits" ],
        "summary" : "List credit grants",
        "description" : "List all credit grants for this account",
        "operationId" : "getCredits",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "description" : "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).",
          "required" : false,
          "schema" : {
            "type" : "integer"
          }
        }, {
          "name" : "after",
          "in" : "query",
          "description" : "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "before",
          "in" : "query",
          "description" : "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ListCreditGrantsResponse",
                  "example" : {
                    "items" : [ {
                      "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
                      "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "name" : "On-boarding Credits",
                      "creditUnitType" : "CURRENCY",
                      "currency" : "GBP",
                      "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                      "amount" : 10,
                      "costOfCredit" : 10,
                      "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                      "effectiveDate" : "2023-01-01",
                      "expiryDate" : "2023-01-31",
                      "createdAt" : "2022-10-07T14:12:08.826121Z",
                      "creditNoteId" : "73086198-8752-4ec9-a99b-16209a32dc6c",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "74ed2615-4730-49ab-9445-74f31723a206",
                        "isPending" : false
                      } ]
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "ListCreditGrantsResponse" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
                        "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                        "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                        "name" : "On-boarding Credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                        "amount" : 10,
                        "costOfCredit" : 10,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "effectiveDate" : "2023-01-01",
                        "expiryDate" : "2023-01-31",
                        "createdAt" : "2022-10-07T14:12:08.826121Z",
                        "creditNoteId" : "73086198-8752-4ec9-a99b-16209a32dc6c",
                        "integrationIds" : [ {
                          "service" : "Xero",
                          "id" : "74ed2615-4730-49ab-9445-74f31723a206",
                          "isPending" : false
                        } ]
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Credits" ],
        "summary" : "Create a new credit grant",
        "description" : "Create a new credit grant",
        "operationId" : "postCredits",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateCreditGrantRequest",
                "example" : {
                  "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                  "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                  "name" : "Onboarding Credits",
                  "creditUnitType" : "CURRENCY",
                  "currency" : "GBP",
                  "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                  "amount" : 10,
                  "costOfCredit" : 10,
                  "effectiveDate" : "2023-01-01",
                  "expiryDate" : "2023-01-31",
                  "createInvoice" : true
                }
              },
              "examples" : {
                "CreateCreditGrantRequest" : {
                  "summary" : "",
                  "value" : {
                    "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "name" : "Onboarding Credits",
                    "creditUnitType" : "CURRENCY",
                    "currency" : "GBP",
                    "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                    "amount" : 10,
                    "costOfCredit" : 10,
                    "effectiveDate" : "2023-01-01",
                    "expiryDate" : "2023-01-31",
                    "createInvoice" : true
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "201" : {
            "description" : "Created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CreditGrantResponse",
                  "example" : {
                    "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
                    "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "name" : "Onboarding Credits",
                    "creditUnitType" : "CURRENCY",
                    "currency" : "GBP",
                    "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                    "amount" : 10,
                    "costOfCredit" : 10,
                    "effectiveDate" : "2023-01-01",
                    "expiryDate" : "2023-01-31",
                    "createdAt" : "2022-10-07T14:12:08.826121Z",
                    "integrationIds" : [ {
                      "service" : "Xero",
                      "id" : "74ed2615-4730-49ab-9445-74f31723a206",
                      "isPending" : false
                    } ]
                  }
                },
                "examples" : {
                  "CreditGrantResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
                      "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "name" : "Onboarding Credits",
                      "creditUnitType" : "CURRENCY",
                      "currency" : "GBP",
                      "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
                      "amount" : 10,
                      "costOfCredit" : 10,
                      "effectiveDate" : "2023-01-01",
                      "expiryDate" : "2023-01-31",
                      "createdAt" : "2022-10-07T14:12:08.826121Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "74ed2615-4730-49ab-9445-74f31723a206",
                        "isPending" : false
                      } ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/discounts" : {
      "get" : {
        "tags" : [ "Discounts" ],
        "summary" : "List all discounts",
        "description" : "List all discounts for Sequence account",
        "operationId" : "getDiscounts",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "description" : "Maximum number of objects to return per-page. Must be between 1 and 100 (inclusive).",
          "required" : false,
          "schema" : {
            "type" : "integer"
          }
        }, {
          "name" : "after",
          "in" : "query",
          "description" : "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.after` or `pagination.before` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "before",
          "in" : "query",
          "description" : "Pagination offset. To page through items, omit this parameter to retrieve the first page, and then successively use the value you get from `pagination.next` or `pagination.previous` to retrieve each page.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ListDiscountsResponse",
                  "example" : {
                    "items" : [ {
                      "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
                      "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
                      "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                      "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
                      "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                      "separateLineItem" : false,
                      "amount" : 25,
                      "discountCalculationType" : "PERCENTAGE",
                      "message" : "Loyalty Discount",
                      "validFrom" : "2023-01-01",
                      "validTo" : "2023-01-31",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "seatDiscountType" : "ALL_SEATS"
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "ListDiscountsResponse" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
                        "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
                        "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
                        "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
                        "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
                        "separateLineItem" : false,
                        "amount" : 25,
                        "discountCalculationType" : "PERCENTAGE",
                        "message" : "Loyalty Discount",
                        "validFrom" : "2023-01-01",
                        "validTo" : "2023-01-31",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "seatDiscountType" : "ALL_SEATS"
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/billing-schedule-custom-field-keys" : {
      "get" : {
        "tags" : [ "Billing Schedules" ],
        "summary" : "List Billing Schedule Custom Field Keys",
        "description" : "List all distinct custom field keys across billing schedules for the current account.",
        "operationId" : "getBillingScheduleCustomFieldKeys",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ListBillingScheduleCustomFieldKeysResponse",
                  "example" : {
                    "items" : [ "department", "region" ]
                  }
                },
                "examples" : {
                  "ListBillingScheduleCustomFieldKeysResponse" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ "department", "region" ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/billing-schedules/validate-taxes" : {
      "post" : {
        "tags" : [ "Billing Schedules" ],
        "summary" : "Validate taxes on a billing schedule",
        "description" : "Validate the tax strategy that will apply to the given billing schedule before it's created or updated.",
        "operationId" : "postBillingSchedulesValidateTaxes",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateBillingScheduleRequest",
                "example" : {
                  "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                  "startDate" : "2022-01-01",
                  "endDate" : "2022-12-31",
                  "recurrenceDayOfMonth" : 1,
                  "taxRates" : [ {
                    "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                    "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                  } ],
                  "autoIssueInvoices" : false,
                  "purchaseOrderNumber" : "PO123",
                  "reference" : "Example reference",
                  "label" : "Example label",
                  "paymentProvider" : "STRIPE",
                  "isDraft" : true,
                  "rollUpBilling" : false,
                  "phases" : [ {
                    "name" : "Trial Period",
                    "externalContractRef" : "ACME-2022-MSA",
                    "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-06-30",
                    "discounts" : [ {
                      "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "type" : "PERCENTAGE",
                      "amount" : 8,
                      "message" : "8% Discount",
                      "separateLineItem" : true,
                      "seatDiscountType" : "ALL_SEATS"
                    } ],
                    "minimums" : [ {
                      "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                      "amount" : 100
                    } ],
                    "creditGrants" : [ {
                      "name" : "Monthly usage credits",
                      "creditUnitType" : "CURRENCY",
                      "currency" : "GBP",
                      "amount" : 100,
                      "costOfCredit" : 0,
                      "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                      "grantRefreshFrequency" : "MONTHLY",
                      "billingFrequency" : "MONTHLY",
                      "rolloverMode" : "NONE",
                      "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                    } ],
                    "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
                    "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                    "phasePriceMetadata" : [ {
                      "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "arrCalculation" : "INCLUDE"
                    } ],
                    "phaseListPriceMetadata" : [ {
                      "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                      "arrCalculation" : "INCLUDE"
                    } ]
                  }, {
                    "priceIds" : [ ],
                    "startDate" : "2022-07-01",
                    "endDate" : "2022-12-31",
                    "discounts" : [ ],
                    "minimums" : [ {
                      "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                      "amount" : 100
                    } ],
                    "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
                    "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                    "phasePriceMetadata" : [ {
                      "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "arrCalculation" : "INCLUDE"
                    } ],
                    "phaseListPriceMetadata" : [ {
                      "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                      "arrCalculation" : "INCLUDE"
                    } ]
                  } ],
                  "attachmentAssetIds" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
                  "autoCharge" : true,
                  "defaultDueDateDays" : 30,
                  "memo" : "Example Billing Schedule",
                  "customFields" : {
                    "key" : "value"
                  }
                }
              },
              "examples" : {
                "CreateBillingScheduleRequest" : {
                  "summary" : "",
                  "value" : {
                    "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-31",
                    "recurrenceDayOfMonth" : 1,
                    "taxRates" : [ {
                      "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                    } ],
                    "autoIssueInvoices" : false,
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "Example reference",
                    "label" : "Example label",
                    "paymentProvider" : "STRIPE",
                    "isDraft" : true,
                    "rollUpBilling" : false,
                    "phases" : [ {
                      "name" : "Trial Period",
                      "externalContractRef" : "ACME-2022-MSA",
                      "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-06-30",
                      "discounts" : [ {
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "type" : "PERCENTAGE",
                        "amount" : 8,
                        "message" : "8% Discount",
                        "separateLineItem" : true,
                        "seatDiscountType" : "ALL_SEATS"
                      } ],
                      "minimums" : [ {
                        "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                        "amount" : 100
                      } ],
                      "creditGrants" : [ {
                        "name" : "Monthly usage credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "amount" : 100,
                        "costOfCredit" : 0,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "grantRefreshFrequency" : "MONTHLY",
                        "billingFrequency" : "MONTHLY",
                        "rolloverMode" : "NONE",
                        "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                      } ],
                      "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ],
                      "phaseListPriceMetadata" : [ {
                        "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    }, {
                      "priceIds" : [ ],
                      "startDate" : "2022-07-01",
                      "endDate" : "2022-12-31",
                      "discounts" : [ ],
                      "minimums" : [ {
                        "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                        "amount" : 100
                      } ],
                      "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ],
                      "phaseListPriceMetadata" : [ {
                        "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    } ],
                    "attachmentAssetIds" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
                    "autoCharge" : true,
                    "defaultDueDateDays" : 30,
                    "memo" : "Example Billing Schedule",
                    "customFields" : {
                      "key" : "value"
                    }
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : { }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/billing-schedules/{billingScheduleId}/duplicate" : {
      "post" : {
        "tags" : [ "Billing Schedules" ],
        "summary" : "Duplicate a billing schedule",
        "description" : "Duplicate a [billing schedule](/billing/create-billing-schedules) onto the customer named in the request. The copy is always created as a draft, and is given its own prices, phases and credit grants rather than sharing the source's.\n\nAttachments and custom field values belong to the customer rather than to the schedule. Duplicating for the same customer carries both across, the attachments referencing the same assets so that nothing is re-uploaded. Duplicating for a different customer attaches nothing, and carries the custom field keys with blank values.",
        "operationId" : "postBillingSchedulesByBillingScheduleIdDuplicate",
        "parameters" : [ {
          "name" : "billingScheduleId",
          "in" : "path",
          "description" : "Billing Schedule ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/DuplicateBillingScheduleRequest",
                "example" : {
                  "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4"
                }
              },
              "examples" : {
                "DuplicateBillingScheduleRequest" : {
                  "summary" : "",
                  "value" : {
                    "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4"
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "201" : {
            "description" : "Created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BillingScheduleResponse",
                  "example" : {
                    "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                    "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                    "status" : "ACTIVE",
                    "startDate" : "2022-01-01",
                    "endDate" : "2022-12-01",
                    "taxRates" : [ {
                      "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                    } ],
                    "firstBillingDate" : "2022-02-02",
                    "autoIssueInvoices" : false,
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "label" : "label",
                    "recurrenceDayOfMonth" : 1,
                    "prices" : [ {
                      "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                      "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                      "name" : "Demo Product",
                      "currency" : "GBP",
                      "structure" : {
                        "pricePerUnit" : "0.25",
                        "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                        "isPricePercentage" : false,
                        "pricingType" : "LINEAR"
                      },
                      "billingFrequency" : "MONTHLY",
                      "billingType" : "IN_ARREARS",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "integrationIds" : [ {
                        "service" : "Xero",
                        "id" : "123",
                        "isPending" : false
                      } ],
                      "customMetricParameters" : [ {
                        "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "value" : "10"
                      } ],
                      "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                      "usageCalculationPeriod" : {
                        "frequency" : "MONTHLY",
                        "interval" : 1
                      },
                      "status" : "ACTIVE"
                    } ],
                    "createdAt" : "2022-06-28T16:47:00Z",
                    "updatedAt" : "2022-06-28T16:47:00Z",
                    "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                    "phases" : [ {
                      "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                      "name" : "Onboarding",
                      "externalContractRef" : "ACME-2022-MSA",
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-06-30",
                      "discounts" : [ {
                        "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "type" : "PERCENTAGE",
                        "amount" : 15,
                        "message" : "15% Discount",
                        "separateLineItem" : true,
                        "seatDiscountType" : "ALL_SEATS"
                      } ],
                      "minimums" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "amount" : 100,
                        "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "creditGrants" : [ {
                        "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                        "name" : "Monthly usage credits",
                        "creditUnitType" : "CURRENCY",
                        "currency" : "GBP",
                        "amount" : 100,
                        "costOfCredit" : 0,
                        "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                        "grantRefreshFrequency" : "MONTHLY",
                        "billingFrequency" : "MONTHLY",
                        "rolloverMode" : "NONE",
                        "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                      } ],
                      "integrationIds" : [ {
                        "service" : "NetSuite",
                        "id" : "SO-1024",
                        "lastSynced" : "2022-06-28T16:47:00Z",
                        "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                        "isPending" : false
                      } ],
                      "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                      "phasePriceMetadata" : [ {
                        "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "arrCalculation" : "INCLUDE"
                      } ]
                    } ],
                    "archivedAt" : "2022-06-28T16:47:00Z",
                    "rollUpBilling" : false,
                    "integrationIds" : [ {
                      "service" : "Salesforce",
                      "id" : "a0CQy00000Ipz5VMAR",
                      "lastSynced" : "2024-08-14T17:14:17Z",
                      "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                      "isPending" : false
                    } ],
                    "attachmentAssets" : [ {
                      "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                      "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "type" : "IMAGE",
                      "format" : "PNG",
                      "fileName" : "my-image.png",
                      "fileSizeBytes" : 12345,
                      "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                      "createdAt" : "2022-06-28T16:47:00Z"
                    } ],
                    "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                    "defaultDueDateDays" : 30,
                    "memo" : "Example Billing Schedule",
                    "customFields" : {
                      "key" : "value"
                    },
                    "paymentProvider" : "STRIPE",
                    "autoCharge" : true
                  }
                },
                "examples" : {
                  "BillingScheduleResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                      "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
                      "status" : "ACTIVE",
                      "startDate" : "2022-01-01",
                      "endDate" : "2022-12-01",
                      "taxRates" : [ {
                        "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
                      } ],
                      "firstBillingDate" : "2022-02-02",
                      "autoIssueInvoices" : false,
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "label" : "label",
                      "recurrenceDayOfMonth" : 1,
                      "prices" : [ {
                        "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                        "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                        "name" : "Demo Product",
                        "currency" : "GBP",
                        "structure" : {
                          "pricePerUnit" : "0.25",
                          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                          "isPricePercentage" : false,
                          "pricingType" : "LINEAR"
                        },
                        "billingFrequency" : "MONTHLY",
                        "billingType" : "IN_ARREARS",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "updatedAt" : "2022-06-28T16:47:00Z",
                        "integrationIds" : [ {
                          "service" : "Xero",
                          "id" : "123",
                          "isPending" : false
                        } ],
                        "customMetricParameters" : [ {
                          "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                          "value" : "10"
                        } ],
                        "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                        "usageCalculationPeriod" : {
                          "frequency" : "MONTHLY",
                          "interval" : 1
                        },
                        "status" : "ACTIVE"
                      } ],
                      "createdAt" : "2022-06-28T16:47:00Z",
                      "updatedAt" : "2022-06-28T16:47:00Z",
                      "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
                      "phases" : [ {
                        "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                        "name" : "Onboarding",
                        "externalContractRef" : "ACME-2022-MSA",
                        "createdAt" : "2022-06-28T16:47:00Z",
                        "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                        "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                        "startDate" : "2022-01-01",
                        "endDate" : "2022-06-30",
                        "discounts" : [ {
                          "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "type" : "PERCENTAGE",
                          "amount" : 15,
                          "message" : "15% Discount",
                          "separateLineItem" : true,
                          "seatDiscountType" : "ALL_SEATS"
                        } ],
                        "minimums" : [ {
                          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                          "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "amount" : 100,
                          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                          "createdAt" : "2022-06-28T16:47:00Z",
                          "updatedAt" : "2022-06-28T16:47:00Z"
                        } ],
                        "creditGrants" : [ {
                          "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                          "name" : "Monthly usage credits",
                          "creditUnitType" : "CURRENCY",
                          "currency" : "GBP",
                          "amount" : 100,
                          "costOfCredit" : 0,
                          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                          "grantRefreshFrequency" : "MONTHLY",
                          "billingFrequency" : "MONTHLY",
                          "rolloverMode" : "NONE",
                          "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                        } ],
                        "integrationIds" : [ {
                          "service" : "NetSuite",
                          "id" : "SO-1024",
                          "lastSynced" : "2022-06-28T16:47:00Z",
                          "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                          "isPending" : false
                        } ],
                        "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                        "phasePriceMetadata" : [ {
                          "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                          "arrCalculation" : "INCLUDE"
                        } ]
                      } ],
                      "archivedAt" : "2022-06-28T16:47:00Z",
                      "rollUpBilling" : false,
                      "integrationIds" : [ {
                        "service" : "Salesforce",
                        "id" : "a0CQy00000Ipz5VMAR",
                        "lastSynced" : "2024-08-14T17:14:17Z",
                        "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                        "isPending" : false
                      } ],
                      "attachmentAssets" : [ {
                        "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "type" : "IMAGE",
                        "format" : "PNG",
                        "fileName" : "my-image.png",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
                      "defaultDueDateDays" : 30,
                      "memo" : "Example Billing Schedule",
                      "customFields" : {
                        "key" : "value"
                      },
                      "paymentProvider" : "STRIPE",
                      "autoCharge" : true
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credits/{customerId}/balances" : {
      "get" : {
        "tags" : [ "Credits" ],
        "summary" : "List Credit Balances for a customer",
        "description" : "List all Credit Balances including their grants and transactions",
        "operationId" : "getCreditsByCustomerIdBalances",
        "parameters" : [ {
          "name" : "customerId",
          "in" : "path",
          "description" : "Customer ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CreditBalancesReply",
                  "example" : {
                    "items" : [ {
                      "id" : "6587e308-ab0d-4a58-8cc1-1d168490de7b",
                      "type" : "CASH",
                      "name" : "Credits",
                      "balance" : "50",
                      "grants" : [ {
                        "id" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
                        "sequenceAccountId" : "a507e782-d26b-4d34-92b9-aacd1667e1f0",
                        "customerId" : "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb",
                        "type" : "CASH",
                        "currency" : "GBP",
                        "metricId" : "b84f5290-fe95-4c6f-bedc-477700125265",
                        "name" : "GBP",
                        "originalAmount" : "10",
                        "currentBalance" : "1",
                        "expiryDate" : "2024-01-02",
                        "costOfCredit" : "10",
                        "taxRateId" : "b3c37ea3-96bb-44fb-baed-01eb38d3328e",
                        "effectiveDate" : "2024-01-01",
                        "createdAt" : "2024-01-01T12:00:00Z"
                      } ],
                      "transactions" : [ {
                        "id" : "c770d296-ef09-459b-b8dd-42c334e00dab",
                        "grantId" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
                        "reason" : "because",
                        "invoiceId" : "c6864c69-42a3-4966-8c22-1c56d7375a05",
                        "billingRunId" : "e95256be-08e7-4585-b3c7-fa9928aacd90",
                        "type" : "CREDIT",
                        "amount" : "10",
                        "date" : "2024-01-01"
                      } ]
                    } ]
                  }
                },
                "examples" : {
                  "CreditBalancesReply" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "6587e308-ab0d-4a58-8cc1-1d168490de7b",
                        "type" : "CASH",
                        "name" : "Credits",
                        "balance" : "50",
                        "grants" : [ {
                          "id" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
                          "sequenceAccountId" : "a507e782-d26b-4d34-92b9-aacd1667e1f0",
                          "customerId" : "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb",
                          "type" : "CASH",
                          "currency" : "GBP",
                          "metricId" : "b84f5290-fe95-4c6f-bedc-477700125265",
                          "name" : "GBP",
                          "originalAmount" : "10",
                          "currentBalance" : "1",
                          "expiryDate" : "2024-01-02",
                          "costOfCredit" : "10",
                          "taxRateId" : "b3c37ea3-96bb-44fb-baed-01eb38d3328e",
                          "effectiveDate" : "2024-01-01",
                          "createdAt" : "2024-01-01T12:00:00Z"
                        } ],
                        "transactions" : [ {
                          "id" : "c770d296-ef09-459b-b8dd-42c334e00dab",
                          "grantId" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
                          "reason" : "because",
                          "invoiceId" : "c6864c69-42a3-4966-8c22-1c56d7375a05",
                          "billingRunId" : "e95256be-08e7-4585-b3c7-fa9928aacd90",
                          "type" : "CREDIT",
                          "amount" : "10",
                          "date" : "2024-01-01"
                        } ]
                      } ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credits/{customerId}/grants" : {
      "get" : {
        "tags" : [ "Credits" ],
        "summary" : "List Credit Grants for a customer",
        "description" : "List all Credit Grants and their outstanding balances where the balance is non-zero",
        "operationId" : "getCreditsByCustomerIdGrants",
        "parameters" : [ {
          "name" : "customerId",
          "in" : "path",
          "description" : "Customer ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sequence-version",
          "in" : "header",
          "description" : "Use this header to select an API version",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "2024-07-30" ]
          }
        } ],
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CreditGrantsResponse",
                  "example" : {
                    "items" : [ {
                      "id" : "22efb229-c474-407c-bbf7-f5e113ee8b20",
                      "name" : "API Calls",
                      "grantAmount" : 1000,
                      "balance" : 324,
                      "issueDate" : "2022-02-22",
                      "expiryDate" : "2030-03-03"
                    } ]
                  }
                },
                "examples" : {
                  "CreditGrantsResponse" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "22efb229-c474-407c-bbf7-f5e113ee8b20",
                        "name" : "API Calls",
                        "grantAmount" : 1000,
                        "balance" : 324,
                        "issueDate" : "2022-02-22",
                        "expiryDate" : "2030-03-03"
                      } ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    }
  },
  "components" : {
    "schemas" : {
      "PriceResponsePaginatedPriceResponseModel" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
            "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
            "name" : "Demo Product",
            "currency" : "GBP",
            "structure" : {
              "tiers" : [ {
                "upperBound" : "200",
                "price" : "1.00",
                "fee" : "50.00",
                "isPricePercentage" : false
              }, {
                "upperBound" : "400",
                "price" : "0.75",
                "fee" : "25.00",
                "isPricePercentage" : false
              }, {
                "price" : "0.50",
                "fee" : "0.00",
                "isPricePercentage" : false
              } ],
              "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
              "usageCalculationMode" : "BILLING_PERIOD",
              "pricingType" : "GRADUATED"
            },
            "billingFrequency" : "MONTHLY",
            "billingType" : "IN_ARREARS",
            "createdAt" : "2022-06-28T16:47:00Z",
            "updatedAt" : "2022-06-28T16:47:00Z",
            "integrationIds" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "customMetricParameters" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
            "usageCalculationPeriod" : {
              "frequency" : "MONTHLY",
              "interval" : 1
            },
            "status" : "ACTIVE"
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Prices",
            "example" : [ {
              "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
              "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
              "name" : "Demo Product",
              "currency" : "GBP",
              "structure" : {
                "tiers" : [ {
                  "upperBound" : "200",
                  "price" : "1.00",
                  "fee" : "50.00",
                  "isPricePercentage" : false
                }, {
                  "upperBound" : "400",
                  "price" : "0.75",
                  "fee" : "25.00",
                  "isPricePercentage" : false
                }, {
                  "price" : "0.50",
                  "fee" : "0.00",
                  "isPricePercentage" : false
                } ],
                "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                "usageCalculationMode" : "BILLING_PERIOD",
                "pricingType" : "GRADUATED"
              },
              "billingFrequency" : "MONTHLY",
              "billingType" : "IN_ARREARS",
              "createdAt" : "2022-06-28T16:47:00Z",
              "updatedAt" : "2022-06-28T16:47:00Z",
              "integrationIds" : [ {
                "service" : "Xero",
                "id" : "123",
                "isPending" : false
              } ],
              "customMetricParameters" : [ {
                "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                "value" : "10"
              } ],
              "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
              "usageCalculationPeriod" : {
                "frequency" : "MONTHLY",
                "interval" : 1
              },
              "status" : "ACTIVE"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceResponse"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "PriceResponse" : {
        "required" : [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ],
        "type" : "object",
        "example" : {
          "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "tiers" : [ {
              "upperBound" : "200",
              "price" : "1.00",
              "fee" : "50.00",
              "isPricePercentage" : false
            }, {
              "upperBound" : "400",
              "price" : "0.75",
              "fee" : "25.00",
              "isPricePercentage" : false
            }, {
              "price" : "0.50",
              "fee" : "0.00",
              "isPricePercentage" : false
            } ],
            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
            "usageCalculationMode" : "BILLING_PERIOD",
            "pricingType" : "GRADUATED"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123",
            "isPending" : false
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "usageCalculationPeriod" : {
            "frequency" : "MONTHLY",
            "interval" : 1
          },
          "status" : "ACTIVE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique Price ID, generated by Sequence on creation.",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/GraduatedPricingStructure"
            }, {
              "$ref" : "#/components/schemas/VolumePricingStructure"
            }, {
              "$ref" : "#/components/schemas/SeatBasedPricingStructure"
            }, {
              "$ref" : "#/components/schemas/PackagePricingStructure"
            }, {
              "$ref" : "#/components/schemas/LinearPricingStructure"
            }, {
              "$ref" : "#/components/schemas/FixedPricingStructure"
            }, {
              "$ref" : "#/components/schemas/OneTimePricingStructure"
            } ]
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Time at which the Price was initially created, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Time at which the Price was last updated, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "usageCalculationPeriod" : {
            "$ref" : "#/components/schemas/UsageCalculationPeriod"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "Currency" : {
        "type" : "string",
        "example" : "GBP",
        "enum" : [ "AED", "ARS", "AUD", "BRL", "BGN", "CAD", "CHF", "CLP", "CNY", "COP", "CZK", "DKK", "EGP", "EUR", "GBP", "HKD", "ILS", "INR", "ISK", "JPY", "KRW", "MXN", "NOK", "NZD", "PLN", "SAR", "SEK", "SGD", "THB", "USD", "UYU", "ZAR" ]
      },
      "GraduatedPricingStructure" : {
        "required" : [ "pricingType", "tiers", "usageCalculationMode", "usageMetricId" ],
        "type" : "object",
        "description" : "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.",
        "example" : {
          "tiers" : [ {
            "upperBound" : "200",
            "price" : "1.00",
            "fee" : "50.00",
            "isPricePercentage" : false
          }, {
            "upperBound" : "400",
            "price" : "0.75",
            "fee" : "25.00",
            "isPricePercentage" : false
          }, {
            "price" : "0.50",
            "fee" : "0.00",
            "isPricePercentage" : false
          } ],
          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
          "usageCalculationMode" : "BILLING_PERIOD",
          "pricingType" : "GRADUATED"
        },
        "properties" : {
          "tiers" : {
            "type" : "array",
            "description" : "A list of contiguous pricing tiers",
            "example" : [ {
              "upperBound" : "200",
              "price" : "1.00",
              "fee" : "50.00",
              "isPricePercentage" : false
            }, {
              "upperBound" : "400",
              "price" : "0.75",
              "fee" : "25.00",
              "isPricePercentage" : false
            }, {
              "price" : "0.50",
              "fee" : "0.00",
              "isPricePercentage" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/GraduatedUsageTier"
            }
          },
          "usageMetricId" : {
            "type" : "string",
            "description" : "The usage metric associated to this pricing structure",
            "example" : "04c62961-04ba-48e6-b985-758bb7d3e712"
          },
          "usageCalculationMode" : {
            "description" : "Indicates the scope of usage calculation",
            "$ref" : "#/components/schemas/UsageCalculationMode"
          },
          "pricingType" : {
            "description" : "The type of pricing",
            "$ref" : "#/components/schemas/GraduatedPricingType"
          }
        }
      },
      "GraduatedUsageTier" : {
        "required" : [ "isPricePercentage", "price" ],
        "type" : "object",
        "example" : {
          "upperBound" : "200",
          "price" : "1.00",
          "fee" : "50.00",
          "isPricePercentage" : false
        },
        "properties" : {
          "upperBound" : {
            "type" : "string",
            "description" : "The upper bound of usage for this tier. Set to null to if this is a final tier and is unbounded. The lower bound is set by the previous tier or 0 if it's the first one.",
            "example" : "200"
          },
          "price" : {
            "type" : "string",
            "description" : "The rate to apply to usage for this product in this tier. In the case of percentage pricing where `isPricePercentage` is set to `true`, a value of 1 represents 100%.",
            "example" : "1.00"
          },
          "fee" : {
            "type" : "string",
            "description" : "The nominal fee associated with usage at this tier",
            "example" : "50.00"
          },
          "isPricePercentage" : {
            "type" : "boolean",
            "description" : "Indicate whether the price attribute is to be considered as a percentage or an absolute value.",
            "example" : false
          }
        }
      },
      "UsageCalculationMode" : {
        "type" : "string",
        "example" : "BILLING_PERIOD",
        "enum" : [ "BILLING_PERIOD", "CUMULATIVE", "PERIODIC" ]
      },
      "PricingType" : {
        "type" : "string",
        "example" : "GRADUATED",
        "enum" : [ "ONE_TIME", "FIXED", "LINEAR", "PACKAGE", "GRADUATED", "VOLUME", "SEAT_BASED" ]
      },
      "BillingFrequency" : {
        "type" : "string",
        "example" : "MONTHLY",
        "enum" : [ "ON_DEMAND", "ONE_TIME", "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY", "PER_EVENT" ]
      },
      "BillingType" : {
        "type" : "string",
        "example" : "IN_ARREARS",
        "enum" : [ "IN_ARREARS", "IN_ADVANCE" ]
      },
      "IntegrationId" : {
        "required" : [ "id", "isPending", "service" ],
        "type" : "object",
        "example" : {
          "service" : "Xero",
          "id" : "123",
          "isPending" : false
        },
        "properties" : {
          "service" : {
            "$ref" : "#/components/schemas/IntegrationService"
          },
          "id" : {
            "type" : "string",
            "example" : "123"
          },
          "isPending" : {
            "type" : "boolean",
            "example" : false
          }
        }
      },
      "IntegrationService" : {
        "type" : "string",
        "example" : "Xero",
        "enum" : [ "Amazon_Redshift", "GoCardless", "Google_BigQuery", "Google_Sheets", "HubSpot", "NetSuite", "QuickBooks_Online", "Salesforce", "Slack", "Snowflake", "Stripe", "Xero", "Avalara", "Anrok", "Attio", "Numeral", "Rillet", "Sphere" ]
      },
      "PriceParameter" : {
        "required" : [ "parameterId", "value" ],
        "type" : "object",
        "example" : {
          "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
          "value" : "10"
        },
        "properties" : {
          "parameterId" : {
            "type" : "string",
            "description" : "Custom metric parameter ID",
            "example" : "94703530-1293-479b-bd37-ccad42fd9c8b"
          },
          "value" : {
            "type" : "string",
            "description" : "Parameter value",
            "example" : "10"
          }
        }
      },
      "UsageCalculationPeriod" : {
        "required" : [ "frequency", "interval" ],
        "type" : "object",
        "description" : "The period over which usage is aggregated.",
        "example" : {
          "frequency" : "MONTHLY",
          "interval" : 1
        },
        "properties" : {
          "frequency" : {
            "description" : "Frequency determines the time period over which usage is aggregated.",
            "$ref" : "#/components/schemas/UsageCalculationFrequency"
          },
          "interval" : {
            "type" : "integer",
            "description" : "Interval determines the time period over which usage is aggregated. For example, if the frequency is MONTHLY and the interval is 3, the usage is aggregated over 3 months before starting at 0 again.",
            "format" : "int32",
            "example" : 1
          }
        }
      },
      "UsageCalculationFrequency" : {
        "type" : "string",
        "example" : "MONTHLY",
        "enum" : [ "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY" ]
      },
      "PriceStatus" : {
        "type" : "string",
        "example" : "ACTIVE",
        "enum" : [ "DRAFT", "ACTIVE" ]
      },
      "PaginationMeta" : {
        "type" : "object",
        "description" : "Results pagination",
        "example" : {
          "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
          "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
          "totalResultSize" : 10
        },
        "properties" : {
          "after" : {
            "type" : "string",
            "description" : "Cursor for the page after this (if it exists)",
            "example" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3"
          },
          "before" : {
            "type" : "string",
            "description" : "Cursor for the page before this (if it exists)",
            "example" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz"
          },
          "totalResultSize" : {
            "type" : "integer",
            "description" : "Total number of entries across all pages",
            "format" : "int64",
            "example" : 10
          }
        }
      },
      "VolumePricingStructure" : {
        "required" : [ "pricingType", "tiers", "usageMetricId" ],
        "type" : "object",
        "description" : "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.",
        "example" : {
          "tiers" : [ {
            "upperBound" : "100",
            "price" : "1.00",
            "fee" : "50.00",
            "isPricePercentage" : true,
            "maxPrice" : "10",
            "minPrice" : "5"
          }, {
            "price" : "0.75",
            "fee" : "25.00",
            "isPricePercentage" : true,
            "maxPrice" : "10",
            "minPrice" : "5"
          } ],
          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
          "pricingType" : "VOLUME"
        },
        "properties" : {
          "tiers" : {
            "type" : "array",
            "description" : "A list of contiguous pricing tiers",
            "example" : [ {
              "upperBound" : "100",
              "price" : "1.00",
              "fee" : "50.00",
              "isPricePercentage" : true,
              "maxPrice" : "10",
              "minPrice" : "5"
            }, {
              "price" : "0.75",
              "fee" : "25.00",
              "isPricePercentage" : true,
              "maxPrice" : "10",
              "minPrice" : "5"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/VolumeUsageTier"
            }
          },
          "usageMetricId" : {
            "type" : "string",
            "description" : "The usage metric associated to this tier",
            "example" : "04c62961-04ba-48e6-b985-758bb7d3e712"
          },
          "pricingType" : {
            "description" : "The type of pricing",
            "$ref" : "#/components/schemas/VolumePricingType"
          }
        }
      },
      "VolumeUsageTier" : {
        "required" : [ "isPricePercentage", "price" ],
        "type" : "object",
        "example" : {
          "upperBound" : "100",
          "price" : "1.00",
          "fee" : "50.00",
          "isPricePercentage" : true,
          "maxPrice" : "10",
          "minPrice" : "5"
        },
        "properties" : {
          "upperBound" : {
            "type" : "string",
            "description" : "The upper bound of usage for this tier. Set to null to if this is a final tier and is unbounded. The lower bound is set by the previous tier or 0 if it's the first one.",
            "example" : "100"
          },
          "price" : {
            "type" : "string",
            "description" : "The rate to apply to usage for this product in this tier. In the case of percentage pricing where `isPricePercentage` is set to `true`, a value of 1 represents 100%.",
            "example" : "1.00"
          },
          "fee" : {
            "type" : "string",
            "description" : "The nominal fee associated with usage at this tier",
            "example" : "50.00"
          },
          "isPricePercentage" : {
            "type" : "boolean",
            "description" : "Indicate whether the price attribute is to be considered as a percentage or an absolute value.",
            "example" : true
          },
          "maxPrice" : {
            "type" : "string",
            "description" : "Maximum Price to Charge for each Unit if Price is Percentage Based",
            "example" : "10"
          },
          "minPrice" : {
            "type" : "string",
            "description" : "Minimum Price to Charge for each Unit if Price is Percentage Based",
            "example" : "5"
          }
        }
      },
      "SeatBasedPricingStructure" : {
        "required" : [ "contractedMinimumSeats", "pricePerSeat", "pricingType", "prorationStrategy", "seatMetricId", "tiers" ],
        "type" : "object",
        "description" : "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.",
        "example" : {
          "seatMetricId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "pricePerSeat" : "0.25",
          "prorationStrategy" : "USE_MAXIMUM",
          "contractedMinimumSeats" : 10,
          "overagesBillingFrequency" : "YEARLY",
          "tiers" : [ {
            "upperBound" : "100",
            "price" : "1.00",
            "fee" : "50.00"
          }, {
            "price" : "0.75",
            "fee" : "25.00"
          } ],
          "prorateFlatFees" : false,
          "pricingType" : "SEAT_BASED"
        },
        "properties" : {
          "seatMetricId" : {
            "type" : "string",
            "description" : "Seat metric associated to this pricing structure",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "pricePerSeat" : {
            "type" : "string",
            "description" : "Price charged per seat per full billing period",
            "example" : "0.25"
          },
          "prorationStrategy" : {
            "description" : "The proration strategy to use when calculating the price for a seat. A `USE_MAXIMUM` will not prorate and charge the highest seat balance for the entire billing period, while a PRORATE_INCREMENTS will charge incremental seats from the day they're added",
            "$ref" : "#/components/schemas/SeatProrationStrategy"
          },
          "contractedMinimumSeats" : {
            "type" : "integer",
            "description" : "The number of contractually agreed minimum seats",
            "example" : 10
          },
          "overagesBillingFrequency" : {
            "description" : "The frequency with which to charge overages",
            "$ref" : "#/components/schemas/OveragesFrequency"
          },
          "tiers" : {
            "type" : "array",
            "description" : "A list of contiguous pricing tiers",
            "example" : [ {
              "upperBound" : "100",
              "price" : "1.00",
              "fee" : "50.00"
            }, {
              "price" : "0.75",
              "fee" : "25.00"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/SeatUsageTier"
            }
          },
          "prorateFlatFees" : {
            "type" : "boolean",
            "description" : "If set any flat fees will be pro-rated if the invoice service period length does not match the billing frequency",
            "example" : false
          },
          "pricingType" : {
            "description" : "The type of pricing",
            "$ref" : "#/components/schemas/SeatBasedPricingType"
          }
        }
      },
      "SeatProrationStrategy" : {
        "type" : "string",
        "example" : "USE_MAXIMUM",
        "enum" : [ "USE_MAXIMUM", "PRORATE_INCREMENTS", "PRORATE_ALL_CHANGES" ]
      },
      "OveragesFrequency" : {
        "type" : "string",
        "example" : "YEARLY",
        "enum" : [ "NONE", "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY" ]
      },
      "SeatUsageTier" : {
        "required" : [ "price" ],
        "type" : "object",
        "example" : {
          "upperBound" : "100",
          "price" : "1.00",
          "fee" : "50.00"
        },
        "properties" : {
          "upperBound" : {
            "type" : "string",
            "description" : "The upper bound of usage for this tier. Set to null to if this is a final tier and is unbounded. The lower bound is set by the previous tier or 0 if it's the first one.",
            "example" : "100"
          },
          "price" : {
            "type" : "string",
            "description" : "The rate to apply to usage for this product in this tier. In the case of percentage pricing where `isPricePercentage` is set to `true`, a value of 1 represents 100%.",
            "example" : "1.00"
          },
          "fee" : {
            "type" : "string",
            "description" : "The nominal fee associated with usage at this tier",
            "example" : "50.00"
          }
        }
      },
      "PackagePricingStructure" : {
        "required" : [ "packageSize", "pricePerPackage", "pricingType", "usageMetricId" ],
        "type" : "object",
        "description" : "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.",
        "example" : {
          "packageSize" : "50",
          "pricePerPackage" : "2.00",
          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
          "pricingType" : "PACKAGE"
        },
        "properties" : {
          "packageSize" : {
            "type" : "string",
            "description" : "The amount of usage allowed for the price in this structure",
            "example" : "50"
          },
          "pricePerPackage" : {
            "type" : "string",
            "description" : "The price charged for each package",
            "example" : "2.00"
          },
          "usageMetricId" : {
            "type" : "string",
            "description" : "The usage metric associated to this tier",
            "example" : "04c62961-04ba-48e6-b985-758bb7d3e712"
          },
          "pricingType" : {
            "description" : "The type of pricing",
            "$ref" : "#/components/schemas/PackagePricingType"
          }
        }
      },
      "LinearPricingStructure" : {
        "required" : [ "isPricePercentage", "pricePerUnit", "pricingType", "usageMetricId" ],
        "type" : "object",
        "description" : "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.",
        "example" : {
          "pricePerUnit" : "0.25",
          "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
          "isPricePercentage" : false,
          "pricingType" : "LINEAR"
        },
        "properties" : {
          "pricePerUnit" : {
            "type" : "string",
            "description" : "The per unit rate to apply to usage for this product. In the case of percentage pricing where `isPricePercentage` is set to `true`, a value of 1 represents 100%.",
            "example" : "0.25"
          },
          "usageMetricId" : {
            "type" : "string",
            "description" : "Usage metric associated to this pricing structure",
            "example" : "04c62961-04ba-48e6-b985-758bb7d3e712"
          },
          "isPricePercentage" : {
            "type" : "boolean",
            "description" : "Indicate whether the price attribute is to be considered as a percentage or an absolute value.",
            "example" : false
          },
          "pricingType" : {
            "description" : "The type of pricing",
            "$ref" : "#/components/schemas/LinearPricingType"
          }
        }
      },
      "FixedPricingStructure" : {
        "required" : [ "price", "pricingType" ],
        "type" : "object",
        "description" : "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.",
        "example" : {
          "price" : "20.00",
          "pricingType" : "FIXED"
        },
        "properties" : {
          "price" : {
            "type" : "string",
            "description" : "A fixed amount that is charged once every billing period.",
            "example" : "20.00"
          },
          "pricingType" : {
            "description" : "The type of pricing",
            "$ref" : "#/components/schemas/FixedPricingType"
          }
        }
      },
      "OneTimePricingStructure" : {
        "required" : [ "price", "pricingType" ],
        "type" : "object",
        "description" : "The pricing structure for this price. This can be a simple fixed price, or a more complex structure that varies based on usage.",
        "example" : {
          "price" : "150.00",
          "pricingType" : "ONE_TIME"
        },
        "properties" : {
          "price" : {
            "type" : "string",
            "description" : "A fixed amount that is charged once.",
            "example" : "150.00"
          },
          "pricingType" : {
            "description" : "The type of pricing",
            "$ref" : "#/components/schemas/OneTimePricingType"
          }
        }
      },
      "CreateBillingScheduleRequest" : {
        "required" : [ "autoIssueInvoices", "customerId", "isDraft", "phases", "rollUpBilling", "startDate", "taxRates" ],
        "type" : "object",
        "example" : {
          "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
          "startDate" : "2022-01-01",
          "endDate" : "2022-12-31",
          "recurrenceDayOfMonth" : 1,
          "taxRates" : [ {
            "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
            "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
          } ],
          "autoIssueInvoices" : false,
          "purchaseOrderNumber" : "PO123",
          "reference" : "Example reference",
          "label" : "Example label",
          "paymentProvider" : "STRIPE",
          "isDraft" : true,
          "rollUpBilling" : false,
          "phases" : [ {
            "name" : "Trial Period",
            "externalContractRef" : "ACME-2022-MSA",
            "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "startDate" : "2022-01-01",
            "endDate" : "2022-06-30",
            "discounts" : [ {
              "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
              "type" : "PERCENTAGE",
              "amount" : 8,
              "message" : "8% Discount",
              "separateLineItem" : true,
              "seatDiscountType" : "ALL_SEATS"
            } ],
            "minimums" : [ {
              "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
              "amount" : 100
            } ],
            "creditGrants" : [ {
              "name" : "Monthly usage credits",
              "creditUnitType" : "CURRENCY",
              "currency" : "GBP",
              "amount" : 100,
              "costOfCredit" : 0,
              "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
              "grantRefreshFrequency" : "MONTHLY",
              "billingFrequency" : "MONTHLY",
              "rolloverMode" : "NONE",
              "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
            } ],
            "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
            "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
            "phasePriceMetadata" : [ {
              "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "arrCalculation" : "INCLUDE"
            } ],
            "phaseListPriceMetadata" : [ {
              "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
              "arrCalculation" : "INCLUDE"
            } ]
          }, {
            "priceIds" : [ ],
            "startDate" : "2022-07-01",
            "endDate" : "2022-12-31",
            "discounts" : [ ],
            "minimums" : [ {
              "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
              "amount" : 100
            } ],
            "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
            "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
            "phasePriceMetadata" : [ {
              "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "arrCalculation" : "INCLUDE"
            } ],
            "phaseListPriceMetadata" : [ {
              "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
              "arrCalculation" : "INCLUDE"
            } ]
          } ],
          "attachmentAssetIds" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
          "autoCharge" : true,
          "defaultDueDateDays" : 30,
          "memo" : "Example Billing Schedule",
          "customFields" : {
            "key" : "value"
          }
        },
        "properties" : {
          "customerId" : {
            "type" : "string",
            "description" : "Customer ID",
            "example" : "cca32597-b6b0-4499-9669-128aef8702e4"
          },
          "startDate" : {
            "type" : "string",
            "description" : "Start date",
            "example" : "2022-01-01"
          },
          "endDate" : {
            "type" : "string",
            "description" : "End date. A null end date denotes an open-ended schedule.",
            "example" : "2022-12-31"
          },
          "recurrenceDayOfMonth" : {
            "type" : "integer",
            "description" : "Recurrence day of month",
            "format" : "int32",
            "example" : 1
          },
          "taxRates" : {
            "type" : "array",
            "description" : "Tax Rate for each Product",
            "example" : [ {
              "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
              "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/ProductTaxRateRepresentation"
            }
          },
          "autoIssueInvoices" : {
            "type" : "boolean",
            "description" : "Auto-issue invoices for this billing schedule",
            "example" : false
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Optional purchase order number to be added to invoices",
            "example" : "PO123"
          },
          "reference" : {
            "type" : "string",
            "description" : "Optional reference to be added to invoices",
            "example" : "Example reference"
          },
          "label" : {
            "type" : "string",
            "description" : "Optional label",
            "example" : "Example label"
          },
          "paymentProvider" : {
            "description" : "Payment provider to set up collection for",
            "$ref" : "#/components/schemas/PaymentProvider"
          },
          "isDraft" : {
            "type" : "boolean",
            "description" : "Create in draft status",
            "example" : true
          },
          "rollUpBilling" : {
            "type" : "boolean",
            "description" : "Toggles Roll-up billing",
            "example" : false
          },
          "phases" : {
            "type" : "array",
            "description" : "Phases",
            "example" : [ {
              "name" : "Trial Period",
              "externalContractRef" : "ACME-2022-MSA",
              "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
              "startDate" : "2022-01-01",
              "endDate" : "2022-06-30",
              "discounts" : [ {
                "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                "type" : "PERCENTAGE",
                "amount" : 8,
                "message" : "8% Discount",
                "separateLineItem" : true,
                "seatDiscountType" : "ALL_SEATS"
              } ],
              "minimums" : [ {
                "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                "amount" : 100
              } ],
              "creditGrants" : [ {
                "name" : "Monthly usage credits",
                "creditUnitType" : "CURRENCY",
                "currency" : "GBP",
                "amount" : 100,
                "costOfCredit" : 0,
                "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                "grantRefreshFrequency" : "MONTHLY",
                "billingFrequency" : "MONTHLY",
                "rolloverMode" : "NONE",
                "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
              } ],
              "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
              "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
              "phasePriceMetadata" : [ {
                "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "arrCalculation" : "INCLUDE"
              } ],
              "phaseListPriceMetadata" : [ {
                "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                "arrCalculation" : "INCLUDE"
              } ]
            }, {
              "priceIds" : [ ],
              "startDate" : "2022-07-01",
              "endDate" : "2022-12-31",
              "discounts" : [ ],
              "minimums" : [ {
                "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
                "amount" : 100
              } ],
              "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
              "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
              "phasePriceMetadata" : [ {
                "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "arrCalculation" : "INCLUDE"
              } ],
              "phaseListPriceMetadata" : [ {
                "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
                "arrCalculation" : "INCLUDE"
              } ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PhaseRequest"
            }
          },
          "attachmentAssetIds" : {
            "type" : "array",
            "description" : "IDs of assets that are attached to this schedule",
            "example" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
            "items" : {
              "type" : "string"
            }
          },
          "autoCharge" : {
            "type" : "boolean",
            "description" : "Automatically collect payments if payment details are available",
            "example" : true
          },
          "defaultDueDateDays" : {
            "type" : "integer",
            "description" : "Default number of days between invoice issue date and due date. Overrides any invoice level set default due date",
            "example" : 30
          },
          "memo" : {
            "type" : "string",
            "description" : "Billing schedule memo. Overrides any invoice level set memo",
            "example" : "Example Billing Schedule"
          },
          "customFields" : {
            "type" : "object",
            "description" : "Custom key-value fields for this billing schedule",
            "example" : {
              "key" : "value"
            },
            "additionalProperties" : {
              "type" : "string"
            }
          }
        }
      },
      "ProductTaxRateRepresentation" : {
        "required" : [ "priceId", "taxRateId" ],
        "type" : "object",
        "example" : {
          "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
        },
        "properties" : {
          "priceId" : {
            "type" : "string",
            "description" : "ID of the Price",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "taxRateId" : {
            "type" : "string",
            "description" : "ID of the Tax Rate",
            "example" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
          }
        }
      },
      "PaymentProvider" : {
        "type" : "string",
        "example" : "STRIPE",
        "enum" : [ "STRIPE", "GOCARDLESS", "NONE" ]
      },
      "PhaseRequest" : {
        "required" : [ "priceIds", "startDate" ],
        "type" : "object",
        "example" : {
          "name" : "Trial Period",
          "externalContractRef" : "ACME-2022-MSA",
          "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
          "startDate" : "2022-01-01",
          "endDate" : "2022-06-30",
          "discounts" : [ {
            "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "type" : "PERCENTAGE",
            "amount" : 8,
            "message" : "8% Discount",
            "separateLineItem" : true,
            "seatDiscountType" : "ALL_SEATS"
          } ],
          "minimums" : [ {
            "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
            "amount" : 100
          } ],
          "creditGrants" : [ {
            "name" : "Monthly usage credits",
            "creditUnitType" : "CURRENCY",
            "currency" : "GBP",
            "amount" : 100,
            "costOfCredit" : 0,
            "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
            "grantRefreshFrequency" : "MONTHLY",
            "billingFrequency" : "MONTHLY",
            "rolloverMode" : "NONE",
            "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
          } ],
          "listPriceIds" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
          "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
          "phasePriceMetadata" : [ {
            "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
            "arrCalculation" : "INCLUDE"
          } ],
          "phaseListPriceMetadata" : [ {
            "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
            "arrCalculation" : "INCLUDE"
          } ]
        },
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "Optional name for the Phase",
            "example" : "Trial Period"
          },
          "externalContractRef" : {
            "type" : "string",
            "description" : "Free-text reference to the contract this phase rolls up to in an external system. Phases sharing a reference belong to the same contract; surrounding whitespace is trimmed, and matching is case-sensitive. On update, omitting this field or sending null clears any existing reference and has the phase roll up to the billing schedule itself.",
            "example" : "ACME-2022-MSA"
          },
          "priceIds" : {
            "type" : "array",
            "description" : "The price IDs included in this phase",
            "example" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "items" : {
              "type" : "string"
            }
          },
          "startDate" : {
            "type" : "string",
            "description" : "Phase start date",
            "example" : "2022-01-01"
          },
          "endDate" : {
            "type" : "string",
            "description" : "Phase end date. A null end date denotes an open-ended phase. Only the last phase can be open-ended.",
            "example" : "2022-06-30"
          },
          "discounts" : {
            "type" : "array",
            "description" : "Discounts applicable to this phase",
            "example" : [ {
              "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
              "type" : "PERCENTAGE",
              "amount" : 8,
              "message" : "8% Discount",
              "separateLineItem" : true,
              "seatDiscountType" : "ALL_SEATS"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/EmbeddableDiscountRequest"
            }
          },
          "minimums" : {
            "type" : "array",
            "description" : "Minimums applicable to this phase",
            "example" : [ {
              "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
              "amount" : 100
            } ],
            "items" : {
              "$ref" : "#/components/schemas/MinimumRequest"
            }
          },
          "creditGrants" : {
            "type" : "array",
            "description" : "Credit grants applicable to this phase. Omit this field on every phase to leave the schedule's existing grants untouched. Once any phase provides it, the grants across all phases are the schedule's full grant spec: grants without an ID are created, grants re-sent with their ID are kept, and grants left out are removed. Grants cannot be updated through this request, and a grant that has already been drawn down cannot be removed this way — delete it through the credit grant endpoint instead.",
            "example" : [ {
              "name" : "Monthly usage credits",
              "creditUnitType" : "CURRENCY",
              "currency" : "GBP",
              "amount" : 100,
              "costOfCredit" : 0,
              "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
              "grantRefreshFrequency" : "MONTHLY",
              "billingFrequency" : "MONTHLY",
              "rolloverMode" : "NONE",
              "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/EmbeddableCreditGrantRequest"
            }
          },
          "listPriceIds" : {
            "type" : "array",
            "description" : "IDs of list prices from which to create prices for this phase",
            "example" : [ "45e16eb7-2170-4632-b04f-9ecd90b85b1e" ],
            "items" : {
              "type" : "string"
            }
          },
          "recurrencePreference" : {
            "description" : "Phase recurrence preference",
            "$ref" : "#/components/schemas/PhaseRecurrencePreference"
          },
          "phasePriceMetadata" : {
            "type" : "array",
            "description" : "Additional metadata for the relationship between this phase and each price",
            "example" : [ {
              "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "arrCalculation" : "INCLUDE"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PhasePriceMetadata"
            }
          },
          "phaseListPriceMetadata" : {
            "type" : "array",
            "description" : "Additional metadata for the relationship between this phase and each list price",
            "example" : [ {
              "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
              "arrCalculation" : "INCLUDE"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PhaseListPriceMetadata"
            }
          }
        }
      },
      "EmbeddableDiscountRequest" : {
        "required" : [ "amount", "message", "separateLineItem", "type" ],
        "type" : "object",
        "example" : {
          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
          "type" : "PERCENTAGE",
          "amount" : 8,
          "message" : "8% Discount",
          "separateLineItem" : true,
          "seatDiscountType" : "ALL_SEATS"
        },
        "properties" : {
          "restrictToPrices" : {
            "type" : "array",
            "description" : "Price IDs to which this discount applies",
            "example" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "items" : {
              "type" : "string"
            }
          },
          "type" : {
            "description" : "Whether the discount is a nominal or percentage amount",
            "$ref" : "#/components/schemas/DiscountCalculationType"
          },
          "amount" : {
            "type" : "number",
            "description" : "The discount amount",
            "example" : 8
          },
          "message" : {
            "type" : "string",
            "description" : "The message to show on an invoice",
            "example" : "8% Discount"
          },
          "separateLineItem" : {
            "type" : "boolean",
            "description" : "If true the discount will show as a separate line item on an invoice",
            "example" : true
          },
          "seatDiscountType" : {
            "description" : "Determines how the discount is applied to any seat-based prices",
            "$ref" : "#/components/schemas/SeatDiscountType"
          }
        }
      },
      "DiscountCalculationType" : {
        "type" : "string",
        "example" : "PERCENTAGE",
        "enum" : [ "PERCENTAGE", "NOMINAL" ]
      },
      "SeatDiscountType" : {
        "type" : "string",
        "example" : "ALL_SEATS",
        "enum" : [ "INCLUDED_SEATS_ONLY", "OVERAGE_SEATS_ONLY", "ALL_SEATS" ]
      },
      "MinimumRequest" : {
        "required" : [ "amount" ],
        "type" : "object",
        "example" : {
          "restrictToPrices" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
          "amount" : 100
        },
        "properties" : {
          "restrictToPrices" : {
            "type" : "array",
            "description" : "Price IDs to which this minimum applies",
            "example" : [ "9fe9986b-e205-42b7-a58f-42845c91f03f" ],
            "items" : {
              "type" : "string"
            }
          },
          "amount" : {
            "type" : "number",
            "description" : "The minimum amount",
            "example" : 100
          }
        }
      },
      "EmbeddableCreditGrantRequest" : {
        "required" : [ "amount", "creditUnitType", "grantRefreshFrequency", "name", "rolloverMode" ],
        "type" : "object",
        "example" : {
          "name" : "Monthly usage credits",
          "creditUnitType" : "CURRENCY",
          "currency" : "GBP",
          "amount" : 100,
          "costOfCredit" : 0,
          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
          "grantRefreshFrequency" : "MONTHLY",
          "billingFrequency" : "MONTHLY",
          "rolloverMode" : "NONE",
          "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
        },
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "Name of the credit grant.",
            "example" : "Monthly usage credits"
          },
          "creditUnitType" : {
            "description" : "Type of the unit of credit.",
            "$ref" : "#/components/schemas/CreditUnitType"
          },
          "currency" : {
            "description" : "Currency of cash credit if creditUnitType is CURRENCY.",
            "$ref" : "#/components/schemas/Currency"
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount of units granted.",
            "example" : 100
          },
          "costOfCredit" : {
            "type" : "number",
            "description" : "Cost of credit grant.",
            "example" : 0
          },
          "taxRateId" : {
            "type" : "string",
            "description" : "Tax rate ID for the credit grant.",
            "example" : "179d1ab3-cc96-48e2-9310-067b0b42d47c"
          },
          "grantRefreshFrequency" : {
            "description" : "How often the credit grant refreshes its balance.",
            "$ref" : "#/components/schemas/GrantRefreshFrequency"
          },
          "billingFrequency" : {
            "description" : "How often the customer is charged for the credit grant. Omit to charge on the refresh cadence. One charge must cover whole refresh periods, so a quarterly refresh cannot be billed monthly. Cannot be changed once the grant exists: when id is set, send the stored value or omit it.",
            "$ref" : "#/components/schemas/GrantBillingFrequency"
          },
          "rolloverMode" : {
            "description" : "Whether unused balance carries over when the grant refreshes.",
            "$ref" : "#/components/schemas/RolloverMode"
          },
          "restrictToPrices" : {
            "type" : "array",
            "description" : "Price IDs the grant is consumed against. Omit or leave empty to apply to every price in the phase.",
            "example" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "CreditUnitType" : {
        "type" : "string",
        "example" : "CURRENCY",
        "enum" : [ "CURRENCY", "METRIC" ]
      },
      "GrantRefreshFrequency" : {
        "type" : "string",
        "example" : "MONTHLY",
        "enum" : [ "NONE", "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY" ]
      },
      "GrantBillingFrequency" : {
        "type" : "string",
        "example" : "MONTHLY",
        "enum" : [ "ONE_TIME", "MONTHLY", "QUARTERLY", "HALF_YEARLY", "YEARLY" ]
      },
      "RolloverMode" : {
        "type" : "string",
        "example" : "NONE",
        "enum" : [ "NONE", "ON_GRANT_REFRESH", "ON_GRANT_REFRESH_AND_PHASE" ]
      },
      "PhaseRecurrencePreference" : {
        "type" : "string",
        "example" : "CONTINUE_FROM_PREVIOUS_PHASE",
        "enum" : [ "CONTINUE_FROM_PREVIOUS_PHASE", "RESET" ]
      },
      "PhasePriceMetadata" : {
        "required" : [ "arrCalculation", "priceId" ],
        "type" : "object",
        "example" : {
          "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
          "arrCalculation" : "INCLUDE"
        },
        "properties" : {
          "priceId" : {
            "type" : "string",
            "example" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8"
          },
          "arrCalculation" : {
            "$ref" : "#/components/schemas/ArrCalculation"
          }
        }
      },
      "ArrCalculation" : {
        "type" : "string",
        "example" : "INCLUDE",
        "enum" : [ "INCLUDE", "EXCLUDE" ]
      },
      "PhaseListPriceMetadata" : {
        "required" : [ "arrCalculation", "listPriceId" ],
        "type" : "object",
        "example" : {
          "listPriceId" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e",
          "arrCalculation" : "INCLUDE"
        },
        "properties" : {
          "listPriceId" : {
            "type" : "string",
            "example" : "45e16eb7-2170-4632-b04f-9ecd90b85b1e"
          },
          "arrCalculation" : {
            "$ref" : "#/components/schemas/ArrCalculation"
          }
        }
      },
      "BillingScheduleResponse" : {
        "required" : [ "attachmentAssets", "autoIssueInvoices", "createdAt", "customFields", "customerId", "id", "integrationIds", "phases", "prices", "rollUpBilling", "startDate", "status", "updatedAt" ],
        "type" : "object",
        "example" : {
          "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
          "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
          "status" : "ACTIVE",
          "startDate" : "2022-01-01",
          "endDate" : "2022-12-01",
          "taxRates" : [ {
            "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
            "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
          } ],
          "firstBillingDate" : "2022-02-02",
          "autoIssueInvoices" : false,
          "purchaseOrderNumber" : "PO123",
          "reference" : "ref",
          "label" : "label",
          "recurrenceDayOfMonth" : 1,
          "prices" : [ {
            "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
            "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
            "name" : "Demo Product",
            "currency" : "GBP",
            "structure" : {
              "pricePerUnit" : "0.25",
              "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
              "isPricePercentage" : false,
              "pricingType" : "LINEAR"
            },
            "billingFrequency" : "MONTHLY",
            "billingType" : "IN_ARREARS",
            "createdAt" : "2022-06-28T16:47:00Z",
            "updatedAt" : "2022-06-28T16:47:00Z",
            "integrationIds" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "customMetricParameters" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
            "usageCalculationPeriod" : {
              "frequency" : "MONTHLY",
              "interval" : 1
            },
            "status" : "ACTIVE"
          } ],
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
          "phases" : [ {
            "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
            "name" : "Onboarding",
            "externalContractRef" : "ACME-2022-MSA",
            "createdAt" : "2022-06-28T16:47:00Z",
            "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
            "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "startDate" : "2022-01-01",
            "endDate" : "2022-06-30",
            "discounts" : [ {
              "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
              "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
              "type" : "PERCENTAGE",
              "amount" : 15,
              "message" : "15% Discount",
              "separateLineItem" : true,
              "seatDiscountType" : "ALL_SEATS"
            } ],
            "minimums" : [ {
              "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
              "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
              "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "amount" : 100,
              "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
              "createdAt" : "2022-06-28T16:47:00Z",
              "updatedAt" : "2022-06-28T16:47:00Z"
            } ],
            "creditGrants" : [ {
              "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
              "name" : "Monthly usage credits",
              "creditUnitType" : "CURRENCY",
              "currency" : "GBP",
              "amount" : 100,
              "costOfCredit" : 0,
              "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
              "grantRefreshFrequency" : "MONTHLY",
              "billingFrequency" : "MONTHLY",
              "rolloverMode" : "NONE",
              "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
            } ],
            "integrationIds" : [ {
              "service" : "NetSuite",
              "id" : "SO-1024",
              "lastSynced" : "2022-06-28T16:47:00Z",
              "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
              "isPending" : false
            } ],
            "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
            "phasePriceMetadata" : [ {
              "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "arrCalculation" : "INCLUDE"
            } ]
          } ],
          "archivedAt" : "2022-06-28T16:47:00Z",
          "rollUpBilling" : false,
          "integrationIds" : [ {
            "service" : "Salesforce",
            "id" : "a0CQy00000Ipz5VMAR",
            "lastSynced" : "2024-08-14T17:14:17Z",
            "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
            "isPending" : false
          } ],
          "attachmentAssets" : [ {
            "id" : "e007e884-5100-4183-8355-4771865cb4dd",
            "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "type" : "IMAGE",
            "format" : "PNG",
            "fileName" : "my-image.png",
            "fileSizeBytes" : 12345,
            "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
            "createdAt" : "2022-06-28T16:47:00Z"
          } ],
          "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
          "defaultDueDateDays" : 30,
          "memo" : "Example Billing Schedule",
          "customFields" : {
            "key" : "value"
          },
          "paymentProvider" : "STRIPE",
          "autoCharge" : true
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Billing Schedule ID",
            "example" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b"
          },
          "customerId" : {
            "type" : "string",
            "description" : "Customer ID",
            "example" : "cca32597-b6b0-4499-9669-128aef8702e4"
          },
          "status" : {
            "description" : "Billing schedule status",
            "$ref" : "#/components/schemas/ApiBillingScheduleStatus"
          },
          "startDate" : {
            "type" : "string",
            "description" : "Start date",
            "example" : "2022-01-01"
          },
          "endDate" : {
            "type" : "string",
            "description" : "End date",
            "example" : "2022-12-01"
          },
          "taxRates" : {
            "type" : "array",
            "description" : "Tax Rate for each Product",
            "example" : [ {
              "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
              "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/ProductTaxRateRepresentation"
            }
          },
          "firstBillingDate" : {
            "type" : "string",
            "description" : "First billing date",
            "example" : "2022-02-02"
          },
          "autoIssueInvoices" : {
            "type" : "boolean",
            "description" : "If true, invoices will be automatically sent for this billing schedule",
            "example" : false
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Optional purchase order number to be added to invoices",
            "example" : "PO123"
          },
          "reference" : {
            "type" : "string",
            "description" : "Optional reference to be added to invoices",
            "example" : "ref"
          },
          "label" : {
            "type" : "string",
            "description" : "Optional label",
            "example" : "label"
          },
          "recurrenceDayOfMonth" : {
            "type" : "integer",
            "description" : "The day of the month on which billing recurs",
            "format" : "int32",
            "example" : 1
          },
          "prices" : {
            "type" : "array",
            "description" : "Prices",
            "example" : [ {
              "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
              "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
              "name" : "Demo Product",
              "currency" : "GBP",
              "structure" : {
                "pricePerUnit" : "0.25",
                "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                "isPricePercentage" : false,
                "pricingType" : "LINEAR"
              },
              "billingFrequency" : "MONTHLY",
              "billingType" : "IN_ARREARS",
              "createdAt" : "2022-06-28T16:47:00Z",
              "updatedAt" : "2022-06-28T16:47:00Z",
              "integrationIds" : [ {
                "service" : "Xero",
                "id" : "123",
                "isPending" : false
              } ],
              "customMetricParameters" : [ {
                "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                "value" : "10"
              } ],
              "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
              "usageCalculationPeriod" : {
                "frequency" : "MONTHLY",
                "interval" : 1
              },
              "status" : "ACTIVE"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceResponse"
            }
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Time at which the schedule was initially created, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Time at which the schedule was last updated, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "lastInvoiceId" : {
            "type" : "string",
            "description" : "ID of the last invoice (if there has been one)",
            "example" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64"
          },
          "phases" : {
            "type" : "array",
            "description" : "Phases",
            "example" : [ {
              "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "name" : "Onboarding",
              "externalContractRef" : "ACME-2022-MSA",
              "createdAt" : "2022-06-28T16:47:00Z",
              "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
              "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
              "startDate" : "2022-01-01",
              "endDate" : "2022-06-30",
              "discounts" : [ {
                "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                "type" : "PERCENTAGE",
                "amount" : 15,
                "message" : "15% Discount",
                "separateLineItem" : true,
                "seatDiscountType" : "ALL_SEATS"
              } ],
              "minimums" : [ {
                "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "amount" : 100,
                "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                "createdAt" : "2022-06-28T16:47:00Z",
                "updatedAt" : "2022-06-28T16:47:00Z"
              } ],
              "creditGrants" : [ {
                "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                "name" : "Monthly usage credits",
                "creditUnitType" : "CURRENCY",
                "currency" : "GBP",
                "amount" : 100,
                "costOfCredit" : 0,
                "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                "grantRefreshFrequency" : "MONTHLY",
                "billingFrequency" : "MONTHLY",
                "rolloverMode" : "NONE",
                "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
              } ],
              "integrationIds" : [ {
                "service" : "NetSuite",
                "id" : "SO-1024",
                "lastSynced" : "2022-06-28T16:47:00Z",
                "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                "isPending" : false
              } ],
              "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
              "phasePriceMetadata" : [ {
                "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "arrCalculation" : "INCLUDE"
              } ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/Phase"
            }
          },
          "archivedAt" : {
            "type" : "string",
            "description" : "Time at which the schedule was archived, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "rollUpBilling" : {
            "type" : "boolean",
            "description" : "Roll up billing",
            "example" : false
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "External services which are linked to this customer",
            "example" : [ {
              "service" : "Salesforce",
              "id" : "a0CQy00000Ipz5VMAR",
              "lastSynced" : "2024-08-14T17:14:17Z",
              "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "attachmentAssets" : {
            "type" : "array",
            "description" : "Assets attached to this billing schedule",
            "example" : [ {
              "id" : "e007e884-5100-4183-8355-4771865cb4dd",
              "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "type" : "IMAGE",
              "format" : "PNG",
              "fileName" : "my-image.png",
              "fileSizeBytes" : 12345,
              "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
              "createdAt" : "2022-06-28T16:47:00Z"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/AssetResponse"
            }
          },
          "contractId" : {
            "type" : "string",
            "description" : "Optional ID of the contract used to create this billing schedule",
            "example" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a"
          },
          "defaultDueDateDays" : {
            "type" : "integer",
            "description" : "Default number of days between invoice issue date and due date",
            "example" : 30
          },
          "memo" : {
            "type" : "string",
            "description" : "Billing schedule memo",
            "example" : "Example Billing Schedule"
          },
          "customFields" : {
            "type" : "object",
            "description" : "Custom key-value fields for this billing schedule",
            "example" : {
              "key" : "value"
            },
            "additionalProperties" : {
              "type" : "string"
            }
          },
          "paymentProvider" : {
            "description" : "Payment provider configured for collecting invoices on this billing schedule",
            "$ref" : "#/components/schemas/PaymentProvider"
          },
          "autoCharge" : {
            "type" : "boolean",
            "description" : "Whether invoices for this billing schedule are automatically charged",
            "example" : true
          }
        }
      },
      "ApiBillingScheduleStatus" : {
        "type" : "string",
        "example" : "ACTIVE",
        "enum" : [ "DRAFT", "PENDING", "ACTIVE", "SUSPENDED", "CANCELLED", "COMPLETED" ]
      },
      "Phase" : {
        "required" : [ "billingScheduleId", "createdAt", "creditGrants", "discounts", "id", "integrationIds", "minimums", "phasePriceMetadata", "priceIds", "recurrencePreference", "startDate" ],
        "type" : "object",
        "example" : {
          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
          "name" : "Onboarding",
          "externalContractRef" : "ACME-2022-MSA",
          "createdAt" : "2022-06-28T16:47:00Z",
          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
          "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
          "startDate" : "2022-01-01",
          "endDate" : "2022-06-30",
          "discounts" : [ {
            "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
            "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "type" : "PERCENTAGE",
            "amount" : 15,
            "message" : "15% Discount",
            "separateLineItem" : true,
            "seatDiscountType" : "ALL_SEATS"
          } ],
          "minimums" : [ {
            "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
            "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
            "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
            "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
            "amount" : 100,
            "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "createdAt" : "2022-06-28T16:47:00Z",
            "updatedAt" : "2022-06-28T16:47:00Z"
          } ],
          "creditGrants" : [ {
            "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
            "name" : "Monthly usage credits",
            "creditUnitType" : "CURRENCY",
            "currency" : "GBP",
            "amount" : 100,
            "costOfCredit" : 0,
            "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
            "grantRefreshFrequency" : "MONTHLY",
            "billingFrequency" : "MONTHLY",
            "rolloverMode" : "NONE",
            "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
          } ],
          "integrationIds" : [ {
            "service" : "NetSuite",
            "id" : "SO-1024",
            "lastSynced" : "2022-06-28T16:47:00Z",
            "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
            "isPending" : false
          } ],
          "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
          "phasePriceMetadata" : [ {
            "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
            "arrCalculation" : "INCLUDE"
          } ]
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Phase ID",
            "example" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8"
          },
          "name" : {
            "type" : "string",
            "description" : "Name",
            "example" : "Onboarding"
          },
          "externalContractRef" : {
            "type" : "string",
            "description" : "Free-text reference to the contract this phase rolls up to in an external system. Phases sharing a reference belong to the same contract. Null means the phase rolls up to the billing schedule itself.",
            "example" : "ACME-2022-MSA"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Created at",
            "example" : "2022-06-28T16:47:00Z"
          },
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Billing Schedule ID",
            "example" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b"
          },
          "priceIds" : {
            "type" : "array",
            "description" : "Price IDs",
            "example" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "items" : {
              "type" : "string"
            }
          },
          "startDate" : {
            "type" : "string",
            "description" : "Start Date",
            "example" : "2022-01-01"
          },
          "endDate" : {
            "type" : "string",
            "description" : "End date",
            "example" : "2022-06-30"
          },
          "discounts" : {
            "type" : "array",
            "description" : "Discounts in Phase",
            "example" : [ {
              "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
              "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
              "type" : "PERCENTAGE",
              "amount" : 15,
              "message" : "15% Discount",
              "separateLineItem" : true,
              "seatDiscountType" : "ALL_SEATS"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/EmbeddableDiscount"
            }
          },
          "minimums" : {
            "type" : "array",
            "example" : [ {
              "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
              "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
              "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "amount" : 100,
              "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
              "createdAt" : "2022-06-28T16:47:00Z",
              "updatedAt" : "2022-06-28T16:47:00Z"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/Minimum"
            }
          },
          "creditGrants" : {
            "type" : "array",
            "description" : "Credit grants in Phase",
            "example" : [ {
              "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
              "name" : "Monthly usage credits",
              "creditUnitType" : "CURRENCY",
              "currency" : "GBP",
              "amount" : 100,
              "costOfCredit" : 0,
              "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
              "grantRefreshFrequency" : "MONTHLY",
              "billingFrequency" : "MONTHLY",
              "rolloverMode" : "NONE",
              "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/EmbeddableCreditGrant"
            }
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "External services which this phase is linked to",
            "example" : [ {
              "service" : "NetSuite",
              "id" : "SO-1024",
              "lastSynced" : "2022-06-28T16:47:00Z",
              "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "recurrencePreference" : {
            "$ref" : "#/components/schemas/PhaseRecurrencePreference"
          },
          "phasePriceMetadata" : {
            "type" : "array",
            "description" : "Additional metadata for the relationship between this phase and each price",
            "example" : [ {
              "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "arrCalculation" : "INCLUDE"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PhasePriceMetadata"
            }
          }
        }
      },
      "EmbeddableDiscount" : {
        "required" : [ "amount", "id", "message", "separateLineItem", "type" ],
        "type" : "object",
        "example" : {
          "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
          "type" : "PERCENTAGE",
          "amount" : 15,
          "message" : "15% Discount",
          "separateLineItem" : true,
          "seatDiscountType" : "ALL_SEATS"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Discount ID",
            "example" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c"
          },
          "restrictToPrices" : {
            "type" : "array",
            "description" : "Price IDs to which this discount applies",
            "example" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "items" : {
              "type" : "string"
            }
          },
          "type" : {
            "description" : "Whether the discount is a nominal or percentage amount",
            "$ref" : "#/components/schemas/DiscountCalculationType"
          },
          "amount" : {
            "type" : "number",
            "description" : "The discount amount",
            "example" : 15
          },
          "message" : {
            "type" : "string",
            "description" : "The message to show on an invoice",
            "example" : "15% Discount"
          },
          "separateLineItem" : {
            "type" : "boolean",
            "description" : "If true the discount will show as a separate line item on an invoice",
            "example" : true
          },
          "seatDiscountType" : {
            "description" : "Determines how the discount is applied to any seat-based prices",
            "$ref" : "#/components/schemas/SeatDiscountType"
          }
        }
      },
      "Minimum" : {
        "required" : [ "amount", "billingScheduleId", "createdAt", "id", "phaseId", "restrictToPrices", "sequenceAccountId", "updatedAt" ],
        "type" : "object",
        "example" : {
          "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
          "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
          "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
          "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
          "amount" : 100,
          "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Minimum ID",
            "example" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence Account ID",
            "example" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e"
          },
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Billing Schedule ID",
            "example" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b"
          },
          "phaseId" : {
            "type" : "string",
            "description" : "Phase ID",
            "example" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8"
          },
          "amount" : {
            "type" : "number",
            "description" : "Minimum amount",
            "example" : 100
          },
          "restrictToPrices" : {
            "type" : "array",
            "description" : "Price IDs the minimum is restricted to",
            "example" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
            "items" : {
              "type" : "string"
            }
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Created at",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Updated at",
            "example" : "2022-06-28T16:47:00Z"
          }
        }
      },
      "EmbeddableCreditGrant" : {
        "required" : [ "amount", "billingFrequency", "creditUnitType", "grantRefreshFrequency", "id", "name", "restrictToPrices", "rolloverMode" ],
        "type" : "object",
        "example" : {
          "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
          "name" : "Monthly usage credits",
          "creditUnitType" : "CURRENCY",
          "currency" : "GBP",
          "amount" : 100,
          "costOfCredit" : 0,
          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
          "grantRefreshFrequency" : "MONTHLY",
          "billingFrequency" : "MONTHLY",
          "rolloverMode" : "NONE",
          "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit grant ID.",
            "example" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0"
          },
          "name" : {
            "type" : "string",
            "description" : "Name of the credit grant.",
            "example" : "Monthly usage credits"
          },
          "creditUnitType" : {
            "description" : "Type of the unit of credit.",
            "$ref" : "#/components/schemas/CreditUnitType"
          },
          "currency" : {
            "description" : "Currency of cash credit if creditUnitType is CURRENCY.",
            "$ref" : "#/components/schemas/Currency"
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount of units granted.",
            "example" : 100
          },
          "costOfCredit" : {
            "type" : "number",
            "description" : "Cost of credit grant.",
            "example" : 0
          },
          "taxRateId" : {
            "type" : "string",
            "description" : "Tax rate ID for the credit grant.",
            "example" : "179d1ab3-cc96-48e2-9310-067b0b42d47c"
          },
          "grantRefreshFrequency" : {
            "description" : "How often the credit grant refreshes its balance.",
            "$ref" : "#/components/schemas/GrantRefreshFrequency"
          },
          "billingFrequency" : {
            "description" : "How often the customer is charged for the credit grant.",
            "$ref" : "#/components/schemas/GrantBillingFrequency"
          },
          "rolloverMode" : {
            "description" : "Whether unused balance carries over when the grant refreshes.",
            "$ref" : "#/components/schemas/RolloverMode"
          },
          "restrictToPrices" : {
            "type" : "array",
            "description" : "Price IDs the grant is consumed against.",
            "example" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "AssetResponse" : {
        "required" : [ "createdAt", "createdBy", "fileName", "fileSizeBytes", "format", "id", "type", "url" ],
        "type" : "object",
        "example" : {
          "id" : "e007e884-5100-4183-8355-4771865cb4dd",
          "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
          "type" : "IMAGE",
          "format" : "PNG",
          "fileName" : "my-image.png",
          "fileSizeBytes" : 12345,
          "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
          "createdAt" : "2022-06-28T16:47:00Z"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique ID",
            "example" : "e007e884-5100-4183-8355-4771865cb4dd"
          },
          "createdBy" : {
            "type" : "string",
            "description" : "The Sequence user who created this asset",
            "example" : "94703530-1293-479b-bd37-ccad42fd9c8b"
          },
          "type" : {
            "description" : "Either image or document",
            "$ref" : "#/components/schemas/AssetType"
          },
          "format" : {
            "description" : "Identifies the intended data format. Allowed formats are: jpg, jpeg, png, and pdf",
            "$ref" : "#/components/schemas/AssetFormat"
          },
          "fileName" : {
            "type" : "string",
            "description" : "Filename of the uploaded file",
            "example" : "my-image.png"
          },
          "fileSizeBytes" : {
            "type" : "integer",
            "description" : "Size of the uploaded file in bytes",
            "format" : "int32",
            "example" : 12345
          },
          "url" : {
            "type" : "string",
            "description" : "URL to download the asset",
            "example" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Creation timestamp. Formatted as an ISO 8601 timestamp.",
            "example" : "2022-06-28T16:47:00Z"
          }
        }
      },
      "AssetType" : {
        "type" : "string",
        "example" : "IMAGE",
        "enum" : [ "IMAGE", "DOCUMENT", "BINARY" ]
      },
      "AssetFormat" : {
        "type" : "string",
        "example" : "PNG",
        "enum" : [ "JPEG", "JPG", "PNG", "PDF", "CSV", "TXT", "RTF", "MD", "XLS", "XLSX", "XLSM", "DOC", "DOCX", "ZIP", "ODT", "ODS" ]
      },
      "GraduatedPriceResponse" : {
        "required" : [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ],
        "type" : "object",
        "title" : "GraduatedPriceResponse",
        "example" : {
          "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "tiers" : [ {
              "upperBound" : "200",
              "price" : "1.00",
              "fee" : "50.00",
              "isPricePercentage" : false
            }, {
              "upperBound" : "400",
              "price" : "0.75",
              "fee" : "25.00",
              "isPricePercentage" : false
            }, {
              "price" : "0.50",
              "fee" : "0.00",
              "isPricePercentage" : false
            } ],
            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
            "usageCalculationMode" : "BILLING_PERIOD",
            "pricingType" : "GRADUATED"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123",
            "isPending" : false
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "usageCalculationPeriod" : {
            "frequency" : "MONTHLY",
            "interval" : 1
          },
          "status" : "ACTIVE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique Price ID, generated by Sequence on creation.",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/GraduatedPricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Time at which the Price was initially created, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Time at which the Price was last updated, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "usageCalculationPeriod" : {
            "$ref" : "#/components/schemas/UsageCalculationPeriod"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "VolumePriceResponse" : {
        "required" : [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ],
        "type" : "object",
        "title" : "VolumePriceResponse",
        "example" : {
          "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "tiers" : [ {
              "upperBound" : "100",
              "price" : "1.00",
              "fee" : "50.00",
              "isPricePercentage" : true,
              "maxPrice" : "10",
              "minPrice" : "5"
            }, {
              "price" : "0.75",
              "fee" : "25.00",
              "isPricePercentage" : true,
              "maxPrice" : "10",
              "minPrice" : "5"
            } ],
            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
            "pricingType" : "VOLUME"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123",
            "isPending" : false
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique Price ID, generated by Sequence on creation.",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/VolumePricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Time at which the Price was initially created, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Time at which the Price was last updated, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "SeatBasedPriceResponse" : {
        "required" : [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ],
        "type" : "object",
        "title" : "SeatBasedPriceResponse",
        "example" : {
          "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "seatMetricId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
            "pricePerSeat" : "0.25",
            "prorationStrategy" : "USE_MAXIMUM",
            "contractedMinimumSeats" : 10,
            "overagesBillingFrequency" : "YEARLY",
            "tiers" : [ {
              "upperBound" : "100",
              "price" : "1.00",
              "fee" : "50.00"
            }, {
              "price" : "0.75",
              "fee" : "25.00"
            } ],
            "prorateFlatFees" : false,
            "pricingType" : "SEAT_BASED"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123",
            "isPending" : false
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique Price ID, generated by Sequence on creation.",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/SeatBasedPricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Time at which the Price was initially created, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Time at which the Price was last updated, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "PackagePriceResponse" : {
        "required" : [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ],
        "type" : "object",
        "title" : "PackagePriceResponse",
        "example" : {
          "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "packageSize" : "50",
            "pricePerPackage" : "2.00",
            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
            "pricingType" : "PACKAGE"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123",
            "isPending" : false
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique Price ID, generated by Sequence on creation.",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/PackagePricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Time at which the Price was initially created, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Time at which the Price was last updated, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "LinearPriceResponse" : {
        "required" : [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ],
        "type" : "object",
        "title" : "LinearPriceResponse",
        "example" : {
          "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "pricePerUnit" : "0.25",
            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
            "isPricePercentage" : false,
            "pricingType" : "LINEAR"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123",
            "isPending" : false
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique Price ID, generated by Sequence on creation.",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/LinearPricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Time at which the Price was initially created, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Time at which the Price was last updated, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "FixedPriceResponse" : {
        "required" : [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ],
        "type" : "object",
        "title" : "FixedPriceResponse",
        "example" : {
          "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "price" : "20.00",
            "pricingType" : "FIXED"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123",
            "isPending" : false
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique Price ID, generated by Sequence on creation.",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/FixedPricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Time at which the Price was initially created, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Time at which the Price was last updated, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "OneTimePriceResponse" : {
        "required" : [ "billingFrequency", "billingType", "createdAt", "currency", "customMetricParameters", "id", "integrationIds", "name", "productId", "status", "structure" ],
        "type" : "object",
        "title" : "OneTimePriceResponse",
        "example" : {
          "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "price" : "150.00",
            "pricingType" : "ONE_TIME"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123",
            "isPending" : false
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique Price ID, generated by Sequence on creation.",
            "example" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730"
          },
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/OneTimePricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Time at which the Price was initially created, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Time at which the Price was last updated, in ISO 8601 format.",
            "example" : "2022-06-28T16:47:00Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "CreditGrant" : {
        "required" : [ "amount", "costOfCredit", "createdAt", "creditUnitType", "currency", "customerId", "id", "integrationIds", "name", "sequenceAccountId" ],
        "type" : "object",
        "example" : {
          "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
          "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "name" : "On-boarding Credits",
          "creditUnitType" : "CURRENCY",
          "currency" : "GBP",
          "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
          "amount" : 10,
          "costOfCredit" : 10,
          "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
          "effectiveDate" : "2023-01-01",
          "expiryDate" : "2023-01-31",
          "createdAt" : "2022-10-07T14:12:08.826121Z",
          "creditNoteId" : "73086198-8752-4ec9-a99b-16209a32dc6c",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "74ed2615-4730-49ab-9445-74f31723a206",
            "isPending" : false
          } ]
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Grant ID",
            "example" : "746fc7f2-8098-4fe7-953c-7d51c580a126"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence Account ID",
            "example" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the Customer Credit is granted to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "name" : {
            "type" : "string",
            "description" : "Name of the Credit Grant",
            "example" : "On-boarding Credits"
          },
          "creditUnitType" : {
            "description" : "Type of the Unit of Credit",
            "$ref" : "#/components/schemas/CreditUnitType"
          },
          "currency" : {
            "description" : "Currency of Cash Credit (if CreditUnitType is CURRENCY)",
            "$ref" : "#/components/schemas/Currency"
          },
          "metricId" : {
            "type" : "string",
            "description" : "Metric ID (if CreditUnitType is METRIC)",
            "example" : "f092246c-6b90-4106-bcca-304ccf06bf45"
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount of Units Granted",
            "example" : 10
          },
          "costOfCredit" : {
            "type" : "number",
            "description" : "Cost of Credit Grant, to be Invoiced to the Customer",
            "example" : 10
          },
          "taxRateId" : {
            "type" : "string",
            "description" : "Tax Rate ID for Credit Purchase",
            "example" : "179d1ab3-cc96-48e2-9310-067b0b42d47c"
          },
          "effectiveDate" : {
            "type" : "string",
            "description" : "First Day Credit Grant can be consumed",
            "example" : "2023-01-01"
          },
          "expiryDate" : {
            "type" : "string",
            "description" : "Last Day Credit Grant can be consumed",
            "example" : "2023-01-31"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "The created at",
            "example" : "2022-10-07T14:12:08.826121Z"
          },
          "creditNoteId" : {
            "type" : "string",
            "description" : "ID of the credit note that created this grant (if applicable)",
            "example" : "73086198-8752-4ec9-a99b-16209a32dc6c"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "service" : "Xero",
              "id" : "74ed2615-4730-49ab-9445-74f31723a206",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          }
        }
      },
      "GenerateIntegrationIdRequest" : {
        "required" : [ "id", "service" ],
        "type" : "object",
        "example" : {
          "service" : "Xero",
          "id" : "123"
        },
        "properties" : {
          "service" : {
            "$ref" : "#/components/schemas/IntegrationService"
          },
          "id" : {
            "type" : "string",
            "example" : "123"
          }
        }
      },
      "GraduatedPriceRequest" : {
        "required" : [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ],
        "type" : "object",
        "title" : "GraduatedPriceRequest",
        "example" : {
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "tiers" : [ {
              "upperBound" : "200",
              "price" : "1.00",
              "fee" : "50.00",
              "isPricePercentage" : false
            }, {
              "upperBound" : "400",
              "price" : "0.75",
              "fee" : "25.00",
              "isPricePercentage" : false
            }, {
              "price" : "0.50",
              "fee" : "0.00",
              "isPricePercentage" : false
            } ],
            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
            "usageCalculationMode" : "BILLING_PERIOD",
            "pricingType" : "GRADUATED"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123"
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "usageCalculationPeriod" : {
            "frequency" : "MONTHLY",
            "interval" : 1
          },
          "status" : "ACTIVE"
        },
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/GraduatedPricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/GenerateIntegrationIdRequest"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "usageCalculationPeriod" : {
            "$ref" : "#/components/schemas/UsageCalculationPeriod"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "VolumePriceRequest" : {
        "required" : [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ],
        "type" : "object",
        "title" : "VolumePriceRequest",
        "example" : {
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "tiers" : [ {
              "upperBound" : "100",
              "price" : "1.00",
              "fee" : "50.00",
              "isPricePercentage" : true,
              "maxPrice" : "10",
              "minPrice" : "5"
            }, {
              "price" : "0.75",
              "fee" : "25.00",
              "isPricePercentage" : true,
              "maxPrice" : "10",
              "minPrice" : "5"
            } ],
            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
            "pricingType" : "VOLUME"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123"
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/VolumePricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/GenerateIntegrationIdRequest"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "SeatBasedPriceRequest" : {
        "required" : [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ],
        "type" : "object",
        "title" : "SeatBasedPriceRequest",
        "example" : {
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "seatMetricId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
            "pricePerSeat" : "0.25",
            "prorationStrategy" : "USE_MAXIMUM",
            "contractedMinimumSeats" : 10,
            "overagesBillingFrequency" : "YEARLY",
            "tiers" : [ {
              "upperBound" : "100",
              "price" : "1.00",
              "fee" : "50.00"
            }, {
              "price" : "0.75",
              "fee" : "25.00"
            } ],
            "prorateFlatFees" : false,
            "pricingType" : "SEAT_BASED"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123"
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/SeatBasedPricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/GenerateIntegrationIdRequest"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "PackagePriceRequest" : {
        "required" : [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ],
        "type" : "object",
        "title" : "PackagePriceRequest",
        "example" : {
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "packageSize" : "50",
            "pricePerPackage" : "2.00",
            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
            "pricingType" : "PACKAGE"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123"
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/PackagePricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/GenerateIntegrationIdRequest"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "LinearPriceRequest" : {
        "required" : [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ],
        "type" : "object",
        "title" : "LinearPriceRequest",
        "example" : {
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "pricePerUnit" : "0.25",
            "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
            "isPricePercentage" : false,
            "pricingType" : "LINEAR"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123"
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/LinearPricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/GenerateIntegrationIdRequest"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "FixedPriceRequest" : {
        "required" : [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ],
        "type" : "object",
        "title" : "FixedPriceRequest",
        "example" : {
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "price" : "20.00",
            "pricingType" : "FIXED"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123"
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/FixedPricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/GenerateIntegrationIdRequest"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "OneTimePriceRequest" : {
        "required" : [ "billingFrequency", "billingType", "currency", "name", "productId", "structure" ],
        "type" : "object",
        "title" : "OneTimePriceRequest",
        "example" : {
          "productId" : "d07037d5-3e31-4c3a-a360-e58555e2bf44",
          "name" : "Demo Product",
          "currency" : "GBP",
          "structure" : {
            "price" : "150.00",
            "pricingType" : "ONE_TIME"
          },
          "billingFrequency" : "MONTHLY",
          "billingType" : "IN_ARREARS",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "123"
          } ],
          "customMetricParameters" : [ {
            "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "value" : "10"
          } ],
          "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
          "status" : "ACTIVE"
        },
        "properties" : {
          "productId" : {
            "type" : "string",
            "description" : "The ID of the Product that this Price is associated with.",
            "example" : "d07037d5-3e31-4c3a-a360-e58555e2bf44"
          },
          "name" : {
            "type" : "string",
            "description" : "A short form description of the price, which appears as the title of line items on invoices.",
            "example" : "Demo Product"
          },
          "currency" : {
            "description" : "The currency in which this price is denominated. This must be a valid ISO 4217 currency code, that is currently part of currencies supported by Sequence.",
            "$ref" : "#/components/schemas/Currency"
          },
          "structure" : {
            "$ref" : "#/components/schemas/OneTimePricingStructure"
          },
          "billingFrequency" : {
            "description" : "The frequency with which this price is billed.",
            "$ref" : "#/components/schemas/BillingFrequency"
          },
          "billingType" : {
            "description" : "Indicate at which point of the billing period to generate the invoice for this price. This can be either in-arrears (after the period ends), or in-advnace (at the beginning of the period).",
            "$ref" : "#/components/schemas/BillingType"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "Alternate IDs for this Price in third-party integration systems",
            "example" : [ {
              "service" : "Xero",
              "id" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/GenerateIntegrationIdRequest"
            }
          },
          "customMetricParameters" : {
            "type" : "array",
            "description" : "Specific parameters to influence usage calculation for this Price, and are only required when using custom metric. Please speak to your Sequence contacts for further information prior to usage.",
            "example" : [ {
              "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "value" : "10"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PriceParameter"
            }
          },
          "listPriceId" : {
            "type" : "string",
            "description" : "The list price ID, if this price variant was created from a list price",
            "example" : "b4d7e884-e007-4183-8355-4771865c5100"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "UpdateBillingScheduleRequest" : {
        "required" : [ "autoIssueInvoices", "phases", "rollUpBilling", "startDate", "taxRates" ],
        "type" : "object",
        "example" : {
          "startDate" : "2022-01-01",
          "endDate" : "2022-12-01",
          "recurrenceDayOfMonth" : 1,
          "taxRates" : [ {
            "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
            "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
          } ],
          "autoIssueInvoices" : true,
          "purchaseOrderNumber" : "PO123",
          "rollUpBilling" : false,
          "phases" : [ {
            "externalContractRef" : "ACME-2022-MSA",
            "priceIds" : [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ],
            "startDate" : "2022-01-01",
            "endDate" : "2022-12-01",
            "discounts" : [ ],
            "minimums" : [ ],
            "creditGrants" : [ {
              "id" : "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40",
              "name" : "Monthly usage credits",
              "creditUnitType" : "CURRENCY",
              "currency" : "GBP",
              "amount" : 100,
              "costOfCredit" : 0,
              "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
              "grantRefreshFrequency" : "MONTHLY",
              "billingFrequency" : "MONTHLY",
              "rolloverMode" : "NONE",
              "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
            } ],
            "listPriceIds" : [ "b4d7e884-e007-4183-8355-4771865c5100" ],
            "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
            "phasePriceMetadata" : [ {
              "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "arrCalculation" : "INCLUDE"
            } ],
            "phaseListPriceMetadata" : [ {
              "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
              "arrCalculation" : "INCLUDE"
            } ]
          } ],
          "attachmentAssetIds" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
          "defaultDueDateDays" : 30,
          "memo" : "Example Billing Schedule",
          "customFields" : {
            "key" : "value"
          }
        },
        "properties" : {
          "startDate" : {
            "type" : "string",
            "description" : "Start date",
            "example" : "2022-01-01"
          },
          "endDate" : {
            "type" : "string",
            "description" : "End date",
            "example" : "2022-12-01"
          },
          "recurrenceDayOfMonth" : {
            "type" : "integer",
            "description" : "Recurrence day of month",
            "format" : "int32",
            "example" : 1
          },
          "taxRates" : {
            "type" : "array",
            "description" : "Tax Rate for each Product",
            "example" : [ {
              "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
              "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/ProductTaxRateRepresentation"
            }
          },
          "autoIssueInvoices" : {
            "type" : "boolean",
            "description" : "Auto-issue invoices for this billing schedule",
            "example" : true
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Optional purchase order number to be added to invoices",
            "example" : "PO123"
          },
          "rollUpBilling" : {
            "type" : "boolean",
            "description" : "Toggles Roll-up billing",
            "example" : false
          },
          "phases" : {
            "type" : "array",
            "description" : "Phases",
            "example" : [ {
              "externalContractRef" : "ACME-2022-MSA",
              "priceIds" : [ "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730" ],
              "startDate" : "2022-01-01",
              "endDate" : "2022-12-01",
              "discounts" : [ ],
              "minimums" : [ ],
              "creditGrants" : [ {
                "id" : "0199ca88-1c2e-7d3a-93a4-5b7f2e9c1d40",
                "name" : "Monthly usage credits",
                "creditUnitType" : "CURRENCY",
                "currency" : "GBP",
                "amount" : 100,
                "costOfCredit" : 0,
                "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                "grantRefreshFrequency" : "MONTHLY",
                "billingFrequency" : "MONTHLY",
                "rolloverMode" : "NONE",
                "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
              } ],
              "listPriceIds" : [ "b4d7e884-e007-4183-8355-4771865c5100" ],
              "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
              "phasePriceMetadata" : [ {
                "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "arrCalculation" : "INCLUDE"
              } ],
              "phaseListPriceMetadata" : [ {
                "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                "arrCalculation" : "INCLUDE"
              } ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PhaseRequest"
            }
          },
          "attachmentAssetIds" : {
            "type" : "array",
            "description" : "IDs of assets that are attached to this schedule",
            "example" : [ "5055cd17-d5e8-4286-bddf-79729ddabf51" ],
            "items" : {
              "type" : "string"
            }
          },
          "defaultDueDateDays" : {
            "type" : "integer",
            "description" : "Default number of days between invoice issue date and due date. Overrides any invoice level set default due date",
            "example" : 30
          },
          "memo" : {
            "type" : "string",
            "description" : "Billing schedule memo. Overrides any invoice level set memo",
            "example" : "Example Billing Schedule"
          },
          "customFields" : {
            "type" : "object",
            "description" : "Custom key-value fields. Providing this field replaces all existing custom fields. Omitting it leaves them unchanged.",
            "example" : {
              "key" : "value"
            },
            "additionalProperties" : {
              "type" : "string"
            }
          }
        }
      },
      "DiscountResponse" : {
        "required" : [ "amount", "billingScheduleId", "createdAt", "discountCalculationType", "id", "message", "priceIds", "seatDiscountType", "separateLineItem", "sequenceAccountId", "updatedAt" ],
        "type" : "object",
        "example" : {
          "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
          "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
          "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
          "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
          "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
          "separateLineItem" : false,
          "amount" : 25,
          "discountCalculationType" : "PERCENTAGE",
          "message" : "Loyalty Discount",
          "validFrom" : "2023-01-01",
          "validTo" : "2023-01-31",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "seatDiscountType" : "ALL_SEATS"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Discount ID",
            "example" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "The Sequence Account to which this Discount belongs",
            "example" : "1986c663-9ee9-4811-bfbf-57d2ad666096"
          },
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Billing Schedule ID",
            "example" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50"
          },
          "phaseId" : {
            "type" : "string",
            "description" : "Phase ID",
            "example" : "220e1878-b70a-4dfd-9c55-7651424b12d6"
          },
          "priceIds" : {
            "type" : "array",
            "description" : "Price IDs this discount applies to. If not populated, the discount applies to all prices on the billing schedule",
            "example" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
            "items" : {
              "type" : "string"
            }
          },
          "separateLineItem" : {
            "type" : "boolean",
            "description" : "Indicates whether the discount should appear as a separate line item in the invoice",
            "example" : false
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount to be reduced",
            "example" : 25
          },
          "discountCalculationType" : {
            "description" : "Indicates whether the discount amount is percentage or nominal",
            "$ref" : "#/components/schemas/DiscountCalculationType"
          },
          "message" : {
            "type" : "string",
            "description" : "Message to appear on the Invoice",
            "example" : "Loyalty Discount"
          },
          "validFrom" : {
            "type" : "string",
            "description" : "First Day Discount is Valid",
            "example" : "2023-01-01"
          },
          "validTo" : {
            "type" : "string",
            "description" : "Last Day Discount is Valid",
            "example" : "2023-01-31"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Created at",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Updated At",
            "example" : "2022-06-28T16:47:00Z"
          },
          "seatDiscountType" : {
            "description" : "Determines how the discount is applied to any seat-based prices",
            "$ref" : "#/components/schemas/SeatDiscountType"
          }
        }
      },
      "ListBillingSchedulesResponse" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
            "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
            "status" : "ACTIVE",
            "startDate" : "2022-01-01",
            "endDate" : "2022-12-01",
            "taxRates" : [ {
              "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
              "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
            } ],
            "firstBillingDate" : "2022-02-02",
            "autoIssueInvoices" : false,
            "purchaseOrderNumber" : "PO123",
            "reference" : "ref",
            "label" : "label",
            "recurrenceDayOfMonth" : 1,
            "prices" : [ {
              "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
              "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
              "name" : "Demo Product",
              "currency" : "GBP",
              "structure" : {
                "pricePerUnit" : "0.25",
                "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                "isPricePercentage" : false,
                "pricingType" : "LINEAR"
              },
              "billingFrequency" : "MONTHLY",
              "billingType" : "IN_ARREARS",
              "createdAt" : "2022-06-28T16:47:00Z",
              "updatedAt" : "2022-06-28T16:47:00Z",
              "integrationIds" : [ {
                "service" : "Xero",
                "id" : "123",
                "isPending" : false
              } ],
              "customMetricParameters" : [ {
                "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                "value" : "10"
              } ],
              "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
              "usageCalculationPeriod" : {
                "frequency" : "MONTHLY",
                "interval" : 1
              },
              "status" : "ACTIVE"
            } ],
            "createdAt" : "2022-06-28T16:47:00Z",
            "updatedAt" : "2022-06-28T16:47:00Z",
            "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
            "phases" : [ {
              "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
              "name" : "Onboarding",
              "externalContractRef" : "ACME-2022-MSA",
              "createdAt" : "2022-06-28T16:47:00Z",
              "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
              "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
              "startDate" : "2022-01-01",
              "endDate" : "2022-06-30",
              "discounts" : [ {
                "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                "type" : "PERCENTAGE",
                "amount" : 15,
                "message" : "15% Discount",
                "separateLineItem" : true,
                "seatDiscountType" : "ALL_SEATS"
              } ],
              "minimums" : [ {
                "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "amount" : 100,
                "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                "createdAt" : "2022-06-28T16:47:00Z",
                "updatedAt" : "2022-06-28T16:47:00Z"
              } ],
              "creditGrants" : [ {
                "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                "name" : "Monthly usage credits",
                "creditUnitType" : "CURRENCY",
                "currency" : "GBP",
                "amount" : 100,
                "costOfCredit" : 0,
                "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                "grantRefreshFrequency" : "MONTHLY",
                "billingFrequency" : "MONTHLY",
                "rolloverMode" : "NONE",
                "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
              } ],
              "integrationIds" : [ {
                "service" : "NetSuite",
                "id" : "SO-1024",
                "lastSynced" : "2022-06-28T16:47:00Z",
                "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                "isPending" : false
              } ],
              "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
              "phasePriceMetadata" : [ {
                "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "arrCalculation" : "INCLUDE"
              } ]
            } ],
            "archivedAt" : "2022-06-28T16:47:00Z",
            "rollUpBilling" : false,
            "integrationIds" : [ {
              "service" : "Salesforce",
              "id" : "a0CQy00000Ipz5VMAR",
              "lastSynced" : "2024-08-14T17:14:17Z",
              "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
              "isPending" : false
            } ],
            "attachmentAssets" : [ {
              "id" : "e007e884-5100-4183-8355-4771865cb4dd",
              "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "type" : "IMAGE",
              "format" : "PNG",
              "fileName" : "my-image.png",
              "fileSizeBytes" : 12345,
              "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
              "createdAt" : "2022-06-28T16:47:00Z"
            } ],
            "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
            "defaultDueDateDays" : 30,
            "memo" : "Example Billing Schedule",
            "customFields" : {
              "key" : "value"
            },
            "paymentProvider" : "STRIPE",
            "autoCharge" : true
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Billing Schedules",
            "example" : [ {
              "id" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
              "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4",
              "status" : "ACTIVE",
              "startDate" : "2022-01-01",
              "endDate" : "2022-12-01",
              "taxRates" : [ {
                "priceId" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                "taxRateId" : "50c0d53b-8460-41e6-b4e9-a4e157fc1a64"
              } ],
              "firstBillingDate" : "2022-02-02",
              "autoIssueInvoices" : false,
              "purchaseOrderNumber" : "PO123",
              "reference" : "ref",
              "label" : "label",
              "recurrenceDayOfMonth" : 1,
              "prices" : [ {
                "id" : "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
                "productId" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
                "name" : "Demo Product",
                "currency" : "GBP",
                "structure" : {
                  "pricePerUnit" : "0.25",
                  "usageMetricId" : "04c62961-04ba-48e6-b985-758bb7d3e712",
                  "isPricePercentage" : false,
                  "pricingType" : "LINEAR"
                },
                "billingFrequency" : "MONTHLY",
                "billingType" : "IN_ARREARS",
                "createdAt" : "2022-06-28T16:47:00Z",
                "updatedAt" : "2022-06-28T16:47:00Z",
                "integrationIds" : [ {
                  "service" : "Xero",
                  "id" : "123",
                  "isPending" : false
                } ],
                "customMetricParameters" : [ {
                  "parameterId" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                  "value" : "10"
                } ],
                "listPriceId" : "b4d7e884-e007-4183-8355-4771865c5100",
                "usageCalculationPeriod" : {
                  "frequency" : "MONTHLY",
                  "interval" : 1
                },
                "status" : "ACTIVE"
              } ],
              "createdAt" : "2022-06-28T16:47:00Z",
              "updatedAt" : "2022-06-28T16:47:00Z",
              "lastInvoiceId" : "bdbf78a5-b007-4d46-aa7d-d0417a649d64",
              "phases" : [ {
                "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                "name" : "Onboarding",
                "externalContractRef" : "ACME-2022-MSA",
                "createdAt" : "2022-06-28T16:47:00Z",
                "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                "priceIds" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                "startDate" : "2022-01-01",
                "endDate" : "2022-06-30",
                "discounts" : [ {
                  "id" : "4451f62c-0c1f-491c-aeb2-9eb41b28149c",
                  "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                  "type" : "PERCENTAGE",
                  "amount" : 15,
                  "message" : "15% Discount",
                  "separateLineItem" : true,
                  "seatDiscountType" : "ALL_SEATS"
                } ],
                "minimums" : [ {
                  "id" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                  "sequenceAccountId" : "c4602d51-0fb4-4b48-b689-6ba28f540d1e",
                  "billingScheduleId" : "b102e007-f5d7-4b1a-8a1d-9a51135ae73b",
                  "phaseId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                  "amount" : 100,
                  "restrictToPrices" : [ "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8" ],
                  "createdAt" : "2022-06-28T16:47:00Z",
                  "updatedAt" : "2022-06-28T16:47:00Z"
                } ],
                "creditGrants" : [ {
                  "id" : "0199ca8a-e7e8-73b3-bd69-a316a23231a0",
                  "name" : "Monthly usage credits",
                  "creditUnitType" : "CURRENCY",
                  "currency" : "GBP",
                  "amount" : 100,
                  "costOfCredit" : 0,
                  "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
                  "grantRefreshFrequency" : "MONTHLY",
                  "billingFrequency" : "MONTHLY",
                  "rolloverMode" : "NONE",
                  "restrictToPrices" : [ "0199ca89-2d9e-7e3d-914c-7de86e8fc7ce" ]
                } ],
                "integrationIds" : [ {
                  "service" : "NetSuite",
                  "id" : "SO-1024",
                  "lastSynced" : "2022-06-28T16:47:00Z",
                  "url" : "https://system.netsuite.com/app/accounting/transactions/salesord.nl?id=1024",
                  "isPending" : false
                } ],
                "recurrencePreference" : "CONTINUE_FROM_PREVIOUS_PHASE",
                "phasePriceMetadata" : [ {
                  "priceId" : "6dc54805-0ac8-4f17-9341-4d3f2db9dcd8",
                  "arrCalculation" : "INCLUDE"
                } ]
              } ],
              "archivedAt" : "2022-06-28T16:47:00Z",
              "rollUpBilling" : false,
              "integrationIds" : [ {
                "service" : "Salesforce",
                "id" : "a0CQy00000Ipz5VMAR",
                "lastSynced" : "2024-08-14T17:14:17Z",
                "url" : "https://sequence-b-dev-ed.develop.my.salesforce.com/lightning/r/sequence__Billing_Schedule__c/a0CQy00000Ipz5VMAR/view",
                "isPending" : false
              } ],
              "attachmentAssets" : [ {
                "id" : "e007e884-5100-4183-8355-4771865cb4dd",
                "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                "type" : "IMAGE",
                "format" : "PNG",
                "fileName" : "my-image.png",
                "fileSizeBytes" : 12345,
                "url" : "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
                "createdAt" : "2022-06-28T16:47:00Z"
              } ],
              "contractId" : "0194d091-f65b-7b98-b75f-a923aa0f5b1a",
              "defaultDueDateDays" : 30,
              "memo" : "Example Billing Schedule",
              "customFields" : {
                "key" : "value"
              },
              "paymentProvider" : "STRIPE",
              "autoCharge" : true
            } ],
            "items" : {
              "$ref" : "#/components/schemas/BillingScheduleResponse"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "ListBillingProductsResponse" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
            "name" : "Fixed priced product",
            "label" : "Fixed priced product - UK",
            "sequenceAccountId" : "683fe518-60c8-429f-9320-8aa7efc20bcc",
            "createdAt" : "2022-06-28T16:47:00Z",
            "updatedAt" : "2022-06-28T16:47:00Z",
            "prices" : [ ],
            "taxCategoryName" : "SaaS",
            "recognitionMethod" : "USAGE"
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Billing products",
            "example" : [ {
              "id" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
              "name" : "Fixed priced product",
              "label" : "Fixed priced product - UK",
              "sequenceAccountId" : "683fe518-60c8-429f-9320-8aa7efc20bcc",
              "createdAt" : "2022-06-28T16:47:00Z",
              "updatedAt" : "2022-06-28T16:47:00Z",
              "prices" : [ ],
              "taxCategoryName" : "SaaS",
              "recognitionMethod" : "USAGE"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/BillingProduct"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "BillingProduct" : {
        "required" : [ "createdAt", "id", "label", "name", "prices", "recognitionMethod", "sequenceAccountId", "updatedAt" ],
        "type" : "object",
        "example" : {
          "id" : "f409d651-c475-4142-aafd-a5d2bd74d4f9",
          "name" : "Fixed priced product",
          "label" : "Fixed priced product - UK",
          "sequenceAccountId" : "683fe518-60c8-429f-9320-8aa7efc20bcc",
          "createdAt" : "2022-06-28T16:47:00Z",
          "updatedAt" : "2022-06-28T16:47:00Z",
          "prices" : [ ],
          "taxCategoryName" : "SaaS",
          "recognitionMethod" : "USAGE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique Product ID",
            "example" : "f409d651-c475-4142-aafd-a5d2bd74d4f9"
          },
          "name" : {
            "type" : "string",
            "description" : "The customer-facing name of this Product",
            "example" : "Fixed priced product"
          },
          "label" : {
            "type" : "string",
            "description" : "The internal descriptive name of this item",
            "example" : "Fixed priced product - UK"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence Account ID",
            "example" : "683fe518-60c8-429f-9320-8aa7efc20bcc"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Created at",
            "example" : "2022-06-28T16:47:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Updated At",
            "example" : "2022-06-28T16:47:00Z"
          },
          "prices" : {
            "type" : "array",
            "description" : "Prices",
            "example" : [ ],
            "items" : { }
          },
          "taxCategoryName" : {
            "type" : "string",
            "description" : "The tax category associated with the product",
            "example" : "SaaS"
          },
          "recognitionMethod" : {
            "description" : "Indication of how revenue is recognised for this product",
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          }
        }
      },
      "RevenueRecognitionMethod" : {
        "type" : "string",
        "example" : "USAGE",
        "enum" : [ "STRAIGHT_LINE", "USAGE", "MILESTONE", "POINT_IN_TIME" ]
      },
      "ListCreditGrantsResponse" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
            "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
            "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
            "name" : "On-boarding Credits",
            "creditUnitType" : "CURRENCY",
            "currency" : "GBP",
            "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
            "amount" : 10,
            "costOfCredit" : 10,
            "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
            "effectiveDate" : "2023-01-01",
            "expiryDate" : "2023-01-31",
            "createdAt" : "2022-10-07T14:12:08.826121Z",
            "creditNoteId" : "73086198-8752-4ec9-a99b-16209a32dc6c",
            "integrationIds" : [ {
              "service" : "Xero",
              "id" : "74ed2615-4730-49ab-9445-74f31723a206",
              "isPending" : false
            } ]
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Credit grants",
            "example" : [ {
              "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
              "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
              "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
              "name" : "On-boarding Credits",
              "creditUnitType" : "CURRENCY",
              "currency" : "GBP",
              "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
              "amount" : 10,
              "costOfCredit" : 10,
              "taxRateId" : "179d1ab3-cc96-48e2-9310-067b0b42d47c",
              "effectiveDate" : "2023-01-01",
              "expiryDate" : "2023-01-31",
              "createdAt" : "2022-10-07T14:12:08.826121Z",
              "creditNoteId" : "73086198-8752-4ec9-a99b-16209a32dc6c",
              "integrationIds" : [ {
                "service" : "Xero",
                "id" : "74ed2615-4730-49ab-9445-74f31723a206",
                "isPending" : false
              } ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/CreditGrant"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "ListDiscountsResponse" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
            "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
            "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
            "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
            "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
            "separateLineItem" : false,
            "amount" : 25,
            "discountCalculationType" : "PERCENTAGE",
            "message" : "Loyalty Discount",
            "validFrom" : "2023-01-01",
            "validTo" : "2023-01-31",
            "createdAt" : "2022-06-28T16:47:00Z",
            "updatedAt" : "2022-06-28T16:47:00Z",
            "seatDiscountType" : "ALL_SEATS"
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Discounts",
            "example" : [ {
              "id" : "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
              "sequenceAccountId" : "1986c663-9ee9-4811-bfbf-57d2ad666096",
              "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
              "phaseId" : "220e1878-b70a-4dfd-9c55-7651424b12d6",
              "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
              "separateLineItem" : false,
              "amount" : 25,
              "discountCalculationType" : "PERCENTAGE",
              "message" : "Loyalty Discount",
              "validFrom" : "2023-01-01",
              "validTo" : "2023-01-31",
              "createdAt" : "2022-06-28T16:47:00Z",
              "updatedAt" : "2022-06-28T16:47:00Z",
              "seatDiscountType" : "ALL_SEATS"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/DiscountResponse"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "ListBillingScheduleCustomFieldKeysResponse" : {
        "required" : [ "items" ],
        "type" : "object",
        "example" : {
          "items" : [ "department", "region" ]
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Distinct custom field keys across all billing schedules",
            "example" : [ "department", "region" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "CreateCreditGrantRequest" : {
        "required" : [ "amount", "creditUnitType", "currency", "customerId", "name", "sequenceAccountId" ],
        "type" : "object",
        "example" : {
          "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "name" : "Onboarding Credits",
          "creditUnitType" : "CURRENCY",
          "currency" : "GBP",
          "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
          "amount" : 10,
          "costOfCredit" : 10,
          "effectiveDate" : "2023-01-01",
          "expiryDate" : "2023-01-31",
          "createInvoice" : true
        },
        "properties" : {
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence account ID",
            "example" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the customer credit is granted to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "name" : {
            "type" : "string",
            "description" : "Name of the credit grant",
            "example" : "Onboarding Credits"
          },
          "creditUnitType" : {
            "description" : "Type of the unit of credit",
            "$ref" : "#/components/schemas/CreditUnitType"
          },
          "currency" : {
            "description" : "Currency of cash credit (if creditUnitType is CURRENCY)",
            "$ref" : "#/components/schemas/Currency"
          },
          "metricId" : {
            "type" : "string",
            "description" : "Metric ID (if creditUnitType is METRIC)",
            "example" : "f092246c-6b90-4106-bcca-304ccf06bf45"
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount of units granted",
            "example" : 10
          },
          "costOfCredit" : {
            "type" : "number",
            "description" : "Cost of credit grant, to be invoiced to the customer",
            "example" : 10
          },
          "effectiveDate" : {
            "type" : "string",
            "description" : "First day credit grant can be consumed",
            "example" : "2023-01-01"
          },
          "expiryDate" : {
            "type" : "string",
            "description" : "Last day credit grant can be consumed",
            "example" : "2023-01-31"
          },
          "createInvoice" : {
            "type" : "boolean",
            "description" : "If true we will create an invoice to charge the customer for this grant",
            "example" : true
          }
        }
      },
      "CreditGrantResponse" : {
        "required" : [ "amount", "createdAt", "creditUnitType", "customerId", "id", "integrationIds", "name", "sequenceAccountId" ],
        "type" : "object",
        "example" : {
          "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
          "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "name" : "Onboarding Credits",
          "creditUnitType" : "CURRENCY",
          "currency" : "GBP",
          "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
          "amount" : 10,
          "costOfCredit" : 10,
          "effectiveDate" : "2023-01-01",
          "expiryDate" : "2023-01-31",
          "createdAt" : "2022-10-07T14:12:08.826121Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "74ed2615-4730-49ab-9445-74f31723a206",
            "isPending" : false
          } ]
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit grant ID",
            "example" : "746fc7f2-8098-4fe7-953c-7d51c580a126"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence account ID",
            "example" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the customer credit is granted to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "name" : {
            "type" : "string",
            "description" : "Name of the credit grant",
            "example" : "Onboarding Credits"
          },
          "creditUnitType" : {
            "description" : "Type of the unit of credit",
            "$ref" : "#/components/schemas/CreditUnitType"
          },
          "currency" : {
            "description" : "Currency of cash credit (if creditUnitType is CURRENCY)",
            "$ref" : "#/components/schemas/Currency"
          },
          "metricId" : {
            "type" : "string",
            "description" : "Metric ID (if creditUnitType is METRIC)",
            "example" : "f092246c-6b90-4106-bcca-304ccf06bf45"
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount of units granted",
            "example" : 10
          },
          "costOfCredit" : {
            "type" : "number",
            "description" : "Cost of credit grant, to be invoiced to the customer",
            "example" : 10
          },
          "effectiveDate" : {
            "type" : "string",
            "description" : "First day credit grant can be consumed",
            "example" : "2023-01-01"
          },
          "expiryDate" : {
            "type" : "string",
            "description" : "Last day credit grant can be consumed",
            "example" : "2023-01-31"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "The creation timestamp",
            "example" : "2022-10-07T14:12:08.826121Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "service" : "Xero",
              "id" : "74ed2615-4730-49ab-9445-74f31723a206",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          }
        }
      },
      "DuplicateBillingScheduleRequest" : {
        "required" : [ "customerId" ],
        "type" : "object",
        "example" : {
          "customerId" : "cca32597-b6b0-4499-9669-128aef8702e4"
        },
        "properties" : {
          "customerId" : {
            "type" : "string",
            "description" : "Customer ID",
            "example" : "cca32597-b6b0-4499-9669-128aef8702e4"
          }
        }
      },
      "UpdateDiscountRequest" : {
        "required" : [ "amount", "billingScheduleId", "discountCalculationType", "message", "priceIds", "separateLineItem" ],
        "type" : "object",
        "example" : {
          "billingScheduleId" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
          "priceIds" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
          "separateLineItem" : false,
          "amount" : 25,
          "discountCalculationType" : "PERCENTAGE",
          "message" : "Loyalty Discount",
          "validFrom" : "2023-01-01",
          "validTo" : "2023-01-31"
        },
        "properties" : {
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Billing Schedule ID",
            "example" : "08a76ddb-230e-4700-a5e2-70f6edaf7d50"
          },
          "priceIds" : {
            "type" : "array",
            "description" : "Price IDs this discount applies to. If not populated, the discount applies to all prices on the billing schedule",
            "example" : [ "e007e884-5100-4183-8355-4771865cb4d7" ],
            "items" : {
              "type" : "string"
            }
          },
          "separateLineItem" : {
            "type" : "boolean",
            "description" : "Indicates whether the discount should appear as a separate line item in the invoice",
            "example" : false
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount to be reduced",
            "example" : 25
          },
          "discountCalculationType" : {
            "description" : "Indicates whether the discount amount is percentage or nominal",
            "$ref" : "#/components/schemas/DiscountCalculationType"
          },
          "message" : {
            "type" : "string",
            "description" : "Message to appear on the Invoice",
            "example" : "Loyalty Discount"
          },
          "validFrom" : {
            "type" : "string",
            "description" : "First Day Discount is Valid",
            "example" : "2023-01-01"
          },
          "validTo" : {
            "type" : "string",
            "description" : "Last Day Discount is Valid",
            "example" : "2023-01-31"
          }
        }
      },
      "CreditBalancesReply" : {
        "required" : [ "items" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "6587e308-ab0d-4a58-8cc1-1d168490de7b",
            "type" : "CASH",
            "name" : "Credits",
            "balance" : "50",
            "grants" : [ {
              "id" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
              "sequenceAccountId" : "a507e782-d26b-4d34-92b9-aacd1667e1f0",
              "customerId" : "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb",
              "type" : "CASH",
              "currency" : "GBP",
              "metricId" : "b84f5290-fe95-4c6f-bedc-477700125265",
              "name" : "GBP",
              "originalAmount" : "10",
              "currentBalance" : "1",
              "expiryDate" : "2024-01-02",
              "costOfCredit" : "10",
              "taxRateId" : "b3c37ea3-96bb-44fb-baed-01eb38d3328e",
              "effectiveDate" : "2024-01-01",
              "createdAt" : "2024-01-01T12:00:00Z"
            } ],
            "transactions" : [ {
              "id" : "c770d296-ef09-459b-b8dd-42c334e00dab",
              "grantId" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
              "reason" : "because",
              "invoiceId" : "c6864c69-42a3-4966-8c22-1c56d7375a05",
              "billingRunId" : "e95256be-08e7-4585-b3c7-fa9928aacd90",
              "type" : "CREDIT",
              "amount" : "10",
              "date" : "2024-01-01"
            } ]
          } ]
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "example" : [ {
              "id" : "6587e308-ab0d-4a58-8cc1-1d168490de7b",
              "type" : "CASH",
              "name" : "Credits",
              "balance" : "50",
              "grants" : [ {
                "id" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
                "sequenceAccountId" : "a507e782-d26b-4d34-92b9-aacd1667e1f0",
                "customerId" : "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb",
                "type" : "CASH",
                "currency" : "GBP",
                "metricId" : "b84f5290-fe95-4c6f-bedc-477700125265",
                "name" : "GBP",
                "originalAmount" : "10",
                "currentBalance" : "1",
                "expiryDate" : "2024-01-02",
                "costOfCredit" : "10",
                "taxRateId" : "b3c37ea3-96bb-44fb-baed-01eb38d3328e",
                "effectiveDate" : "2024-01-01",
                "createdAt" : "2024-01-01T12:00:00Z"
              } ],
              "transactions" : [ {
                "id" : "c770d296-ef09-459b-b8dd-42c334e00dab",
                "grantId" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
                "reason" : "because",
                "invoiceId" : "c6864c69-42a3-4966-8c22-1c56d7375a05",
                "billingRunId" : "e95256be-08e7-4585-b3c7-fa9928aacd90",
                "type" : "CREDIT",
                "amount" : "10",
                "date" : "2024-01-01"
              } ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/CreditBalance"
            }
          }
        }
      },
      "CreditBalance" : {
        "required" : [ "balance", "grants", "id", "name", "transactions", "type" ],
        "type" : "object",
        "example" : {
          "id" : "6587e308-ab0d-4a58-8cc1-1d168490de7b",
          "type" : "CASH",
          "name" : "Credits",
          "balance" : "50",
          "grants" : [ {
            "id" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
            "sequenceAccountId" : "a507e782-d26b-4d34-92b9-aacd1667e1f0",
            "customerId" : "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb",
            "type" : "CASH",
            "currency" : "GBP",
            "metricId" : "b84f5290-fe95-4c6f-bedc-477700125265",
            "name" : "GBP",
            "originalAmount" : "10",
            "currentBalance" : "1",
            "expiryDate" : "2024-01-02",
            "costOfCredit" : "10",
            "taxRateId" : "b3c37ea3-96bb-44fb-baed-01eb38d3328e",
            "effectiveDate" : "2024-01-01",
            "createdAt" : "2024-01-01T12:00:00Z"
          } ],
          "transactions" : [ {
            "id" : "c770d296-ef09-459b-b8dd-42c334e00dab",
            "grantId" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
            "reason" : "because",
            "invoiceId" : "c6864c69-42a3-4966-8c22-1c56d7375a05",
            "billingRunId" : "e95256be-08e7-4585-b3c7-fa9928aacd90",
            "type" : "CREDIT",
            "amount" : "10",
            "date" : "2024-01-01"
          } ]
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Indicates the ID of Credit target, either a currency code or a metric id",
            "example" : "6587e308-ab0d-4a58-8cc1-1d168490de7b"
          },
          "type" : {
            "description" : "Type of the Credit - will either be CASH or USAGE",
            "$ref" : "#/components/schemas/CreditType"
          },
          "name" : {
            "type" : "string",
            "description" : "Name of the Credit - will either be the currency or name of the metric",
            "example" : "Credits"
          },
          "balance" : {
            "type" : "string",
            "description" : "Amount remaining of Credits Granted",
            "example" : "50"
          },
          "grants" : {
            "type" : "array",
            "description" : "Related credit grants",
            "example" : [ {
              "id" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
              "sequenceAccountId" : "a507e782-d26b-4d34-92b9-aacd1667e1f0",
              "customerId" : "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb",
              "type" : "CASH",
              "currency" : "GBP",
              "metricId" : "b84f5290-fe95-4c6f-bedc-477700125265",
              "name" : "GBP",
              "originalAmount" : "10",
              "currentBalance" : "1",
              "expiryDate" : "2024-01-02",
              "costOfCredit" : "10",
              "taxRateId" : "b3c37ea3-96bb-44fb-baed-01eb38d3328e",
              "effectiveDate" : "2024-01-01",
              "createdAt" : "2024-01-01T12:00:00Z"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/CreditGrant2"
            }
          },
          "transactions" : {
            "type" : "array",
            "description" : "Related credit transactions",
            "example" : [ {
              "id" : "c770d296-ef09-459b-b8dd-42c334e00dab",
              "grantId" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
              "reason" : "because",
              "invoiceId" : "c6864c69-42a3-4966-8c22-1c56d7375a05",
              "billingRunId" : "e95256be-08e7-4585-b3c7-fa9928aacd90",
              "type" : "CREDIT",
              "amount" : "10",
              "date" : "2024-01-01"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/CreditTransaction"
            }
          }
        }
      },
      "CreditType" : {
        "type" : "string",
        "example" : "CASH",
        "enum" : [ "CASH", "USAGE" ]
      },
      "CreditGrant2" : {
        "required" : [ "costOfCredit", "createdAt", "currency", "currentBalance", "customerId", "id", "name", "originalAmount", "sequenceAccountId", "type" ],
        "type" : "object",
        "example" : {
          "id" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
          "sequenceAccountId" : "a507e782-d26b-4d34-92b9-aacd1667e1f0",
          "customerId" : "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb",
          "type" : "CASH",
          "currency" : "GBP",
          "metricId" : "b84f5290-fe95-4c6f-bedc-477700125265",
          "name" : "GBP",
          "originalAmount" : "10",
          "currentBalance" : "1",
          "expiryDate" : "2024-01-02",
          "costOfCredit" : "10",
          "taxRateId" : "b3c37ea3-96bb-44fb-baed-01eb38d3328e",
          "effectiveDate" : "2024-01-01",
          "createdAt" : "2024-01-01T12:00:00Z"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Grant ID",
            "example" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence account ID",
            "example" : "a507e782-d26b-4d34-92b9-aacd1667e1f0"
          },
          "customerId" : {
            "type" : "string",
            "description" : "Customer ID",
            "example" : "eabb3196-9c73-4c0d-b508-d3c4fc7b2cbb"
          },
          "type" : {
            "description" : "Type of the Credit - will either be CASH or USAGE",
            "$ref" : "#/components/schemas/CreditType"
          },
          "currency" : {
            "description" : "Currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "metricId" : {
            "type" : "string",
            "description" : "Usage metric ID (if type is USAGE)",
            "example" : "b84f5290-fe95-4c6f-bedc-477700125265"
          },
          "name" : {
            "type" : "string",
            "description" : "Name of the Credit - will either be the currency or name of the metric",
            "example" : "GBP"
          },
          "originalAmount" : {
            "type" : "string",
            "description" : "Amount of credits originally granted",
            "example" : "10"
          },
          "currentBalance" : {
            "type" : "string",
            "description" : "Amount remaining of Credits Granted",
            "example" : "1"
          },
          "expiryDate" : {
            "type" : "string",
            "description" : "Last Day Credit Grant can be consumed",
            "example" : "2024-01-02"
          },
          "costOfCredit" : {
            "type" : "string",
            "description" : "Cost of credit grant",
            "example" : "10"
          },
          "taxRateId" : {
            "type" : "string",
            "description" : "Tax Rate ID for Credit Purchase",
            "example" : "b3c37ea3-96bb-44fb-baed-01eb38d3328e"
          },
          "effectiveDate" : {
            "type" : "string",
            "description" : "First Day Credit Grant can be consumed",
            "example" : "2024-01-01"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "The created at",
            "example" : "2024-01-01T12:00:00Z"
          }
        }
      },
      "CreditTransaction" : {
        "required" : [ "amount", "date", "grantId", "type" ],
        "type" : "object",
        "example" : {
          "id" : "c770d296-ef09-459b-b8dd-42c334e00dab",
          "grantId" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6",
          "reason" : "because",
          "invoiceId" : "c6864c69-42a3-4966-8c22-1c56d7375a05",
          "billingRunId" : "e95256be-08e7-4585-b3c7-fa9928aacd90",
          "type" : "CREDIT",
          "amount" : "10",
          "date" : "2024-01-01"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Transaction ID",
            "example" : "c770d296-ef09-459b-b8dd-42c334e00dab"
          },
          "grantId" : {
            "type" : "string",
            "description" : "Credit Grant ID",
            "example" : "5a0faea3-7ad5-4a83-a420-09bb6576f7e6"
          },
          "reason" : {
            "type" : "string",
            "description" : "Transaction Reason",
            "example" : "because"
          },
          "invoiceId" : {
            "type" : "string",
            "description" : "Invoice ID where Credit was consumed",
            "example" : "c6864c69-42a3-4966-8c22-1c56d7375a05"
          },
          "billingRunId" : {
            "type" : "string",
            "description" : "Billing Run ID where Credit was consumed",
            "example" : "e95256be-08e7-4585-b3c7-fa9928aacd90"
          },
          "type" : {
            "description" : "Credit Transaction Type",
            "$ref" : "#/components/schemas/CreditTransactionType"
          },
          "amount" : {
            "type" : "string",
            "description" : "Number of units added or consumed",
            "example" : "10"
          },
          "date" : {
            "type" : "string",
            "description" : "Date of transaction",
            "example" : "2024-01-01"
          }
        }
      },
      "CreditTransactionType" : {
        "type" : "string",
        "example" : "CREDIT",
        "enum" : [ "DEBIT", "CREDIT" ]
      },
      "CreditGrantResponse2" : {
        "required" : [ "amount", "createdAt", "creditUnitType", "customerId", "id", "integrationIds", "name", "sequenceAccountId" ],
        "type" : "object",
        "example" : {
          "id" : "746fc7f2-8098-4fe7-953c-7d51c580a126",
          "sequenceAccountId" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6",
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "name" : "Onboarding Credits",
          "creditUnitType" : "CURRENCY",
          "currency" : "GBP",
          "metricId" : "f092246c-6b90-4106-bcca-304ccf06bf45",
          "amount" : 10,
          "costOfCredit" : 10,
          "effectiveDate" : "2023-01-01",
          "expiryDate" : "2023-01-31",
          "createdAt" : "2022-10-07T14:12:08.826121Z",
          "integrationIds" : [ {
            "service" : "Xero",
            "id" : "74ed2615-4730-49ab-9445-74f31723a206",
            "isPending" : false
          } ]
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit grant ID",
            "example" : "746fc7f2-8098-4fe7-953c-7d51c580a126"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence account ID",
            "example" : "dce9ae85-d8d0-42b4-bcad-f221a64363c6"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the customer credit is granted to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "name" : {
            "type" : "string",
            "description" : "Name of the credit grant",
            "example" : "Onboarding Credits"
          },
          "creditUnitType" : {
            "description" : "Type of the unit of credit",
            "$ref" : "#/components/schemas/CreditUnitType"
          },
          "currency" : {
            "description" : "Currency of cash credit (if creditUnitType is CURRENCY)",
            "$ref" : "#/components/schemas/Currency"
          },
          "metricId" : {
            "type" : "string",
            "description" : "Metric ID (if creditUnitType is METRIC)",
            "example" : "f092246c-6b90-4106-bcca-304ccf06bf45"
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount of units granted",
            "example" : 10
          },
          "costOfCredit" : {
            "type" : "number",
            "description" : "Cost of credit grant, to be invoiced to the customer",
            "example" : 10
          },
          "effectiveDate" : {
            "type" : "string",
            "description" : "First day credit grant can be consumed",
            "example" : "2023-01-01"
          },
          "expiryDate" : {
            "type" : "string",
            "description" : "Last day credit grant can be consumed",
            "example" : "2023-01-31"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "The creation timestamp",
            "example" : "2022-10-07T14:12:08.826121Z"
          },
          "integrationIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "service" : "Xero",
              "id" : "74ed2615-4730-49ab-9445-74f31723a206",
              "isPending" : false
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationId"
            }
          }
        }
      },
      "CreditGrantsResponse" : {
        "required" : [ "items" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "22efb229-c474-407c-bbf7-f5e113ee8b20",
            "name" : "API Calls",
            "grantAmount" : 1000,
            "balance" : 324,
            "issueDate" : "2022-02-22",
            "expiryDate" : "2030-03-03"
          } ]
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Credit Grants",
            "example" : [ {
              "id" : "22efb229-c474-407c-bbf7-f5e113ee8b20",
              "name" : "API Calls",
              "grantAmount" : 1000,
              "balance" : 324,
              "issueDate" : "2022-02-22",
              "expiryDate" : "2030-03-03"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/CreditGrantResponseItem"
            }
          }
        }
      },
      "CreditGrantResponseItem" : {
        "required" : [ "balance", "grantAmount", "id", "issueDate", "name" ],
        "type" : "object",
        "example" : {
          "id" : "22efb229-c474-407c-bbf7-f5e113ee8b20",
          "name" : "API Calls",
          "grantAmount" : 1000,
          "balance" : 324,
          "issueDate" : "2022-02-22",
          "expiryDate" : "2030-03-03"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Grant ID",
            "example" : "22efb229-c474-407c-bbf7-f5e113ee8b20"
          },
          "name" : {
            "type" : "string",
            "description" : "Credit Grant Name",
            "example" : "API Calls"
          },
          "grantAmount" : {
            "type" : "number",
            "description" : "Amount of Credits Granted",
            "example" : 1000
          },
          "balance" : {
            "type" : "number",
            "description" : "Amount remaining of Credits Granted",
            "example" : 324
          },
          "issueDate" : {
            "type" : "string",
            "description" : "Grant Issue Date",
            "example" : "2022-02-22"
          },
          "expiryDate" : {
            "type" : "string",
            "description" : "Grant Expiry Date",
            "example" : "2030-03-03"
          }
        }
      },
      "UpdatePriceRequest" : {
        "required" : [ "name" ],
        "type" : "object",
        "example" : {
          "name" : "Demo Product",
          "status" : "ACTIVE"
        },
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "The customer-facing name of this Price",
            "example" : "Demo Product"
          },
          "status" : {
            "description" : "Price status:\n- DRAFT means the price has been extracted from a contract and has not yet been approved. It cannot be used while it is in DRAFT.\n- ACTIVE is the default state when a price is created via API or dashboard.",
            "$ref" : "#/components/schemas/PriceStatus"
          }
        }
      },
      "OneTimePricingType" : {
        "type" : "string",
        "example" : "ONE_TIME",
        "enum" : [ "ONE_TIME" ]
      },
      "FixedPricingType" : {
        "type" : "string",
        "example" : "FIXED",
        "enum" : [ "FIXED" ]
      },
      "LinearPricingType" : {
        "type" : "string",
        "example" : "LINEAR",
        "enum" : [ "LINEAR" ]
      },
      "PackagePricingType" : {
        "type" : "string",
        "example" : "PACKAGE",
        "enum" : [ "PACKAGE" ]
      },
      "GraduatedPricingType" : {
        "type" : "string",
        "example" : "GRADUATED",
        "enum" : [ "GRADUATED" ]
      },
      "VolumePricingType" : {
        "type" : "string",
        "example" : "VOLUME",
        "enum" : [ "VOLUME" ]
      },
      "SeatBasedPricingType" : {
        "type" : "string",
        "example" : "SEAT_BASED",
        "enum" : [ "SEAT_BASED" ]
      }
    },
    "requestBodies" : { },
    "securitySchemes" : { }
  }
}