{
  "openapi" : "3.0.0",
  "info" : {
    "title" : "",
    "description" : "",
    "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" : "Invoices"
  }, {
    "name" : "Credit Note Line Items"
  }, {
    "name" : "Invoice Line Items"
  }, {
    "name" : "Credit Notes"
  }, {
    "name" : "Invoice Settings"
  } ],
  "paths" : {
    "/invoices/{id}/finalize" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Finalize invoice",
        "description" : "Updates to FINAL status, generates invoice PDF and prevents further editing",
        "operationId" : "postInvoicesByIdFinalize",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/Invoice",
                  "example" : {
                    "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                    "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV2",
                    "dueDate" : "2022-11-05",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "line2" : "",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                    "totalTax" : "2",
                    "netTotal" : "12",
                    "grossTotal" : "10",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                    "linkedServices" : [ {
                      "externalId" : "ID",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "Flat 1",
                        "line2" : "123 Fake Street",
                        "town" : "New York",
                        "state" : "NY",
                        "postcode" : "AB1 2EF",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "123456",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "legalCompanyName" : "The Merchant",
                      "customFields" : [ ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "accountingDate" : "2022-10-05",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-10-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/list-summary" : {
      "get" : {
        "tags" : [ "Invoices" ],
        "summary" : "List Invoice summaries",
        "description" : "List invoices with only the fields the summary table renders. balance and balanceVersion are returned only for FINAL and SENT invoices that already have a ledger balance. An absent balance means it is unavailable, never that the invoice is settled.",
        "operationId" : "getInvoicesListSummary",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "before",
          "in" : "query",
          "description" : "before",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "after",
          "in" : "query",
          "description" : "after",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "limit",
          "in" : "query",
          "description" : "limit",
          "required" : false,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "sortOrder",
          "in" : "query",
          "description" : "sortOrder",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "ASC", "DESC" ]
          }
        }, {
          "name" : "sortBy",
          "in" : "query",
          "description" : "sortBy",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceStatus",
          "in" : "query",
          "description" : "invoiceStatus",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoicePaymentStatus",
          "in" : "query",
          "description" : "invoicePaymentStatus",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "customerId",
          "in" : "query",
          "description" : "customerId",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "billingScheduleId",
          "in" : "query",
          "description" : "billingScheduleId",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "dueBefore",
          "in" : "query",
          "description" : "dueBefore",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "dueAfter",
          "in" : "query",
          "description" : "dueAfter",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sentBefore",
          "in" : "query",
          "description" : "sentBefore",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sentAfter",
          "in" : "query",
          "description" : "sentAfter",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceBefore",
          "in" : "query",
          "description" : "invoiceBefore",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceAfter",
          "in" : "query",
          "description" : "invoiceAfter",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "billingPeriodBefore",
          "in" : "query",
          "description" : "billingPeriodBefore",
          "required" : false,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "name" : "billingPeriodAfter",
          "in" : "query",
          "description" : "billingPeriodAfter",
          "required" : false,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "name" : "excludeZeroQuantity",
          "in" : "query",
          "description" : "excludeZeroQuantity",
          "required" : false,
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "invoiceCurrency",
          "in" : "query",
          "description" : "invoiceCurrency",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "search",
          "in" : "query",
          "description" : "search",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceNumber",
          "in" : "query",
          "description" : "invoiceNumber",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "netTotal",
          "in" : "query",
          "description" : "netTotal",
          "required" : false,
          "schema" : {
            "type" : "number"
          }
        }, {
          "name" : "excludeInvoiceStatus",
          "in" : "query",
          "description" : "excludeInvoiceStatus",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeInvoicePaymentStatus",
          "in" : "query",
          "description" : "excludeInvoicePaymentStatus",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeCustomerId",
          "in" : "query",
          "description" : "excludeCustomerId",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeBillingScheduleId",
          "in" : "query",
          "description" : "excludeBillingScheduleId",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeInvoiceCurrency",
          "in" : "query",
          "description" : "excludeInvoiceCurrency",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeInvoiceNumber",
          "in" : "query",
          "description" : "excludeInvoiceNumber",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeNetTotal",
          "in" : "query",
          "description" : "excludeNetTotal",
          "required" : false,
          "schema" : {
            "type" : "number"
          }
        }, {
          "name" : "excludeSearch",
          "in" : "query",
          "description" : "excludeSearch",
          "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/InvoiceListSummaryResponse",
                  "example" : {
                    "items" : [ {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "invoiceNumber" : "INV2",
                      "status" : "SENT",
                      "paymentStatus" : "UNPAID",
                      "currency" : "GBP",
                      "grossTotal" : "10",
                      "balance" : "10",
                      "balanceVersion" : 0,
                      "appliedCreditGrantTotal" : "0.00",
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "customerLegalCompanyName" : "Facebook",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "dueDate" : "2022-11-05",
                      "dueDateSource" : "CALCULATED",
                      "dueDatePolicy" : {
                        "paymentTermDays" : 30,
                        "type" : "PAYMENT_TERMS"
                      },
                      "dueDateStatus" : "SET",
                      "accountingDate" : "2022-10-05",
                      "links" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ]
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "InvoiceListSummaryResponse" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                        "invoiceNumber" : "INV2",
                        "status" : "SENT",
                        "paymentStatus" : "UNPAID",
                        "currency" : "GBP",
                        "grossTotal" : "10",
                        "balance" : "10",
                        "balanceVersion" : 0,
                        "appliedCreditGrantTotal" : "0.00",
                        "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                        "customerLegalCompanyName" : "Facebook",
                        "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                        "billingPeriod" : {
                          "start" : "2022-10-01",
                          "endInclusive" : "2022-10-30"
                        },
                        "dueDate" : "2022-11-05",
                        "dueDateSource" : "CALCULATED",
                        "dueDatePolicy" : {
                          "paymentTermDays" : 30,
                          "type" : "PAYMENT_TERMS"
                        },
                        "dueDateStatus" : "SET",
                        "accountingDate" : "2022-10-05",
                        "links" : [ {
                          "externalId" : "ID",
                          "externalService" : "Xero",
                          "syncTime" : "2022-06-28T16:47:00Z",
                          "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                        } ]
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/currency-conversions" : {
      "get" : {
        "tags" : [ "Invoices" ],
        "summary" : "List Currency Conversions for an Invoice",
        "description" : "Lists all currency conversions for a specific invoice.\nCurrency conversions are automatically created for invoices that require regulatory\ncompliance (e.g., UK VAT requiring GBP conversion for foreign currency invoices).",
        "operationId" : "getInvoicesByIdCurrencyConversions",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/InvoiceCurrencyConversionsListResponse",
                  "example" : {
                    "items" : [ {
                      "id" : "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                      "invoiceId" : "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f",
                      "currency" : "GBP",
                      "totalTax" : "20.00",
                      "netTotal" : "100.00",
                      "grossTotal" : "120.00",
                      "exchangeRate" : "0.79",
                      "updatedAt" : "2024-01-15T10:30:00Z"
                    } ]
                  }
                },
                "examples" : {
                  "InvoiceCurrencyConversionsListResponse" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                        "invoiceId" : "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f",
                        "currency" : "GBP",
                        "totalTax" : "20.00",
                        "netTotal" : "100.00",
                        "grossTotal" : "120.00",
                        "exchangeRate" : "0.79",
                        "updatedAt" : "2024-01-15T10:30:00Z"
                      } ]
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "Not Found",
            "content" : { }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{creditnote}/line-items/{id}" : {
      "put" : {
        "tags" : [ "Credit Note Line Items" ],
        "summary" : "Update a Credit Note Line Item",
        "description" : "Update a Credit Note Line Item",
        "operationId" : "putCreditNotesByCreditnoteLineItemsById",
        "parameters" : [ {
          "name" : "creditnote",
          "in" : "path",
          "description" : "The CreditNote ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note Line Item 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/UpdateCreditNoteLineItemEndpointUpdateCreditNoteLineItemRequestModel",
                "example" : {
                  "title" : "Ferraris",
                  "description" : "Red",
                  "quantity" : "2",
                  "rate" : "20000.10",
                  "taxRate" : "0.2",
                  "rateDisplay" : "ABSOLUTE",
                  "externalIds" : [ {
                    "key" : "Xero",
                    "value" : "123"
                  } ],
                  "servicePeriod" : {
                    "start" : "2025-10-01",
                    "endInclusive" : "2025-10-30"
                  },
                  "revenueRecognitionMethod" : "STRAIGHT_LINE",
                  "revenueClassification" : "EARNED",
                  "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
                }
              },
              "examples" : {
                "UpdateCreditNoteLineItemEndpointUpdateCreditNoteLineItemRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ],
                    "servicePeriod" : {
                      "start" : "2025-10-01",
                      "endInclusive" : "2025-10-30"
                    },
                    "revenueRecognitionMethod" : "STRAIGHT_LINE",
                    "revenueClassification" : "EARNED",
                    "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
                  }
                }
              }
            }
          },
          "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/UpdateCreditNoteLineItemEndpointProductUpdateCreditNoteLineItemResponseModel",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "index" : 2,
                    "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "netTotal" : "20000.00",
                    "totalTax" : "2000.00",
                    "grossTotal" : "22000.00",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ],
                    "servicePeriod" : {
                      "start" : "2025-10-01",
                      "endInclusive" : "2025-10-30"
                    },
                    "revenueRecognitionMethod" : "STRAIGHT_LINE",
                    "revenueClassification" : "EARNED",
                    "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
                  }
                },
                "examples" : {
                  "UpdateCreditNoteLineItemEndpointProductUpdateCreditNoteLineItemResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "title" : "Ferraris",
                      "description" : "Red",
                      "quantity" : "2",
                      "rate" : "20000.10",
                      "taxRate" : "0.2",
                      "index" : 2,
                      "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "netTotal" : "20000.00",
                      "totalTax" : "2000.00",
                      "grossTotal" : "22000.00",
                      "rateDisplay" : "ABSOLUTE",
                      "externalIds" : [ {
                        "key" : "Xero",
                        "value" : "123"
                      } ],
                      "servicePeriod" : {
                        "start" : "2025-10-01",
                        "endInclusive" : "2025-10-30"
                      },
                      "revenueRecognitionMethod" : "STRAIGHT_LINE",
                      "revenueClassification" : "EARNED",
                      "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Credit Note Line Items" ],
        "summary" : "Delete a Credit Note Line Item",
        "description" : "Delete a Credit Note Line Item",
        "operationId" : "deleteCreditNotesByCreditnoteLineItemsById",
        "parameters" : [ {
          "name" : "creditnote",
          "in" : "path",
          "description" : "The CreditNote ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note Line Item 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/DeleteCreditNoteLineItemEndpointProductDeleteCreditNoteLineItemResponseModel",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "index" : 2,
                    "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "netTotal" : "20000.00",
                    "totalTax" : "2000.00",
                    "grossTotal" : "22000.00",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ]
                  }
                },
                "examples" : {
                  "DeleteCreditNoteLineItemEndpointProductDeleteCreditNoteLineItemResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "title" : "Ferraris",
                      "description" : "Red",
                      "quantity" : "2",
                      "rate" : "20000.10",
                      "taxRate" : "0.2",
                      "index" : 2,
                      "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "netTotal" : "20000.00",
                      "totalTax" : "2000.00",
                      "grossTotal" : "22000.00",
                      "rateDisplay" : "ABSOLUTE",
                      "externalIds" : [ {
                        "key" : "Xero",
                        "value" : "123"
                      } ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{creditnote}/line-items" : {
      "get" : {
        "tags" : [ "Credit Note Line Items" ],
        "summary" : "List all Credit Note Line Items",
        "description" : "List all Credit Note Line Items",
        "operationId" : "getCreditNotesByCreditnoteLineItems",
        "parameters" : [ {
          "name" : "creditnote",
          "in" : "path",
          "description" : "The CreditNote 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" : "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",
            "format" : "int32"
          }
        }, {
          "name" : "sortOrder",
          "in" : "query",
          "description" : "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "ASC", "DESC" ]
          }
        }, {
          "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/ListCreditNoteLineItemEndpointProductListCreditNoteLineItemPaginatedResponseModel",
                  "example" : {
                    "items" : [ {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "title" : "Ferraris",
                      "description" : "Red",
                      "quantity" : "2",
                      "rate" : "20000.10",
                      "taxRate" : "0.2",
                      "index" : 2,
                      "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "netTotal" : "20000.00",
                      "totalTax" : "2000.00",
                      "grossTotal" : "22000.00",
                      "rateDisplay" : "ABSOLUTE",
                      "externalIds" : [ {
                        "key" : "Xero",
                        "value" : "123"
                      } ],
                      "servicePeriod" : {
                        "start" : "2025-10-01",
                        "endInclusive" : "2025-10-30"
                      },
                      "revenueRecognitionMethod" : "STRAIGHT_LINE",
                      "revenueClassification" : "EARNED",
                      "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "ListCreditNoteLineItemEndpointProductListCreditNoteLineItemPaginatedResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                        "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "title" : "Ferraris",
                        "description" : "Red",
                        "quantity" : "2",
                        "rate" : "20000.10",
                        "taxRate" : "0.2",
                        "index" : 2,
                        "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                        "netTotal" : "20000.00",
                        "totalTax" : "2000.00",
                        "grossTotal" : "22000.00",
                        "rateDisplay" : "ABSOLUTE",
                        "externalIds" : [ {
                          "key" : "Xero",
                          "value" : "123"
                        } ],
                        "servicePeriod" : {
                          "start" : "2025-10-01",
                          "endInclusive" : "2025-10-30"
                        },
                        "revenueRecognitionMethod" : "STRAIGHT_LINE",
                        "revenueClassification" : "EARNED",
                        "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Credit Note Line Items" ],
        "summary" : "Create a new Credit Note Line Item",
        "description" : "Create a new Credit Note Line Item",
        "operationId" : "postCreditNotesByCreditnoteLineItems",
        "parameters" : [ {
          "name" : "creditnote",
          "in" : "path",
          "description" : "The CreditNote 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/Stable20240101CreateCreditNoteLineItemRequestModel",
                "example" : {
                  "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                  "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                  "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                  "title" : "Ferraris",
                  "description" : "Red",
                  "quantity" : "2",
                  "rate" : "20000.10",
                  "taxRate" : "0.2",
                  "rateDisplay" : "ABSOLUTE",
                  "externalIds" : [ {
                    "key" : "Xero",
                    "value" : "123"
                  } ],
                  "servicePeriod" : {
                    "start" : "2025-10-01",
                    "endInclusive" : "2025-10-30"
                  },
                  "revenueRecognitionMethod" : "POINT_IN_TIME",
                  "revenueClassification" : "EARNED",
                  "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                  "invoiceLineItemIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ]
                }
              },
              "examples" : {
                "Stable20240101CreateCreditNoteLineItemRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ],
                    "servicePeriod" : {
                      "start" : "2025-10-01",
                      "endInclusive" : "2025-10-30"
                    },
                    "revenueRecognitionMethod" : "POINT_IN_TIME",
                    "revenueClassification" : "EARNED",
                    "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "invoiceLineItemIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ]
                  }
                }
              }
            }
          },
          "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/Stable20240101ProductCreateCreditNoteLineItemResponseModel",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "index" : 2,
                    "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "netTotal" : "20000.00",
                    "totalTax" : "2000.00",
                    "grossTotal" : "22000.00",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ],
                    "servicePeriod" : {
                      "start" : "2025-10-01",
                      "endInclusive" : "2025-10-30"
                    },
                    "revenueRecognitionMethod" : "STRAIGHT_LINE",
                    "revenueClassification" : "EARNED",
                    "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
                  }
                },
                "examples" : {
                  "Stable20240101ProductCreateCreditNoteLineItemResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "title" : "Ferraris",
                      "description" : "Red",
                      "quantity" : "2",
                      "rate" : "20000.10",
                      "taxRate" : "0.2",
                      "index" : 2,
                      "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "netTotal" : "20000.00",
                      "totalTax" : "2000.00",
                      "grossTotal" : "22000.00",
                      "rateDisplay" : "ABSOLUTE",
                      "externalIds" : [ {
                        "key" : "Xero",
                        "value" : "123"
                      } ],
                      "servicePeriod" : {
                        "start" : "2025-10-01",
                        "endInclusive" : "2025-10-30"
                      },
                      "revenueRecognitionMethod" : "STRAIGHT_LINE",
                      "revenueClassification" : "EARNED",
                      "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{invoice}/line-items" : {
      "get" : {
        "tags" : [ "Invoice Line Items" ],
        "summary" : "List all Line Items",
        "description" : "List all Line Items",
        "operationId" : "getInvoicesByInvoiceLineItems",
        "parameters" : [ {
          "name" : "invoice",
          "in" : "path",
          "description" : "The Invoice 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" : "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",
            "format" : "int32"
          }
        }, {
          "name" : "sortOrder",
          "in" : "query",
          "description" : "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "ASC", "DESC" ]
          }
        }, {
          "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/ListLineItemEndpointPaginatedLineItemResponseModel",
                  "example" : {
                    "items" : [ {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "title" : "Ferraris",
                      "description" : "Red",
                      "quantity" : "2",
                      "rate" : "20000.10",
                      "taxRate" : "0.2",
                      "servicePeriodStart" : "2022-10-20T00:00:00Z",
                      "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                      "servicePeriod" : {
                        "startDate" : "2022-10-20",
                        "endDate" : "2022-10-24"
                      },
                      "index" : 2,
                      "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "netTotal" : "51.20",
                      "totalTax" : "2.50",
                      "grossTotal" : "101.23",
                      "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "rateDisplay" : "ABSOLUTE",
                      "externalIds" : [ {
                        "key" : "Xero",
                        "value" : "123"
                      } ],
                      "revenueClassification" : "EARNED",
                      "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
                      "revenueRecognitionMethod" : "USAGE"
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "ListLineItemEndpointPaginatedLineItemResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                        "title" : "Ferraris",
                        "description" : "Red",
                        "quantity" : "2",
                        "rate" : "20000.10",
                        "taxRate" : "0.2",
                        "servicePeriodStart" : "2022-10-20T00:00:00Z",
                        "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                        "servicePeriod" : {
                          "startDate" : "2022-10-20",
                          "endDate" : "2022-10-24"
                        },
                        "index" : 2,
                        "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                        "netTotal" : "51.20",
                        "totalTax" : "2.50",
                        "grossTotal" : "101.23",
                        "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                        "rateDisplay" : "ABSOLUTE",
                        "externalIds" : [ {
                          "key" : "Xero",
                          "value" : "123"
                        } ],
                        "revenueClassification" : "EARNED",
                        "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                        "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
                        "revenueRecognitionMethod" : "USAGE"
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Invoice Line Items" ],
        "summary" : "Create a new Line Item",
        "description" : "Create a new Line Item",
        "operationId" : "postInvoicesByInvoiceLineItems",
        "parameters" : [ {
          "name" : "invoice",
          "in" : "path",
          "description" : "The Invoice 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/Stable20240101CreateOrUpdateLineItem",
                "example" : {
                  "title" : "Ferraris",
                  "description" : "Red",
                  "quantity" : "2",
                  "rate" : "20000.10",
                  "taxRate" : "0.2",
                  "servicePeriodStart" : "2022-10-20T00:00:00Z",
                  "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                  "servicePeriod" : {
                    "startDate" : "2022-10-20",
                    "endDate" : "2022-10-24"
                  },
                  "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                  "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                  "rateDisplay" : "ABSOLUTE",
                  "externalIds" : [ {
                    "key" : "Xero",
                    "value" : "123"
                  } ],
                  "revenueClassification" : "EARNED",
                  "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                  "revenueRecognitionMethod" : "STRAIGHT_LINE"
                }
              },
              "examples" : {
                "Stable20240101CreateOrUpdateLineItem" : {
                  "summary" : "",
                  "value" : {
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "servicePeriodStart" : "2022-10-20T00:00:00Z",
                    "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                    "servicePeriod" : {
                      "startDate" : "2022-10-20",
                      "endDate" : "2022-10-24"
                    },
                    "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ],
                    "revenueClassification" : "EARNED",
                    "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "revenueRecognitionMethod" : "STRAIGHT_LINE"
                  }
                }
              }
            }
          },
          "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/Stable20240101LineItemResponse",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "servicePeriodStart" : "2022-10-20T00:00:00Z",
                    "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                    "servicePeriod" : {
                      "startDate" : "2022-10-20",
                      "endDate" : "2022-10-24"
                    },
                    "index" : 2,
                    "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "netTotal" : "51.20",
                    "totalTax" : "2.50",
                    "grossTotal" : "101.23",
                    "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ],
                    "revenueClassification" : "EARNED",
                    "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
                    "revenueRecognitionMethod" : "USAGE"
                  }
                },
                "examples" : {
                  "Stable20240101LineItemResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "title" : "Ferraris",
                      "description" : "Red",
                      "quantity" : "2",
                      "rate" : "20000.10",
                      "taxRate" : "0.2",
                      "servicePeriodStart" : "2022-10-20T00:00:00Z",
                      "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                      "servicePeriod" : {
                        "startDate" : "2022-10-20",
                        "endDate" : "2022-10-24"
                      },
                      "index" : 2,
                      "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "netTotal" : "51.20",
                      "totalTax" : "2.50",
                      "grossTotal" : "101.23",
                      "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "rateDisplay" : "ABSOLUTE",
                      "externalIds" : [ {
                        "key" : "Xero",
                        "value" : "123"
                      } ],
                      "revenueClassification" : "EARNED",
                      "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
                      "revenueRecognitionMethod" : "USAGE"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "Not Found",
            "content" : { }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{invoice}/line-item-groups" : {
      "get" : {
        "tags" : [ "Invoice Line Items" ],
        "summary" : "List all Line Item Groups",
        "description" : "List all Line Item Groups",
        "operationId" : "getInvoicesByInvoiceLineItemGroups",
        "parameters" : [ {
          "name" : "invoice",
          "in" : "path",
          "description" : "The Invoice 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" : "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",
            "format" : "int32"
          }
        }, {
          "name" : "sortOrder",
          "in" : "query",
          "description" : "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "ASC", "DESC" ]
          }
        }, {
          "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/ListLineItemGroupEndpointProductListLineItemGroupPaginatedResponseModel",
                  "example" : {
                    "items" : [ {
                      "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
                      "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "title" : "Cars",
                      "description" : "Charges for cars",
                      "index" : 1,
                      "netTotal" : "200000.00",
                      "totalTax" : "10.00",
                      "grossTotal" : "22000.00",
                      "taxCategory" : {
                        "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
                        "name" : "VAT"
                      }
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "ListLineItemGroupEndpointProductListLineItemGroupPaginatedResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
                        "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                        "title" : "Cars",
                        "description" : "Charges for cars",
                        "index" : 1,
                        "netTotal" : "200000.00",
                        "totalTax" : "10.00",
                        "grossTotal" : "22000.00",
                        "taxCategory" : {
                          "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
                          "name" : "VAT"
                        }
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Invoice Line Items" ],
        "summary" : "Create a new Line Item Group",
        "description" : "Create a new Line Item Group",
        "operationId" : "postInvoicesByInvoiceLineItemGroups",
        "parameters" : [ {
          "name" : "invoice",
          "in" : "path",
          "description" : "The Invoice 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/CreateLineItemGroupRequestModel",
                "example" : {
                  "title" : "Users",
                  "description" : "Charges for users",
                  "taxCategoryId" : "28227c88-6dba-455f-9b30-b9c76957e610",
                  "revenueRecognitionMethod" : "STRAIGHT_LINE",
                  "revenueClassification" : "EARNED",
                  "servicePeriod" : {
                    "start" : "2022-10-20",
                    "endInclusive" : "2022-10-24"
                  }
                }
              },
              "examples" : {
                "CreateLineItemGroupRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "title" : "Users",
                    "description" : "Charges for users",
                    "taxCategoryId" : "28227c88-6dba-455f-9b30-b9c76957e610",
                    "revenueRecognitionMethod" : "STRAIGHT_LINE",
                    "revenueClassification" : "EARNED",
                    "servicePeriod" : {
                      "start" : "2022-10-20",
                      "endInclusive" : "2022-10-24"
                    }
                  }
                }
              }
            }
          },
          "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/LineItemGroupResponseModel",
                  "example" : {
                    "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
                    "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "title" : "Cars",
                    "description" : "Charges for cars",
                    "index" : 1,
                    "netTotal" : "200000.00",
                    "totalTax" : "10.00",
                    "grossTotal" : "22000.00",
                    "taxCategory" : {
                      "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
                      "name" : "VAT"
                    }
                  }
                },
                "examples" : {
                  "LineItemGroupResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
                      "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "title" : "Cars",
                      "description" : "Charges for cars",
                      "index" : 1,
                      "netTotal" : "200000.00",
                      "totalTax" : "10.00",
                      "grossTotal" : "22000.00",
                      "taxCategory" : {
                        "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
                        "name" : "VAT"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices" : {
      "get" : {
        "tags" : [ "Invoices" ],
        "summary" : "List all Invoices",
        "description" : "List all invoices. balance and balanceVersion are returned only for FINAL and SENT invoices that already have a ledger balance. An absent balance means it is unavailable, never that the invoice is settled.",
        "operationId" : "getInvoices",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "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",
            "format" : "int32"
          }
        }, {
          "name" : "sortOrder",
          "in" : "query",
          "description" : "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "ASC", "DESC" ]
          }
        }, {
          "name" : "sortBy",
          "in" : "query",
          "description" : "Sort column. Default: creation time. Options: CUSTOMER_LEGAL_COMPANY_NAME, GROSS_TOTAL, ACCOUNTING_DATE, DUE_DATE, ISSUE_DATE",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceStatus",
          "in" : "query",
          "description" : "Filter by invoice status. Options: IN_PROGRESS, DRAFT, FINAL, SENT, VOIDED",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoicePaymentStatus",
          "in" : "query",
          "description" : "Filter by payment status. Options: UNPAID, PARTIALLY_PAID, PAID, UNCOLLECTIBLE",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "customerId",
          "in" : "query",
          "description" : "Filter by customer id.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "billingScheduleId",
          "in" : "query",
          "description" : "Filter by billing schedule id.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "dueBefore",
          "in" : "query",
          "description" : "Filter by due date before. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "dueAfter",
          "in" : "query",
          "description" : "Filter by due date after. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sentBefore",
          "in" : "query",
          "description" : "Filter by sent date before. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sentAfter",
          "in" : "query",
          "description" : "Filter by sent date after. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceBefore",
          "in" : "query",
          "description" : "Filter by invoice date before. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceAfter",
          "in" : "query",
          "description" : "Filter by invoice date after. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "billingPeriodBefore",
          "in" : "query",
          "description" : "Filter by billing period ending on or before this date. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "name" : "billingPeriodAfter",
          "in" : "query",
          "description" : "Filter by billing period starting on or after this date. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "name" : "excludeZeroQuantity",
          "in" : "query",
          "description" : "Exclude invoices with zero quantity.",
          "required" : false,
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "invoiceCurrency",
          "in" : "query",
          "description" : "Get invoices for a specific currency (provide a comma-separated list)",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "search",
          "in" : "query",
          "description" : "Search invoices by invoice number (partial, case-insensitive match)",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceNumber",
          "in" : "query",
          "description" : "Filter by invoice number",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "netTotal",
          "in" : "query",
          "description" : "Filter by net total amount",
          "required" : false,
          "schema" : {
            "type" : "number"
          }
        }, {
          "name" : "excludeInvoiceStatus",
          "in" : "query",
          "description" : "Exclude invoices with these statuses. Options: IN_PROGRESS, DRAFT, FINAL, SENT, VOIDED",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeInvoicePaymentStatus",
          "in" : "query",
          "description" : "Exclude invoices with these payment statuses. Options: UNPAID, PARTIALLY_PAID, PAID, UNCOLLECTIBLE",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeCustomerId",
          "in" : "query",
          "description" : "Exclude invoices for these customer ids.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeBillingScheduleId",
          "in" : "query",
          "description" : "Exclude invoices for these billing schedule ids.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeInvoiceCurrency",
          "in" : "query",
          "description" : "Exclude invoices for these currencies (provide a comma-separated list)",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeInvoiceNumber",
          "in" : "query",
          "description" : "Exclude invoices with these invoice numbers",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "excludeNetTotal",
          "in" : "query",
          "description" : "Exclude invoices with this exact net total amount",
          "required" : false,
          "schema" : {
            "type" : "number"
          }
        }, {
          "name" : "excludeSearch",
          "in" : "query",
          "description" : "Exclude invoices whose invoice number contains this (partial, case-insensitive match)",
          "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/ListInvoiceEndpointListInvoicePaginatedResponseModel",
                  "example" : {
                    "items" : [ {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "SENT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "balance" : "10",
                      "balanceVersion" : 0,
                      "appliedCreditGrantTotal" : "0.00",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "ListInvoiceEndpointListInvoicePaginatedResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                        "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                        "status" : "SENT",
                        "currency" : "GBP",
                        "invoiceNumber" : "INV2",
                        "dueDate" : "2022-11-05",
                        "purchaseOrderNumber" : "PO123",
                        "reference" : "ref",
                        "customerEmails" : [ "customer@example.com" ],
                        "customerLegalCompanyName" : "Facebook",
                        "customerBillingAddress" : {
                          "line1" : "Flat 1",
                          "line2" : "15 Yemen Road",
                          "town" : "Yemen",
                          "state" : "CA",
                          "postcode" : "YE1 2YE",
                          "country" : "YE"
                        },
                        "customerShippingAddress" : {
                          "line1" : "742 Evergreen Terrace",
                          "line2" : "",
                          "town" : "Springfield",
                          "state" : "CA",
                          "postcode" : "12345",
                          "country" : "US"
                        },
                        "memo" : "Thanks",
                        "paymentOptions" : [ "BANK_TRANSFER" ],
                        "billingPeriod" : {
                          "start" : "2022-10-01",
                          "endInclusive" : "2022-10-30"
                        },
                        "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                        "totalTax" : "2",
                        "netTotal" : "12",
                        "grossTotal" : "10",
                        "balance" : "10",
                        "balanceVersion" : 0,
                        "appliedCreditGrantTotal" : "0.00",
                        "metadata" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "paymentStatus" : "UNPAID",
                        "createdAt" : "2022-10-30T00:00:00Z",
                        "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                        "linkedServices" : [ {
                          "externalId" : "ID",
                          "externalService" : "Xero",
                          "syncTime" : "2022-06-28T16:47:00Z",
                          "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                        } ],
                        "merchantDetails" : {
                          "address" : {
                            "line1" : "Flat 1",
                            "line2" : "123 Fake Street",
                            "town" : "New York",
                            "state" : "NY",
                            "postcode" : "AB1 2EF",
                            "country" : "US"
                          },
                          "phoneNumber" : "0800001066",
                          "email" : "donald@example.com",
                          "taxId" : "TAX",
                          "iban" : "GB33BUKB20201555555555",
                          "ukAccountDetails" : {
                            "sortCode" : "123456",
                            "accountNumber" : "12345678"
                          },
                          "usAchDetails" : {
                            "accountNumber" : "12345678",
                            "accountName" : "John Doe",
                            "bankName" : "Chase",
                            "bankRoutingNumber" : "123456789"
                          },
                          "usWireDetails" : {
                            "accountNumber" : "12345678",
                            "accountName" : "John Doe",
                            "bankName" : "Chase",
                            "bankRoutingNumber" : "123456789",
                            "swiftCode" : "CHASUS33",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            }
                          },
                          "swedishBankgiroDestination" : {
                            "bankgiroNumber" : "123-4567",
                            "accountName" : "The Merchant"
                          },
                          "legalCompanyName" : "The Merchant",
                          "customFields" : [ ],
                          "includeBeneficiaryAddressInPaymentDetails" : false
                        },
                        "accountingDate" : "2022-10-05",
                        "customerTaxStatus" : "TAXED",
                        "renderSettings" : {
                          "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                        },
                        "isCustomerArchived" : false,
                        "updatedAt" : "2022-10-30T00:00:00Z"
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Create an invoice",
        "description" : "Create a new invoice",
        "operationId" : "postInvoices",
        "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/Stable20240101CreateInvoiceRequest",
                "example" : {
                  "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                  "currency" : "GBP",
                  "dueDate" : "2022-09-30",
                  "purchaseOrderNumber" : "PO123",
                  "reference" : "ref",
                  "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                  "customerLegalCompanyName" : "Facebook",
                  "customerBillingAddress" : {
                    "line1" : "Flat 1",
                    "line2" : "15 Yemen Road",
                    "town" : "Yemen",
                    "state" : "CA",
                    "postcode" : "YE1 2YE",
                    "country" : "YE"
                  },
                  "customerShippingAddress" : {
                    "line1" : "742 Evergreen Terrace",
                    "town" : "Springfield",
                    "state" : "CA",
                    "postcode" : "12345",
                    "country" : "US"
                  },
                  "memo" : "Thanks",
                  "paymentOptions" : [ "BANK_TRANSFER" ],
                  "billingPeriod" : {
                    "start" : "2022-10-01",
                    "endInclusive" : "2022-10-30"
                  },
                  "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                  "metadata" : [ {
                    "key" : "example-label",
                    "value" : "label-value"
                  } ],
                  "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                  "billingRunId" : "53ff21c8-4872-46c4-83bf-517d54876945",
                  "accountingDate" : "2022-09-30",
                  "attachmentAssetIds" : [ "99874519-25ce-46ff-8823-093115aa7222" ]
                }
              },
              "examples" : {
                "Stable20240101CreateInvoiceRequest" : {
                  "summary" : "",
                  "value" : {
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "dueDate" : "2022-09-30",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                    "billingRunId" : "53ff21c8-4872-46c4-83bf-517d54876945",
                    "accountingDate" : "2022-09-30",
                    "attachmentAssetIds" : [ "99874519-25ce-46ff-8823-093115aa7222" ]
                  }
                }
              }
            }
          },
          "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/InvoiceResponse",
                  "example" : {
                    "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "billingRunId" : "9c5fdd27-1f7a-41e7-ab67-14f65272a853",
                    "status" : "SENT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV00001",
                    "issueDate" : "2022-09-15",
                    "dueDate" : "2022-09-30",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "totalTax" : "2.50",
                    "netTotal" : "98.73",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "paymentStatus" : "PARTIALLY_PAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "updatedAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b" ],
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "finance@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                    "dunningStatus" : "SCHEDULED",
                    "accountingDate" : "2022-09-30",
                    "calculatedAt" : "2022-09-30T00:00:00Z",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "attachmentAssets" : [ {
                      "id" : "4b36a61e-425e-4640-aa26-6224c577b613",
                      "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "createdByType" : "SEQUENCE_USER",
                      "type" : "DOCUMENT",
                      "format" : "PDF",
                      "fileName" : "my-document.pdf",
                      "fileSizeBytes" : 12345,
                      "url" : "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf",
                      "createdAt" : "2022-06-28T16:47:00Z"
                    } ],
                    "balance" : "11.23",
                    "balanceVersion" : 4,
                    "integrationPaymentStatuses" : {
                      "stripe" : "PAID",
                      "goCardless" : "CANCELLED"
                    },
                    "appliedCreditNotes" : [ {
                      "id" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                      "creditNoteBalanceVersion" : 11,
                      "creditNoteNumber" : "CN00001",
                      "netTotal" : "41.67",
                      "totalTax" : "8.33",
                      "grossTotal" : "50.00",
                      "appliedAmount" : "30.00",
                      "lineItems" : [ {
                        "name" : "Adjustment",
                        "netTotal" : "41.67",
                        "grossTotal" : "50.00",
                        "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                      } ]
                    } ],
                    "appliedCreditGrants" : [ {
                      "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
                      "creditGrantName" : "Q3 prepaid credit",
                      "amount" : "10.00",
                      "taxAmount" : "0.00",
                      "status" : "APPLIED"
                    } ],
                    "appliedCreditGrantTax" : "0.00",
                    "projectedCreditGrants" : [ ],
                    "projectedAmountDue" : "101.23",
                    "paymentAllocations" : [ {
                      "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                      "paymentBalanceVersion" : 12,
                      "amount" : "50.00",
                      "allocatedAt" : "2022-10-30T00:00:00Z",
                      "paidAt" : "2022-10-29T00:00:00Z",
                      "origin" : "SEQUENCE",
                      "reference" : "BACS FT26153001"
                    } ],
                    "currentlyApplied" : {
                      "creditNotes" : [ {
                        "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                        "amount" : "30.00",
                        "creditNoteBalanceVersion" : 11,
                        "creditNoteNumber" : "CN00001",
                        "netTotal" : "41.67",
                        "totalTax" : "8.33",
                        "grossTotal" : "50.00",
                        "lineItems" : [ {
                          "name" : "Adjustment",
                          "netTotal" : "41.67",
                          "grossTotal" : "50.00",
                          "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                        } ]
                      } ],
                      "payments" : [ {
                        "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                        "amount" : "50.00",
                        "paymentBalanceVersion" : 12,
                        "paidAt" : "2022-10-29T00:00:00Z",
                        "origin" : "SEQUENCE",
                        "reference" : "BACS FT26153001"
                      } ]
                    },
                    "paymentTermDays" : 30,
                    "dueDateSource" : "CALCULATED",
                    "dueDatePolicy" : {
                      "paymentTermDays" : 30,
                      "type" : "PAYMENT_TERMS"
                    },
                    "dueDateStatus" : "SET"
                  }
                },
                "examples" : {
                  "InvoiceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "billingRunId" : "9c5fdd27-1f7a-41e7-ab67-14f65272a853",
                      "status" : "SENT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV00001",
                      "issueDate" : "2022-09-15",
                      "dueDate" : "2022-09-30",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "totalTax" : "2.50",
                      "netTotal" : "98.73",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "paymentStatus" : "PARTIALLY_PAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "updatedAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b" ],
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "finance@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                      "dunningStatus" : "SCHEDULED",
                      "accountingDate" : "2022-09-30",
                      "calculatedAt" : "2022-09-30T00:00:00Z",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "attachmentAssets" : [ {
                        "id" : "4b36a61e-425e-4640-aa26-6224c577b613",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "createdByType" : "SEQUENCE_USER",
                        "type" : "DOCUMENT",
                        "format" : "PDF",
                        "fileName" : "my-document.pdf",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "balance" : "11.23",
                      "balanceVersion" : 4,
                      "integrationPaymentStatuses" : {
                        "stripe" : "PAID",
                        "goCardless" : "CANCELLED"
                      },
                      "appliedCreditNotes" : [ {
                        "id" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                        "creditNoteBalanceVersion" : 11,
                        "creditNoteNumber" : "CN00001",
                        "netTotal" : "41.67",
                        "totalTax" : "8.33",
                        "grossTotal" : "50.00",
                        "appliedAmount" : "30.00",
                        "lineItems" : [ {
                          "name" : "Adjustment",
                          "netTotal" : "41.67",
                          "grossTotal" : "50.00",
                          "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                        } ]
                      } ],
                      "appliedCreditGrants" : [ {
                        "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
                        "creditGrantName" : "Q3 prepaid credit",
                        "amount" : "10.00",
                        "taxAmount" : "0.00",
                        "status" : "APPLIED"
                      } ],
                      "appliedCreditGrantTax" : "0.00",
                      "projectedCreditGrants" : [ ],
                      "projectedAmountDue" : "101.23",
                      "paymentAllocations" : [ {
                        "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                        "paymentBalanceVersion" : 12,
                        "amount" : "50.00",
                        "allocatedAt" : "2022-10-30T00:00:00Z",
                        "paidAt" : "2022-10-29T00:00:00Z",
                        "origin" : "SEQUENCE",
                        "reference" : "BACS FT26153001"
                      } ],
                      "currentlyApplied" : {
                        "creditNotes" : [ {
                          "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                          "amount" : "30.00",
                          "creditNoteBalanceVersion" : 11,
                          "creditNoteNumber" : "CN00001",
                          "netTotal" : "41.67",
                          "totalTax" : "8.33",
                          "grossTotal" : "50.00",
                          "lineItems" : [ {
                            "name" : "Adjustment",
                            "netTotal" : "41.67",
                            "grossTotal" : "50.00",
                            "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                          } ]
                        } ],
                        "payments" : [ {
                          "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                          "amount" : "50.00",
                          "paymentBalanceVersion" : 12,
                          "paidAt" : "2022-10-29T00:00:00Z",
                          "origin" : "SEQUENCE",
                          "reference" : "BACS FT26153001"
                        } ]
                      },
                      "paymentTermDays" : 30,
                      "dueDateSource" : "CALCULATED",
                      "dueDatePolicy" : {
                        "paymentTermDays" : 30,
                        "type" : "PAYMENT_TERMS"
                      },
                      "dueDateStatus" : "SET"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/draft" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Convert upcoming invoice to draft",
        "description" : "Updates to DRAFT status and recalculates invoice. Returns 409 when an earlier billing run this document corrects has no document yet: PRIOR_RUN_STILL_IN_FLIGHT means retry shortly, OLD_BILLING_RUN_INCOMPLETE means escalate, as the earlier run needs repair.",
        "operationId" : "postInvoicesByIdDraft",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/Invoice",
                  "example" : {
                    "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                    "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV2",
                    "dueDate" : "2022-11-05",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "line2" : "",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                    "totalTax" : "2",
                    "netTotal" : "12",
                    "grossTotal" : "10",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                    "linkedServices" : [ {
                      "externalId" : "ID",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "Flat 1",
                        "line2" : "123 Fake Street",
                        "town" : "New York",
                        "state" : "NY",
                        "postcode" : "AB1 2EF",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "123456",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "legalCompanyName" : "The Merchant",
                      "customFields" : [ ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "accountingDate" : "2022-10-05",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-10-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "409" : {
            "description" : "Conflict",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiError",
                  "example" : {
                    "error" : {
                      "type" : "validationError",
                      "message" : "The request was invalid.",
                      "errors" : [ {
                        "code" : "invalidField",
                        "message" : "The request was invalid."
                      } ]
                    }
                  }
                },
                "examples" : {
                  "ApiError" : {
                    "summary" : "",
                    "value" : {
                      "error" : {
                        "type" : "validationError",
                        "message" : "The request was invalid.",
                        "errors" : [ {
                          "code" : "invalidField",
                          "message" : "The request was invalid."
                        } ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{creditnote}/line-item-groups/{id}" : {
      "put" : {
        "tags" : [ "Credit Note Line Items" ],
        "summary" : "Update a Credit Note Line Item Group",
        "description" : "Update a Credit Note Line Item Group",
        "operationId" : "putCreditNotesByCreditnoteLineItemGroupsById",
        "parameters" : [ {
          "name" : "creditnote",
          "in" : "path",
          "description" : "The CreditNote ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note Line Item Group 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/UpdateCreditNoteLineItemGroupEndpointUpdateCreditNoteLineItemGroupRequestModel",
                "example" : {
                  "title" : "Users",
                  "description" : "Credit note for users"
                }
              },
              "examples" : {
                "UpdateCreditNoteLineItemGroupEndpointUpdateCreditNoteLineItemGroupRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "title" : "Users",
                    "description" : "Credit note for users"
                  }
                }
              }
            }
          },
          "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/UpdateCreditNoteLineItemGroupEndpointProductUpdateCreditNoteLineItemGroupResponseModel",
                  "example" : {
                    "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
                    "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "title" : "Users",
                    "description" : "Credit note for users",
                    "index" : 2,
                    "netTotal" : "51.20",
                    "totalTax" : "2.50",
                    "grossTotal" : "101.23"
                  }
                },
                "examples" : {
                  "UpdateCreditNoteLineItemGroupEndpointProductUpdateCreditNoteLineItemGroupResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
                      "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "title" : "Users",
                      "description" : "Credit note for users",
                      "index" : 2,
                      "netTotal" : "51.20",
                      "totalTax" : "2.50",
                      "grossTotal" : "101.23"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Credit Note Line Items" ],
        "summary" : "Delete a Credit Note Line Item Group",
        "description" : "Delete a Credit Note Line Item Group",
        "operationId" : "deleteCreditNotesByCreditnoteLineItemGroupsById",
        "parameters" : [ {
          "name" : "creditnote",
          "in" : "path",
          "description" : "The CreditNote ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note Line Item Group 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/DeleteCreditNoteLineItemGroupEndpointProductDeleteCreditNoteLineItemGroupResponseModel",
                  "example" : {
                    "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
                    "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "title" : "Users",
                    "description" : "Credit note for users",
                    "index" : 2,
                    "netTotal" : "51.20",
                    "totalTax" : "2.50",
                    "grossTotal" : "101.23"
                  }
                },
                "examples" : {
                  "DeleteCreditNoteLineItemGroupEndpointProductDeleteCreditNoteLineItemGroupResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
                      "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "title" : "Users",
                      "description" : "Credit note for users",
                      "index" : 2,
                      "netTotal" : "51.20",
                      "totalTax" : "2.50",
                      "grossTotal" : "101.23"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}" : {
      "get" : {
        "tags" : [ "Invoices" ],
        "summary" : "Get an Invoice by ID",
        "description" : "Get an Invoice by ID",
        "operationId" : "getInvoicesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/InvoiceResponse",
                  "example" : {
                    "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "billingRunId" : "9c5fdd27-1f7a-41e7-ab67-14f65272a853",
                    "status" : "SENT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV00001",
                    "issueDate" : "2022-09-15",
                    "dueDate" : "2022-09-30",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "totalTax" : "2.50",
                    "netTotal" : "98.73",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "paymentStatus" : "PARTIALLY_PAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "updatedAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b" ],
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "finance@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                    "dunningStatus" : "SCHEDULED",
                    "accountingDate" : "2022-09-30",
                    "calculatedAt" : "2022-09-30T00:00:00Z",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "attachmentAssets" : [ {
                      "id" : "4b36a61e-425e-4640-aa26-6224c577b613",
                      "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "createdByType" : "SEQUENCE_USER",
                      "type" : "DOCUMENT",
                      "format" : "PDF",
                      "fileName" : "my-document.pdf",
                      "fileSizeBytes" : 12345,
                      "url" : "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf",
                      "createdAt" : "2022-06-28T16:47:00Z"
                    } ],
                    "balance" : "11.23",
                    "balanceVersion" : 4,
                    "integrationPaymentStatuses" : {
                      "stripe" : "PAID",
                      "goCardless" : "CANCELLED"
                    },
                    "appliedCreditNotes" : [ {
                      "id" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                      "creditNoteBalanceVersion" : 11,
                      "creditNoteNumber" : "CN00001",
                      "netTotal" : "41.67",
                      "totalTax" : "8.33",
                      "grossTotal" : "50.00",
                      "appliedAmount" : "30.00",
                      "lineItems" : [ {
                        "name" : "Adjustment",
                        "netTotal" : "41.67",
                        "grossTotal" : "50.00",
                        "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                      } ]
                    } ],
                    "appliedCreditGrants" : [ {
                      "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
                      "creditGrantName" : "Q3 prepaid credit",
                      "amount" : "10.00",
                      "taxAmount" : "0.00",
                      "status" : "APPLIED"
                    } ],
                    "appliedCreditGrantTax" : "0.00",
                    "projectedCreditGrants" : [ ],
                    "projectedAmountDue" : "101.23",
                    "paymentAllocations" : [ {
                      "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                      "paymentBalanceVersion" : 12,
                      "amount" : "50.00",
                      "allocatedAt" : "2022-10-30T00:00:00Z",
                      "paidAt" : "2022-10-29T00:00:00Z",
                      "origin" : "SEQUENCE",
                      "reference" : "BACS FT26153001"
                    } ],
                    "currentlyApplied" : {
                      "creditNotes" : [ {
                        "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                        "amount" : "30.00",
                        "creditNoteBalanceVersion" : 11,
                        "creditNoteNumber" : "CN00001",
                        "netTotal" : "41.67",
                        "totalTax" : "8.33",
                        "grossTotal" : "50.00",
                        "lineItems" : [ {
                          "name" : "Adjustment",
                          "netTotal" : "41.67",
                          "grossTotal" : "50.00",
                          "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                        } ]
                      } ],
                      "payments" : [ {
                        "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                        "amount" : "50.00",
                        "paymentBalanceVersion" : 12,
                        "paidAt" : "2022-10-29T00:00:00Z",
                        "origin" : "SEQUENCE",
                        "reference" : "BACS FT26153001"
                      } ]
                    },
                    "paymentTermDays" : 30,
                    "dueDateSource" : "CALCULATED",
                    "dueDatePolicy" : {
                      "paymentTermDays" : 30,
                      "type" : "PAYMENT_TERMS"
                    },
                    "dueDateStatus" : "SET"
                  }
                },
                "examples" : {
                  "InvoiceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "billingRunId" : "9c5fdd27-1f7a-41e7-ab67-14f65272a853",
                      "status" : "SENT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV00001",
                      "issueDate" : "2022-09-15",
                      "dueDate" : "2022-09-30",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "totalTax" : "2.50",
                      "netTotal" : "98.73",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "paymentStatus" : "PARTIALLY_PAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "updatedAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b" ],
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "finance@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                      "dunningStatus" : "SCHEDULED",
                      "accountingDate" : "2022-09-30",
                      "calculatedAt" : "2022-09-30T00:00:00Z",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "attachmentAssets" : [ {
                        "id" : "4b36a61e-425e-4640-aa26-6224c577b613",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "createdByType" : "SEQUENCE_USER",
                        "type" : "DOCUMENT",
                        "format" : "PDF",
                        "fileName" : "my-document.pdf",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "balance" : "11.23",
                      "balanceVersion" : 4,
                      "integrationPaymentStatuses" : {
                        "stripe" : "PAID",
                        "goCardless" : "CANCELLED"
                      },
                      "appliedCreditNotes" : [ {
                        "id" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                        "creditNoteBalanceVersion" : 11,
                        "creditNoteNumber" : "CN00001",
                        "netTotal" : "41.67",
                        "totalTax" : "8.33",
                        "grossTotal" : "50.00",
                        "appliedAmount" : "30.00",
                        "lineItems" : [ {
                          "name" : "Adjustment",
                          "netTotal" : "41.67",
                          "grossTotal" : "50.00",
                          "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                        } ]
                      } ],
                      "appliedCreditGrants" : [ {
                        "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
                        "creditGrantName" : "Q3 prepaid credit",
                        "amount" : "10.00",
                        "taxAmount" : "0.00",
                        "status" : "APPLIED"
                      } ],
                      "appliedCreditGrantTax" : "0.00",
                      "projectedCreditGrants" : [ ],
                      "projectedAmountDue" : "101.23",
                      "paymentAllocations" : [ {
                        "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                        "paymentBalanceVersion" : 12,
                        "amount" : "50.00",
                        "allocatedAt" : "2022-10-30T00:00:00Z",
                        "paidAt" : "2022-10-29T00:00:00Z",
                        "origin" : "SEQUENCE",
                        "reference" : "BACS FT26153001"
                      } ],
                      "currentlyApplied" : {
                        "creditNotes" : [ {
                          "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                          "amount" : "30.00",
                          "creditNoteBalanceVersion" : 11,
                          "creditNoteNumber" : "CN00001",
                          "netTotal" : "41.67",
                          "totalTax" : "8.33",
                          "grossTotal" : "50.00",
                          "lineItems" : [ {
                            "name" : "Adjustment",
                            "netTotal" : "41.67",
                            "grossTotal" : "50.00",
                            "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                          } ]
                        } ],
                        "payments" : [ {
                          "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                          "amount" : "50.00",
                          "paymentBalanceVersion" : 12,
                          "paidAt" : "2022-10-29T00:00:00Z",
                          "origin" : "SEQUENCE",
                          "reference" : "BACS FT26153001"
                        } ]
                      },
                      "paymentTermDays" : 30,
                      "dueDateSource" : "CALCULATED",
                      "dueDatePolicy" : {
                        "paymentTermDays" : 30,
                        "type" : "PAYMENT_TERMS"
                      },
                      "dueDateStatus" : "SET"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "Not Found",
            "content" : { }
          }
        }
      },
      "put" : {
        "tags" : [ "Invoices" ],
        "summary" : "Update an invoice",
        "description" : "Update an invoice",
        "operationId" : "putInvoicesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/Stable20240101UpdateInvoiceRequest",
                "example" : {
                  "dueDate" : "2022-09-30",
                  "purchaseOrderNumber" : "PO123",
                  "reference" : "ref",
                  "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                  "customerLegalCompanyName" : "Facebook",
                  "customerBillingAddress" : {
                    "line1" : "Flat 1",
                    "line2" : "15 Yemen Road",
                    "town" : "Yemen",
                    "state" : "CA",
                    "postcode" : "YE1 2YE",
                    "country" : "YE"
                  },
                  "customerShippingAddress" : {
                    "line1" : "742 Evergreen Terrace",
                    "town" : "Springfield",
                    "state" : "CA",
                    "postcode" : "12345",
                    "country" : "US"
                  },
                  "memo" : "Thanks",
                  "paymentOptions" : [ "BANK_TRANSFER" ],
                  "billingPeriod" : {
                    "start" : "2022-10-01",
                    "endInclusive" : "2022-10-30"
                  },
                  "metadata" : [ {
                    "key" : "example-label",
                    "value" : "label-value"
                  } ],
                  "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                  "billingRunId" : "53ff21c8-4872-46c4-83bf-517d54876945",
                  "accountingDate" : "2022-09-30",
                  "attachmentAssetIds" : [ "99874519-25ce-46ff-8823-093115aa7222" ],
                  "currency" : "GBP"
                }
              },
              "examples" : {
                "Stable20240101UpdateInvoiceRequest" : {
                  "summary" : "",
                  "value" : {
                    "dueDate" : "2022-09-30",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                    "billingRunId" : "53ff21c8-4872-46c4-83bf-517d54876945",
                    "accountingDate" : "2022-09-30",
                    "attachmentAssetIds" : [ "99874519-25ce-46ff-8823-093115aa7222" ],
                    "currency" : "GBP"
                  }
                }
              }
            }
          },
          "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/InvoiceResponse",
                  "example" : {
                    "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "billingRunId" : "9c5fdd27-1f7a-41e7-ab67-14f65272a853",
                    "status" : "SENT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV00001",
                    "issueDate" : "2022-09-15",
                    "dueDate" : "2022-09-30",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "totalTax" : "2.50",
                    "netTotal" : "98.73",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "paymentStatus" : "PARTIALLY_PAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "updatedAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b" ],
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "finance@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                    "dunningStatus" : "SCHEDULED",
                    "accountingDate" : "2022-09-30",
                    "calculatedAt" : "2022-09-30T00:00:00Z",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "attachmentAssets" : [ {
                      "id" : "4b36a61e-425e-4640-aa26-6224c577b613",
                      "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                      "createdByType" : "SEQUENCE_USER",
                      "type" : "DOCUMENT",
                      "format" : "PDF",
                      "fileName" : "my-document.pdf",
                      "fileSizeBytes" : 12345,
                      "url" : "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf",
                      "createdAt" : "2022-06-28T16:47:00Z"
                    } ],
                    "balance" : "11.23",
                    "balanceVersion" : 4,
                    "integrationPaymentStatuses" : {
                      "stripe" : "PAID",
                      "goCardless" : "CANCELLED"
                    },
                    "appliedCreditNotes" : [ {
                      "id" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                      "creditNoteBalanceVersion" : 11,
                      "creditNoteNumber" : "CN00001",
                      "netTotal" : "41.67",
                      "totalTax" : "8.33",
                      "grossTotal" : "50.00",
                      "appliedAmount" : "30.00",
                      "lineItems" : [ {
                        "name" : "Adjustment",
                        "netTotal" : "41.67",
                        "grossTotal" : "50.00",
                        "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                      } ]
                    } ],
                    "appliedCreditGrants" : [ {
                      "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
                      "creditGrantName" : "Q3 prepaid credit",
                      "amount" : "10.00",
                      "taxAmount" : "0.00",
                      "status" : "APPLIED"
                    } ],
                    "appliedCreditGrantTax" : "0.00",
                    "projectedCreditGrants" : [ ],
                    "projectedAmountDue" : "101.23",
                    "paymentAllocations" : [ {
                      "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                      "paymentBalanceVersion" : 12,
                      "amount" : "50.00",
                      "allocatedAt" : "2022-10-30T00:00:00Z",
                      "paidAt" : "2022-10-29T00:00:00Z",
                      "origin" : "SEQUENCE",
                      "reference" : "BACS FT26153001"
                    } ],
                    "currentlyApplied" : {
                      "creditNotes" : [ {
                        "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                        "amount" : "30.00",
                        "creditNoteBalanceVersion" : 11,
                        "creditNoteNumber" : "CN00001",
                        "netTotal" : "41.67",
                        "totalTax" : "8.33",
                        "grossTotal" : "50.00",
                        "lineItems" : [ {
                          "name" : "Adjustment",
                          "netTotal" : "41.67",
                          "grossTotal" : "50.00",
                          "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                        } ]
                      } ],
                      "payments" : [ {
                        "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                        "amount" : "50.00",
                        "paymentBalanceVersion" : 12,
                        "paidAt" : "2022-10-29T00:00:00Z",
                        "origin" : "SEQUENCE",
                        "reference" : "BACS FT26153001"
                      } ]
                    },
                    "paymentTermDays" : 30,
                    "dueDateSource" : "CALCULATED",
                    "dueDatePolicy" : {
                      "paymentTermDays" : 30,
                      "type" : "PAYMENT_TERMS"
                    },
                    "dueDateStatus" : "SET"
                  }
                },
                "examples" : {
                  "InvoiceResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "billingRunId" : "9c5fdd27-1f7a-41e7-ab67-14f65272a853",
                      "status" : "SENT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV00001",
                      "issueDate" : "2022-09-15",
                      "dueDate" : "2022-09-30",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "totalTax" : "2.50",
                      "netTotal" : "98.73",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "paymentStatus" : "PARTIALLY_PAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "updatedAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b" ],
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "finance@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                      "dunningStatus" : "SCHEDULED",
                      "accountingDate" : "2022-09-30",
                      "calculatedAt" : "2022-09-30T00:00:00Z",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "attachmentAssets" : [ {
                        "id" : "4b36a61e-425e-4640-aa26-6224c577b613",
                        "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
                        "createdByType" : "SEQUENCE_USER",
                        "type" : "DOCUMENT",
                        "format" : "PDF",
                        "fileName" : "my-document.pdf",
                        "fileSizeBytes" : 12345,
                        "url" : "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf",
                        "createdAt" : "2022-06-28T16:47:00Z"
                      } ],
                      "balance" : "11.23",
                      "balanceVersion" : 4,
                      "integrationPaymentStatuses" : {
                        "stripe" : "PAID",
                        "goCardless" : "CANCELLED"
                      },
                      "appliedCreditNotes" : [ {
                        "id" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                        "creditNoteBalanceVersion" : 11,
                        "creditNoteNumber" : "CN00001",
                        "netTotal" : "41.67",
                        "totalTax" : "8.33",
                        "grossTotal" : "50.00",
                        "appliedAmount" : "30.00",
                        "lineItems" : [ {
                          "name" : "Adjustment",
                          "netTotal" : "41.67",
                          "grossTotal" : "50.00",
                          "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                        } ]
                      } ],
                      "appliedCreditGrants" : [ {
                        "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
                        "creditGrantName" : "Q3 prepaid credit",
                        "amount" : "10.00",
                        "taxAmount" : "0.00",
                        "status" : "APPLIED"
                      } ],
                      "appliedCreditGrantTax" : "0.00",
                      "projectedCreditGrants" : [ ],
                      "projectedAmountDue" : "101.23",
                      "paymentAllocations" : [ {
                        "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                        "paymentBalanceVersion" : 12,
                        "amount" : "50.00",
                        "allocatedAt" : "2022-10-30T00:00:00Z",
                        "paidAt" : "2022-10-29T00:00:00Z",
                        "origin" : "SEQUENCE",
                        "reference" : "BACS FT26153001"
                      } ],
                      "currentlyApplied" : {
                        "creditNotes" : [ {
                          "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
                          "amount" : "30.00",
                          "creditNoteBalanceVersion" : 11,
                          "creditNoteNumber" : "CN00001",
                          "netTotal" : "41.67",
                          "totalTax" : "8.33",
                          "grossTotal" : "50.00",
                          "lineItems" : [ {
                            "name" : "Adjustment",
                            "netTotal" : "41.67",
                            "grossTotal" : "50.00",
                            "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
                          } ]
                        } ],
                        "payments" : [ {
                          "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
                          "amount" : "50.00",
                          "paymentBalanceVersion" : 12,
                          "paidAt" : "2022-10-29T00:00:00Z",
                          "origin" : "SEQUENCE",
                          "reference" : "BACS FT26153001"
                        } ]
                      },
                      "paymentTermDays" : 30,
                      "dueDateSource" : "CALCULATED",
                      "dueDatePolicy" : {
                        "paymentTermDays" : 30,
                        "type" : "PAYMENT_TERMS"
                      },
                      "dueDateStatus" : "SET"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Invoices" ],
        "summary" : "Delete an Invoice",
        "description" : "Delete an Invoice. NB. You can only delete a draft or in-progress invoice. If you want to correct an invoice you have already finalised, you should void it instead. If you want to correct an invoice you have already sent, you should create a credit note. ",
        "operationId" : "deleteInvoicesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/DeleteInvoiceEndpointProductDeleteInvoiceResponseModel",
                  "example" : {
                    "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV00001",
                    "issueDate" : "2022-09-15",
                    "dueDate" : "2022-09-30",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ],
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "finance@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                    "dunningStatus" : "SCHEDULED",
                    "accountingDate" : "2022-09-30",
                    "calculatedAt" : "2022-09-30T00:00:00Z",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false
                  }
                },
                "examples" : {
                  "DeleteInvoiceEndpointProductDeleteInvoiceResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV00001",
                      "issueDate" : "2022-09-15",
                      "dueDate" : "2022-09-30",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ],
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "finance@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                      "dunningStatus" : "SCHEDULED",
                      "accountingDate" : "2022-09-30",
                      "calculatedAt" : "2022-09-30T00:00:00Z",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch" : {
        "tags" : [ "Invoices" ],
        "summary" : "Patch an invoice",
        "description" : "Patch an invoice",
        "operationId" : "patchInvoicesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/Stable20240101PatchInvoiceRequest",
                "example" : {
                  "dueDate" : "2022-09-30",
                  "purchaseOrderNumber" : "PO123",
                  "reference" : "ref",
                  "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                  "customerLegalCompanyName" : "Facebook",
                  "customerBillingAddress" : {
                    "line1" : "Flat 1",
                    "line2" : "15 Yemen Road",
                    "town" : "Yemen",
                    "state" : "CA",
                    "postcode" : "YE1 2YE",
                    "country" : "YE"
                  },
                  "customerShippingAddress" : {
                    "line1" : "742 Evergreen Terrace",
                    "town" : "Springfield",
                    "state" : "CA",
                    "postcode" : "12345",
                    "country" : "US"
                  },
                  "memo" : "Thanks",
                  "paymentOptions" : [ "BANK_TRANSFER" ],
                  "billingPeriod" : {
                    "start" : "2022-10-01",
                    "endInclusive" : "2022-10-30"
                  },
                  "metadata" : [ {
                    "key" : "example-label",
                    "value" : "label-value"
                  } ],
                  "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                  "billingRunId" : "53ff21c8-4872-46c4-83bf-517d54876945",
                  "accountingDate" : "2022-09-30",
                  "attachmentAssetIds" : [ "99874519-25ce-46ff-8823-093115aa7222" ]
                }
              },
              "examples" : {
                "Stable20240101PatchInvoiceRequest" : {
                  "summary" : "",
                  "value" : {
                    "dueDate" : "2022-09-30",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                    "billingRunId" : "53ff21c8-4872-46c4-83bf-517d54876945",
                    "accountingDate" : "2022-09-30",
                    "attachmentAssetIds" : [ "99874519-25ce-46ff-8823-093115aa7222" ]
                  }
                }
              }
            }
          },
          "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/Invoice",
                  "example" : {
                    "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                    "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV2",
                    "dueDate" : "2022-11-05",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "line2" : "",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                    "totalTax" : "2",
                    "netTotal" : "12",
                    "grossTotal" : "10",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                    "linkedServices" : [ {
                      "externalId" : "ID",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "Flat 1",
                        "line2" : "123 Fake Street",
                        "town" : "New York",
                        "state" : "NY",
                        "postcode" : "AB1 2EF",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "123456",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "legalCompanyName" : "The Merchant",
                      "customFields" : [ ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "accountingDate" : "2022-10-05",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-10-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{id}/finalize-and-send" : {
      "post" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Finalize and send credit note",
        "description" : "Updates to SENT status, generates credit note PDF and sends to end-customer",
        "operationId" : "postCreditNotesByIdFinalizeAndSend",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note 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/CreditNote",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "status" : "SENT",
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceNumber" : "INV00001",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "issueDate" : "2022-09-15",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "creditNoteNumber" : "CN00001",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "applicationStatus" : "PARTIALLY_APPLIED",
                    "balance" : "51.23",
                    "balanceVersion" : 3,
                    "applications" : [ {
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "amount" : "50.00",
                      "appliedAt" : "2022-10-14T12:34:56Z"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "12345678"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : true
                    },
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                },
                "examples" : {
                  "CreditNote" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "SENT",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{creditnote}/line-item-groups" : {
      "get" : {
        "tags" : [ "Credit Note Line Items" ],
        "summary" : "List all Credit Note Line Item Groups",
        "description" : "List all Credit Note Line Item Groups",
        "operationId" : "getCreditNotesByCreditnoteLineItemGroups",
        "parameters" : [ {
          "name" : "creditnote",
          "in" : "path",
          "description" : "The CreditNote 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" : "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",
            "format" : "int32"
          }
        }, {
          "name" : "sortOrder",
          "in" : "query",
          "description" : "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "ASC", "DESC" ]
          }
        }, {
          "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/ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupPaginatedResponseModel",
                  "example" : {
                    "items" : [ {
                      "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
                      "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "title" : "Users",
                      "description" : "Credit note for users",
                      "index" : 2,
                      "netTotal" : "51.20",
                      "totalTax" : "2.50",
                      "grossTotal" : "101.23"
                    } ],
                    "pagination" : {
                      "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                      "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                      "totalResultSize" : 10
                    }
                  }
                },
                "examples" : {
                  "ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupPaginatedResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
                        "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "title" : "Users",
                        "description" : "Credit note for users",
                        "index" : 2,
                        "netTotal" : "51.20",
                        "totalTax" : "2.50",
                        "grossTotal" : "101.23"
                      } ],
                      "pagination" : {
                        "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
                        "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
                        "totalResultSize" : 10
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Credit Note Line Items" ],
        "summary" : "Create a new Credit Note Line Item Group",
        "description" : "Create a new Credit Note Line Item Group",
        "operationId" : "postCreditNotesByCreditnoteLineItemGroups",
        "parameters" : [ {
          "name" : "creditnote",
          "in" : "path",
          "description" : "The CreditNote 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/CreateCreditNoteLineItemGroupEndpointCreateCreditNoteLineItemGroupRequestModel",
                "example" : {
                  "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                  "title" : "Users",
                  "description" : "Credit note for users"
                }
              },
              "examples" : {
                "CreateCreditNoteLineItemGroupEndpointCreateCreditNoteLineItemGroupRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "title" : "Users",
                    "description" : "Credit note for users"
                  }
                }
              }
            }
          },
          "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/CreateCreditNoteLineItemGroupEndpointProductCreateCreditNoteLineItemGroupResponseModel",
                  "example" : {
                    "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
                    "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "title" : "Users",
                    "description" : "Credit note for users",
                    "index" : 2,
                    "netTotal" : "51.20",
                    "totalTax" : "2.50",
                    "grossTotal" : "101.23"
                  }
                },
                "examples" : {
                  "CreateCreditNoteLineItemGroupEndpointProductCreateCreditNoteLineItemGroupResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
                      "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "title" : "Users",
                      "description" : "Credit note for users",
                      "index" : 2,
                      "netTotal" : "51.20",
                      "totalTax" : "2.50",
                      "grossTotal" : "101.23"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{id}" : {
      "get" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Get a Credit Note by ID",
        "description" : "Get a Credit Note by ID",
        "operationId" : "getCreditNotesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note 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/CreditNoteResponse",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "status" : "SENT",
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceNumber" : "INV00001",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "issueDate" : "2022-09-15",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "creditNoteNumber" : "CN00001",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "applicationStatus" : "PARTIALLY_APPLIED",
                    "balance" : "51.23",
                    "balanceVersion" : 3,
                    "applications" : [ {
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "amount" : "50.00",
                      "appliedAt" : "2022-10-14T12:34:56Z"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "12345678"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : true
                    },
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                },
                "examples" : {
                  "CreditNoteResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "SENT",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Update a Credit Note",
        "description" : "Update a Credit Note",
        "operationId" : "putCreditNotesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note 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/UpdateCreditNoteEndpointUpdateCreditNoteRequestModel",
                "example" : {
                  "billingPeriodStart" : "2022-10-01T00:00:00Z",
                  "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                  "purchaseOrderNumber" : "PO123",
                  "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                  "customerLegalCompanyName" : "Facebook",
                  "customerBillingAddress" : {
                    "line1" : "Flat 1",
                    "line2" : "15 Yemen Road",
                    "town" : "Yemen",
                    "state" : "CA",
                    "postcode" : "YE1 2YE",
                    "country" : "YE"
                  },
                  "customerShippingAddress" : {
                    "line1" : "742 Evergreen Terrace",
                    "town" : "Springfield",
                    "state" : "CA",
                    "postcode" : "12345",
                    "country" : "US"
                  },
                  "memo" : "Thanks",
                  "metadata" : [ {
                    "key" : "example-label",
                    "value" : "label-value"
                  } ],
                  "customerTaxId" : "TAX123",
                  "settings" : {
                    "generateCashCreditGrant" : "ENABLED"
                  },
                  "accountingDate" : "2022-09-30"
                }
              },
              "examples" : {
                "UpdateCreditNoteEndpointUpdateCreditNoteRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "purchaseOrderNumber" : "PO123",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                }
              }
            }
          },
          "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/CreditNote",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "status" : "SENT",
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceNumber" : "INV00001",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "issueDate" : "2022-09-15",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "creditNoteNumber" : "CN00001",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "applicationStatus" : "PARTIALLY_APPLIED",
                    "balance" : "51.23",
                    "balanceVersion" : 3,
                    "applications" : [ {
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "amount" : "50.00",
                      "appliedAt" : "2022-10-14T12:34:56Z"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "12345678"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : true
                    },
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                },
                "examples" : {
                  "CreditNote" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "SENT",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Delete a Credit Note",
        "description" : "Delete a Credit Note",
        "operationId" : "deleteCreditNotesById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note 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/CreditNote",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "status" : "SENT",
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceNumber" : "INV00001",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "issueDate" : "2022-09-15",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "creditNoteNumber" : "CN00001",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "applicationStatus" : "PARTIALLY_APPLIED",
                    "balance" : "51.23",
                    "balanceVersion" : 3,
                    "applications" : [ {
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "amount" : "50.00",
                      "appliedAt" : "2022-10-14T12:34:56Z"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "12345678"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : true
                    },
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                },
                "examples" : {
                  "CreditNote" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "SENT",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/download" : {
      "get" : {
        "tags" : [ "Invoices" ],
        "summary" : "Download invoice PDF",
        "description" : "Download invoice PDF",
        "operationId" : "getInvoicesByIdDownload",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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" : { }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/mark-as-sent" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Finalize and mark invoice as sent without triggering actions except revenue recognition",
        "description" : "Finalizes an invoice (if not already finalized) and sets its status to SENT. Emails or notifications are not sent. Integration syncs do not happen. Journal entries are created for the invoice.",
        "operationId" : "postInvoicesByIdMarkAsSent",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/Invoice",
                  "example" : {
                    "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                    "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                    "status" : "SENT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV2",
                    "dueDate" : "2022-11-05",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "line2" : "",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                    "totalTax" : "2",
                    "netTotal" : "12",
                    "grossTotal" : "10",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                    "linkedServices" : [ {
                      "externalId" : "ID",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "Flat 1",
                        "line2" : "123 Fake Street",
                        "town" : "New York",
                        "state" : "NY",
                        "postcode" : "AB1 2EF",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "123456",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "legalCompanyName" : "The Merchant",
                      "customFields" : [ ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "accountingDate" : "2022-10-05",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-10-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "SENT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{invoice}/line-item-groups/{id}" : {
      "put" : {
        "tags" : [ "Invoice Line Items" ],
        "summary" : "Update a Line Item Group",
        "description" : "Update a Line Item Group",
        "operationId" : "putInvoicesByInvoiceLineItemGroupsById",
        "parameters" : [ {
          "name" : "invoice",
          "in" : "path",
          "description" : "The Invoice ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "id",
          "in" : "path",
          "description" : "Line Item Group 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/UpdateLineItemGroupRequestModel",
                "example" : {
                  "title" : "Users",
                  "description" : "Charges for users",
                  "taxCategoryId" : "28227c88-6dba-455f-9b30-b9c76957e610",
                  "revenueRecognitionMethod" : "STRAIGHT_LINE",
                  "revenueClassification" : "EARNED",
                  "servicePeriod" : {
                    "start" : "2022-10-20",
                    "endInclusive" : "2022-10-24"
                  },
                  "index" : 10
                }
              },
              "examples" : {
                "UpdateLineItemGroupRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "title" : "Users",
                    "description" : "Charges for users",
                    "taxCategoryId" : "28227c88-6dba-455f-9b30-b9c76957e610",
                    "revenueRecognitionMethod" : "STRAIGHT_LINE",
                    "revenueClassification" : "EARNED",
                    "servicePeriod" : {
                      "start" : "2022-10-20",
                      "endInclusive" : "2022-10-24"
                    },
                    "index" : 10
                  }
                }
              }
            }
          },
          "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/LineItemGroupResponseModel",
                  "example" : {
                    "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
                    "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "title" : "Cars",
                    "description" : "Charges for cars",
                    "index" : 1,
                    "netTotal" : "200000.00",
                    "totalTax" : "10.00",
                    "grossTotal" : "22000.00",
                    "taxCategory" : {
                      "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
                      "name" : "VAT"
                    }
                  }
                },
                "examples" : {
                  "LineItemGroupResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
                      "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "title" : "Cars",
                      "description" : "Charges for cars",
                      "index" : 1,
                      "netTotal" : "200000.00",
                      "totalTax" : "10.00",
                      "grossTotal" : "22000.00",
                      "taxCategory" : {
                        "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
                        "name" : "VAT"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete" : {
        "tags" : [ "Invoice Line Items" ],
        "summary" : "Delete a Line Item Group",
        "description" : "Delete a Line Item Group",
        "operationId" : "deleteInvoicesByInvoiceLineItemGroupsById",
        "parameters" : [ {
          "name" : "invoice",
          "in" : "path",
          "description" : "The Invoice ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "id",
          "in" : "path",
          "description" : "Line Item Group 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/LineItemGroupResponseModel",
                  "example" : {
                    "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
                    "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "title" : "Cars",
                    "description" : "Charges for cars",
                    "index" : 1,
                    "netTotal" : "200000.00",
                    "totalTax" : "10.00",
                    "grossTotal" : "22000.00",
                    "taxCategory" : {
                      "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
                      "name" : "VAT"
                    }
                  }
                },
                "examples" : {
                  "LineItemGroupResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
                      "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "title" : "Cars",
                      "description" : "Charges for cars",
                      "index" : 1,
                      "netTotal" : "200000.00",
                      "totalTax" : "10.00",
                      "grossTotal" : "22000.00",
                      "taxCategory" : {
                        "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
                        "name" : "VAT"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/render-settings" : {
      "get" : {
        "tags" : [ "Invoice Settings" ],
        "summary" : "Get or create Invoice Render Settings",
        "description" : "Returns invoice render settings or creates new settings if they do not exist",
        "operationId" : "getInvoicesRenderSettings",
        "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/GetOrCreateInvoiceRenderSettingsEndpointProductCreateInvoiceRenderSettingsResponseModel",
                  "example" : {
                    "id" : "385f41ab-51f9-49c2-8f25-358545106b88",
                    "paymentLinkDisplay" : "SHOW_PAYMENT_LINK",
                    "currencyConversionDisplay" : "SHOW_CURRENCY_CONVERSION"
                  }
                },
                "examples" : {
                  "GetOrCreateInvoiceRenderSettingsEndpointProductCreateInvoiceRenderSettingsResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "385f41ab-51f9-49c2-8f25-358545106b88",
                      "paymentLinkDisplay" : "SHOW_PAYMENT_LINK",
                      "currencyConversionDisplay" : "SHOW_CURRENCY_CONVERSION"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/sent" : {
      "patch" : {
        "tags" : [ "Invoices" ],
        "summary" : "Patch a sent invoice",
        "description" : "Patch fields on a SENT invoice. Supports updating the purchase order number, customer legal company name, customer billing address, memo, reference, and due date. Setting a due date records it as manually chosen and clears the invoice's stored payment terms, so it will not be recomputed from them later. Neither the due date nor the customer legal company name can be cleared: sending an explicit null for either is rejected.",
        "operationId" : "patchInvoicesByIdSent",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/PatchSentInvoiceEndpointPatchSentInvoiceRequest",
                "example" : {
                  "purchaseOrderNumber" : "PO-12345",
                  "customerLegalCompanyName" : "Acme Corporation Ltd",
                  "dueDate" : "2026-09-29"
                }
              },
              "examples" : {
                "PatchSentInvoiceEndpointPatchSentInvoiceRequest" : {
                  "summary" : "",
                  "value" : {
                    "purchaseOrderNumber" : "PO-12345",
                    "customerLegalCompanyName" : "Acme Corporation Ltd",
                    "dueDate" : "2026-09-29"
                  }
                }
              }
            }
          },
          "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/Invoice",
                  "example" : {
                    "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV00001",
                    "issueDate" : "2022-09-15",
                    "dueDate" : "2022-09-30",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ],
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "finance@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                    "dunningStatus" : "SCHEDULED",
                    "accountingDate" : "2022-09-30",
                    "calculatedAt" : "2022-09-30T00:00:00Z",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-09-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV00001",
                      "issueDate" : "2022-09-15",
                      "dueDate" : "2022-09-30",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ],
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "finance@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                      "dunningStatus" : "SCHEDULED",
                      "accountingDate" : "2022-09-30",
                      "calculatedAt" : "2022-09-30T00:00:00Z",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-09-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/send-payment-reminder" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Send a payment reminder for an invoice",
        "description" : "Send a payment reminder to the billing contacts for an invoice",
        "operationId" : "postInvoicesByIdSendPaymentReminder",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/Invoice",
                  "example" : {
                    "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                    "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV2",
                    "dueDate" : "2022-11-05",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "line2" : "",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                    "totalTax" : "2",
                    "netTotal" : "12",
                    "grossTotal" : "10",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                    "linkedServices" : [ {
                      "externalId" : "ID",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "Flat 1",
                        "line2" : "123 Fake Street",
                        "town" : "New York",
                        "state" : "NY",
                        "postcode" : "AB1 2EF",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "123456",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "legalCompanyName" : "The Merchant",
                      "customFields" : [ ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "accountingDate" : "2022-10-05",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-10-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-note-applications" : {
      "post" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Apply a Credit Note to an Invoice",
        "description" : "Allocates an amount from a Credit Note's balance to an Invoice's balance.",
        "operationId" : "postCreditNoteApplications",
        "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/CreateCreditNoteApplicationEndpointCreateCreditNoteApplicationRequestModel",
                "example" : {
                  "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                  "invoiceId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                  "amount" : 50,
                  "currency" : "USD",
                  "creditNoteBalanceVersion" : 3,
                  "invoiceBalanceVersion" : 7
                }
              },
              "examples" : {
                "CreateCreditNoteApplicationEndpointCreateCreditNoteApplicationRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "amount" : 50,
                    "currency" : "USD",
                    "creditNoteBalanceVersion" : 3,
                    "invoiceBalanceVersion" : 7
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "200" : {
            "description" : "OK",
            "content" : { }
          },
          "201" : {
            "description" : "Created",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/CreditNoteApplicationResponse",
                  "example" : {
                    "ledgerTransactionId" : "0192c1b6-7f3a-7000-8000-000000000001",
                    "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "amount" : 50,
                    "currency" : "USD",
                    "appliedAt" : "2026-05-28T12:34:56Z",
                    "invoiceBalance" : {
                      "value" : 150,
                      "currency" : "USD",
                      "version" : 8
                    },
                    "creditNoteBalance" : {
                      "value" : 50,
                      "currency" : "USD",
                      "version" : 4
                    }
                  }
                },
                "examples" : {
                  "CreditNoteApplicationResponse" : {
                    "summary" : "",
                    "value" : {
                      "ledgerTransactionId" : "0192c1b6-7f3a-7000-8000-000000000001",
                      "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "amount" : 50,
                      "currency" : "USD",
                      "appliedAt" : "2026-05-28T12:34:56Z",
                      "invoiceBalance" : {
                        "value" : 150,
                        "currency" : "USD",
                        "version" : 8
                      },
                      "creditNoteBalance" : {
                        "value" : 50,
                        "currency" : "USD",
                        "version" : 4
                      }
                    }
                  }
                }
              }
            }
          },
          "409" : {
            "description" : "Conflict",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/VersionConflictResponse",
                  "example" : {
                    "message" : "Balance version mismatch. Re-read current versions and retry.",
                    "currentInvoiceBalance" : {
                      "value" : 150,
                      "currency" : "USD",
                      "version" : 8
                    },
                    "currentCreditNoteBalance" : {
                      "value" : 50,
                      "currency" : "USD",
                      "version" : 4
                    }
                  }
                },
                "examples" : {
                  "VersionConflictResponse" : {
                    "summary" : "",
                    "value" : {
                      "message" : "Balance version mismatch. Re-read current versions and retry.",
                      "currentInvoiceBalance" : {
                        "value" : 150,
                        "currency" : "USD",
                        "version" : 8
                      },
                      "currentCreditNoteBalance" : {
                        "value" : 50,
                        "currency" : "USD",
                        "version" : 4
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{id}/mark-as-sent" : {
      "post" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Mark credit note as sent without triggering actions except revenue recognition",
        "description" : "Finalizes a credit note (if not already finalized) and sets its status to SENT. Emails or notifications are not sent. Integration syncs do not happen. Journal entries are created for the credit note.",
        "operationId" : "postCreditNotesByIdMarkAsSent",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note 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/CreditNote",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "status" : "SENT",
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceNumber" : "INV00001",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "issueDate" : "2022-09-15",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "creditNoteNumber" : "CN00001",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "applicationStatus" : "PARTIALLY_APPLIED",
                    "balance" : "51.23",
                    "balanceVersion" : 3,
                    "applications" : [ {
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "amount" : "50.00",
                      "appliedAt" : "2022-10-14T12:34:56Z"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "12345678"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : true
                    },
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                },
                "examples" : {
                  "CreditNote" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "SENT",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/fix-billing-runs" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Fix invoices billing runs",
        "description" : "Fix invoices with missing billing runs",
        "operationId" : "postInvoicesFixBillingRuns",
        "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" : { }
          },
          "202" : {
            "description" : "Accepted",
            "content" : { }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{invoice}/line-items/{id}" : {
      "put" : {
        "tags" : [ "Invoice Line Items" ],
        "summary" : "Update a line item",
        "description" : "Update a line item on an invoice",
        "operationId" : "putInvoicesByInvoiceLineItemsById",
        "parameters" : [ {
          "name" : "invoice",
          "in" : "path",
          "description" : "The Invoice ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "id",
          "in" : "path",
          "description" : "Line Item 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/Stable20240101CreateOrUpdateLineItem",
                "example" : {
                  "title" : "Ferraris",
                  "description" : "Red",
                  "quantity" : "2",
                  "rate" : "20000.10",
                  "taxRate" : "0.2",
                  "servicePeriodStart" : "2022-10-20T00:00:00Z",
                  "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                  "servicePeriod" : {
                    "startDate" : "2022-10-20",
                    "endDate" : "2022-10-24"
                  },
                  "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                  "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                  "rateDisplay" : "ABSOLUTE",
                  "externalIds" : [ {
                    "key" : "Xero",
                    "value" : "123"
                  } ],
                  "revenueClassification" : "EARNED",
                  "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                  "revenueRecognitionMethod" : "STRAIGHT_LINE"
                }
              },
              "examples" : {
                "Stable20240101CreateOrUpdateLineItem" : {
                  "summary" : "",
                  "value" : {
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "servicePeriodStart" : "2022-10-20T00:00:00Z",
                    "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                    "servicePeriod" : {
                      "startDate" : "2022-10-20",
                      "endDate" : "2022-10-24"
                    },
                    "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ],
                    "revenueClassification" : "EARNED",
                    "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "revenueRecognitionMethod" : "STRAIGHT_LINE"
                  }
                }
              }
            }
          },
          "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/Stable20240101LineItemResponse",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "servicePeriodStart" : "2022-10-20T00:00:00Z",
                    "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                    "servicePeriod" : {
                      "startDate" : "2022-10-20",
                      "endDate" : "2022-10-24"
                    },
                    "index" : 2,
                    "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "netTotal" : "51.20",
                    "totalTax" : "2.50",
                    "grossTotal" : "101.23",
                    "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ],
                    "revenueClassification" : "EARNED",
                    "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
                    "revenueRecognitionMethod" : "USAGE"
                  }
                },
                "examples" : {
                  "Stable20240101LineItemResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "title" : "Ferraris",
                      "description" : "Red",
                      "quantity" : "2",
                      "rate" : "20000.10",
                      "taxRate" : "0.2",
                      "servicePeriodStart" : "2022-10-20T00:00:00Z",
                      "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                      "servicePeriod" : {
                        "startDate" : "2022-10-20",
                        "endDate" : "2022-10-24"
                      },
                      "index" : 2,
                      "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "netTotal" : "51.20",
                      "totalTax" : "2.50",
                      "grossTotal" : "101.23",
                      "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "rateDisplay" : "ABSOLUTE",
                      "externalIds" : [ {
                        "key" : "Xero",
                        "value" : "123"
                      } ],
                      "revenueClassification" : "EARNED",
                      "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
                      "revenueRecognitionMethod" : "USAGE"
                    }
                  }
                }
              }
            }
          },
          "404" : {
            "description" : "Not Found",
            "content" : { }
          }
        }
      },
      "delete" : {
        "tags" : [ "Invoice Line Items" ],
        "summary" : "Deletes a Line Item",
        "description" : "Deletes a Line Item",
        "operationId" : "deleteInvoicesByInvoiceLineItemsById",
        "parameters" : [ {
          "name" : "invoice",
          "in" : "path",
          "description" : "The Invoice ID",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "id",
          "in" : "path",
          "description" : "Line Item 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/Stable20240101LineItemResponse",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "title" : "Ferraris",
                    "description" : "Red",
                    "quantity" : "2",
                    "rate" : "20000.10",
                    "taxRate" : "0.2",
                    "servicePeriodStart" : "2022-10-20T00:00:00Z",
                    "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                    "servicePeriod" : {
                      "startDate" : "2022-10-20",
                      "endDate" : "2022-10-24"
                    },
                    "index" : 2,
                    "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                    "netTotal" : "51.20",
                    "totalTax" : "2.50",
                    "grossTotal" : "101.23",
                    "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "rateDisplay" : "ABSOLUTE",
                    "externalIds" : [ {
                      "key" : "Xero",
                      "value" : "123"
                    } ],
                    "revenueClassification" : "EARNED",
                    "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
                    "revenueRecognitionMethod" : "USAGE"
                  }
                },
                "examples" : {
                  "Stable20240101LineItemResponse" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "title" : "Ferraris",
                      "description" : "Red",
                      "quantity" : "2",
                      "rate" : "20000.10",
                      "taxRate" : "0.2",
                      "servicePeriodStart" : "2022-10-20T00:00:00Z",
                      "servicePeriodEnd" : "2022-10-24T00:00:00Z",
                      "servicePeriod" : {
                        "startDate" : "2022-10-20",
                        "endDate" : "2022-10-24"
                      },
                      "index" : 2,
                      "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
                      "netTotal" : "51.20",
                      "totalTax" : "2.50",
                      "grossTotal" : "101.23",
                      "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "rateDisplay" : "ABSOLUTE",
                      "externalIds" : [ {
                        "key" : "Xero",
                        "value" : "123"
                      } ],
                      "revenueClassification" : "EARNED",
                      "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
                      "revenueRecognitionMethod" : "USAGE"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes" : {
      "get" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "List all Credit Notes",
        "description" : "List all Credit Notes for this Sequence account",
        "operationId" : "getCreditNotes",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "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",
            "format" : "int32"
          }
        }, {
          "name" : "sortOrder",
          "in" : "query",
          "description" : "Sort order. Default: DESC (descending, most often used for reverse chronological sorting).",
          "required" : false,
          "schema" : {
            "type" : "string",
            "enum" : [ "ASC", "DESC" ]
          }
        }, {
          "name" : "sortBy",
          "in" : "query",
          "description" : "Sort column. Default: creation time. Options: GROSS_TOTAL, CREDIT_NOTE_NUMBER, STATUS",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "creditNoteStatus",
          "in" : "query",
          "description" : "Filter by credit note status. Options: DRAFT, FINAL, SENT, VOIDED",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "customerId",
          "in" : "query",
          "description" : "Filter by customer id.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sentBefore",
          "in" : "query",
          "description" : "Filter by sent date before. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sentAfter",
          "in" : "query",
          "description" : "Filter by sent date after. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "searchCreditNoteNumber",
          "in" : "query",
          "description" : "Search credit notes by credit note number (partial, case-insensitive match)",
          "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/ListCreditNoteEndpointProductListCreditNotePaginatedResponseModel",
                  "example" : {
                    "items" : [ {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "SENT",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    } ],
                    "pagination" : {
                      "after" : "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==",
                      "before" : "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND",
                      "totalResultSize" : 100
                    }
                  }
                },
                "examples" : {
                  "ListCreditNoteEndpointProductListCreditNotePaginatedResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "items" : [ {
                        "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                        "status" : "SENT",
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                        "currency" : "GBP",
                        "issueDate" : "2022-09-15",
                        "billingPeriodStart" : "2022-10-01T00:00:00Z",
                        "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                        "creditNoteNumber" : "CN00001",
                        "purchaseOrderNumber" : "PO123",
                        "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                        "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                        "customerLegalCompanyName" : "Facebook",
                        "customerBillingAddress" : {
                          "line1" : "Flat 1",
                          "line2" : "15 Yemen Road",
                          "town" : "Yemen",
                          "state" : "CA",
                          "postcode" : "YE1 2YE",
                          "country" : "YE"
                        },
                        "customerShippingAddress" : {
                          "line1" : "742 Evergreen Terrace",
                          "town" : "Springfield",
                          "state" : "CA",
                          "postcode" : "12345",
                          "country" : "US"
                        },
                        "memo" : "Thanks",
                        "totalTax" : "2.50",
                        "netTotal" : "51.20",
                        "grossTotal" : "101.23",
                        "metadata" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "customerTaxId" : "TAX123",
                        "linkedServices" : [ {
                          "externalId" : "123",
                          "externalService" : "Xero",
                          "syncTime" : "2022-06-28T16:47:00Z",
                          "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                        } ],
                        "applicationStatus" : "PARTIALLY_APPLIED",
                        "balance" : "51.23",
                        "balanceVersion" : 3,
                        "applications" : [ {
                          "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                          "invoiceNumber" : "INV00001",
                          "amount" : "50.00",
                          "appliedAt" : "2022-10-14T12:34:56Z"
                        } ],
                        "merchantDetails" : {
                          "address" : {
                            "line1" : "The White House",
                            "line2" : "1600 Pennsylvania Avenue",
                            "town" : "Washington, D.C.",
                            "state" : "CA",
                            "postcode" : "20500",
                            "country" : "US"
                          },
                          "phoneNumber" : "0800001066",
                          "email" : "donald@example.com",
                          "taxId" : "TAX60",
                          "iban" : "GB33BUKB20201555555555",
                          "ukAccountDetails" : {
                            "sortCode" : "000000",
                            "accountNumber" : "12345678"
                          },
                          "usAchDetails" : {
                            "accountNumber" : "12345678",
                            "accountName" : "John Doe",
                            "bankName" : "Chase",
                            "bankRoutingNumber" : "123456789"
                          },
                          "usWireDetails" : {
                            "accountNumber" : "12345678",
                            "accountName" : "John Doe",
                            "bankName" : "Chase",
                            "bankRoutingNumber" : "123456789",
                            "swiftCode" : "CHASUS33",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            }
                          },
                          "caBankAccountDetails" : {
                            "transitNumber" : "123",
                            "institutionNumber" : "12345",
                            "accountNumber" : "1234567"
                          },
                          "canadianInternationalDestination" : {
                            "legalName" : "John Doe",
                            "accountNumber" : "12345678",
                            "transitNumber" : "12345",
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "institutionNumber" : "123",
                            "swiftCode" : "CHASUS33",
                            "intermediaryBank" : {
                              "bankName" : "Chase",
                              "bankAddress" : {
                                "line1" : "JP Morgan Chase",
                                "town" : "New York City",
                                "state" : "NY",
                                "postcode" : "10017",
                                "country" : "US"
                              },
                              "swiftCode" : "CHASUS33",
                              "routingNumber" : "123456789"
                            }
                          },
                          "australianDestination" : {
                            "legalName" : "John Doe",
                            "accountNumber" : "12345678",
                            "swiftCode" : "CHASUS33",
                            "bsb" : "123456"
                          },
                          "swedishBankgiroDestination" : {
                            "bankgiroNumber" : "123-4567",
                            "accountName" : "12345678"
                          },
                          "logoUrl" : "logo",
                          "legalCompanyName" : "The Merchant",
                          "primaryColour" : "#000000",
                          "customFields" : [ {
                            "key" : "example-label",
                            "value" : "label-value"
                          } ],
                          "includeBeneficiaryAddressInPaymentDetails" : true
                        },
                        "settings" : {
                          "generateCashCreditGrant" : "ENABLED"
                        },
                        "accountingDate" : "2022-09-30"
                      } ],
                      "pagination" : {
                        "after" : "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==",
                        "before" : "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND",
                        "totalResultSize" : 100
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Create a new Credit Note",
        "description" : "Create a new Credit Note",
        "operationId" : "postCreditNotes",
        "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/CreateCreditNoteEndpointCreateCreditNoteRequestModel",
                "example" : {
                  "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                  "currency" : "GBP",
                  "billingPeriodStart" : "2022-10-01T00:00:00Z",
                  "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                  "purchaseOrderNumber" : "PO123",
                  "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                  "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                  "customerLegalCompanyName" : "Facebook",
                  "customerBillingAddress" : {
                    "line1" : "Flat 1",
                    "line2" : "15 Yemen Road",
                    "town" : "Yemen",
                    "state" : "CA",
                    "postcode" : "YE1 2YE",
                    "country" : "YE"
                  },
                  "customerShippingAddress" : {
                    "line1" : "742 Evergreen Terrace",
                    "town" : "Springfield",
                    "state" : "CA",
                    "postcode" : "12345",
                    "country" : "US"
                  },
                  "memo" : "Thanks",
                  "metadata" : [ {
                    "key" : "example-label",
                    "value" : "label-value"
                  } ],
                  "customerTaxId" : "TAX123",
                  "accountingDate" : "2025-08-29"
                }
              },
              "examples" : {
                "CreateCreditNoteEndpointCreateCreditNoteRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "currency" : "GBP",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "accountingDate" : "2025-08-29"
                  }
                }
              }
            }
          },
          "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/CreditNote",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "status" : "SENT",
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceNumber" : "INV00001",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "issueDate" : "2022-09-15",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "creditNoteNumber" : "CN00001",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "applicationStatus" : "PARTIALLY_APPLIED",
                    "balance" : "51.23",
                    "balanceVersion" : 3,
                    "applications" : [ {
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "amount" : "50.00",
                      "appliedAt" : "2022-10-14T12:34:56Z"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "12345678"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : true
                    },
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                },
                "examples" : {
                  "CreditNote" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "SENT",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/finalize-and-send" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Finalize and send invoice",
        "description" : "Updates to SENT status, generates invoice PDF and sends to end-customer",
        "operationId" : "postInvoicesByIdFinalizeAndSend",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/Invoice",
                  "example" : {
                    "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                    "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV2",
                    "dueDate" : "2022-11-05",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "line2" : "",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                    "totalTax" : "2",
                    "netTotal" : "12",
                    "grossTotal" : "10",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                    "linkedServices" : [ {
                      "externalId" : "ID",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "Flat 1",
                        "line2" : "123 Fake Street",
                        "town" : "New York",
                        "state" : "NY",
                        "postcode" : "AB1 2EF",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "123456",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "legalCompanyName" : "The Merchant",
                      "customFields" : [ ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "accountingDate" : "2022-10-05",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-10-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/summary" : {
      "get" : {
        "tags" : [ "Invoices" ],
        "summary" : "Get an invoice summary",
        "description" : "Returns aggregate invoice totals (count and gross total) grouped by currency for the invoices matching the supplied filters. Totals cover the whole matching set, so accurate figures can be retrieved in a single request without paginating.",
        "operationId" : "getInvoicesSummary",
        "parameters" : [ {
          "name" : "Authorization",
          "in" : "header",
          "description" : "Your [API credentials](/reference/authentication). Eg. `Basic {credentials}`.",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceStatus",
          "in" : "query",
          "description" : "Filter by invoice status. Options: IN_PROGRESS, DRAFT, FINAL, SENT, VOIDED",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoicePaymentStatus",
          "in" : "query",
          "description" : "Filter by payment status. Options: UNPAID, PARTIALLY_PAID, PAID, UNCOLLECTIBLE",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "customerId",
          "in" : "query",
          "description" : "Filter by customer id.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "billingScheduleId",
          "in" : "query",
          "description" : "Filter by billing schedule id.",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "dueBefore",
          "in" : "query",
          "description" : "Filter by due date before. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "dueAfter",
          "in" : "query",
          "description" : "Filter by due date after. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sentBefore",
          "in" : "query",
          "description" : "Filter by sent date before. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "sentAfter",
          "in" : "query",
          "description" : "Filter by sent date after. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceBefore",
          "in" : "query",
          "description" : "Filter by invoice date before. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceAfter",
          "in" : "query",
          "description" : "Filter by invoice date after. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "billingPeriodBefore",
          "in" : "query",
          "description" : "Filter by billing period ending on or before this date. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "name" : "billingPeriodAfter",
          "in" : "query",
          "description" : "Filter by billing period starting on or after this date. Format: yyyy-MM-dd",
          "required" : false,
          "schema" : {
            "type" : "string",
            "format" : "date"
          }
        }, {
          "name" : "excludeZeroQuantity",
          "in" : "query",
          "description" : "Exclude invoices with zero quantity.",
          "required" : false,
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "name" : "invoiceCurrency",
          "in" : "query",
          "description" : "Get invoices for a specific currency (provide a comma-separated list)",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "search",
          "in" : "query",
          "description" : "Search invoices by invoice number (partial, case-insensitive match)",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "invoiceNumber",
          "in" : "query",
          "description" : "Filter by invoice number",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "netTotal",
          "in" : "query",
          "description" : "Filter by net total amount",
          "required" : false,
          "schema" : {
            "type" : "number"
          }
        }, {
          "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/InvoiceSummaryResponse",
                  "example" : {
                    "totalsByCurrency" : [ {
                      "currency" : "GBP",
                      "invoiceCount" : 12,
                      "grossTotal" : 15400
                    }, {
                      "currency" : "USD",
                      "invoiceCount" : 3,
                      "grossTotal" : 980.5
                    } ]
                  }
                },
                "examples" : {
                  "InvoiceSummaryResponse" : {
                    "summary" : "",
                    "value" : {
                      "totalsByCurrency" : [ {
                        "currency" : "GBP",
                        "invoiceCount" : 12,
                        "grossTotal" : 15400
                      }, {
                        "currency" : "USD",
                        "invoiceCount" : 3,
                        "grossTotal" : 980.5
                      } ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/merge" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Merge invoices",
        "description" : "Merge multiple draft invoices into one",
        "operationId" : "postInvoicesMerge",
        "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/MergeInvoicesEndpointRequestBody",
                "example" : {
                  "invoiceIds" : [ "bd39e664-a4a2-4515-bd7e-6bc91d484498", "6582c475-7e29-4ea4-b8f8-f071032573a0" ]
                }
              },
              "examples" : {
                "MergeInvoicesEndpointRequestBody" : {
                  "summary" : "",
                  "value" : {
                    "invoiceIds" : [ "bd39e664-a4a2-4515-bd7e-6bc91d484498", "6582c475-7e29-4ea4-b8f8-f071032573a0" ]
                  }
                }
              }
            }
          },
          "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/Invoice",
                  "example" : {
                    "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV00001",
                    "issueDate" : "2022-09-15",
                    "dueDate" : "2022-09-30",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ],
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "finance@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                    "dunningStatus" : "SCHEDULED",
                    "accountingDate" : "2022-09-30",
                    "calculatedAt" : "2022-09-30T00:00:00Z",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-09-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV00001",
                      "issueDate" : "2022-09-15",
                      "dueDate" : "2022-09-30",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ],
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "finance@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
                      "dunningStatus" : "SCHEDULED",
                      "accountingDate" : "2022-09-30",
                      "calculatedAt" : "2022-09-30T00:00:00Z",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-09-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{id}/send" : {
      "post" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Send credit note",
        "description" : "Updates to SENT status and sends to end-customer",
        "operationId" : "postCreditNotesByIdSend",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note 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/CreditNote",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "status" : "SENT",
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceNumber" : "INV00001",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "issueDate" : "2022-09-15",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "creditNoteNumber" : "CN00001",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "applicationStatus" : "PARTIALLY_APPLIED",
                    "balance" : "51.23",
                    "balanceVersion" : 3,
                    "applications" : [ {
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "amount" : "50.00",
                      "appliedAt" : "2022-10-14T12:34:56Z"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "12345678"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : true
                    },
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                },
                "examples" : {
                  "CreditNote" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "SENT",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/reconcile-with-integration" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Reconcile invoices with external integration",
        "description" : "Reconcile invoice properties between our system and integration",
        "operationId" : "postInvoicesReconcileWithIntegration",
        "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/ReconcileInvoicesWithIntegrationEndpointReconcileInvoicesWithIntegrationRequest",
                "example" : {
                  "integrationService" : "Xero",
                  "invoiceIds" : [ ],
                  "propertiesToCompare" : [ "INVOICE_NUMBER", "STATUS" ]
                }
              },
              "examples" : {
                "ReconcileInvoicesWithIntegrationEndpointReconcileInvoicesWithIntegrationRequest" : {
                  "summary" : "",
                  "value" : {
                    "integrationService" : "Xero",
                    "invoiceIds" : [ ],
                    "propertiesToCompare" : [ "INVOICE_NUMBER", "STATUS" ]
                  }
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "400" : {
            "description" : "Bad Request",
            "content" : { }
          },
          "401" : {
            "description" : "Unauthorized",
            "content" : { }
          },
          "500" : {
            "description" : "Internal Server Error",
            "content" : { }
          },
          "202" : {
            "description" : "Accepted",
            "content" : { }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/send" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Send invoice",
        "description" : "Updates to SENT status and sends to end-customer",
        "operationId" : "postInvoicesByIdSend",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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" : "resend",
          "in" : "query",
          "description" : "Set to true to email an invoice that has already been sent. A re-send goes to the customer's current billing contacts rather than the contacts the invoice was originally sent to, and leaves the invoice's status unchanged.",
          "required" : false,
          "schema" : {
            "type" : "boolean"
          }
        }, {
          "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/Invoice",
                  "example" : {
                    "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                    "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV2",
                    "dueDate" : "2022-11-05",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "line2" : "",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                    "totalTax" : "2",
                    "netTotal" : "12",
                    "grossTotal" : "10",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                    "linkedServices" : [ {
                      "externalId" : "ID",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "Flat 1",
                        "line2" : "123 Fake Street",
                        "town" : "New York",
                        "state" : "NY",
                        "postcode" : "AB1 2EF",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "123456",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "legalCompanyName" : "The Merchant",
                      "customFields" : [ ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "accountingDate" : "2022-10-05",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-10-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/payment-status" : {
      "put" : {
        "tags" : [ "Invoices" ],
        "summary" : "Update payment status for an invoice",
        "description" : "Update payment status for an invoice",
        "operationId" : "putInvoicesByIdPaymentStatus",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/UpdateInvoicePaymentStatusEndpointRequestModel",
                "example" : {
                  "paymentStatus" : "PAID"
                }
              },
              "examples" : {
                "UpdateInvoicePaymentStatusEndpointRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "paymentStatus" : "PAID"
                  }
                }
              }
            }
          },
          "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/Invoice",
                  "example" : {
                    "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                    "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV2",
                    "dueDate" : "2022-11-05",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "line2" : "",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                    "totalTax" : "2",
                    "netTotal" : "12",
                    "grossTotal" : "10",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                    "linkedServices" : [ {
                      "externalId" : "ID",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "Flat 1",
                        "line2" : "123 Fake Street",
                        "town" : "New York",
                        "state" : "NY",
                        "postcode" : "AB1 2EF",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "123456",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "legalCompanyName" : "The Merchant",
                      "customFields" : [ ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "accountingDate" : "2022-10-05",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-10-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/render-settings/{id}" : {
      "put" : {
        "tags" : [ "Invoice Settings" ],
        "summary" : "Update an Invoice Render Settings",
        "description" : "Update an Invoice Render Settings",
        "operationId" : "putInvoicesRenderSettingsById",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice settings 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/UpdateInvoiceRenderSettingsEndpointUpdateInvoiceRenderSettingsRequestModel",
                "example" : {
                  "paymentLinkDisplay" : "SHOW_PAYMENT_LINK",
                  "currencyConversionDisplay" : "SHOW_CURRENCY_CONVERSION"
                }
              },
              "examples" : {
                "UpdateInvoiceRenderSettingsEndpointUpdateInvoiceRenderSettingsRequestModel" : {
                  "summary" : "",
                  "value" : {
                    "paymentLinkDisplay" : "SHOW_PAYMENT_LINK",
                    "currencyConversionDisplay" : "SHOW_CURRENCY_CONVERSION"
                  }
                }
              }
            }
          },
          "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/UpdateInvoiceRenderSettingsEndpointProductUpdateInvoiceRenderSettingsResponseModel",
                  "example" : {
                    "id" : "385f41ab-51f9-49c2-8f25-358545106b88",
                    "paymentLinkDisplay" : "SHOW_PAYMENT_LINK",
                    "currencyConversionDisplay" : "SHOW_CURRENCY_CONVERSION"
                  }
                },
                "examples" : {
                  "UpdateInvoiceRenderSettingsEndpointProductUpdateInvoiceRenderSettingsResponseModel" : {
                    "summary" : "",
                    "value" : {
                      "id" : "385f41ab-51f9-49c2-8f25-358545106b88",
                      "paymentLinkDisplay" : "SHOW_PAYMENT_LINK",
                      "currencyConversionDisplay" : "SHOW_CURRENCY_CONVERSION"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{id}/void" : {
      "post" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Void a Credit Note",
        "description" : "Void a Credit Note",
        "operationId" : "postCreditNotesByIdVoid",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note 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/CreditNote",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "status" : "SENT",
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceNumber" : "INV00001",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "issueDate" : "2022-09-15",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "creditNoteNumber" : "CN00001",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "applicationStatus" : "PARTIALLY_APPLIED",
                    "balance" : "51.23",
                    "balanceVersion" : 3,
                    "applications" : [ {
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "amount" : "50.00",
                      "appliedAt" : "2022-10-14T12:34:56Z"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "12345678"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : true
                    },
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                },
                "examples" : {
                  "CreditNote" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "SENT",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/invoices/{id}/void" : {
      "post" : {
        "tags" : [ "Invoices" ],
        "summary" : "Void an Invoice",
        "description" : "Void a DRAFT, FINAL, or SENT invoice. SENT invoices can only be voided if they are UNPAID or UNCOLLECTIBLE",
        "operationId" : "postInvoicesByIdVoid",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Invoice 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/Invoice",
                  "example" : {
                    "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                    "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                    "status" : "DRAFT",
                    "currency" : "GBP",
                    "invoiceNumber" : "INV2",
                    "dueDate" : "2022-11-05",
                    "purchaseOrderNumber" : "PO123",
                    "reference" : "ref",
                    "customerEmails" : [ "customer@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "line2" : "",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "paymentOptions" : [ "BANK_TRANSFER" ],
                    "billingPeriod" : {
                      "start" : "2022-10-01",
                      "endInclusive" : "2022-10-30"
                    },
                    "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                    "totalTax" : "2",
                    "netTotal" : "12",
                    "grossTotal" : "10",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "paymentStatus" : "UNPAID",
                    "createdAt" : "2022-10-30T00:00:00Z",
                    "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                    "linkedServices" : [ {
                      "externalId" : "ID",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "Flat 1",
                        "line2" : "123 Fake Street",
                        "town" : "New York",
                        "state" : "NY",
                        "postcode" : "AB1 2EF",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "123456",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "The Merchant"
                      },
                      "legalCompanyName" : "The Merchant",
                      "customFields" : [ ],
                      "includeBeneficiaryAddressInPaymentDetails" : false
                    },
                    "accountingDate" : "2022-10-05",
                    "customerTaxStatus" : "TAXED",
                    "renderSettings" : {
                      "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                    },
                    "isCustomerArchived" : false,
                    "updatedAt" : "2022-10-30T00:00:00Z"
                  }
                },
                "examples" : {
                  "Invoice" : {
                    "summary" : "",
                    "value" : {
                      "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
                      "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
                      "status" : "DRAFT",
                      "currency" : "GBP",
                      "invoiceNumber" : "INV2",
                      "dueDate" : "2022-11-05",
                      "purchaseOrderNumber" : "PO123",
                      "reference" : "ref",
                      "customerEmails" : [ "customer@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "line2" : "",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "paymentOptions" : [ "BANK_TRANSFER" ],
                      "billingPeriod" : {
                        "start" : "2022-10-01",
                        "endInclusive" : "2022-10-30"
                      },
                      "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
                      "totalTax" : "2",
                      "netTotal" : "12",
                      "grossTotal" : "10",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "paymentStatus" : "UNPAID",
                      "createdAt" : "2022-10-30T00:00:00Z",
                      "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
                      "linkedServices" : [ {
                        "externalId" : "ID",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "Flat 1",
                          "line2" : "123 Fake Street",
                          "town" : "New York",
                          "state" : "NY",
                          "postcode" : "AB1 2EF",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "123456",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "The Merchant"
                        },
                        "legalCompanyName" : "The Merchant",
                        "customFields" : [ ],
                        "includeBeneficiaryAddressInPaymentDetails" : false
                      },
                      "accountingDate" : "2022-10-05",
                      "customerTaxStatus" : "TAXED",
                      "renderSettings" : {
                        "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
                      },
                      "isCustomerArchived" : false,
                      "updatedAt" : "2022-10-30T00:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{id}/download" : {
      "get" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Download credit note PDF",
        "description" : "Download credit note PDF",
        "operationId" : "getCreditNotesByIdDownload",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note 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" : { }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    },
    "/credit-notes/{id}/finalize" : {
      "post" : {
        "tags" : [ "Credit Notes" ],
        "summary" : "Finalize credit note",
        "description" : "Updates to FINAL status, generates credit note PDF and prevents further editing",
        "operationId" : "postCreditNotesByIdFinalize",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "description" : "Credit Note 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/CreditNote",
                  "example" : {
                    "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                    "status" : "FINAL",
                    "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                    "invoiceNumber" : "INV00001",
                    "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                    "currency" : "GBP",
                    "issueDate" : "2022-09-15",
                    "billingPeriodStart" : "2022-10-01T00:00:00Z",
                    "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                    "creditNoteNumber" : "CN00001",
                    "purchaseOrderNumber" : "PO123",
                    "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                    "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                    "customerLegalCompanyName" : "Facebook",
                    "customerBillingAddress" : {
                      "line1" : "Flat 1",
                      "line2" : "15 Yemen Road",
                      "town" : "Yemen",
                      "state" : "CA",
                      "postcode" : "YE1 2YE",
                      "country" : "YE"
                    },
                    "customerShippingAddress" : {
                      "line1" : "742 Evergreen Terrace",
                      "town" : "Springfield",
                      "state" : "CA",
                      "postcode" : "12345",
                      "country" : "US"
                    },
                    "memo" : "Thanks",
                    "totalTax" : "2.50",
                    "netTotal" : "51.20",
                    "grossTotal" : "101.23",
                    "metadata" : [ {
                      "key" : "example-label",
                      "value" : "label-value"
                    } ],
                    "customerTaxId" : "TAX123",
                    "linkedServices" : [ {
                      "externalId" : "123",
                      "externalService" : "Xero",
                      "syncTime" : "2022-06-28T16:47:00Z",
                      "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                    } ],
                    "applicationStatus" : "PARTIALLY_APPLIED",
                    "balance" : "51.23",
                    "balanceVersion" : 3,
                    "applications" : [ {
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "amount" : "50.00",
                      "appliedAt" : "2022-10-14T12:34:56Z"
                    } ],
                    "merchantDetails" : {
                      "address" : {
                        "line1" : "The White House",
                        "line2" : "1600 Pennsylvania Avenue",
                        "town" : "Washington, D.C.",
                        "state" : "CA",
                        "postcode" : "20500",
                        "country" : "US"
                      },
                      "phoneNumber" : "0800001066",
                      "email" : "donald@example.com",
                      "taxId" : "TAX60",
                      "iban" : "GB33BUKB20201555555555",
                      "ukAccountDetails" : {
                        "sortCode" : "000000",
                        "accountNumber" : "12345678"
                      },
                      "usAchDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789"
                      },
                      "usWireDetails" : {
                        "accountNumber" : "12345678",
                        "accountName" : "John Doe",
                        "bankName" : "Chase",
                        "bankRoutingNumber" : "123456789",
                        "swiftCode" : "CHASUS33",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        }
                      },
                      "caBankAccountDetails" : {
                        "transitNumber" : "123",
                        "institutionNumber" : "12345",
                        "accountNumber" : "1234567"
                      },
                      "canadianInternationalDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "transitNumber" : "12345",
                        "bankName" : "Chase",
                        "bankAddress" : {
                          "line1" : "JP Morgan Chase",
                          "town" : "New York City",
                          "state" : "NY",
                          "postcode" : "10017",
                          "country" : "US"
                        },
                        "institutionNumber" : "123",
                        "swiftCode" : "CHASUS33",
                        "intermediaryBank" : {
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "swiftCode" : "CHASUS33",
                          "routingNumber" : "123456789"
                        }
                      },
                      "australianDestination" : {
                        "legalName" : "John Doe",
                        "accountNumber" : "12345678",
                        "swiftCode" : "CHASUS33",
                        "bsb" : "123456"
                      },
                      "swedishBankgiroDestination" : {
                        "bankgiroNumber" : "123-4567",
                        "accountName" : "12345678"
                      },
                      "logoUrl" : "logo",
                      "legalCompanyName" : "The Merchant",
                      "primaryColour" : "#000000",
                      "customFields" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "includeBeneficiaryAddressInPaymentDetails" : true
                    },
                    "settings" : {
                      "generateCashCreditGrant" : "ENABLED"
                    },
                    "accountingDate" : "2022-09-30"
                  }
                },
                "examples" : {
                  "CreditNote" : {
                    "summary" : "",
                    "value" : {
                      "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
                      "status" : "FINAL",
                      "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                      "invoiceNumber" : "INV00001",
                      "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
                      "currency" : "GBP",
                      "issueDate" : "2022-09-15",
                      "billingPeriodStart" : "2022-10-01T00:00:00Z",
                      "billingPeriodEnd" : "2022-10-30T00:00:00Z",
                      "creditNoteNumber" : "CN00001",
                      "purchaseOrderNumber" : "PO123",
                      "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
                      "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
                      "customerLegalCompanyName" : "Facebook",
                      "customerBillingAddress" : {
                        "line1" : "Flat 1",
                        "line2" : "15 Yemen Road",
                        "town" : "Yemen",
                        "state" : "CA",
                        "postcode" : "YE1 2YE",
                        "country" : "YE"
                      },
                      "customerShippingAddress" : {
                        "line1" : "742 Evergreen Terrace",
                        "town" : "Springfield",
                        "state" : "CA",
                        "postcode" : "12345",
                        "country" : "US"
                      },
                      "memo" : "Thanks",
                      "totalTax" : "2.50",
                      "netTotal" : "51.20",
                      "grossTotal" : "101.23",
                      "metadata" : [ {
                        "key" : "example-label",
                        "value" : "label-value"
                      } ],
                      "customerTaxId" : "TAX123",
                      "linkedServices" : [ {
                        "externalId" : "123",
                        "externalService" : "Xero",
                        "syncTime" : "2022-06-28T16:47:00Z",
                        "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
                      } ],
                      "applicationStatus" : "PARTIALLY_APPLIED",
                      "balance" : "51.23",
                      "balanceVersion" : 3,
                      "applications" : [ {
                        "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                        "invoiceNumber" : "INV00001",
                        "amount" : "50.00",
                        "appliedAt" : "2022-10-14T12:34:56Z"
                      } ],
                      "merchantDetails" : {
                        "address" : {
                          "line1" : "The White House",
                          "line2" : "1600 Pennsylvania Avenue",
                          "town" : "Washington, D.C.",
                          "state" : "CA",
                          "postcode" : "20500",
                          "country" : "US"
                        },
                        "phoneNumber" : "0800001066",
                        "email" : "donald@example.com",
                        "taxId" : "TAX60",
                        "iban" : "GB33BUKB20201555555555",
                        "ukAccountDetails" : {
                          "sortCode" : "000000",
                          "accountNumber" : "12345678"
                        },
                        "usAchDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789"
                        },
                        "usWireDetails" : {
                          "accountNumber" : "12345678",
                          "accountName" : "John Doe",
                          "bankName" : "Chase",
                          "bankRoutingNumber" : "123456789",
                          "swiftCode" : "CHASUS33",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          }
                        },
                        "caBankAccountDetails" : {
                          "transitNumber" : "123",
                          "institutionNumber" : "12345",
                          "accountNumber" : "1234567"
                        },
                        "canadianInternationalDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "transitNumber" : "12345",
                          "bankName" : "Chase",
                          "bankAddress" : {
                            "line1" : "JP Morgan Chase",
                            "town" : "New York City",
                            "state" : "NY",
                            "postcode" : "10017",
                            "country" : "US"
                          },
                          "institutionNumber" : "123",
                          "swiftCode" : "CHASUS33",
                          "intermediaryBank" : {
                            "bankName" : "Chase",
                            "bankAddress" : {
                              "line1" : "JP Morgan Chase",
                              "town" : "New York City",
                              "state" : "NY",
                              "postcode" : "10017",
                              "country" : "US"
                            },
                            "swiftCode" : "CHASUS33",
                            "routingNumber" : "123456789"
                          }
                        },
                        "australianDestination" : {
                          "legalName" : "John Doe",
                          "accountNumber" : "12345678",
                          "swiftCode" : "CHASUS33",
                          "bsb" : "123456"
                        },
                        "swedishBankgiroDestination" : {
                          "bankgiroNumber" : "123-4567",
                          "accountName" : "12345678"
                        },
                        "logoUrl" : "logo",
                        "legalCompanyName" : "The Merchant",
                        "primaryColour" : "#000000",
                        "customFields" : [ {
                          "key" : "example-label",
                          "value" : "label-value"
                        } ],
                        "includeBeneficiaryAddressInPaymentDetails" : true
                      },
                      "settings" : {
                        "generateCashCreditGrant" : "ENABLED"
                      },
                      "accountingDate" : "2022-09-30"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "servers" : [ ],
      "parameters" : [ ]
    }
  },
  "components" : {
    "schemas" : {
      "Invoice" : {
        "required" : [ "accountingDate", "createdAt", "creditNoteIds", "currency", "customerBillingAddress", "customerEmails", "customerId", "customerLegalCompanyName", "customerShippingAddress", "grossTotal", "id", "isCustomerArchived", "linkedServices", "metadata", "netTotal", "paymentStatus", "renderSettings", "sequenceAccountId", "status", "totalTax", "updatedAt" ],
        "type" : "object",
        "example" : {
          "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
          "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
          "status" : "DRAFT",
          "currency" : "GBP",
          "invoiceNumber" : "INV2",
          "dueDate" : "2022-11-05",
          "purchaseOrderNumber" : "PO123",
          "reference" : "ref",
          "customerEmails" : [ "customer@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "line2" : "",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "paymentOptions" : [ "BANK_TRANSFER" ],
          "billingPeriod" : {
            "start" : "2022-10-01",
            "endInclusive" : "2022-10-30"
          },
          "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
          "totalTax" : "2",
          "netTotal" : "12",
          "grossTotal" : "10",
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "paymentStatus" : "UNPAID",
          "createdAt" : "2022-10-30T00:00:00Z",
          "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
          "linkedServices" : [ {
            "externalId" : "ID",
            "externalService" : "Xero",
            "syncTime" : "2022-06-28T16:47:00Z",
            "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
          } ],
          "merchantDetails" : {
            "address" : {
              "line1" : "Flat 1",
              "line2" : "123 Fake Street",
              "town" : "New York",
              "state" : "NY",
              "postcode" : "AB1 2EF",
              "country" : "US"
            },
            "phoneNumber" : "0800001066",
            "email" : "donald@example.com",
            "taxId" : "TAX",
            "iban" : "GB33BUKB20201555555555",
            "ukAccountDetails" : {
              "sortCode" : "123456",
              "accountNumber" : "12345678"
            },
            "usAchDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789"
            },
            "usWireDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789",
              "swiftCode" : "CHASUS33",
              "bankAddress" : {
                "line1" : "JP Morgan Chase",
                "town" : "New York City",
                "state" : "NY",
                "postcode" : "10017",
                "country" : "US"
              }
            },
            "swedishBankgiroDestination" : {
              "bankgiroNumber" : "123-4567",
              "accountName" : "The Merchant"
            },
            "legalCompanyName" : "The Merchant",
            "customFields" : [ ],
            "includeBeneficiaryAddressInPaymentDetails" : false
          },
          "accountingDate" : "2022-10-05",
          "customerTaxStatus" : "TAXED",
          "renderSettings" : {
            "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
          },
          "isCustomerArchived" : false,
          "updatedAt" : "2022-10-30T00:00:00Z"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Invoice ID",
            "example" : "ba37a392-7054-4dae-ab37-6fee9e23fe06"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence Account ID",
            "example" : "af9b5988-1d7b-45f6-a188-326df5e59b24"
          },
          "status" : {
            "description" : "Invoice status",
            "$ref" : "#/components/schemas/InvoiceStatus"
          },
          "currency" : {
            "description" : "Invoice currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "invoiceNumber" : {
            "type" : "string",
            "description" : "Invoice number",
            "nullable" : true,
            "example" : "INV2"
          },
          "dueDate" : {
            "type" : "string",
            "description" : "Due date",
            "nullable" : true,
            "example" : "2022-11-05"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "reference" : {
            "type" : "string",
            "description" : "Reference",
            "nullable" : true,
            "example" : "ref"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer email addresses, used for sending the Invoice if provided",
            "example" : [ "customer@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Invoice memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "paymentOptions" : {
            "type" : "array",
            "description" : "Invoice payment options",
            "nullable" : true,
            "example" : [ "BANK_TRANSFER" ],
            "items" : {
              "$ref" : "#/components/schemas/InvoicePaymentOption"
            }
          },
          "billingPeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the Customer this invoice is linked to",
            "example" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax, in decimal format of the Invoice's currency",
            "example" : "2"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total, in decimal format of the Invoice's currency",
            "example" : "12"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total, in decimal format of the Invoice's currency",
            "example" : "10"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.",
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "paymentStatus" : {
            "description" : "Invoice payment status",
            "$ref" : "#/components/schemas/InvoicePaymentStatus"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Creation time",
            "example" : "2022-10-30T00:00:00Z"
          },
          "creditNoteIds" : {
            "type" : "array",
            "description" : "IDs of linked credit notes (if any)",
            "example" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
            "items" : {
              "type" : "string"
            }
          },
          "linkedServices" : {
            "type" : "array",
            "description" : "External services which are linked to this invoice",
            "example" : [ {
              "externalId" : "ID",
              "externalService" : "Xero",
              "syncTime" : "2022-06-28T16:47:00Z",
              "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/LinkInfo"
            }
          },
          "merchantDetails" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InvoiceMerchantDetails"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "example" : "2022-10-05"
          },
          "customerTaxStatus" : {
            "description" : "Customer tax status",
            "nullable" : true,
            "$ref" : "#/components/schemas/TaxStatus"
          },
          "renderSettings" : {
            "$ref" : "#/components/schemas/InvoiceRenderSettingsInlineAggregate"
          },
          "isCustomerArchived" : {
            "type" : "boolean",
            "example" : false
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Last updated time",
            "example" : "2022-10-30T00:00:00Z"
          },
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Billing Schedule ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "issueDate" : {
            "type" : "string",
            "description" : "Issue date",
            "nullable" : true,
            "example" : "2022-09-15"
          },
          "customerTaxId" : {
            "type" : "string",
            "description" : "Customer's tax ID",
            "nullable" : true,
            "example" : "TAX123"
          },
          "creditBalances" : {
            "type" : "string",
            "description" : "Credit balances",
            "nullable" : true,
            "example" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)"
          },
          "dunningStatus" : {
            "description" : "Dunning status",
            "nullable" : true,
            "$ref" : "#/components/schemas/InvoiceDunningStatus"
          },
          "calculatedAt" : {
            "type" : "string",
            "description" : "Time this invoice was last calculated (applicable for invoices generated by billing engine only)",
            "nullable" : true,
            "example" : "2022-09-30T00:00:00Z"
          }
        }
      },
      "InvoiceStatus" : {
        "type" : "string",
        "example" : "DRAFT",
        "enum" : [ "IN_PROGRESS", "DRAFT", "FINAL", "SENT", "VOIDED" ]
      },
      "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" ]
      },
      "Address" : {
        "required" : [ "country", "line1", "postcode", "town" ],
        "type" : "object",
        "description" : "Customer's billing address",
        "example" : {
          "line1" : "Flat 1",
          "line2" : "15 Yemen Road",
          "town" : "Yemen",
          "state" : "CA",
          "postcode" : "YE1 2YE",
          "country" : "YE"
        },
        "properties" : {
          "line1" : {
            "type" : "string",
            "description" : "Address line 1",
            "example" : "Flat 1"
          },
          "line2" : {
            "type" : "string",
            "description" : "Address line 2",
            "nullable" : true,
            "example" : "15 Yemen Road"
          },
          "town" : {
            "type" : "string",
            "description" : "Town or city",
            "example" : "Yemen"
          },
          "state" : {
            "description" : "State or province (required for USA and Canada)",
            "nullable" : true,
            "$ref" : "#/components/schemas/State"
          },
          "postcode" : {
            "type" : "string",
            "description" : "Postal code",
            "example" : "YE1 2YE"
          },
          "country" : {
            "description" : "Country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes))",
            "$ref" : "#/components/schemas/CountryCode"
          }
        }
      },
      "State" : {
        "type" : "string",
        "example" : "CA",
        "enum" : [ "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", "AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT" ]
      },
      "CountryCode" : {
        "type" : "string",
        "example" : "YE",
        "enum" : [ "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GF", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT", "GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MF", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RE", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SJ", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TF", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN", "VU", "WF", "WS", "XK", "YE", "YT", "ZA", "ZM", "ZW" ]
      },
      "InvoicePaymentOption" : {
        "type" : "string",
        "example" : "BANK_TRANSFER",
        "enum" : [ "BANK_TRANSFER", "LINK" ]
      },
      "InclusiveDateRange" : {
        "required" : [ "endInclusive", "start" ],
        "type" : "object",
        "description" : "Billing period",
        "example" : {
          "start" : "2022-10-01",
          "endInclusive" : "2022-10-30"
        },
        "properties" : {
          "start" : {
            "type" : "string",
            "description" : "Start date, included in the whole range",
            "example" : "2022-10-01"
          },
          "endInclusive" : {
            "type" : "string",
            "description" : "End date, included in the whole range",
            "example" : "2022-10-30"
          }
        }
      },
      "KeyValuePair" : {
        "required" : [ "key", "value" ],
        "type" : "object",
        "example" : {
          "key" : "example-label",
          "value" : "label-value"
        },
        "properties" : {
          "key" : {
            "type" : "string",
            "example" : "example-label"
          },
          "value" : {
            "type" : "string",
            "example" : "label-value"
          }
        }
      },
      "InvoicePaymentStatus" : {
        "type" : "string",
        "example" : "UNPAID",
        "enum" : [ "UNPAID", "PARTIALLY_PAID", "PAID", "UNCOLLECTIBLE" ]
      },
      "LinkInfo" : {
        "required" : [ "externalId", "externalService", "syncTime" ],
        "type" : "object",
        "example" : {
          "externalId" : "ID",
          "externalService" : "Xero",
          "syncTime" : "2022-06-28T16:47:00Z",
          "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
        },
        "properties" : {
          "externalId" : {
            "type" : "string",
            "description" : "The ID of the related entity in external system",
            "example" : "ID"
          },
          "externalService" : {
            "description" : "The connected service",
            "$ref" : "#/components/schemas/IntegrationService"
          },
          "syncTime" : {
            "type" : "string",
            "description" : "The time that this was synced from the connected integration",
            "example" : "2022-06-28T16:47:00Z"
          },
          "externalUrl" : {
            "type" : "string",
            "description" : "External URL",
            "nullable" : true,
            "example" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
          }
        }
      },
      "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" ]
      },
      "InvoiceMerchantDetails" : {
        "required" : [ "address", "customFields", "email", "includeBeneficiaryAddressInPaymentDetails", "legalCompanyName" ],
        "type" : "object",
        "description" : "Merchant details",
        "example" : {
          "address" : {
            "line1" : "Flat 1",
            "line2" : "123 Fake Street",
            "town" : "New York",
            "state" : "NY",
            "postcode" : "AB1 2EF",
            "country" : "US"
          },
          "phoneNumber" : "0800001066",
          "email" : "donald@example.com",
          "taxId" : "TAX",
          "iban" : "GB33BUKB20201555555555",
          "ukAccountDetails" : {
            "sortCode" : "123456",
            "accountNumber" : "12345678"
          },
          "usAchDetails" : {
            "accountNumber" : "12345678",
            "accountName" : "John Doe",
            "bankName" : "Chase",
            "bankRoutingNumber" : "123456789"
          },
          "usWireDetails" : {
            "accountNumber" : "12345678",
            "accountName" : "John Doe",
            "bankName" : "Chase",
            "bankRoutingNumber" : "123456789",
            "swiftCode" : "CHASUS33",
            "bankAddress" : {
              "line1" : "JP Morgan Chase",
              "town" : "New York City",
              "state" : "NY",
              "postcode" : "10017",
              "country" : "US"
            }
          },
          "swedishBankgiroDestination" : {
            "bankgiroNumber" : "123-4567",
            "accountName" : "The Merchant"
          },
          "legalCompanyName" : "The Merchant",
          "customFields" : [ ],
          "includeBeneficiaryAddressInPaymentDetails" : false
        },
        "properties" : {
          "address" : {
            "$ref" : "#/components/schemas/Address"
          },
          "phoneNumber" : {
            "type" : "string",
            "description" : "Merchant's phone number",
            "nullable" : true,
            "example" : "0800001066"
          },
          "email" : {
            "type" : "string",
            "description" : "Merchant's email",
            "example" : "donald@example.com"
          },
          "taxId" : {
            "type" : "string",
            "description" : "Merchant's tax ID",
            "nullable" : true,
            "example" : "TAX"
          },
          "iban" : {
            "type" : "string",
            "description" : "Merchant's IBAN, for receiving payment by bank transfer",
            "nullable" : true,
            "example" : "GB33BUKB20201555555555"
          },
          "ukAccountDetails" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/SortCodeAccountNumber"
          },
          "usAchDetails" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/UsAchDestination"
          },
          "usWireDetails" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/UsWireDestination"
          },
          "swedishBankgiroDestination" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/SwedishBankgiroDestination"
          },
          "legalCompanyName" : {
            "type" : "string",
            "description" : "Merchant's legal company name",
            "example" : "The Merchant"
          },
          "customFields" : {
            "type" : "array",
            "description" : "merchantCustomFields",
            "example" : [ ],
            "items" : { }
          },
          "includeBeneficiaryAddressInPaymentDetails" : {
            "type" : "boolean",
            "description" : "Include beneficiary address in payment details on invoice",
            "example" : false
          }
        }
      },
      "SortCodeAccountNumber" : {
        "required" : [ "accountNumber", "sortCode" ],
        "type" : "object",
        "description" : "Merchant's UK bank account details, for receiving payment by UK bank transfer",
        "example" : {
          "sortCode" : "123456",
          "accountNumber" : "12345678"
        },
        "properties" : {
          "sortCode" : {
            "type" : "string",
            "description" : "UK sort code. 6 digits.",
            "example" : "123456"
          },
          "accountNumber" : {
            "type" : "string",
            "description" : "UK account number. 8 digits.",
            "example" : "12345678"
          }
        }
      },
      "UsAchDestination" : {
        "required" : [ "accountName", "accountNumber", "bankName", "bankRoutingNumber" ],
        "type" : "object",
        "description" : "Merchant's US account details, for receiving payment by ACH",
        "example" : {
          "accountNumber" : "12345678",
          "accountName" : "John Doe",
          "bankName" : "Chase",
          "bankRoutingNumber" : "123456789"
        },
        "properties" : {
          "accountNumber" : {
            "type" : "string",
            "example" : "12345678"
          },
          "accountName" : {
            "type" : "string",
            "example" : "John Doe"
          },
          "bankName" : {
            "type" : "string",
            "example" : "Chase"
          },
          "bankRoutingNumber" : {
            "type" : "string",
            "example" : "123456789"
          }
        }
      },
      "UsWireDestination" : {
        "required" : [ "accountName", "accountNumber", "bankAddress", "bankName", "bankRoutingNumber", "swiftCode" ],
        "type" : "object",
        "description" : "Merchant's US account details, for receiving payment by wire transfer",
        "example" : {
          "accountNumber" : "12345678",
          "accountName" : "John Doe",
          "bankName" : "Chase",
          "bankRoutingNumber" : "123456789",
          "swiftCode" : "CHASUS33",
          "bankAddress" : {
            "line1" : "JP Morgan Chase",
            "town" : "New York City",
            "state" : "NY",
            "postcode" : "10017",
            "country" : "US"
          }
        },
        "properties" : {
          "accountNumber" : {
            "type" : "string",
            "example" : "12345678"
          },
          "accountName" : {
            "type" : "string",
            "example" : "John Doe"
          },
          "bankName" : {
            "type" : "string",
            "example" : "Chase"
          },
          "bankRoutingNumber" : {
            "type" : "string",
            "example" : "123456789"
          },
          "swiftCode" : {
            "type" : "string",
            "example" : "CHASUS33"
          },
          "bankAddress" : {
            "$ref" : "#/components/schemas/Address"
          }
        }
      },
      "SwedishBankgiroDestination" : {
        "required" : [ "accountName", "bankgiroNumber" ],
        "type" : "object",
        "description" : "Merchant's Swedish Bankgiro account details, for receiving payment by Swedish Bankgiro",
        "example" : {
          "bankgiroNumber" : "123-4567",
          "accountName" : "The Merchant"
        },
        "properties" : {
          "bankgiroNumber" : {
            "type" : "string",
            "description" : "Swedish Bankgiro number. 7-8 digits, formatted as 123-4567 or 1234-5678.",
            "example" : "123-4567"
          },
          "accountName" : {
            "type" : "string",
            "description" : "Account holder name",
            "example" : "The Merchant"
          }
        }
      },
      "TaxStatus" : {
        "type" : "string",
        "example" : "TAXED",
        "enum" : [ "TAXED", "TAX_EXEMPT", "REVERSE_CHARGED" ]
      },
      "InvoiceRenderSettingsInlineAggregate" : {
        "required" : [ "paymentLinkDisplay" ],
        "type" : "object",
        "description" : "Settings that control how the invoice is rendered.",
        "example" : {
          "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
        },
        "properties" : {
          "paymentLinkDisplay" : {
            "description" : "Payment link display preference. By default, the payment link is shown.",
            "$ref" : "#/components/schemas/PaymentLinkDisplayOption"
          }
        }
      },
      "PaymentLinkDisplayOption" : {
        "type" : "string",
        "example" : "HIDE_PAYMENT_LINK",
        "enum" : [ "SHOW_PAYMENT_LINK", "HIDE_PAYMENT_LINK" ]
      },
      "InvoiceListSummaryResponse" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
            "invoiceNumber" : "INV2",
            "status" : "SENT",
            "paymentStatus" : "UNPAID",
            "currency" : "GBP",
            "grossTotal" : "10",
            "balance" : "10",
            "balanceVersion" : 0,
            "appliedCreditGrantTotal" : "0.00",
            "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
            "customerLegalCompanyName" : "Facebook",
            "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
            "billingPeriod" : {
              "start" : "2022-10-01",
              "endInclusive" : "2022-10-30"
            },
            "dueDate" : "2022-11-05",
            "dueDateSource" : "CALCULATED",
            "dueDatePolicy" : {
              "paymentTermDays" : 30,
              "type" : "PAYMENT_TERMS"
            },
            "dueDateStatus" : "SET",
            "accountingDate" : "2022-10-05",
            "links" : [ {
              "externalId" : "ID",
              "externalService" : "Xero",
              "syncTime" : "2022-06-28T16:47:00Z",
              "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
            } ]
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Invoice summaries",
            "example" : [ {
              "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
              "invoiceNumber" : "INV2",
              "status" : "SENT",
              "paymentStatus" : "UNPAID",
              "currency" : "GBP",
              "grossTotal" : "10",
              "balance" : "10",
              "balanceVersion" : 0,
              "appliedCreditGrantTotal" : "0.00",
              "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
              "customerLegalCompanyName" : "Facebook",
              "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
              "billingPeriod" : {
                "start" : "2022-10-01",
                "endInclusive" : "2022-10-30"
              },
              "dueDate" : "2022-11-05",
              "dueDateSource" : "CALCULATED",
              "dueDatePolicy" : {
                "paymentTermDays" : 30,
                "type" : "PAYMENT_TERMS"
              },
              "dueDateStatus" : "SET",
              "accountingDate" : "2022-10-05",
              "links" : [ {
                "externalId" : "ID",
                "externalService" : "Xero",
                "syncTime" : "2022-06-28T16:47:00Z",
                "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
              } ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/InvoiceListSummaryResponseItem"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "InvoiceListSummaryResponseItem" : {
        "required" : [ "accountingDate", "currency", "customerId", "customerLegalCompanyName", "dueDatePolicy", "dueDateSource", "dueDateStatus", "grossTotal", "id", "links", "paymentStatus", "status" ],
        "type" : "object",
        "example" : {
          "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
          "invoiceNumber" : "INV2",
          "status" : "SENT",
          "paymentStatus" : "UNPAID",
          "currency" : "GBP",
          "grossTotal" : "10",
          "balance" : "10",
          "balanceVersion" : 0,
          "appliedCreditGrantTotal" : "0.00",
          "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
          "customerLegalCompanyName" : "Facebook",
          "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "billingPeriod" : {
            "start" : "2022-10-01",
            "endInclusive" : "2022-10-30"
          },
          "dueDate" : "2022-11-05",
          "dueDateSource" : "CALCULATED",
          "dueDatePolicy" : {
            "paymentTermDays" : 30,
            "type" : "PAYMENT_TERMS"
          },
          "dueDateStatus" : "SET",
          "accountingDate" : "2022-10-05",
          "links" : [ {
            "externalId" : "ID",
            "externalService" : "Xero",
            "syncTime" : "2022-06-28T16:47:00Z",
            "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
          } ]
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Invoice ID",
            "example" : "ba37a392-7054-4dae-ab37-6fee9e23fe06"
          },
          "invoiceNumber" : {
            "type" : "string",
            "description" : "Invoice number",
            "nullable" : true,
            "example" : "INV2"
          },
          "status" : {
            "description" : "Invoice status",
            "$ref" : "#/components/schemas/InvoiceStatus"
          },
          "paymentStatus" : {
            "description" : "Payment status (drives the Status column)",
            "$ref" : "#/components/schemas/InvoicePaymentStatus"
          },
          "currency" : {
            "description" : "Invoice currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total (the Amount column)",
            "example" : "10"
          },
          "balance" : {
            "type" : "string",
            "description" : "Outstanding ledger balance on list responses for FINAL or SENT invoices. Omitted when unavailable or not applicable; absence does not mean zero.",
            "nullable" : true,
            "example" : "10"
          },
          "balanceVersion" : {
            "type" : "integer",
            "description" : "Version of the outstanding ledger balance. Omitted when no balance is returned.",
            "format" : "int64",
            "nullable" : true,
            "example" : 0
          },
          "appliedCreditGrantTotal" : {
            "type" : "string",
            "description" : "The total amount covered by credit grants, including associated tax, in the invoice's currency. Excludes payments and credit notes. Returns zero when no credit grants have been applied.",
            "nullable" : true,
            "example" : "0.00"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the Customer this invoice is linked to",
            "example" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a"
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name (the Customer column)",
            "example" : "Facebook"
          },
          "billingScheduleId" : {
            "type" : "string",
            "description" : "The ID of the billing schedule this invoice was generated from, if any",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "billingPeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "dueDate" : {
            "type" : "string",
            "description" : "Due date",
            "nullable" : true,
            "example" : "2022-11-05"
          },
          "dueDateSource" : {
            "description" : "Whether the due date was set manually or calculated from the payment terms",
            "$ref" : "#/components/schemas/DueDateSource"
          },
          "dueDatePolicy" : {
            "description" : "How the due date is set: MANUAL for a date chosen by hand, PAYMENT_TERMS for a number of days after the due date anchor. Null when the invoice has neither a due date nor payment terms.",
            "nullable" : true,
            "example" : {
              "paymentTermDays" : 30,
              "type" : "PAYMENT_TERMS"
            },
            "oneOf" : [ {
              "$ref" : "#/components/schemas/DueDatePolicyManual"
            }, {
              "$ref" : "#/components/schemas/DueDatePolicyPaymentTerms"
            } ],
            "discriminator" : {
              "propertyName" : "type",
              "mapping" : {
                "MANUAL" : "#/components/schemas/DueDatePolicyManual",
                "PAYMENT_TERMS" : "#/components/schemas/DueDatePolicyPaymentTerms"
              }
            }
          },
          "dueDateStatus" : {
            "description" : "Whether the invoice has its due date yet. PENDING means it has none, and drives the Due column's pending state.",
            "$ref" : "#/components/schemas/DueDateStatus"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date (the Date column)",
            "example" : "2022-10-05"
          },
          "links" : {
            "type" : "array",
            "description" : "Linked external integration entities (the Links column)",
            "example" : [ {
              "externalId" : "ID",
              "externalService" : "Xero",
              "syncTime" : "2022-06-28T16:47:00Z",
              "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/LinkInfo"
            }
          }
        }
      },
      "DueDateSource" : {
        "type" : "string",
        "example" : "CALCULATED",
        "enum" : [ "MANUAL", "CALCULATED" ]
      },
      "DueDatePolicyManual" : {
        "required" : [ "date", "type" ],
        "type" : "object",
        "example" : {
          "date" : "2022-10-30",
          "type" : "MANUAL"
        },
        "properties" : {
          "date" : {
            "type" : "string",
            "description" : "The due date. The invoice keeps this exact date until it is explicitly changed.",
            "example" : "2022-10-30"
          },
          "type" : {
            "description" : "Whether the due date is a hand-picked date or is computed from payment terms.",
            "$ref" : "#/components/schemas/DueDatePolicyType"
          }
        }
      },
      "DueDatePolicyType" : {
        "type" : "string",
        "example" : "MANUAL",
        "enum" : [ "MANUAL", "PAYMENT_TERMS" ]
      },
      "DueDatePolicyPaymentTerms" : {
        "required" : [ "paymentTermDays", "type" ],
        "type" : "object",
        "example" : {
          "paymentTermDays" : 30,
          "type" : "PAYMENT_TERMS"
        },
        "properties" : {
          "paymentTermDays" : {
            "type" : "integer",
            "description" : "The number of days after the due date anchor that the invoice becomes due. The anchor is the invoice date or the issue date according to your account settings; with an issue date anchor the due date stays empty until the invoice is issued.",
            "example" : 30
          },
          "type" : {
            "description" : "Whether the due date is a hand-picked date or is computed from payment terms.",
            "$ref" : "#/components/schemas/DueDatePolicyType"
          }
        }
      },
      "DueDateStatus" : {
        "type" : "string",
        "example" : "SET",
        "enum" : [ "SET", "PENDING" ]
      },
      "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)",
            "nullable" : true,
            "example" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3"
          },
          "before" : {
            "type" : "string",
            "description" : "Cursor for the page before this (if it exists)",
            "nullable" : true,
            "example" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz"
          },
          "totalResultSize" : {
            "type" : "integer",
            "description" : "Total number of entries across all pages",
            "format" : "int64",
            "nullable" : true,
            "example" : 10
          }
        }
      },
      "InvoiceCurrencyConversionsListResponse" : {
        "required" : [ "items" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
            "invoiceId" : "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f",
            "currency" : "GBP",
            "totalTax" : "20.00",
            "netTotal" : "100.00",
            "grossTotal" : "120.00",
            "exchangeRate" : "0.79",
            "updatedAt" : "2024-01-15T10:30:00Z"
          } ]
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "List of currency conversions for the invoice",
            "example" : [ {
              "id" : "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
              "invoiceId" : "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f",
              "currency" : "GBP",
              "totalTax" : "20.00",
              "netTotal" : "100.00",
              "grossTotal" : "120.00",
              "exchangeRate" : "0.79",
              "updatedAt" : "2024-01-15T10:30:00Z"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/InvoiceCurrencyConversionResponse"
            }
          }
        }
      },
      "InvoiceCurrencyConversionResponse" : {
        "required" : [ "currency", "exchangeRate", "grossTotal", "id", "invoiceId", "netTotal", "totalTax", "updatedAt" ],
        "type" : "object",
        "example" : {
          "id" : "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
          "invoiceId" : "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f",
          "currency" : "GBP",
          "totalTax" : "20.00",
          "netTotal" : "100.00",
          "grossTotal" : "120.00",
          "exchangeRate" : "0.79",
          "updatedAt" : "2024-01-15T10:30:00Z"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The unique identifier for the currency conversion",
            "example" : "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
          },
          "invoiceId" : {
            "type" : "string",
            "description" : "The invoice this conversion belongs to",
            "example" : "f1e2d3c4-b5a6-4978-8e9f-0a1b2c3d4e5f"
          },
          "currency" : {
            "description" : "The target currency for the conversion",
            "$ref" : "#/components/schemas/Currency"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "The total tax amount in the converted currency",
            "example" : "20.00"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "The net total amount in the converted currency",
            "example" : "100.00"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "The gross total amount in the converted currency",
            "example" : "120.00"
          },
          "exchangeRate" : {
            "type" : "string",
            "description" : "The exchange rate used for the conversion",
            "example" : "0.79"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "The last update timestamp",
            "example" : "2024-01-15T10:30:00Z"
          }
        }
      },
      "DeleteCreditNoteLineItemEndpointProductDeleteCreditNoteLineItemResponseModel" : {
        "required" : [ "creditNoteId", "externalIds", "grossTotal", "id", "index", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
          "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Ferraris",
          "description" : "Red",
          "quantity" : "2",
          "rate" : "20000.10",
          "taxRate" : "0.2",
          "index" : 2,
          "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "netTotal" : "20000.00",
          "totalTax" : "2000.00",
          "grossTotal" : "22000.00",
          "rateDisplay" : "ABSOLUTE",
          "externalIds" : [ {
            "key" : "Xero",
            "value" : "123"
          } ]
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "creditNoteId" : {
            "type" : "string",
            "description" : "Credit Note Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "groupId" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group ID",
            "nullable" : true,
            "example" : "cd11218d-fa00-4faa-8684-a43113d076a8"
          },
          "lineItemId" : {
            "type" : "string",
            "description" : "Line Item ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Item Title",
            "example" : "Ferraris"
          },
          "description" : {
            "type" : "string",
            "description" : "Item Description",
            "nullable" : true,
            "example" : "Red"
          },
          "quantity" : {
            "type" : "string",
            "description" : "Quantity",
            "example" : "2"
          },
          "rate" : {
            "type" : "string",
            "description" : "Rate per Item",
            "example" : "20000.10"
          },
          "taxRate" : {
            "type" : "string",
            "description" : "Tax Rate",
            "example" : "0.2"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 2
          },
          "priceId" : {
            "type" : "string",
            "description" : "Price ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net Total",
            "example" : "20000.00"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total Tax",
            "example" : "2000.00"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross Total",
            "example" : "22000.00"
          },
          "rateDisplay" : {
            "description" : "Determines whether rate is displayed as an absolute value or percentage",
            "$ref" : "#/components/schemas/RateDisplay"
          },
          "externalIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationExternalIdentifier"
            }
          }
        }
      },
      "RateDisplay" : {
        "type" : "string",
        "example" : "ABSOLUTE",
        "enum" : [ "ABSOLUTE", "PERCENTAGE" ]
      },
      "IntegrationExternalIdentifier" : {
        "required" : [ "key", "value" ],
        "type" : "object",
        "example" : {
          "key" : "Xero",
          "value" : "123"
        },
        "properties" : {
          "key" : {
            "$ref" : "#/components/schemas/IntegrationService"
          },
          "value" : {
            "type" : "string",
            "example" : "123"
          }
        }
      },
      "ListCreditNoteLineItemEndpointProductListCreditNoteLineItemPaginatedResponseModel" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
            "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "title" : "Ferraris",
            "description" : "Red",
            "quantity" : "2",
            "rate" : "20000.10",
            "taxRate" : "0.2",
            "index" : 2,
            "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
            "netTotal" : "20000.00",
            "totalTax" : "2000.00",
            "grossTotal" : "22000.00",
            "rateDisplay" : "ABSOLUTE",
            "externalIds" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "servicePeriod" : {
              "start" : "2025-10-01",
              "endInclusive" : "2025-10-30"
            },
            "revenueRecognitionMethod" : "STRAIGHT_LINE",
            "revenueClassification" : "EARNED",
            "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "CreditNoteLineItems",
            "example" : [ {
              "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
              "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "title" : "Ferraris",
              "description" : "Red",
              "quantity" : "2",
              "rate" : "20000.10",
              "taxRate" : "0.2",
              "index" : 2,
              "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
              "netTotal" : "20000.00",
              "totalTax" : "2000.00",
              "grossTotal" : "22000.00",
              "rateDisplay" : "ABSOLUTE",
              "externalIds" : [ {
                "key" : "Xero",
                "value" : "123"
              } ],
              "servicePeriod" : {
                "start" : "2025-10-01",
                "endInclusive" : "2025-10-30"
              },
              "revenueRecognitionMethod" : "STRAIGHT_LINE",
              "revenueClassification" : "EARNED",
              "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/ListCreditNoteLineItemEndpointProductListCreditNoteLineItemResponseModel"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "ListCreditNoteLineItemEndpointProductListCreditNoteLineItemResponseModel" : {
        "required" : [ "creditNoteId", "externalIds", "grossTotal", "id", "index", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
          "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Ferraris",
          "description" : "Red",
          "quantity" : "2",
          "rate" : "20000.10",
          "taxRate" : "0.2",
          "index" : 2,
          "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "netTotal" : "20000.00",
          "totalTax" : "2000.00",
          "grossTotal" : "22000.00",
          "rateDisplay" : "ABSOLUTE",
          "externalIds" : [ {
            "key" : "Xero",
            "value" : "123"
          } ],
          "servicePeriod" : {
            "start" : "2025-10-01",
            "endInclusive" : "2025-10-30"
          },
          "revenueRecognitionMethod" : "STRAIGHT_LINE",
          "revenueClassification" : "EARNED",
          "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "creditNoteId" : {
            "type" : "string",
            "description" : "Credit Note Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "groupId" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group ID",
            "nullable" : true,
            "example" : "cd11218d-fa00-4faa-8684-a43113d076a8"
          },
          "lineItemId" : {
            "type" : "string",
            "description" : "Line Item ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Item Title",
            "example" : "Ferraris"
          },
          "description" : {
            "type" : "string",
            "description" : "Item Description",
            "nullable" : true,
            "example" : "Red"
          },
          "quantity" : {
            "type" : "string",
            "description" : "Quantity",
            "example" : "2"
          },
          "rate" : {
            "type" : "string",
            "description" : "Rate per Item",
            "example" : "20000.10"
          },
          "taxRate" : {
            "type" : "string",
            "description" : "Tax Rate",
            "example" : "0.2"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 2
          },
          "priceId" : {
            "type" : "string",
            "description" : "Price ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net Total",
            "example" : "20000.00"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total Tax",
            "example" : "2000.00"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross Total",
            "example" : "22000.00"
          },
          "rateDisplay" : {
            "description" : "Determines whether rate is displayed as an absolute value or percentage",
            "$ref" : "#/components/schemas/RateDisplay"
          },
          "externalIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationExternalIdentifier"
            }
          },
          "servicePeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "revenueRecognitionMethod" : {
            "description" : "Revenue recognition method. Valid values are: STRAIGHT_LINE, POINT_IN_TIME",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          },
          "revenueClassification" : {
            "description" : "Revenue classification",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueClassification"
          },
          "productId" : {
            "type" : "string",
            "description" : "Product ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          }
        }
      },
      "RevenueRecognitionMethod" : {
        "type" : "string",
        "example" : "STRAIGHT_LINE",
        "enum" : [ "STRAIGHT_LINE", "USAGE", "MILESTONE", "POINT_IN_TIME" ]
      },
      "RevenueClassification" : {
        "type" : "string",
        "example" : "EARNED",
        "enum" : [ "PREPAYMENT", "EARNED", "BURNDOWN" ]
      },
      "ListLineItemEndpointPaginatedLineItemResponseModel" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
            "title" : "Ferraris",
            "description" : "Red",
            "quantity" : "2",
            "rate" : "20000.10",
            "taxRate" : "0.2",
            "servicePeriodStart" : "2022-10-20T00:00:00Z",
            "servicePeriodEnd" : "2022-10-24T00:00:00Z",
            "servicePeriod" : {
              "startDate" : "2022-10-20",
              "endDate" : "2022-10-24"
            },
            "index" : 2,
            "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
            "netTotal" : "51.20",
            "totalTax" : "2.50",
            "grossTotal" : "101.23",
            "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
            "rateDisplay" : "ABSOLUTE",
            "externalIds" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "revenueClassification" : "EARNED",
            "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
            "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
            "revenueRecognitionMethod" : "USAGE"
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "LineItems",
            "example" : [ {
              "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
              "title" : "Ferraris",
              "description" : "Red",
              "quantity" : "2",
              "rate" : "20000.10",
              "taxRate" : "0.2",
              "servicePeriodStart" : "2022-10-20T00:00:00Z",
              "servicePeriodEnd" : "2022-10-24T00:00:00Z",
              "servicePeriod" : {
                "startDate" : "2022-10-20",
                "endDate" : "2022-10-24"
              },
              "index" : 2,
              "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
              "netTotal" : "51.20",
              "totalTax" : "2.50",
              "grossTotal" : "101.23",
              "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
              "rateDisplay" : "ABSOLUTE",
              "externalIds" : [ {
                "key" : "Xero",
                "value" : "123"
              } ],
              "revenueClassification" : "EARNED",
              "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
              "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
              "revenueRecognitionMethod" : "USAGE"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/Stable20240101LineItemResponse"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "Stable20240101LineItemResponse" : {
        "required" : [ "externalIds", "grossTotal", "id", "index", "invoiceId", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
          "title" : "Ferraris",
          "description" : "Red",
          "quantity" : "2",
          "rate" : "20000.10",
          "taxRate" : "0.2",
          "servicePeriodStart" : "2022-10-20T00:00:00Z",
          "servicePeriodEnd" : "2022-10-24T00:00:00Z",
          "servicePeriod" : {
            "startDate" : "2022-10-20",
            "endDate" : "2022-10-24"
          },
          "index" : 2,
          "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
          "netTotal" : "51.20",
          "totalTax" : "2.50",
          "grossTotal" : "101.23",
          "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "rateDisplay" : "ABSOLUTE",
          "externalIds" : [ {
            "key" : "Xero",
            "value" : "123"
          } ],
          "revenueClassification" : "EARNED",
          "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "productId" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110",
          "revenueRecognitionMethod" : "USAGE"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "invoiceId" : {
            "type" : "string",
            "description" : "Invoice ID",
            "example" : "cd11218d-fa00-4faa-8684-a43113d076a8"
          },
          "title" : {
            "type" : "string",
            "description" : "Item Title",
            "example" : "Ferraris"
          },
          "description" : {
            "type" : "string",
            "description" : "Item Description",
            "nullable" : true,
            "example" : "Red"
          },
          "quantity" : {
            "type" : "string",
            "description" : "Quantity",
            "example" : "2"
          },
          "rate" : {
            "type" : "string",
            "description" : "Price per Item",
            "example" : "20000.10"
          },
          "taxRate" : {
            "type" : "string",
            "description" : "Tax Rate",
            "example" : "0.2"
          },
          "servicePeriodStart" : {
            "type" : "string",
            "description" : "Start of the service period (the time period in which the service was provided)",
            "nullable" : true,
            "example" : "2022-10-20T00:00:00Z"
          },
          "servicePeriodEnd" : {
            "type" : "string",
            "description" : "End of the service period (the time period in which the service was provided)",
            "nullable" : true,
            "example" : "2022-10-24T00:00:00Z"
          },
          "servicePeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/DateRange"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 2
          },
          "groupId" : {
            "type" : "string",
            "description" : "Line Item Group ID",
            "nullable" : true,
            "example" : "cd11218d-fa00-4faa-8684-a43113d076a8"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total, in decimal format of the Invoice's currency",
            "example" : "51.20"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax, in decimal format of the Invoice's currency",
            "example" : "2.50"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total, in decimal format of the Invoice's currency",
            "example" : "101.23"
          },
          "priceId" : {
            "type" : "string",
            "description" : "Price ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "rateDisplay" : {
            "description" : "Determines whether rate is displayed as an absolute value or percentage",
            "$ref" : "#/components/schemas/RateDisplay"
          },
          "externalIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationExternalIdentifier"
            }
          },
          "revenueClassification" : {
            "description" : "Revenue classification",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueClassification"
          },
          "creditGrantId" : {
            "type" : "string",
            "description" : "Credit Grant ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "productId" : {
            "type" : "string",
            "description" : "Product ID",
            "nullable" : true,
            "example" : "dd55bf30-3b97-4644-a9fc-b15e0f59a110"
          },
          "revenueRecognitionMethod" : {
            "description" : "Revenue recognition method",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          }
        }
      },
      "DateRange" : {
        "required" : [ "endDate", "startDate" ],
        "type" : "object",
        "description" : "Service Period",
        "example" : {
          "startDate" : "2022-10-20",
          "endDate" : "2022-10-24"
        },
        "properties" : {
          "startDate" : {
            "type" : "string",
            "example" : "2022-10-20"
          },
          "endDate" : {
            "type" : "string",
            "example" : "2022-10-24"
          }
        }
      },
      "CreateLineItemGroupRequestModel" : {
        "required" : [ "title" ],
        "type" : "object",
        "example" : {
          "title" : "Users",
          "description" : "Charges for users",
          "taxCategoryId" : "28227c88-6dba-455f-9b30-b9c76957e610",
          "revenueRecognitionMethod" : "STRAIGHT_LINE",
          "revenueClassification" : "EARNED",
          "servicePeriod" : {
            "start" : "2022-10-20",
            "endInclusive" : "2022-10-24"
          }
        },
        "properties" : {
          "title" : {
            "type" : "string",
            "description" : "Line Item Group Title",
            "example" : "Users"
          },
          "description" : {
            "type" : "string",
            "description" : "Line Item Group Description",
            "nullable" : true,
            "example" : "Charges for users"
          },
          "taxCategoryId" : {
            "type" : "string",
            "description" : "The tax category for all line items in this line item group",
            "nullable" : true,
            "example" : "28227c88-6dba-455f-9b30-b9c76957e610"
          },
          "revenueRecognitionMethod" : {
            "description" : "The revenue recognition method for all line items in this line item group",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          },
          "revenueClassification" : {
            "description" : "The revenue classification for all line items in this line item group",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueClassification"
          },
          "servicePeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          }
        }
      },
      "LineItemGroupResponseModel" : {
        "required" : [ "grossTotal", "id", "index", "invoiceId", "netTotal", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
          "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
          "title" : "Cars",
          "description" : "Charges for cars",
          "index" : 1,
          "netTotal" : "200000.00",
          "totalTax" : "10.00",
          "grossTotal" : "22000.00",
          "taxCategory" : {
            "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
            "name" : "VAT"
          }
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Line Item Group ID",
            "example" : "941272d1-f840-4e16-b698-0cd455c81e0e"
          },
          "invoiceId" : {
            "type" : "string",
            "description" : "Invoice ID",
            "example" : "cd11218d-fa00-4faa-8684-a43113d076a8"
          },
          "title" : {
            "type" : "string",
            "description" : "Line Item Group Title",
            "example" : "Cars"
          },
          "description" : {
            "type" : "string",
            "description" : "Line Item Group Description",
            "nullable" : true,
            "example" : "Charges for cars"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 1
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total, in decimal format of the Invoice's currency",
            "example" : "200000.00"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax, in decimal format of the Invoice's currency",
            "example" : "10.00"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total, in decimal format of the Invoice's currency",
            "example" : "22000.00"
          },
          "taxCategory" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/TaxCategoryResponse"
          }
        }
      },
      "TaxCategoryResponse" : {
        "required" : [ "id", "name" ],
        "type" : "object",
        "description" : "The tax category for all line items in this line item group",
        "example" : {
          "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
          "name" : "VAT"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Tax Category ID",
            "example" : "28227c88-6dba-455f-9b30-b9c76957e610"
          },
          "name" : {
            "type" : "string",
            "description" : "Tax Category name",
            "example" : "VAT"
          }
        }
      },
      "ListInvoiceEndpointListInvoicePaginatedResponseModel" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
            "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
            "status" : "SENT",
            "currency" : "GBP",
            "invoiceNumber" : "INV2",
            "dueDate" : "2022-11-05",
            "purchaseOrderNumber" : "PO123",
            "reference" : "ref",
            "customerEmails" : [ "customer@example.com" ],
            "customerLegalCompanyName" : "Facebook",
            "customerBillingAddress" : {
              "line1" : "Flat 1",
              "line2" : "15 Yemen Road",
              "town" : "Yemen",
              "state" : "CA",
              "postcode" : "YE1 2YE",
              "country" : "YE"
            },
            "customerShippingAddress" : {
              "line1" : "742 Evergreen Terrace",
              "line2" : "",
              "town" : "Springfield",
              "state" : "CA",
              "postcode" : "12345",
              "country" : "US"
            },
            "memo" : "Thanks",
            "paymentOptions" : [ "BANK_TRANSFER" ],
            "billingPeriod" : {
              "start" : "2022-10-01",
              "endInclusive" : "2022-10-30"
            },
            "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
            "totalTax" : "2",
            "netTotal" : "12",
            "grossTotal" : "10",
            "balance" : "10",
            "balanceVersion" : 0,
            "appliedCreditGrantTotal" : "0.00",
            "metadata" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "paymentStatus" : "UNPAID",
            "createdAt" : "2022-10-30T00:00:00Z",
            "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
            "linkedServices" : [ {
              "externalId" : "ID",
              "externalService" : "Xero",
              "syncTime" : "2022-06-28T16:47:00Z",
              "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
            } ],
            "merchantDetails" : {
              "address" : {
                "line1" : "Flat 1",
                "line2" : "123 Fake Street",
                "town" : "New York",
                "state" : "NY",
                "postcode" : "AB1 2EF",
                "country" : "US"
              },
              "phoneNumber" : "0800001066",
              "email" : "donald@example.com",
              "taxId" : "TAX",
              "iban" : "GB33BUKB20201555555555",
              "ukAccountDetails" : {
                "sortCode" : "123456",
                "accountNumber" : "12345678"
              },
              "usAchDetails" : {
                "accountNumber" : "12345678",
                "accountName" : "John Doe",
                "bankName" : "Chase",
                "bankRoutingNumber" : "123456789"
              },
              "usWireDetails" : {
                "accountNumber" : "12345678",
                "accountName" : "John Doe",
                "bankName" : "Chase",
                "bankRoutingNumber" : "123456789",
                "swiftCode" : "CHASUS33",
                "bankAddress" : {
                  "line1" : "JP Morgan Chase",
                  "town" : "New York City",
                  "state" : "NY",
                  "postcode" : "10017",
                  "country" : "US"
                }
              },
              "swedishBankgiroDestination" : {
                "bankgiroNumber" : "123-4567",
                "accountName" : "The Merchant"
              },
              "legalCompanyName" : "The Merchant",
              "customFields" : [ ],
              "includeBeneficiaryAddressInPaymentDetails" : false
            },
            "accountingDate" : "2022-10-05",
            "customerTaxStatus" : "TAXED",
            "renderSettings" : {
              "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
            },
            "isCustomerArchived" : false,
            "updatedAt" : "2022-10-30T00:00:00Z"
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "Invoices",
            "example" : [ {
              "id" : "ba37a392-7054-4dae-ab37-6fee9e23fe06",
              "sequenceAccountId" : "af9b5988-1d7b-45f6-a188-326df5e59b24",
              "status" : "SENT",
              "currency" : "GBP",
              "invoiceNumber" : "INV2",
              "dueDate" : "2022-11-05",
              "purchaseOrderNumber" : "PO123",
              "reference" : "ref",
              "customerEmails" : [ "customer@example.com" ],
              "customerLegalCompanyName" : "Facebook",
              "customerBillingAddress" : {
                "line1" : "Flat 1",
                "line2" : "15 Yemen Road",
                "town" : "Yemen",
                "state" : "CA",
                "postcode" : "YE1 2YE",
                "country" : "YE"
              },
              "customerShippingAddress" : {
                "line1" : "742 Evergreen Terrace",
                "line2" : "",
                "town" : "Springfield",
                "state" : "CA",
                "postcode" : "12345",
                "country" : "US"
              },
              "memo" : "Thanks",
              "paymentOptions" : [ "BANK_TRANSFER" ],
              "billingPeriod" : {
                "start" : "2022-10-01",
                "endInclusive" : "2022-10-30"
              },
              "customerId" : "b3c0cf23-6717-4cdc-b190-acf8aa6ccd8a",
              "totalTax" : "2",
              "netTotal" : "12",
              "grossTotal" : "10",
              "balance" : "10",
              "balanceVersion" : 0,
              "appliedCreditGrantTotal" : "0.00",
              "metadata" : [ {
                "key" : "example-label",
                "value" : "label-value"
              } ],
              "paymentStatus" : "UNPAID",
              "createdAt" : "2022-10-30T00:00:00Z",
              "creditNoteIds" : [ "941272d1-f840-4e16-b698-0cd455c81e0e" ],
              "linkedServices" : [ {
                "externalId" : "ID",
                "externalService" : "Xero",
                "syncTime" : "2022-06-28T16:47:00Z",
                "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
              } ],
              "merchantDetails" : {
                "address" : {
                  "line1" : "Flat 1",
                  "line2" : "123 Fake Street",
                  "town" : "New York",
                  "state" : "NY",
                  "postcode" : "AB1 2EF",
                  "country" : "US"
                },
                "phoneNumber" : "0800001066",
                "email" : "donald@example.com",
                "taxId" : "TAX",
                "iban" : "GB33BUKB20201555555555",
                "ukAccountDetails" : {
                  "sortCode" : "123456",
                  "accountNumber" : "12345678"
                },
                "usAchDetails" : {
                  "accountNumber" : "12345678",
                  "accountName" : "John Doe",
                  "bankName" : "Chase",
                  "bankRoutingNumber" : "123456789"
                },
                "usWireDetails" : {
                  "accountNumber" : "12345678",
                  "accountName" : "John Doe",
                  "bankName" : "Chase",
                  "bankRoutingNumber" : "123456789",
                  "swiftCode" : "CHASUS33",
                  "bankAddress" : {
                    "line1" : "JP Morgan Chase",
                    "town" : "New York City",
                    "state" : "NY",
                    "postcode" : "10017",
                    "country" : "US"
                  }
                },
                "swedishBankgiroDestination" : {
                  "bankgiroNumber" : "123-4567",
                  "accountName" : "The Merchant"
                },
                "legalCompanyName" : "The Merchant",
                "customFields" : [ ],
                "includeBeneficiaryAddressInPaymentDetails" : false
              },
              "accountingDate" : "2022-10-05",
              "customerTaxStatus" : "TAXED",
              "renderSettings" : {
                "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
              },
              "isCustomerArchived" : false,
              "updatedAt" : "2022-10-30T00:00:00Z"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/Invoice"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "ApiError" : {
        "required" : [ "error" ],
        "type" : "object",
        "example" : {
          "error" : {
            "type" : "validationError",
            "message" : "The request was invalid.",
            "errors" : [ {
              "code" : "invalidField",
              "message" : "The request was invalid."
            } ]
          }
        },
        "properties" : {
          "error" : {
            "$ref" : "#/components/schemas/ErrorObject"
          }
        }
      },
      "ErrorObject" : {
        "required" : [ "message", "type" ],
        "type" : "object",
        "description" : "Top level wrapper for all errors",
        "example" : {
          "type" : "validationError",
          "message" : "The request was invalid.",
          "errors" : [ {
            "code" : "invalidField",
            "message" : "The request was invalid."
          } ]
        },
        "properties" : {
          "type" : {
            "type" : "string",
            "description" : "Type of the error",
            "example" : "validationError"
          },
          "message" : {
            "type" : "string",
            "description" : "Plain text description of the error",
            "example" : "The request was invalid."
          },
          "errors" : {
            "type" : "array",
            "description" : "A list of detailed errors",
            "nullable" : true,
            "example" : [ {
              "code" : "invalidField",
              "message" : "The request was invalid."
            } ],
            "items" : {
              "$ref" : "#/components/schemas/ErrorItem"
            }
          }
        }
      },
      "ErrorItem" : {
        "required" : [ "code", "message" ],
        "type" : "object",
        "example" : {
          "code" : "invalidField",
          "message" : "The request was invalid."
        },
        "properties" : {
          "code" : {
            "type" : "string",
            "description" : "Code of the error",
            "example" : "invalidField"
          },
          "message" : {
            "type" : "string",
            "description" : "Plain text description of the error",
            "example" : "The request was invalid."
          }
        }
      },
      "UpdateCreditNoteLineItemGroupEndpointUpdateCreditNoteLineItemGroupRequestModel" : {
        "required" : [ "title" ],
        "type" : "object",
        "example" : {
          "title" : "Users",
          "description" : "Credit note for users"
        },
        "properties" : {
          "title" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Title",
            "example" : "Users"
          },
          "description" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Description",
            "nullable" : true,
            "example" : "Credit note for users"
          }
        }
      },
      "UpdateCreditNoteLineItemGroupEndpointProductUpdateCreditNoteLineItemGroupResponseModel" : {
        "required" : [ "creditNoteId", "grossTotal", "id", "index", "netTotal", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Users",
          "description" : "Credit note for users",
          "index" : 2,
          "netTotal" : "51.20",
          "totalTax" : "2.50",
          "grossTotal" : "101.23"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group ID",
            "example" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec"
          },
          "creditNoteId" : {
            "type" : "string",
            "description" : "Credit Note ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "lineItemGroupId" : {
            "type" : "string",
            "description" : "Line Item Group ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Title",
            "example" : "Users"
          },
          "description" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Description",
            "nullable" : true,
            "example" : "Credit note for users"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 2
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total",
            "example" : "51.20"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax",
            "example" : "2.50"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total",
            "example" : "101.23"
          }
        }
      },
      "Stable20240101PatchInvoiceRequest" : {
        "type" : "object",
        "example" : {
          "dueDate" : "2022-09-30",
          "purchaseOrderNumber" : "PO123",
          "reference" : "ref",
          "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "paymentOptions" : [ "BANK_TRANSFER" ],
          "billingPeriod" : {
            "start" : "2022-10-01",
            "endInclusive" : "2022-10-30"
          },
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
          "billingRunId" : "53ff21c8-4872-46c4-83bf-517d54876945",
          "accountingDate" : "2022-09-30",
          "attachmentAssetIds" : [ "99874519-25ce-46ff-8823-093115aa7222" ]
        },
        "properties" : {
          "dueDate" : {
            "type" : "string",
            "description" : "Due date",
            "nullable" : true,
            "example" : "2022-09-30"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "reference" : {
            "type" : "string",
            "description" : "Reference",
            "nullable" : true,
            "example" : "ref"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer email addresses, used for sending the Invoice if provided",
            "nullable" : true,
            "example" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "nullable" : true,
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Invoice memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "paymentOptions" : {
            "type" : "array",
            "description" : "Invoice payment options",
            "nullable" : true,
            "example" : [ "BANK_TRANSFER" ],
            "items" : {
              "$ref" : "#/components/schemas/InvoicePaymentOption"
            }
          },
          "billingPeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.",
            "nullable" : true,
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "creditBalances" : {
            "type" : "string",
            "description" : "Credit balances",
            "nullable" : true,
            "example" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)"
          },
          "billingRunId" : {
            "type" : "string",
            "description" : "Billing Run ID",
            "nullable" : true,
            "example" : "53ff21c8-4872-46c4-83bf-517d54876945"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "nullable" : true,
            "example" : "2022-09-30"
          },
          "attachmentAssetIds" : {
            "type" : "array",
            "description" : "Attachment asset IDs",
            "nullable" : true,
            "example" : [ "99874519-25ce-46ff-8823-093115aa7222" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "CreditNote" : {
        "required" : [ "applications", "currency", "customerBillingAddress", "customerEmails", "customerId", "customerLegalCompanyName", "customerShippingAddress", "grossTotal", "id", "linkedServices", "metadata", "netTotal", "sequenceAccountId", "settings", "status", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
          "status" : "FINAL",
          "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "invoiceNumber" : "INV00001",
          "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "currency" : "GBP",
          "issueDate" : "2022-09-15",
          "billingPeriodStart" : "2022-10-01T00:00:00Z",
          "billingPeriodEnd" : "2022-10-30T00:00:00Z",
          "creditNoteNumber" : "CN00001",
          "purchaseOrderNumber" : "PO123",
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "totalTax" : "2.50",
          "netTotal" : "51.20",
          "grossTotal" : "101.23",
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "customerTaxId" : "TAX123",
          "linkedServices" : [ {
            "externalId" : "123",
            "externalService" : "Xero",
            "syncTime" : "2022-06-28T16:47:00Z",
            "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
          } ],
          "applicationStatus" : "PARTIALLY_APPLIED",
          "balance" : "51.23",
          "balanceVersion" : 3,
          "applications" : [ {
            "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "invoiceNumber" : "INV00001",
            "amount" : "50.00",
            "appliedAt" : "2022-10-14T12:34:56Z"
          } ],
          "merchantDetails" : {
            "address" : {
              "line1" : "The White House",
              "line2" : "1600 Pennsylvania Avenue",
              "town" : "Washington, D.C.",
              "state" : "CA",
              "postcode" : "20500",
              "country" : "US"
            },
            "phoneNumber" : "0800001066",
            "email" : "donald@example.com",
            "taxId" : "TAX60",
            "iban" : "GB33BUKB20201555555555",
            "ukAccountDetails" : {
              "sortCode" : "000000",
              "accountNumber" : "12345678"
            },
            "usAchDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789"
            },
            "usWireDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789",
              "swiftCode" : "CHASUS33",
              "bankAddress" : {
                "line1" : "JP Morgan Chase",
                "town" : "New York City",
                "state" : "NY",
                "postcode" : "10017",
                "country" : "US"
              }
            },
            "caBankAccountDetails" : {
              "transitNumber" : "123",
              "institutionNumber" : "12345",
              "accountNumber" : "1234567"
            },
            "canadianInternationalDestination" : {
              "legalName" : "John Doe",
              "accountNumber" : "12345678",
              "transitNumber" : "12345",
              "bankName" : "Chase",
              "bankAddress" : {
                "line1" : "JP Morgan Chase",
                "town" : "New York City",
                "state" : "NY",
                "postcode" : "10017",
                "country" : "US"
              },
              "institutionNumber" : "123",
              "swiftCode" : "CHASUS33",
              "intermediaryBank" : {
                "bankName" : "Chase",
                "bankAddress" : {
                  "line1" : "JP Morgan Chase",
                  "town" : "New York City",
                  "state" : "NY",
                  "postcode" : "10017",
                  "country" : "US"
                },
                "swiftCode" : "CHASUS33",
                "routingNumber" : "123456789"
              }
            },
            "australianDestination" : {
              "legalName" : "John Doe",
              "accountNumber" : "12345678",
              "swiftCode" : "CHASUS33",
              "bsb" : "123456"
            },
            "swedishBankgiroDestination" : {
              "bankgiroNumber" : "123-4567",
              "accountName" : "12345678"
            },
            "logoUrl" : "logo",
            "legalCompanyName" : "The Merchant",
            "primaryColour" : "#000000",
            "customFields" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "includeBeneficiaryAddressInPaymentDetails" : true
          },
          "settings" : {
            "generateCashCreditGrant" : "ENABLED"
          },
          "accountingDate" : "2022-09-30"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence Account ID",
            "example" : "68233908-402a-43b4-8952-1c2ab0ef0b25"
          },
          "status" : {
            "description" : "Credit Note status",
            "$ref" : "#/components/schemas/CreditNoteStatus"
          },
          "invoiceId" : {
            "type" : "string",
            "description" : "Invoice ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "invoiceNumber" : {
            "type" : "string",
            "description" : "Invoice Number",
            "nullable" : true,
            "example" : "INV00001"
          },
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Subscription ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "currency" : {
            "description" : "Credit Note currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "issueDate" : {
            "type" : "string",
            "description" : "Issue date",
            "nullable" : true,
            "example" : "2022-09-15"
          },
          "billingPeriodStart" : {
            "type" : "string",
            "description" : "Billing period start",
            "nullable" : true,
            "example" : "2022-10-01T00:00:00Z"
          },
          "billingPeriodEnd" : {
            "type" : "string",
            "description" : "Billing period end",
            "nullable" : true,
            "example" : "2022-10-30T00:00:00Z"
          },
          "creditNoteNumber" : {
            "type" : "string",
            "description" : "Credit Note number",
            "nullable" : true,
            "example" : "CN00001"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the Customer this Credit Note is linked to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer's email addresses, used for sending the Credit Note if provided",
            "example" : [ "customer@example.com", "customer.alias@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Credit Note memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax, in decimal format of the Credit Note's currency",
            "example" : "2.50"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total, in decimal format of the Credit Note's currency",
            "example" : "51.20"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total, in decimal format of the Invoice's currency",
            "example" : "101.23"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Credit Note. These are not interpreted by Sequence; they are present for your use alone.",
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "customerTaxId" : {
            "type" : "string",
            "description" : "Customer's tax ID",
            "nullable" : true,
            "example" : "TAX123"
          },
          "linkedServices" : {
            "type" : "array",
            "description" : "External services which are linked to this credit note",
            "example" : [ {
              "externalId" : "123",
              "externalService" : "Xero",
              "syncTime" : "2022-06-28T16:47:00Z",
              "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/LinkInfo"
            }
          },
          "applicationStatus" : {
            "description" : "Application status derived from the ledger account balance. Omitted for credit notes that are not in a terminal status",
            "nullable" : true,
            "$ref" : "#/components/schemas/CreditNoteApplicationStatus"
          },
          "balance" : {
            "type" : "string",
            "description" : "Credit still available to apply, in decimal format of the Credit Note's currency. Omitted for credit notes with no ledger balance",
            "nullable" : true,
            "example" : "51.23"
          },
          "balanceVersion" : {
            "type" : "integer",
            "description" : "Ledger version of the balance. Advances each time the balance changes; required when applying this Credit Note to an Invoice. Omitted for credit notes with no ledger balance",
            "format" : "int64",
            "nullable" : true,
            "example" : 3
          },
          "applications" : {
            "type" : "array",
            "description" : "Invoices this Credit Note has been applied to, each with the amount applied and when. Empty when the Credit Note has not been applied to any invoice",
            "example" : [ {
              "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "invoiceNumber" : "INV00001",
              "amount" : "50.00",
              "appliedAt" : "2022-10-14T12:34:56Z"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/CreditNoteApplication"
            }
          },
          "merchantDetails" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InvoiceMerchantDetails"
          },
          "settings" : {
            "$ref" : "#/components/schemas/CreditNoteSettings"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "nullable" : true,
            "example" : "2022-09-30"
          }
        }
      },
      "CreditNoteStatus" : {
        "type" : "string",
        "example" : "SENT",
        "enum" : [ "DRAFT", "FINAL", "IN_PROGRESS", "SENT", "VOIDED" ]
      },
      "CreditNoteApplicationStatus" : {
        "type" : "string",
        "example" : "PARTIALLY_APPLIED",
        "enum" : [ "UNAPPLIED", "PARTIALLY_APPLIED", "FULLY_APPLIED", "UNKNOWN" ]
      },
      "CreditNoteApplication" : {
        "required" : [ "amount", "appliedAt", "invoiceId" ],
        "type" : "object",
        "example" : {
          "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "invoiceNumber" : "INV00001",
          "amount" : "50.00",
          "appliedAt" : "2022-10-14T12:34:56Z"
        },
        "properties" : {
          "invoiceId" : {
            "type" : "string",
            "description" : "ID of the invoice the credit was applied to",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "invoiceNumber" : {
            "type" : "string",
            "description" : "Invoice number of the invoice the credit was applied to, when available",
            "nullable" : true,
            "example" : "INV00001"
          },
          "amount" : {
            "type" : "string",
            "description" : "Amount applied, in decimal format of the Credit Note's currency",
            "example" : "50.00"
          },
          "appliedAt" : {
            "type" : "string",
            "description" : "When the credit was applied",
            "example" : "2022-10-14T12:34:56Z"
          }
        }
      },
      "CreditNoteSettings" : {
        "required" : [ "generateCashCreditGrant" ],
        "type" : "object",
        "description" : "Credit note settings",
        "example" : {
          "generateCashCreditGrant" : "ENABLED"
        },
        "properties" : {
          "generateCashCreditGrant" : {
            "description" : "Whether to generate a cash credit grant when sending this credit note",
            "$ref" : "#/components/schemas/SettingPreference"
          }
        }
      },
      "SettingPreference" : {
        "type" : "string",
        "example" : "ENABLED",
        "enum" : [ "ENABLED", "DISABLED" ]
      },
      "ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupPaginatedResponseModel" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
            "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "title" : "Users",
            "description" : "Credit note for users",
            "index" : 2,
            "netTotal" : "51.20",
            "totalTax" : "2.50",
            "grossTotal" : "101.23"
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "CreditNoteLineItemGroups",
            "example" : [ {
              "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
              "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "title" : "Users",
              "description" : "Credit note for users",
              "index" : 2,
              "netTotal" : "51.20",
              "totalTax" : "2.50",
              "grossTotal" : "101.23"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupResponseModel"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "ListCreditNoteLineItemGroupEndpointProductListCreditNoteLineItemGroupResponseModel" : {
        "required" : [ "creditNoteId", "grossTotal", "id", "index", "netTotal", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Users",
          "description" : "Credit note for users",
          "index" : 2,
          "netTotal" : "51.20",
          "totalTax" : "2.50",
          "grossTotal" : "101.23"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group ID",
            "example" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec"
          },
          "creditNoteId" : {
            "type" : "string",
            "description" : "Credit Note ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "lineItemGroupId" : {
            "type" : "string",
            "description" : "Line Item Group ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Title",
            "example" : "Users"
          },
          "description" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Description",
            "nullable" : true,
            "example" : "Credit note for users"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 2
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total",
            "example" : "51.20"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax",
            "example" : "2.50"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total",
            "example" : "101.23"
          }
        }
      },
      "CreditNoteResponse" : {
        "required" : [ "applications", "currency", "customerBillingAddress", "customerEmails", "customerId", "customerLegalCompanyName", "customerShippingAddress", "grossTotal", "id", "linkedServices", "metadata", "netTotal", "sequenceAccountId", "settings", "status", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
          "status" : "SENT",
          "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "invoiceNumber" : "INV00001",
          "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "currency" : "GBP",
          "issueDate" : "2022-09-15",
          "billingPeriodStart" : "2022-10-01T00:00:00Z",
          "billingPeriodEnd" : "2022-10-30T00:00:00Z",
          "creditNoteNumber" : "CN00001",
          "purchaseOrderNumber" : "PO123",
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "totalTax" : "2.50",
          "netTotal" : "51.20",
          "grossTotal" : "101.23",
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "customerTaxId" : "TAX123",
          "linkedServices" : [ {
            "externalId" : "123",
            "externalService" : "Xero",
            "syncTime" : "2022-06-28T16:47:00Z",
            "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
          } ],
          "applicationStatus" : "PARTIALLY_APPLIED",
          "balance" : "51.23",
          "balanceVersion" : 3,
          "applications" : [ {
            "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "invoiceNumber" : "INV00001",
            "amount" : "50.00",
            "appliedAt" : "2022-10-14T12:34:56Z"
          } ],
          "merchantDetails" : {
            "address" : {
              "line1" : "The White House",
              "line2" : "1600 Pennsylvania Avenue",
              "town" : "Washington, D.C.",
              "state" : "CA",
              "postcode" : "20500",
              "country" : "US"
            },
            "phoneNumber" : "0800001066",
            "email" : "donald@example.com",
            "taxId" : "TAX60",
            "iban" : "GB33BUKB20201555555555",
            "ukAccountDetails" : {
              "sortCode" : "000000",
              "accountNumber" : "12345678"
            },
            "usAchDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789"
            },
            "usWireDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789",
              "swiftCode" : "CHASUS33",
              "bankAddress" : {
                "line1" : "JP Morgan Chase",
                "town" : "New York City",
                "state" : "NY",
                "postcode" : "10017",
                "country" : "US"
              }
            },
            "caBankAccountDetails" : {
              "transitNumber" : "123",
              "institutionNumber" : "12345",
              "accountNumber" : "1234567"
            },
            "canadianInternationalDestination" : {
              "legalName" : "John Doe",
              "accountNumber" : "12345678",
              "transitNumber" : "12345",
              "bankName" : "Chase",
              "bankAddress" : {
                "line1" : "JP Morgan Chase",
                "town" : "New York City",
                "state" : "NY",
                "postcode" : "10017",
                "country" : "US"
              },
              "institutionNumber" : "123",
              "swiftCode" : "CHASUS33",
              "intermediaryBank" : {
                "bankName" : "Chase",
                "bankAddress" : {
                  "line1" : "JP Morgan Chase",
                  "town" : "New York City",
                  "state" : "NY",
                  "postcode" : "10017",
                  "country" : "US"
                },
                "swiftCode" : "CHASUS33",
                "routingNumber" : "123456789"
              }
            },
            "australianDestination" : {
              "legalName" : "John Doe",
              "accountNumber" : "12345678",
              "swiftCode" : "CHASUS33",
              "bsb" : "123456"
            },
            "swedishBankgiroDestination" : {
              "bankgiroNumber" : "123-4567",
              "accountName" : "12345678"
            },
            "logoUrl" : "logo",
            "legalCompanyName" : "The Merchant",
            "primaryColour" : "#000000",
            "customFields" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "includeBeneficiaryAddressInPaymentDetails" : true
          },
          "settings" : {
            "generateCashCreditGrant" : "ENABLED"
          },
          "accountingDate" : "2022-09-30"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence Account ID",
            "example" : "68233908-402a-43b4-8952-1c2ab0ef0b25"
          },
          "status" : {
            "description" : "Credit Note status",
            "$ref" : "#/components/schemas/CreditNoteStatus"
          },
          "invoiceId" : {
            "type" : "string",
            "description" : "Invoice ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "invoiceNumber" : {
            "type" : "string",
            "description" : "Invoice Number",
            "nullable" : true,
            "example" : "INV00001"
          },
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Subscription ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "currency" : {
            "description" : "Credit Note currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "issueDate" : {
            "type" : "string",
            "description" : "Issue date",
            "nullable" : true,
            "example" : "2022-09-15"
          },
          "billingPeriodStart" : {
            "type" : "string",
            "description" : "Billing period start",
            "nullable" : true,
            "example" : "2022-10-01T00:00:00Z"
          },
          "billingPeriodEnd" : {
            "type" : "string",
            "description" : "Billing period end",
            "nullable" : true,
            "example" : "2022-10-30T00:00:00Z"
          },
          "creditNoteNumber" : {
            "type" : "string",
            "description" : "Credit Note number",
            "nullable" : true,
            "example" : "CN00001"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the Customer this Credit Note is linked to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer's email addresses, used for sending the Credit Note if provided",
            "example" : [ "customer@example.com", "customer.alias@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Credit Note memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax, in decimal format of the Credit Note's currency",
            "example" : "2.50"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total, in decimal format of the Credit Note's currency",
            "example" : "51.20"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total, in decimal format of the Invoice's currency",
            "example" : "101.23"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Credit Note. These are not interpreted by Sequence; they are present for your use alone.",
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "customerTaxId" : {
            "type" : "string",
            "description" : "Customer's tax ID",
            "nullable" : true,
            "example" : "TAX123"
          },
          "linkedServices" : {
            "type" : "array",
            "description" : "External services which are linked to this credit note",
            "example" : [ {
              "externalId" : "123",
              "externalService" : "Xero",
              "syncTime" : "2022-06-28T16:47:00Z",
              "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/LinkInfo"
            }
          },
          "applicationStatus" : {
            "description" : "Application status derived from the ledger account balance. Omitted for credit notes that are not in a terminal status",
            "nullable" : true,
            "$ref" : "#/components/schemas/CreditNoteApplicationStatus"
          },
          "balance" : {
            "type" : "string",
            "description" : "Credit still available to apply, in decimal format of the Credit Note's currency. Omitted for credit notes with no ledger balance",
            "nullable" : true,
            "example" : "51.23"
          },
          "balanceVersion" : {
            "type" : "integer",
            "description" : "Ledger version of the balance. Advances each time the balance changes; required when applying this Credit Note to an Invoice. Omitted for credit notes with no ledger balance",
            "format" : "int64",
            "nullable" : true,
            "example" : 3
          },
          "applications" : {
            "type" : "array",
            "description" : "Invoices this Credit Note has been applied to, each with the amount applied and when. Empty when the Credit Note has not been applied to any invoice",
            "example" : [ {
              "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "invoiceNumber" : "INV00001",
              "amount" : "50.00",
              "appliedAt" : "2022-10-14T12:34:56Z"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/CreditNoteApplication"
            }
          },
          "merchantDetails" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InvoiceMerchantDetails"
          },
          "settings" : {
            "$ref" : "#/components/schemas/CreditNoteSettings"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "nullable" : true,
            "example" : "2022-09-30"
          }
        }
      },
      "Stable20240101CreateCreditNoteLineItemRequestModel" : {
        "required" : [ "creditNoteId", "externalIds", "quantity", "rate", "taxRate", "title" ],
        "type" : "object",
        "example" : {
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
          "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Ferraris",
          "description" : "Red",
          "quantity" : "2",
          "rate" : "20000.10",
          "taxRate" : "0.2",
          "rateDisplay" : "ABSOLUTE",
          "externalIds" : [ {
            "key" : "Xero",
            "value" : "123"
          } ],
          "servicePeriod" : {
            "start" : "2025-10-01",
            "endInclusive" : "2025-10-30"
          },
          "revenueRecognitionMethod" : "POINT_IN_TIME",
          "revenueClassification" : "EARNED",
          "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "invoiceLineItemIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ]
        },
        "properties" : {
          "creditNoteId" : {
            "type" : "string",
            "description" : "Credit Note Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "groupId" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group ID",
            "nullable" : true,
            "example" : "cd11218d-fa00-4faa-8684-a43113d076a8"
          },
          "lineItemId" : {
            "type" : "string",
            "description" : "Line Item ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Item Title",
            "example" : "Ferraris"
          },
          "description" : {
            "type" : "string",
            "description" : "Item Description",
            "nullable" : true,
            "example" : "Red"
          },
          "quantity" : {
            "type" : "string",
            "description" : "Quantity",
            "example" : "2"
          },
          "rate" : {
            "type" : "string",
            "description" : "Rate per Item",
            "example" : "20000.10"
          },
          "taxRate" : {
            "type" : "string",
            "description" : "Tax Rate",
            "example" : "0.2"
          },
          "rateDisplay" : {
            "description" : "Determines whether rate is displayed as an absolute value or percentage",
            "nullable" : true,
            "$ref" : "#/components/schemas/RateDisplay"
          },
          "externalIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationExternalIdentifier"
            }
          },
          "servicePeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "revenueRecognitionMethod" : {
            "description" : "Revenue recognition method. Valid values are: STRAIGHT_LINE, POINT_IN_TIME",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          },
          "revenueClassification" : {
            "description" : "Revenue classification",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueClassification"
          },
          "productId" : {
            "type" : "string",
            "description" : "Product ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "invoiceLineItemIds" : {
            "type" : "array",
            "description" : "Invoice line items that will be refunded by the created credit note line item. Defaults to list of lineItemId if left empty",
            "nullable" : true,
            "example" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "Stable20240101ProductCreateCreditNoteLineItemResponseModel" : {
        "required" : [ "creditNoteId", "externalIds", "grossTotal", "id", "index", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
          "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Ferraris",
          "description" : "Red",
          "quantity" : "2",
          "rate" : "20000.10",
          "taxRate" : "0.2",
          "index" : 2,
          "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "netTotal" : "20000.00",
          "totalTax" : "2000.00",
          "grossTotal" : "22000.00",
          "rateDisplay" : "ABSOLUTE",
          "externalIds" : [ {
            "key" : "Xero",
            "value" : "123"
          } ],
          "servicePeriod" : {
            "start" : "2025-10-01",
            "endInclusive" : "2025-10-30"
          },
          "revenueRecognitionMethod" : "STRAIGHT_LINE",
          "revenueClassification" : "EARNED",
          "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "creditNoteId" : {
            "type" : "string",
            "description" : "Credit Note Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "groupId" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group ID",
            "nullable" : true,
            "example" : "cd11218d-fa00-4faa-8684-a43113d076a8"
          },
          "lineItemId" : {
            "type" : "string",
            "description" : "Line Item ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Item Title",
            "example" : "Ferraris"
          },
          "description" : {
            "type" : "string",
            "description" : "Item Description",
            "nullable" : true,
            "example" : "Red"
          },
          "quantity" : {
            "type" : "string",
            "description" : "Quantity",
            "example" : "2"
          },
          "rate" : {
            "type" : "string",
            "description" : "Rate per Item",
            "example" : "20000.10"
          },
          "taxRate" : {
            "type" : "string",
            "description" : "Tax Rate",
            "example" : "0.2"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 2
          },
          "priceId" : {
            "type" : "string",
            "description" : "Price ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net Total",
            "example" : "20000.00"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total Tax",
            "example" : "2000.00"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross Total",
            "example" : "22000.00"
          },
          "rateDisplay" : {
            "description" : "Determines whether rate is displayed as an absolute value or percentage",
            "$ref" : "#/components/schemas/RateDisplay"
          },
          "externalIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationExternalIdentifier"
            }
          },
          "servicePeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "revenueRecognitionMethod" : {
            "description" : "Revenue recognition method",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          },
          "revenueClassification" : {
            "description" : "Revenue classification",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueClassification"
          },
          "productId" : {
            "type" : "string",
            "description" : "Product ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          }
        }
      },
      "Stable20240101CreateOrUpdateLineItem" : {
        "required" : [ "externalIds", "quantity", "rate", "taxRate", "title" ],
        "type" : "object",
        "example" : {
          "title" : "Ferraris",
          "description" : "Red",
          "quantity" : "2",
          "rate" : "20000.10",
          "taxRate" : "0.2",
          "servicePeriodStart" : "2022-10-20T00:00:00Z",
          "servicePeriodEnd" : "2022-10-24T00:00:00Z",
          "servicePeriod" : {
            "startDate" : "2022-10-20",
            "endDate" : "2022-10-24"
          },
          "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
          "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "rateDisplay" : "ABSOLUTE",
          "externalIds" : [ {
            "key" : "Xero",
            "value" : "123"
          } ],
          "revenueClassification" : "EARNED",
          "creditGrantId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "revenueRecognitionMethod" : "STRAIGHT_LINE"
        },
        "properties" : {
          "title" : {
            "type" : "string",
            "description" : "Item Title",
            "example" : "Ferraris"
          },
          "description" : {
            "type" : "string",
            "description" : "Item Description",
            "nullable" : true,
            "example" : "Red"
          },
          "quantity" : {
            "type" : "string",
            "description" : "Quantity",
            "example" : "2"
          },
          "rate" : {
            "type" : "string",
            "description" : "Price per Item",
            "example" : "20000.10"
          },
          "taxRate" : {
            "type" : "string",
            "description" : "Tax Rate",
            "example" : "0.2"
          },
          "servicePeriodStart" : {
            "type" : "string",
            "description" : "Start of the service period (the time period in which the service was provided)",
            "nullable" : true,
            "example" : "2022-10-20T00:00:00Z"
          },
          "servicePeriodEnd" : {
            "type" : "string",
            "description" : "End of the service period (the time period in which the service was provided)",
            "nullable" : true,
            "example" : "2022-10-24T00:00:00Z"
          },
          "servicePeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/DateRange"
          },
          "groupId" : {
            "type" : "string",
            "description" : "Line Item Group ID",
            "nullable" : true,
            "example" : "cd11218d-fa00-4faa-8684-a43113d076a8"
          },
          "priceId" : {
            "type" : "string",
            "description" : "Price ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "rateDisplay" : {
            "description" : "Determines whether rate is displayed as an absolute value or percentage",
            "nullable" : true,
            "$ref" : "#/components/schemas/RateDisplay"
          },
          "externalIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationExternalIdentifier"
            }
          },
          "revenueClassification" : {
            "description" : "Revenue classification",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueClassification"
          },
          "creditGrantId" : {
            "type" : "string",
            "description" : "Credit Grant ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "revenueRecognitionMethod" : {
            "description" : "Revenue recognition method",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          }
        }
      },
      "Stable20240101CreateInvoiceRequest" : {
        "required" : [ "currency", "customerId" ],
        "type" : "object",
        "example" : {
          "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "currency" : "GBP",
          "dueDate" : "2022-09-30",
          "purchaseOrderNumber" : "PO123",
          "reference" : "ref",
          "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "paymentOptions" : [ "BANK_TRANSFER" ],
          "billingPeriod" : {
            "start" : "2022-10-01",
            "endInclusive" : "2022-10-30"
          },
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
          "billingRunId" : "53ff21c8-4872-46c4-83bf-517d54876945",
          "accountingDate" : "2022-09-30",
          "attachmentAssetIds" : [ "99874519-25ce-46ff-8823-093115aa7222" ]
        },
        "properties" : {
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Billing Schedule ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "currency" : {
            "description" : "Invoice currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "dueDate" : {
            "type" : "string",
            "description" : "Due date",
            "nullable" : true,
            "example" : "2022-09-30"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "reference" : {
            "type" : "string",
            "description" : "Reference",
            "nullable" : true,
            "example" : "ref"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer email addresses, used for sending the Invoice if provided",
            "nullable" : true,
            "example" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "nullable" : true,
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Invoice memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "paymentOptions" : {
            "type" : "array",
            "description" : "Invoice payment options",
            "nullable" : true,
            "example" : [ "BANK_TRANSFER" ],
            "items" : {
              "$ref" : "#/components/schemas/InvoicePaymentOption"
            }
          },
          "billingPeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the Customer this invoice is linked to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.",
            "nullable" : true,
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "creditBalances" : {
            "type" : "string",
            "description" : "Credit balances",
            "nullable" : true,
            "example" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)"
          },
          "billingRunId" : {
            "type" : "string",
            "description" : "Billing Run ID",
            "nullable" : true,
            "example" : "53ff21c8-4872-46c4-83bf-517d54876945"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "nullable" : true,
            "example" : "2022-09-30"
          },
          "attachmentAssetIds" : {
            "type" : "array",
            "description" : "Attachment asset IDs",
            "nullable" : true,
            "example" : [ "99874519-25ce-46ff-8823-093115aa7222" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "InvoiceResponse" : {
        "required" : [ "accountingDate", "appliedCreditGrants", "appliedCreditNotes", "createdAt", "creditNoteIds", "currency", "customerBillingAddress", "customerEmails", "customerId", "customerLegalCompanyName", "customerShippingAddress", "dueDatePolicy", "dueDateSource", "dueDateStatus", "grossTotal", "id", "integrationPaymentStatuses", "isCustomerArchived", "linkedServices", "metadata", "netTotal", "paymentAllocations", "paymentStatus", "paymentTermDays", "projectedAmountDue", "projectedCreditGrants", "renderSettings", "sequenceAccountId", "status", "totalTax", "updatedAt" ],
        "type" : "object",
        "example" : {
          "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
          "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
          "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "billingRunId" : "9c5fdd27-1f7a-41e7-ab67-14f65272a853",
          "status" : "SENT",
          "currency" : "GBP",
          "invoiceNumber" : "INV00001",
          "issueDate" : "2022-09-15",
          "dueDate" : "2022-09-30",
          "purchaseOrderNumber" : "PO123",
          "reference" : "ref",
          "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "paymentOptions" : [ "BANK_TRANSFER" ],
          "billingPeriod" : {
            "start" : "2022-10-01",
            "endInclusive" : "2022-10-30"
          },
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "totalTax" : "2.50",
          "netTotal" : "98.73",
          "grossTotal" : "101.23",
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "customerTaxId" : "TAX123",
          "paymentStatus" : "PARTIALLY_PAID",
          "createdAt" : "2022-10-30T00:00:00Z",
          "updatedAt" : "2022-10-30T00:00:00Z",
          "creditNoteIds" : [ "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b" ],
          "linkedServices" : [ {
            "externalId" : "123",
            "externalService" : "Xero",
            "syncTime" : "2022-06-28T16:47:00Z",
            "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
          } ],
          "merchantDetails" : {
            "address" : {
              "line1" : "The White House",
              "line2" : "1600 Pennsylvania Avenue",
              "town" : "Washington, D.C.",
              "state" : "CA",
              "postcode" : "20500",
              "country" : "US"
            },
            "phoneNumber" : "0800001066",
            "email" : "finance@example.com",
            "taxId" : "TAX60",
            "iban" : "GB33BUKB20201555555555",
            "ukAccountDetails" : {
              "sortCode" : "000000",
              "accountNumber" : "12345678"
            },
            "usAchDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789"
            },
            "usWireDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789",
              "swiftCode" : "CHASUS33",
              "bankAddress" : {
                "line1" : "JP Morgan Chase",
                "town" : "New York City",
                "state" : "NY",
                "postcode" : "10017",
                "country" : "US"
              }
            },
            "caBankAccountDetails" : {
              "transitNumber" : "123",
              "institutionNumber" : "12345",
              "accountNumber" : "1234567"
            },
            "canadianInternationalDestination" : {
              "legalName" : "John Doe",
              "accountNumber" : "12345678",
              "transitNumber" : "12345",
              "bankName" : "Chase",
              "bankAddress" : {
                "line1" : "JP Morgan Chase",
                "town" : "New York City",
                "state" : "NY",
                "postcode" : "10017",
                "country" : "US"
              },
              "institutionNumber" : "123",
              "swiftCode" : "CHASUS33",
              "intermediaryBank" : {
                "bankName" : "Chase",
                "bankAddress" : {
                  "line1" : "JP Morgan Chase",
                  "town" : "New York City",
                  "state" : "NY",
                  "postcode" : "10017",
                  "country" : "US"
                },
                "swiftCode" : "CHASUS33",
                "routingNumber" : "123456789"
              }
            },
            "australianDestination" : {
              "legalName" : "John Doe",
              "accountNumber" : "12345678",
              "swiftCode" : "CHASUS33",
              "bsb" : "123456"
            },
            "swedishBankgiroDestination" : {
              "bankgiroNumber" : "123-4567",
              "accountName" : "The Merchant"
            },
            "logoUrl" : "logo",
            "legalCompanyName" : "The Merchant",
            "primaryColour" : "#000000",
            "customFields" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "includeBeneficiaryAddressInPaymentDetails" : false
          },
          "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
          "dunningStatus" : "SCHEDULED",
          "accountingDate" : "2022-09-30",
          "calculatedAt" : "2022-09-30T00:00:00Z",
          "customerTaxStatus" : "TAXED",
          "renderSettings" : {
            "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
          },
          "isCustomerArchived" : false,
          "attachmentAssets" : [ {
            "id" : "4b36a61e-425e-4640-aa26-6224c577b613",
            "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
            "createdByType" : "SEQUENCE_USER",
            "type" : "DOCUMENT",
            "format" : "PDF",
            "fileName" : "my-document.pdf",
            "fileSizeBytes" : 12345,
            "url" : "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf",
            "createdAt" : "2022-06-28T16:47:00Z"
          } ],
          "balance" : "11.23",
          "balanceVersion" : 4,
          "integrationPaymentStatuses" : {
            "stripe" : "PAID",
            "goCardless" : "CANCELLED"
          },
          "appliedCreditNotes" : [ {
            "id" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
            "creditNoteBalanceVersion" : 11,
            "creditNoteNumber" : "CN00001",
            "netTotal" : "41.67",
            "totalTax" : "8.33",
            "grossTotal" : "50.00",
            "appliedAmount" : "30.00",
            "lineItems" : [ {
              "name" : "Adjustment",
              "netTotal" : "41.67",
              "grossTotal" : "50.00",
              "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
            } ]
          } ],
          "appliedCreditGrants" : [ {
            "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
            "creditGrantName" : "Q3 prepaid credit",
            "amount" : "10.00",
            "taxAmount" : "0.00",
            "status" : "APPLIED"
          } ],
          "appliedCreditGrantTax" : "0.00",
          "projectedCreditGrants" : [ ],
          "projectedAmountDue" : "101.23",
          "paymentAllocations" : [ {
            "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
            "paymentBalanceVersion" : 12,
            "amount" : "50.00",
            "allocatedAt" : "2022-10-30T00:00:00Z",
            "paidAt" : "2022-10-29T00:00:00Z",
            "origin" : "SEQUENCE",
            "reference" : "BACS FT26153001"
          } ],
          "currentlyApplied" : {
            "creditNotes" : [ {
              "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
              "amount" : "30.00",
              "creditNoteBalanceVersion" : 11,
              "creditNoteNumber" : "CN00001",
              "netTotal" : "41.67",
              "totalTax" : "8.33",
              "grossTotal" : "50.00",
              "lineItems" : [ {
                "name" : "Adjustment",
                "netTotal" : "41.67",
                "grossTotal" : "50.00",
                "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
              } ]
            } ],
            "payments" : [ {
              "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
              "amount" : "50.00",
              "paymentBalanceVersion" : 12,
              "paidAt" : "2022-10-29T00:00:00Z",
              "origin" : "SEQUENCE",
              "reference" : "BACS FT26153001"
            } ]
          },
          "paymentTermDays" : 30,
          "dueDateSource" : "CALCULATED",
          "dueDatePolicy" : {
            "paymentTermDays" : 30,
            "type" : "PAYMENT_TERMS"
          },
          "dueDateStatus" : "SET"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Invoice ID",
            "example" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence Account ID",
            "example" : "68233908-402a-43b4-8952-1c2ab0ef0b25"
          },
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Billing Schedule ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "billingRunId" : {
            "type" : "string",
            "description" : "Billing Run ID",
            "nullable" : true,
            "example" : "9c5fdd27-1f7a-41e7-ab67-14f65272a853"
          },
          "status" : {
            "description" : "Invoice status",
            "$ref" : "#/components/schemas/InvoiceStatus"
          },
          "currency" : {
            "description" : "Invoice currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "invoiceNumber" : {
            "type" : "string",
            "description" : "Invoice number",
            "nullable" : true,
            "example" : "INV00001"
          },
          "issueDate" : {
            "type" : "string",
            "description" : "Issue date",
            "nullable" : true,
            "example" : "2022-09-15"
          },
          "dueDate" : {
            "type" : "string",
            "description" : "Due date",
            "nullable" : true,
            "example" : "2022-09-30"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "reference" : {
            "type" : "string",
            "description" : "Reference",
            "nullable" : true,
            "example" : "ref"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer email addresses, used for sending the Invoice if provided",
            "example" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Invoice memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "paymentOptions" : {
            "type" : "array",
            "description" : "Invoice payment options",
            "nullable" : true,
            "example" : [ "BANK_TRANSFER" ],
            "items" : {
              "$ref" : "#/components/schemas/InvoicePaymentOption"
            }
          },
          "billingPeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the Customer this invoice is linked to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax, in decimal format of the Invoice's currency",
            "example" : "2.50"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total, in decimal format of the Invoice's currency",
            "example" : "98.73"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total, in decimal format of the Invoice's currency",
            "example" : "101.23"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.",
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "customerTaxId" : {
            "type" : "string",
            "description" : "Customer's tax ID",
            "nullable" : true,
            "example" : "TAX123"
          },
          "paymentStatus" : {
            "description" : "Invoice payment status",
            "$ref" : "#/components/schemas/InvoicePaymentStatus"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Creation time",
            "example" : "2022-10-30T00:00:00Z"
          },
          "updatedAt" : {
            "type" : "string",
            "description" : "Updated time",
            "example" : "2022-10-30T00:00:00Z"
          },
          "creditNoteIds" : {
            "type" : "array",
            "description" : "IDs of linked credit notes (if any)",
            "example" : [ "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b" ],
            "items" : {
              "type" : "string"
            }
          },
          "linkedServices" : {
            "type" : "array",
            "description" : "External services which are linked to this invoice",
            "example" : [ {
              "externalId" : "123",
              "externalService" : "Xero",
              "syncTime" : "2022-06-28T16:47:00Z",
              "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/LinkInfo"
            }
          },
          "merchantDetails" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InvoiceMerchantDetails"
          },
          "creditBalances" : {
            "type" : "string",
            "description" : "Credit balances",
            "nullable" : true,
            "example" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)"
          },
          "dunningStatus" : {
            "description" : "Dunning status",
            "nullable" : true,
            "$ref" : "#/components/schemas/InvoiceDunningStatus"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "example" : "2022-09-30"
          },
          "calculatedAt" : {
            "type" : "string",
            "description" : "Time this invoice was last calculated (applicable for invoices generated by billing engine only)",
            "nullable" : true,
            "example" : "2022-09-30T00:00:00Z"
          },
          "customerTaxStatus" : {
            "description" : "Customer tax status",
            "nullable" : true,
            "$ref" : "#/components/schemas/TaxStatus"
          },
          "renderSettings" : {
            "$ref" : "#/components/schemas/InvoiceRenderSettingsInlineAggregate"
          },
          "isCustomerArchived" : {
            "type" : "boolean",
            "description" : "isCustomerArchived",
            "example" : false
          },
          "attachmentAssets" : {
            "type" : "array",
            "description" : "Assets attached to this invoice",
            "nullable" : true,
            "example" : [ {
              "id" : "4b36a61e-425e-4640-aa26-6224c577b613",
              "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
              "createdByType" : "SEQUENCE_USER",
              "type" : "DOCUMENT",
              "format" : "PDF",
              "fileName" : "my-document.pdf",
              "fileSizeBytes" : 12345,
              "url" : "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf",
              "createdAt" : "2022-06-28T16:47:00Z"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/AssetResponse"
            }
          },
          "balance" : {
            "type" : "string",
            "description" : "Outstanding amount owed on this invoice",
            "nullable" : true,
            "example" : "11.23"
          },
          "balanceVersion" : {
            "type" : "integer",
            "description" : "Ledger version of the balance. Advances each time the balance changes; null when the invoice has no ledger balance.",
            "format" : "int64",
            "nullable" : true,
            "example" : 4
          },
          "integrationPaymentStatuses" : {
            "$ref" : "#/components/schemas/IntegrationPaymentStatuses"
          },
          "appliedCreditNotes" : {
            "type" : "array",
            "description" : "Credit notes applied to this invoice, with per-credit-note totals and line items",
            "example" : [ {
              "id" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
              "creditNoteBalanceVersion" : 11,
              "creditNoteNumber" : "CN00001",
              "netTotal" : "41.67",
              "totalTax" : "8.33",
              "grossTotal" : "50.00",
              "appliedAmount" : "30.00",
              "lineItems" : [ {
                "name" : "Adjustment",
                "netTotal" : "41.67",
                "grossTotal" : "50.00",
                "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
              } ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/AppliedCreditNoteResponse"
            }
          },
          "appliedCreditGrants" : {
            "type" : "array",
            "description" : "Credit grants applied to this invoice, with the total credit each grant contributed",
            "example" : [ {
              "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
              "creditGrantName" : "Q3 prepaid credit",
              "amount" : "10.00",
              "taxAmount" : "0.00",
              "status" : "APPLIED"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/AppliedCreditGrantResponse"
            }
          },
          "appliedCreditGrantTax" : {
            "type" : "string",
            "description" : "Total tax credited to this invoice alongside its applied credit grants. Zero where no tax was credited, and absent when invoice's ledger balance not yet initialised. Tax on applied credit notes not included, as they carry their own tax. Rounded to currency scale for display.",
            "nullable" : true,
            "example" : "0.00"
          },
          "projectedCreditGrants" : {
            "type" : "array",
            "description" : "Credit grants expected to reduce this invoice when it is finalised, one row per grant. An estimate that is only locked in at finalisation, and empty once the invoice has been finalised.",
            "example" : [ ],
            "items" : {
              "$ref" : "#/components/schemas/ProjectedCreditGrantResponse"
            }
          },
          "projectedAmountDue" : {
            "type" : "string",
            "description" : "What this invoice is expected to owe once projectedCreditGrants is applied to it, and grossTotal itself where nothing is projected, rounded to the currency's scale. Nets off the projected credit only: tax credited alongside those grants is not deducted, so a finalised invoice owes this less its appliedCreditGrantTax. An estimate that is only locked in at finalisation.",
            "example" : "101.23"
          },
          "paymentAllocations" : {
            "type" : "array",
            "description" : "Payments allocated to this invoice, with per-payment amounts and dates",
            "example" : [ {
              "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
              "paymentBalanceVersion" : 12,
              "amount" : "50.00",
              "allocatedAt" : "2022-10-30T00:00:00Z",
              "paidAt" : "2022-10-29T00:00:00Z",
              "origin" : "SEQUENCE",
              "reference" : "BACS FT26153001"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/PaymentAllocationResponse"
            }
          },
          "currentlyApplied" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/CurrentlyApplied"
          },
          "paymentTermDays" : {
            "type" : "integer",
            "description" : "Payment terms in days. The due date is computed from these terms.",
            "nullable" : true,
            "example" : 30
          },
          "dueDateSource" : {
            "description" : "How the due date was determined: MANUAL when set to a fixed date, CALCULATED when computed from payment terms.",
            "$ref" : "#/components/schemas/DueDateSource"
          },
          "dueDatePolicy" : {
            "description" : "How the due date is set: MANUAL for a date chosen by hand, PAYMENT_TERMS for a number of days after the due date anchor. Null when the invoice has neither a due date nor payment terms. Send the same value back to keep the policy, a different one to change it.",
            "nullable" : true,
            "example" : {
              "paymentTermDays" : 30,
              "type" : "PAYMENT_TERMS"
            },
            "oneOf" : [ {
              "$ref" : "#/components/schemas/DueDatePolicyManual"
            }, {
              "$ref" : "#/components/schemas/DueDatePolicyPaymentTerms"
            } ],
            "discriminator" : {
              "propertyName" : "type",
              "mapping" : {
                "MANUAL" : "#/components/schemas/DueDatePolicyManual",
                "PAYMENT_TERMS" : "#/components/schemas/DueDatePolicyPaymentTerms"
              }
            }
          },
          "dueDateStatus" : {
            "description" : "Whether the invoice has its due date yet. PENDING means it has none: an account that anchors due dates to the issue date fills the due date in when the invoice is issued.",
            "$ref" : "#/components/schemas/DueDateStatus"
          }
        }
      },
      "InvoiceDunningStatus" : {
        "type" : "string",
        "example" : "SCHEDULED",
        "enum" : [ "SCHEDULED", "OVERDUE_CHECK_SCHEDULED", "COMPLETED", "FAILED", "NOT_REQUIRED" ]
      },
      "AssetResponse" : {
        "required" : [ "createdAt", "createdBy", "createdByType", "fileName", "fileSizeBytes", "format", "id", "type", "url" ],
        "type" : "object",
        "example" : {
          "id" : "4b36a61e-425e-4640-aa26-6224c577b613",
          "createdBy" : "94703530-1293-479b-bd37-ccad42fd9c8b",
          "createdByType" : "SEQUENCE_USER",
          "type" : "DOCUMENT",
          "format" : "PDF",
          "fileName" : "my-document.pdf",
          "fileSizeBytes" : 12345,
          "url" : "https://assets.sequencehq.com/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf",
          "createdAt" : "2022-06-28T16:47:00Z"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Unique ID",
            "example" : "4b36a61e-425e-4640-aa26-6224c577b613"
          },
          "createdBy" : {
            "type" : "string",
            "description" : "The ID of the asset creator. A Sequence user id or API key id, as identified by `createdByType`.",
            "example" : "94703530-1293-479b-bd37-ccad42fd9c8b"
          },
          "createdByType" : {
            "description" : "Whether `createdBy` identifies a `SEQUENCE_USER` or an `API_CLIENT`",
            "$ref" : "#/components/schemas/AssetCreatorType"
          },
          "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-document.pdf"
          },
          "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/6cedbb5e-4f77-4217-b8d4-020e7e4d33c9/documents/4B36A61E-425E-4640-AA26-6224C577B613.pdf"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Creation timestamp. Formatted as an ISO 8601 timestamp.",
            "example" : "2022-06-28T16:47:00Z"
          }
        }
      },
      "AssetCreatorType" : {
        "type" : "string",
        "example" : "SEQUENCE_USER",
        "enum" : [ "SEQUENCE_USER", "API_CLIENT" ]
      },
      "AssetType" : {
        "type" : "string",
        "example" : "DOCUMENT",
        "enum" : [ "IMAGE", "DOCUMENT", "BINARY" ]
      },
      "AssetFormat" : {
        "type" : "string",
        "example" : "PDF",
        "enum" : [ "JPEG", "JPG", "PNG", "PDF", "CSV", "TXT", "RTF", "MD", "XLS", "XLSX", "XLSM", "DOC", "DOCX", "ZIP", "ODT", "ODS" ]
      },
      "IntegrationPaymentStatuses" : {
        "type" : "object",
        "description" : "Payment or sync status per integration service",
        "example" : {
          "stripe" : "PAID",
          "goCardless" : "CANCELLED"
        },
        "properties" : {
          "stripe" : {
            "description" : "Payment status for Stripe integration",
            "nullable" : true,
            "$ref" : "#/components/schemas/IntegrationPaymentStatus"
          },
          "goCardless" : {
            "description" : "Payment status for GoCardless integration",
            "nullable" : true,
            "$ref" : "#/components/schemas/IntegrationPaymentStatus"
          }
        }
      },
      "IntegrationPaymentStatus" : {
        "type" : "string",
        "example" : "PAID",
        "enum" : [ "PENDING", "IN_PROGRESS", "PAID", "FAILED", "CANCELLED", "REFUNDED" ]
      },
      "AppliedCreditNoteResponse" : {
        "required" : [ "appliedAmount", "creditNoteBalanceVersion", "grossTotal", "id", "lineItems", "netTotal", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
          "creditNoteBalanceVersion" : 11,
          "creditNoteNumber" : "CN00001",
          "netTotal" : "41.67",
          "totalTax" : "8.33",
          "grossTotal" : "50.00",
          "appliedAmount" : "30.00",
          "lineItems" : [ {
            "name" : "Adjustment",
            "netTotal" : "41.67",
            "grossTotal" : "50.00",
            "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
          } ]
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "The applied credit note's ID",
            "example" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b"
          },
          "creditNoteBalanceVersion" : {
            "type" : "integer",
            "description" : "The Credit Note's current ledger balance version for optimistic concurrency control.",
            "format" : "int64",
            "example" : 11
          },
          "creditNoteNumber" : {
            "type" : "string",
            "description" : "The applied credit note's number",
            "nullable" : true,
            "example" : "CN00001"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total of the credit note, in decimal format of the Invoice's currency",
            "example" : "41.67"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax of the credit note, in decimal format of the Invoice's currency",
            "example" : "8.33"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total of the credit note, in decimal format of the Invoice's currency",
            "example" : "50.00"
          },
          "appliedAmount" : {
            "type" : "string",
            "description" : "Amount of this application of the credit note to the invoice, in decimal format of the Invoice's currency",
            "example" : "30.00"
          },
          "lineItems" : {
            "type" : "array",
            "description" : "The applied credit note's line items",
            "example" : [ {
              "name" : "Adjustment",
              "netTotal" : "41.67",
              "grossTotal" : "50.00",
              "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/AppliedCreditNoteLineItemResponse"
            }
          }
        }
      },
      "AppliedCreditNoteLineItemResponse" : {
        "required" : [ "grossTotal", "invoiceLineItemIds", "name", "netTotal" ],
        "type" : "object",
        "example" : {
          "name" : "Adjustment",
          "netTotal" : "41.67",
          "grossTotal" : "50.00",
          "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
        },
        "properties" : {
          "name" : {
            "type" : "string",
            "description" : "Line item name",
            "example" : "Adjustment"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total of the line item, in decimal format of the Invoice's currency",
            "example" : "41.67"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total of the line item, in decimal format of the Invoice's currency",
            "example" : "50.00"
          },
          "invoiceLineItemIds" : {
            "type" : "array",
            "description" : "IDs of the invoice line item(s) to which this credit note line item relates",
            "example" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "AppliedCreditGrantResponse" : {
        "required" : [ "amount", "status" ],
        "type" : "object",
        "example" : {
          "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
          "creditGrantName" : "Q3 prepaid credit",
          "amount" : "10.00",
          "taxAmount" : "0.00",
          "status" : "APPLIED"
        },
        "properties" : {
          "creditGrantId" : {
            "type" : "string",
            "description" : "The applied credit grant's ID. Null when the grant behind the credit could not be identified.",
            "nullable" : true,
            "example" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13"
          },
          "creditGrantName" : {
            "type" : "string",
            "description" : "The applied credit grant's name. Null when the grant could not be identified or its name could not be read.",
            "nullable" : true,
            "example" : "Q3 prepaid credit"
          },
          "amount" : {
            "type" : "string",
            "description" : "Credit applied from this grant, in decimal format of the Invoice's currency. Net of tax; tax credited alongside the grants is reported once at invoice level in `appliedCreditGrantTax`.",
            "example" : "10.00"
          },
          "taxAmount" : {
            "type" : "string",
            "description" : "Tax credited alongside this grant's net amount, in decimal format of the Invoice's currency. Absent where no tax was credited; treat absent as zero when reconciling.",
            "nullable" : true,
            "example" : "0.00"
          },
          "status" : {
            "description" : "Whether this credit has been applied to the invoice or is only projected.",
            "$ref" : "#/components/schemas/AppliedCreditGrantStatus"
          }
        }
      },
      "AppliedCreditGrantStatus" : {
        "type" : "string",
        "example" : "APPLIED",
        "enum" : [ "APPLIED", "PROJECTED" ]
      },
      "ProjectedCreditGrantResponse" : {
        "required" : [ "amount" ],
        "type" : "object",
        "example" : {
          "creditGrantId" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13",
          "creditGrantName" : "Q3 prepaid credit",
          "amount" : "30.00"
        },
        "properties" : {
          "creditGrantId" : {
            "type" : "string",
            "description" : "The credit grant's ID. Null where the expected credit cannot be attributed to one grant.",
            "nullable" : true,
            "example" : "0198b2c9-5f41-7c3d-9a8e-2b4c6d8e0f13"
          },
          "creditGrantName" : {
            "type" : "string",
            "description" : "The credit grant's name. Null where the grant could not be identified or its name could not be read.",
            "nullable" : true,
            "example" : "Q3 prepaid credit"
          },
          "amount" : {
            "type" : "string",
            "description" : "Credit this grant is expected to contribute, in decimal format of the Invoice's currency. Net of tax; tax on projected credit is not reported.",
            "example" : "30.00"
          }
        }
      },
      "PaymentAllocationResponse" : {
        "required" : [ "allocatedAt", "amount", "origin", "paidAt", "paymentBalanceVersion", "paymentId" ],
        "type" : "object",
        "example" : {
          "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
          "paymentBalanceVersion" : 12,
          "amount" : "50.00",
          "allocatedAt" : "2022-10-30T00:00:00Z",
          "paidAt" : "2022-10-29T00:00:00Z",
          "origin" : "SEQUENCE",
          "reference" : "BACS FT26153001"
        },
        "properties" : {
          "paymentId" : {
            "type" : "string",
            "description" : "The ID of the payment allocated to the invoice",
            "example" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e"
          },
          "paymentBalanceVersion" : {
            "type" : "integer",
            "description" : "The payment's current ledger balance version for optimistic concurrency control.",
            "format" : "int64",
            "example" : 12
          },
          "amount" : {
            "type" : "string",
            "description" : "Amount allocated to the invoice, in decimal format of the Invoice's currency",
            "example" : "50.00"
          },
          "allocatedAt" : {
            "type" : "string",
            "description" : "Time the allocation was recorded",
            "example" : "2022-10-30T00:00:00Z"
          },
          "paidAt" : {
            "type" : "string",
            "description" : "Time the payment was made",
            "example" : "2022-10-29T00:00:00Z"
          },
          "origin" : {
            "description" : "The system the payment entered through: Sequence, a payment provider, or an accounting system",
            "$ref" : "#/components/schemas/PaymentOrigin"
          },
          "reference" : {
            "type" : "string",
            "description" : "A reference associated with the payment, either entered by the user or populated by the payment provider. Absent when no reference is available.",
            "nullable" : true,
            "example" : "BACS FT26153001"
          }
        }
      },
      "PaymentOrigin" : {
        "type" : "string",
        "example" : "SEQUENCE",
        "enum" : [ "SEQUENCE", "STRIPE", "GOCARDLESS", "XERO", "QUICKBOOKS", "RILLET", "NETSUITE" ]
      },
      "CurrentlyApplied" : {
        "required" : [ "creditNotes", "payments" ],
        "type" : "object",
        "description" : "Payments and credit notes with a positive net amount currently applied to this invoice. Fully reversed applications are omitted.",
        "example" : {
          "creditNotes" : [ {
            "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
            "amount" : "30.00",
            "creditNoteBalanceVersion" : 11,
            "creditNoteNumber" : "CN00001",
            "netTotal" : "41.67",
            "totalTax" : "8.33",
            "grossTotal" : "50.00",
            "lineItems" : [ {
              "name" : "Adjustment",
              "netTotal" : "41.67",
              "grossTotal" : "50.00",
              "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
            } ]
          } ],
          "payments" : [ {
            "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
            "amount" : "50.00",
            "paymentBalanceVersion" : 12,
            "paidAt" : "2022-10-29T00:00:00Z",
            "origin" : "SEQUENCE",
            "reference" : "BACS FT26153001"
          } ]
        },
        "properties" : {
          "creditNotes" : {
            "type" : "array",
            "description" : "Credit notes with a positive amount currently applied to this invoice.",
            "example" : [ {
              "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
              "amount" : "30.00",
              "creditNoteBalanceVersion" : 11,
              "creditNoteNumber" : "CN00001",
              "netTotal" : "41.67",
              "totalTax" : "8.33",
              "grossTotal" : "50.00",
              "lineItems" : [ {
                "name" : "Adjustment",
                "netTotal" : "41.67",
                "grossTotal" : "50.00",
                "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
              } ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/AppliedCreditNote"
            }
          },
          "payments" : {
            "type" : "array",
            "description" : "Payments with a positive amount currently applied to this invoice.",
            "example" : [ {
              "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
              "amount" : "50.00",
              "paymentBalanceVersion" : 12,
              "paidAt" : "2022-10-29T00:00:00Z",
              "origin" : "SEQUENCE",
              "reference" : "BACS FT26153001"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/AppliedPayment"
            }
          }
        }
      },
      "AppliedCreditNote" : {
        "required" : [ "amount", "creditNoteBalanceVersion", "creditNoteId", "grossTotal", "lineItems", "netTotal", "totalTax" ],
        "type" : "object",
        "example" : {
          "creditNoteId" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b",
          "amount" : "30.00",
          "creditNoteBalanceVersion" : 11,
          "creditNoteNumber" : "CN00001",
          "netTotal" : "41.67",
          "totalTax" : "8.33",
          "grossTotal" : "50.00",
          "lineItems" : [ {
            "name" : "Adjustment",
            "netTotal" : "41.67",
            "grossTotal" : "50.00",
            "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
          } ]
        },
        "properties" : {
          "creditNoteId" : {
            "type" : "string",
            "description" : "The ID of the credit note currently applied to this invoice.",
            "example" : "8f3a5b1e-0c2d-4e6f-8a9b-1c2d3e4f5a6b"
          },
          "amount" : {
            "type" : "string",
            "description" : "The net amount of this credit note currently applied, in the invoice's currency.",
            "example" : "30.00"
          },
          "creditNoteBalanceVersion" : {
            "type" : "integer",
            "description" : "The credit note's current ledger balance version for optimistic concurrency control.",
            "format" : "int64",
            "example" : 11
          },
          "creditNoteNumber" : {
            "type" : "string",
            "description" : "The credit note's number.",
            "nullable" : true,
            "example" : "CN00001"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "The original net total of the credit note, in the invoice's currency.",
            "example" : "41.67"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "The original tax total of the credit note, in the invoice's currency.",
            "example" : "8.33"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "The original gross total of the credit note, in the invoice's currency.",
            "example" : "50.00"
          },
          "lineItems" : {
            "type" : "array",
            "description" : "The credit note's original line items, before application reversals.",
            "example" : [ {
              "name" : "Adjustment",
              "netTotal" : "41.67",
              "grossTotal" : "50.00",
              "invoiceLineItemIds" : [ "2d4f6a8b-1c3e-4f5a-9b7d-8e6f5a4b3c2d" ]
            } ],
            "items" : {
              "$ref" : "#/components/schemas/AppliedCreditNoteLineItemResponse"
            }
          }
        }
      },
      "AppliedPayment" : {
        "required" : [ "amount", "origin", "paidAt", "paymentBalanceVersion", "paymentId" ],
        "type" : "object",
        "example" : {
          "paymentId" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e",
          "amount" : "50.00",
          "paymentBalanceVersion" : 12,
          "paidAt" : "2022-10-29T00:00:00Z",
          "origin" : "SEQUENCE",
          "reference" : "BACS FT26153001"
        },
        "properties" : {
          "paymentId" : {
            "type" : "string",
            "description" : "The ID of the payment currently applied to this invoice.",
            "example" : "3f9c1a7d-6b2e-4c8a-9d5f-0e1a2b3c4d5e"
          },
          "amount" : {
            "type" : "string",
            "description" : "The net amount of this payment currently applied, in the invoice's currency.",
            "example" : "50.00"
          },
          "paymentBalanceVersion" : {
            "type" : "integer",
            "description" : "The payment's current ledger balance version for optimistic concurrency control.",
            "format" : "int64",
            "example" : 12
          },
          "paidAt" : {
            "type" : "string",
            "description" : "The time the payment was made.",
            "example" : "2022-10-29T00:00:00Z"
          },
          "origin" : {
            "description" : "The system the payment entered through.",
            "$ref" : "#/components/schemas/PaymentOrigin"
          },
          "reference" : {
            "type" : "string",
            "description" : "The payment reference, when available.",
            "nullable" : true,
            "example" : "BACS FT26153001"
          }
        }
      },
      "UpdateLineItemGroupRequestModel" : {
        "required" : [ "title" ],
        "type" : "object",
        "example" : {
          "title" : "Users",
          "description" : "Charges for users",
          "taxCategoryId" : "28227c88-6dba-455f-9b30-b9c76957e610",
          "revenueRecognitionMethod" : "STRAIGHT_LINE",
          "revenueClassification" : "EARNED",
          "servicePeriod" : {
            "start" : "2022-10-20",
            "endInclusive" : "2022-10-24"
          },
          "index" : 10
        },
        "properties" : {
          "title" : {
            "type" : "string",
            "description" : "Line Item Group Title",
            "example" : "Users"
          },
          "description" : {
            "type" : "string",
            "description" : "Line Item Group Description",
            "nullable" : true,
            "example" : "Charges for users"
          },
          "taxCategoryId" : {
            "type" : "string",
            "description" : "The tax category for all line items in this line item group",
            "nullable" : true,
            "example" : "28227c88-6dba-455f-9b30-b9c76957e610"
          },
          "revenueRecognitionMethod" : {
            "description" : "The revenue recognition method for all line items in this line item group",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          },
          "revenueClassification" : {
            "description" : "The revenue classification for all line items in this line item group",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueClassification"
          },
          "servicePeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "nullable" : true,
            "example" : 10
          }
        }
      },
      "GetOrCreateInvoiceRenderSettingsEndpointProductCreateInvoiceRenderSettingsResponseModel" : {
        "required" : [ "currencyConversionDisplay", "id", "paymentLinkDisplay" ],
        "type" : "object",
        "example" : {
          "id" : "385f41ab-51f9-49c2-8f25-358545106b88",
          "paymentLinkDisplay" : "SHOW_PAYMENT_LINK",
          "currencyConversionDisplay" : "SHOW_CURRENCY_CONVERSION"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Invoice settings ID",
            "example" : "385f41ab-51f9-49c2-8f25-358545106b88"
          },
          "paymentLinkDisplay" : {
            "description" : "Payment link display preference. By default, the payment link is shown.",
            "$ref" : "#/components/schemas/PaymentLinkDisplayOption"
          },
          "currencyConversionDisplay" : {
            "description" : "Whether invoices show the regulatory conversion of their totals into the customer's local currency. By default, the conversion is shown.",
            "$ref" : "#/components/schemas/CurrencyConversionDisplayOption"
          }
        }
      },
      "CurrencyConversionDisplayOption" : {
        "type" : "string",
        "example" : "SHOW_CURRENCY_CONVERSION",
        "enum" : [ "SHOW_CURRENCY_CONVERSION", "HIDE_CURRENCY_CONVERSION" ]
      },
      "PatchSentInvoiceEndpointPatchSentInvoiceRequest" : {
        "type" : "object",
        "example" : {
          "purchaseOrderNumber" : "PO-12345",
          "customerLegalCompanyName" : "Acme Corporation Ltd",
          "dueDate" : "2026-09-29"
        },
        "properties" : {
          "purchaseOrderNumber" : {
            "type" : "string",
            "nullable" : true,
            "example" : "PO-12345"
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "nullable" : true,
            "example" : "Acme Corporation Ltd"
          },
          "dueDate" : {
            "type" : "string",
            "nullable" : true,
            "example" : "2026-09-29"
          }
        }
      },
      "CreateCreditNoteApplicationEndpointCreateCreditNoteApplicationRequestModel" : {
        "required" : [ "amount", "creditNoteBalanceVersion", "creditNoteId", "currency", "invoiceBalanceVersion", "invoiceId" ],
        "type" : "object",
        "example" : {
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "invoiceId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "amount" : 50,
          "currency" : "USD",
          "creditNoteBalanceVersion" : 3,
          "invoiceBalanceVersion" : 7
        },
        "properties" : {
          "creditNoteId" : {
            "type" : "string",
            "description" : "The Credit Note to draw from",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "invoiceId" : {
            "type" : "string",
            "description" : "The Invoice to apply credit to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount to allocate from the Credit Note to the Invoice.",
            "example" : 50
          },
          "currency" : {
            "description" : "Currency of the amount. Must match the Credit Note and Invoice currency.",
            "$ref" : "#/components/schemas/Currency"
          },
          "creditNoteBalanceVersion" : {
            "type" : "integer",
            "description" : "Expected current balance version of the Credit Note (for OCC)",
            "format" : "int64",
            "example" : 3
          },
          "invoiceBalanceVersion" : {
            "type" : "integer",
            "description" : "Expected current balance version of the Invoice (for OCC)",
            "format" : "int64",
            "example" : 7
          }
        }
      },
      "CreditNoteApplicationResponse" : {
        "required" : [ "amount", "appliedAt", "creditNoteBalance", "creditNoteId", "currency", "invoiceBalance", "invoiceId", "ledgerTransactionId" ],
        "type" : "object",
        "example" : {
          "ledgerTransactionId" : "0192c1b6-7f3a-7000-8000-000000000001",
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "invoiceId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "amount" : 50,
          "currency" : "USD",
          "appliedAt" : "2026-05-28T12:34:56Z",
          "invoiceBalance" : {
            "value" : 150,
            "currency" : "USD",
            "version" : 8
          },
          "creditNoteBalance" : {
            "value" : 50,
            "currency" : "USD",
            "version" : 4
          }
        },
        "properties" : {
          "ledgerTransactionId" : {
            "type" : "string",
            "description" : "Ledger transaction id that recorded the application",
            "example" : "0192c1b6-7f3a-7000-8000-000000000001"
          },
          "creditNoteId" : {
            "type" : "string",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "invoiceId" : {
            "type" : "string",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "amount" : {
            "type" : "number",
            "description" : "Amount applied",
            "example" : 50
          },
          "currency" : {
            "$ref" : "#/components/schemas/Currency"
          },
          "appliedAt" : {
            "type" : "string",
            "example" : "2026-05-28T12:34:56Z"
          },
          "invoiceBalance" : {
            "$ref" : "#/components/schemas/BalanceResponse"
          },
          "creditNoteBalance" : {
            "$ref" : "#/components/schemas/BalanceResponse"
          }
        }
      },
      "BalanceResponse" : {
        "required" : [ "currency", "value", "version" ],
        "type" : "object",
        "example" : {
          "value" : 150,
          "currency" : "USD",
          "version" : 8
        },
        "properties" : {
          "value" : {
            "type" : "number",
            "description" : "Balance value",
            "example" : 150
          },
          "currency" : {
            "description" : "Balance currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "version" : {
            "type" : "integer",
            "description" : "Balance version for optimistic concurrency control",
            "format" : "int64",
            "example" : 8
          }
        }
      },
      "VersionConflictResponse" : {
        "required" : [ "currentCreditNoteBalance", "currentInvoiceBalance", "message" ],
        "type" : "object",
        "example" : {
          "message" : "Balance version mismatch. Re-read current versions and retry.",
          "currentInvoiceBalance" : {
            "value" : 150,
            "currency" : "USD",
            "version" : 8
          },
          "currentCreditNoteBalance" : {
            "value" : 50,
            "currency" : "USD",
            "version" : 4
          }
        },
        "properties" : {
          "message" : {
            "type" : "string",
            "description" : "Human-readable conflict explanation",
            "example" : "Balance version mismatch. Re-read current versions and retry."
          },
          "currentInvoiceBalance" : {
            "$ref" : "#/components/schemas/BalanceResponse"
          },
          "currentCreditNoteBalance" : {
            "$ref" : "#/components/schemas/BalanceResponse"
          }
        }
      },
      "CreateCreditNoteLineItemGroupEndpointCreateCreditNoteLineItemGroupRequestModel" : {
        "required" : [ "title" ],
        "type" : "object",
        "example" : {
          "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Users",
          "description" : "Credit note for users"
        },
        "properties" : {
          "lineItemGroupId" : {
            "type" : "string",
            "description" : "Line Item Group ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Title",
            "example" : "Users"
          },
          "description" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Description",
            "nullable" : true,
            "example" : "Credit note for users"
          }
        }
      },
      "CreateCreditNoteLineItemGroupEndpointProductCreateCreditNoteLineItemGroupResponseModel" : {
        "required" : [ "creditNoteId", "grossTotal", "id", "index", "netTotal", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Users",
          "description" : "Credit note for users",
          "index" : 2,
          "netTotal" : "51.20",
          "totalTax" : "2.50",
          "grossTotal" : "101.23"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group ID",
            "example" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec"
          },
          "creditNoteId" : {
            "type" : "string",
            "description" : "Credit Note ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "lineItemGroupId" : {
            "type" : "string",
            "description" : "Line Item Group ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Title",
            "example" : "Users"
          },
          "description" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Description",
            "nullable" : true,
            "example" : "Credit note for users"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 2
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total",
            "example" : "51.20"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax",
            "example" : "2.50"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total",
            "example" : "101.23"
          }
        }
      },
      "UpdateCreditNoteLineItemEndpointUpdateCreditNoteLineItemRequestModel" : {
        "required" : [ "externalIds", "quantity", "rate", "taxRate", "title" ],
        "type" : "object",
        "example" : {
          "title" : "Ferraris",
          "description" : "Red",
          "quantity" : "2",
          "rate" : "20000.10",
          "taxRate" : "0.2",
          "rateDisplay" : "ABSOLUTE",
          "externalIds" : [ {
            "key" : "Xero",
            "value" : "123"
          } ],
          "servicePeriod" : {
            "start" : "2025-10-01",
            "endInclusive" : "2025-10-30"
          },
          "revenueRecognitionMethod" : "STRAIGHT_LINE",
          "revenueClassification" : "EARNED",
          "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
        },
        "properties" : {
          "title" : {
            "type" : "string",
            "description" : "Item Title",
            "example" : "Ferraris"
          },
          "description" : {
            "type" : "string",
            "description" : "Item Description",
            "nullable" : true,
            "example" : "Red"
          },
          "quantity" : {
            "type" : "string",
            "description" : "Quantity",
            "example" : "2"
          },
          "rate" : {
            "type" : "string",
            "description" : "Rate per Item",
            "example" : "20000.10"
          },
          "taxRate" : {
            "type" : "string",
            "description" : "Tax Rate",
            "example" : "0.2"
          },
          "rateDisplay" : {
            "description" : "Determines whether rate is displayed as an absolute value or percentage",
            "nullable" : true,
            "$ref" : "#/components/schemas/RateDisplay"
          },
          "externalIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationExternalIdentifier"
            }
          },
          "servicePeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "revenueRecognitionMethod" : {
            "description" : "Revenue recognition method. Valid values are: STRAIGHT_LINE, POINT_IN_TIME",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          },
          "revenueClassification" : {
            "description" : "Revenue classification",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueClassification"
          },
          "productId" : {
            "type" : "string",
            "description" : "Product ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          }
        }
      },
      "UpdateCreditNoteLineItemEndpointProductUpdateCreditNoteLineItemResponseModel" : {
        "required" : [ "creditNoteId", "externalIds", "grossTotal", "id", "index", "netTotal", "quantity", "rate", "rateDisplay", "taxRate", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "groupId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
          "lineItemId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Ferraris",
          "description" : "Red",
          "quantity" : "2",
          "rate" : "20000.10",
          "taxRate" : "0.2",
          "index" : 2,
          "priceId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "netTotal" : "20000.00",
          "totalTax" : "2000.00",
          "grossTotal" : "22000.00",
          "rateDisplay" : "ABSOLUTE",
          "externalIds" : [ {
            "key" : "Xero",
            "value" : "123"
          } ],
          "servicePeriod" : {
            "start" : "2025-10-01",
            "endInclusive" : "2025-10-30"
          },
          "revenueRecognitionMethod" : "STRAIGHT_LINE",
          "revenueClassification" : "EARNED",
          "productId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "creditNoteId" : {
            "type" : "string",
            "description" : "Credit Note Line Item ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "groupId" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group ID",
            "nullable" : true,
            "example" : "cd11218d-fa00-4faa-8684-a43113d076a8"
          },
          "lineItemId" : {
            "type" : "string",
            "description" : "Line Item ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Item Title",
            "example" : "Ferraris"
          },
          "description" : {
            "type" : "string",
            "description" : "Item Description",
            "nullable" : true,
            "example" : "Red"
          },
          "quantity" : {
            "type" : "string",
            "description" : "Quantity",
            "example" : "2"
          },
          "rate" : {
            "type" : "string",
            "description" : "Rate per Item",
            "example" : "20000.10"
          },
          "taxRate" : {
            "type" : "string",
            "description" : "Tax Rate",
            "example" : "0.2"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 2
          },
          "priceId" : {
            "type" : "string",
            "description" : "Price ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net Total",
            "example" : "20000.00"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total Tax",
            "example" : "2000.00"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross Total",
            "example" : "22000.00"
          },
          "rateDisplay" : {
            "description" : "Determines whether rate is displayed as an absolute value or percentage",
            "$ref" : "#/components/schemas/RateDisplay"
          },
          "externalIds" : {
            "type" : "array",
            "description" : "IDs in external integrations",
            "example" : [ {
              "key" : "Xero",
              "value" : "123"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/IntegrationExternalIdentifier"
            }
          },
          "servicePeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "revenueRecognitionMethod" : {
            "description" : "Revenue recognition method",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueRecognitionMethod"
          },
          "revenueClassification" : {
            "description" : "Revenue classification",
            "nullable" : true,
            "$ref" : "#/components/schemas/RevenueClassification"
          },
          "productId" : {
            "type" : "string",
            "description" : "Product ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          }
        }
      },
      "DeleteInvoiceEndpointProductDeleteInvoiceResponseModel" : {
        "required" : [ "accountingDate", "createdAt", "creditNoteIds", "currency", "customerBillingAddress", "customerEmails", "customerId", "customerLegalCompanyName", "customerShippingAddress", "grossTotal", "id", "isCustomerArchived", "linkedServices", "metadata", "netTotal", "paymentStatus", "renderSettings", "sequenceAccountId", "status", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9",
          "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
          "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
          "status" : "DRAFT",
          "currency" : "GBP",
          "invoiceNumber" : "INV00001",
          "issueDate" : "2022-09-15",
          "dueDate" : "2022-09-30",
          "purchaseOrderNumber" : "PO123",
          "reference" : "ref",
          "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "paymentOptions" : [ "BANK_TRANSFER" ],
          "billingPeriod" : {
            "start" : "2022-10-01",
            "endInclusive" : "2022-10-30"
          },
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "totalTax" : "2.50",
          "netTotal" : "51.20",
          "grossTotal" : "101.23",
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "customerTaxId" : "TAX123",
          "paymentStatus" : "UNPAID",
          "createdAt" : "2022-10-30T00:00:00Z",
          "creditNoteIds" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ],
          "linkedServices" : [ {
            "externalId" : "123",
            "externalService" : "Xero",
            "syncTime" : "2022-06-28T16:47:00Z",
            "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
          } ],
          "merchantDetails" : {
            "address" : {
              "line1" : "The White House",
              "line2" : "1600 Pennsylvania Avenue",
              "town" : "Washington, D.C.",
              "state" : "CA",
              "postcode" : "20500",
              "country" : "US"
            },
            "phoneNumber" : "0800001066",
            "email" : "finance@example.com",
            "taxId" : "TAX60",
            "iban" : "GB33BUKB20201555555555",
            "ukAccountDetails" : {
              "sortCode" : "000000",
              "accountNumber" : "12345678"
            },
            "usAchDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789"
            },
            "usWireDetails" : {
              "accountNumber" : "12345678",
              "accountName" : "John Doe",
              "bankName" : "Chase",
              "bankRoutingNumber" : "123456789",
              "swiftCode" : "CHASUS33",
              "bankAddress" : {
                "line1" : "JP Morgan Chase",
                "town" : "New York City",
                "state" : "NY",
                "postcode" : "10017",
                "country" : "US"
              }
            },
            "caBankAccountDetails" : {
              "transitNumber" : "123",
              "institutionNumber" : "12345",
              "accountNumber" : "1234567"
            },
            "canadianInternationalDestination" : {
              "legalName" : "John Doe",
              "accountNumber" : "12345678",
              "transitNumber" : "12345",
              "bankName" : "Chase",
              "bankAddress" : {
                "line1" : "JP Morgan Chase",
                "town" : "New York City",
                "state" : "NY",
                "postcode" : "10017",
                "country" : "US"
              },
              "institutionNumber" : "123",
              "swiftCode" : "CHASUS33",
              "intermediaryBank" : {
                "bankName" : "Chase",
                "bankAddress" : {
                  "line1" : "JP Morgan Chase",
                  "town" : "New York City",
                  "state" : "NY",
                  "postcode" : "10017",
                  "country" : "US"
                },
                "swiftCode" : "CHASUS33",
                "routingNumber" : "123456789"
              }
            },
            "australianDestination" : {
              "legalName" : "John Doe",
              "accountNumber" : "12345678",
              "swiftCode" : "CHASUS33",
              "bsb" : "123456"
            },
            "logoUrl" : "logo",
            "legalCompanyName" : "The Merchant",
            "primaryColour" : "#000000",
            "customFields" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "includeBeneficiaryAddressInPaymentDetails" : false
          },
          "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
          "dunningStatus" : "SCHEDULED",
          "accountingDate" : "2022-09-30",
          "calculatedAt" : "2022-09-30T00:00:00Z",
          "customerTaxStatus" : "TAXED",
          "renderSettings" : {
            "paymentLinkDisplay" : "HIDE_PAYMENT_LINK"
          },
          "isCustomerArchived" : false
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Invoice ID",
            "example" : "6cedbb5e-4f77-4217-b8d4-020e7e4d33c9"
          },
          "sequenceAccountId" : {
            "type" : "string",
            "description" : "Sequence Account ID",
            "example" : "68233908-402a-43b4-8952-1c2ab0ef0b25"
          },
          "billingScheduleId" : {
            "type" : "string",
            "description" : "Billing Schedule ID",
            "nullable" : true,
            "example" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95"
          },
          "status" : {
            "description" : "Invoice status",
            "$ref" : "#/components/schemas/InvoiceStatus"
          },
          "currency" : {
            "description" : "Invoice currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "invoiceNumber" : {
            "type" : "string",
            "description" : "Invoice number",
            "nullable" : true,
            "example" : "INV00001"
          },
          "issueDate" : {
            "type" : "string",
            "description" : "Issue date",
            "nullable" : true,
            "example" : "2022-09-15"
          },
          "dueDate" : {
            "type" : "string",
            "description" : "Due date",
            "nullable" : true,
            "example" : "2022-09-30"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "reference" : {
            "type" : "string",
            "description" : "Reference",
            "nullable" : true,
            "example" : "ref"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer email addresses, used for sending the Invoice if provided",
            "example" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Invoice memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "paymentOptions" : {
            "type" : "array",
            "description" : "Invoice payment options",
            "nullable" : true,
            "example" : [ "BANK_TRANSFER" ],
            "items" : {
              "$ref" : "#/components/schemas/InvoicePaymentOption"
            }
          },
          "billingPeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the Customer this invoice is linked to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax, in decimal format of the Invoice's currency",
            "example" : "2.50"
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total, in decimal format of the Invoice's currency",
            "example" : "51.20"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total, in decimal format of the Invoice's currency",
            "example" : "101.23"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.",
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "customerTaxId" : {
            "type" : "string",
            "description" : "Customer's tax ID",
            "nullable" : true,
            "example" : "TAX123"
          },
          "paymentStatus" : {
            "description" : "Invoice payment status",
            "$ref" : "#/components/schemas/InvoicePaymentStatus"
          },
          "createdAt" : {
            "type" : "string",
            "description" : "Creation time",
            "example" : "2022-10-30T00:00:00Z"
          },
          "creditNoteIds" : {
            "type" : "array",
            "description" : "IDs of linked credit notes (if any)",
            "example" : [ "af60cab3-812d-4250-a051-0fb7133a00c7" ],
            "items" : {
              "type" : "string"
            }
          },
          "linkedServices" : {
            "type" : "array",
            "description" : "External services which are linked to this invoice",
            "example" : [ {
              "externalId" : "123",
              "externalService" : "Xero",
              "syncTime" : "2022-06-28T16:47:00Z",
              "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/LinkInfo"
            }
          },
          "merchantDetails" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InvoiceMerchantDetails"
          },
          "creditBalances" : {
            "type" : "string",
            "description" : "Credit balances",
            "nullable" : true,
            "example" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)"
          },
          "dunningStatus" : {
            "description" : "Dunning status",
            "nullable" : true,
            "$ref" : "#/components/schemas/InvoiceDunningStatus"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "example" : "2022-09-30"
          },
          "calculatedAt" : {
            "type" : "string",
            "description" : "Time this invoice was last calculated (applicable for invoices generated by billing engine only)",
            "nullable" : true,
            "example" : "2022-09-30T00:00:00Z"
          },
          "customerTaxStatus" : {
            "description" : "Customer tax status",
            "nullable" : true,
            "$ref" : "#/components/schemas/TaxStatus"
          },
          "renderSettings" : {
            "$ref" : "#/components/schemas/InvoiceRenderSettingsInlineAggregate"
          },
          "isCustomerArchived" : {
            "type" : "boolean",
            "description" : "isCustomerArchived",
            "example" : false
          }
        }
      },
      "ListCreditNoteEndpointProductListCreditNotePaginatedResponseModel" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
            "status" : "SENT",
            "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
            "invoiceNumber" : "INV00001",
            "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
            "currency" : "GBP",
            "issueDate" : "2022-09-15",
            "billingPeriodStart" : "2022-10-01T00:00:00Z",
            "billingPeriodEnd" : "2022-10-30T00:00:00Z",
            "creditNoteNumber" : "CN00001",
            "purchaseOrderNumber" : "PO123",
            "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
            "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
            "customerLegalCompanyName" : "Facebook",
            "customerBillingAddress" : {
              "line1" : "Flat 1",
              "line2" : "15 Yemen Road",
              "town" : "Yemen",
              "state" : "CA",
              "postcode" : "YE1 2YE",
              "country" : "YE"
            },
            "customerShippingAddress" : {
              "line1" : "742 Evergreen Terrace",
              "town" : "Springfield",
              "state" : "CA",
              "postcode" : "12345",
              "country" : "US"
            },
            "memo" : "Thanks",
            "totalTax" : "2.50",
            "netTotal" : "51.20",
            "grossTotal" : "101.23",
            "metadata" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "customerTaxId" : "TAX123",
            "linkedServices" : [ {
              "externalId" : "123",
              "externalService" : "Xero",
              "syncTime" : "2022-06-28T16:47:00Z",
              "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
            } ],
            "applicationStatus" : "PARTIALLY_APPLIED",
            "balance" : "51.23",
            "balanceVersion" : 3,
            "applications" : [ {
              "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "invoiceNumber" : "INV00001",
              "amount" : "50.00",
              "appliedAt" : "2022-10-14T12:34:56Z"
            } ],
            "merchantDetails" : {
              "address" : {
                "line1" : "The White House",
                "line2" : "1600 Pennsylvania Avenue",
                "town" : "Washington, D.C.",
                "state" : "CA",
                "postcode" : "20500",
                "country" : "US"
              },
              "phoneNumber" : "0800001066",
              "email" : "donald@example.com",
              "taxId" : "TAX60",
              "iban" : "GB33BUKB20201555555555",
              "ukAccountDetails" : {
                "sortCode" : "000000",
                "accountNumber" : "12345678"
              },
              "usAchDetails" : {
                "accountNumber" : "12345678",
                "accountName" : "John Doe",
                "bankName" : "Chase",
                "bankRoutingNumber" : "123456789"
              },
              "usWireDetails" : {
                "accountNumber" : "12345678",
                "accountName" : "John Doe",
                "bankName" : "Chase",
                "bankRoutingNumber" : "123456789",
                "swiftCode" : "CHASUS33",
                "bankAddress" : {
                  "line1" : "JP Morgan Chase",
                  "town" : "New York City",
                  "state" : "NY",
                  "postcode" : "10017",
                  "country" : "US"
                }
              },
              "caBankAccountDetails" : {
                "transitNumber" : "123",
                "institutionNumber" : "12345",
                "accountNumber" : "1234567"
              },
              "canadianInternationalDestination" : {
                "legalName" : "John Doe",
                "accountNumber" : "12345678",
                "transitNumber" : "12345",
                "bankName" : "Chase",
                "bankAddress" : {
                  "line1" : "JP Morgan Chase",
                  "town" : "New York City",
                  "state" : "NY",
                  "postcode" : "10017",
                  "country" : "US"
                },
                "institutionNumber" : "123",
                "swiftCode" : "CHASUS33",
                "intermediaryBank" : {
                  "bankName" : "Chase",
                  "bankAddress" : {
                    "line1" : "JP Morgan Chase",
                    "town" : "New York City",
                    "state" : "NY",
                    "postcode" : "10017",
                    "country" : "US"
                  },
                  "swiftCode" : "CHASUS33",
                  "routingNumber" : "123456789"
                }
              },
              "australianDestination" : {
                "legalName" : "John Doe",
                "accountNumber" : "12345678",
                "swiftCode" : "CHASUS33",
                "bsb" : "123456"
              },
              "swedishBankgiroDestination" : {
                "bankgiroNumber" : "123-4567",
                "accountName" : "12345678"
              },
              "logoUrl" : "logo",
              "legalCompanyName" : "The Merchant",
              "primaryColour" : "#000000",
              "customFields" : [ {
                "key" : "example-label",
                "value" : "label-value"
              } ],
              "includeBeneficiaryAddressInPaymentDetails" : true
            },
            "settings" : {
              "generateCashCreditGrant" : "ENABLED"
            },
            "accountingDate" : "2022-09-30"
          } ],
          "pagination" : {
            "after" : "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==",
            "before" : "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND",
            "totalResultSize" : 100
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "CreditNotes",
            "example" : [ {
              "id" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "sequenceAccountId" : "68233908-402a-43b4-8952-1c2ab0ef0b25",
              "status" : "SENT",
              "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
              "invoiceNumber" : "INV00001",
              "billingScheduleId" : "fe2fcd0b-4c53-45c7-b2ae-b6c1a7d21e95",
              "currency" : "GBP",
              "issueDate" : "2022-09-15",
              "billingPeriodStart" : "2022-10-01T00:00:00Z",
              "billingPeriodEnd" : "2022-10-30T00:00:00Z",
              "creditNoteNumber" : "CN00001",
              "purchaseOrderNumber" : "PO123",
              "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
              "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
              "customerLegalCompanyName" : "Facebook",
              "customerBillingAddress" : {
                "line1" : "Flat 1",
                "line2" : "15 Yemen Road",
                "town" : "Yemen",
                "state" : "CA",
                "postcode" : "YE1 2YE",
                "country" : "YE"
              },
              "customerShippingAddress" : {
                "line1" : "742 Evergreen Terrace",
                "town" : "Springfield",
                "state" : "CA",
                "postcode" : "12345",
                "country" : "US"
              },
              "memo" : "Thanks",
              "totalTax" : "2.50",
              "netTotal" : "51.20",
              "grossTotal" : "101.23",
              "metadata" : [ {
                "key" : "example-label",
                "value" : "label-value"
              } ],
              "customerTaxId" : "TAX123",
              "linkedServices" : [ {
                "externalId" : "123",
                "externalService" : "Xero",
                "syncTime" : "2022-06-28T16:47:00Z",
                "externalUrl" : "https://invoicing.xero.com/view/85e52542-3e54-4f0d-872b-33bba11a0504"
              } ],
              "applicationStatus" : "PARTIALLY_APPLIED",
              "balance" : "51.23",
              "balanceVersion" : 3,
              "applications" : [ {
                "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
                "invoiceNumber" : "INV00001",
                "amount" : "50.00",
                "appliedAt" : "2022-10-14T12:34:56Z"
              } ],
              "merchantDetails" : {
                "address" : {
                  "line1" : "The White House",
                  "line2" : "1600 Pennsylvania Avenue",
                  "town" : "Washington, D.C.",
                  "state" : "CA",
                  "postcode" : "20500",
                  "country" : "US"
                },
                "phoneNumber" : "0800001066",
                "email" : "donald@example.com",
                "taxId" : "TAX60",
                "iban" : "GB33BUKB20201555555555",
                "ukAccountDetails" : {
                  "sortCode" : "000000",
                  "accountNumber" : "12345678"
                },
                "usAchDetails" : {
                  "accountNumber" : "12345678",
                  "accountName" : "John Doe",
                  "bankName" : "Chase",
                  "bankRoutingNumber" : "123456789"
                },
                "usWireDetails" : {
                  "accountNumber" : "12345678",
                  "accountName" : "John Doe",
                  "bankName" : "Chase",
                  "bankRoutingNumber" : "123456789",
                  "swiftCode" : "CHASUS33",
                  "bankAddress" : {
                    "line1" : "JP Morgan Chase",
                    "town" : "New York City",
                    "state" : "NY",
                    "postcode" : "10017",
                    "country" : "US"
                  }
                },
                "caBankAccountDetails" : {
                  "transitNumber" : "123",
                  "institutionNumber" : "12345",
                  "accountNumber" : "1234567"
                },
                "canadianInternationalDestination" : {
                  "legalName" : "John Doe",
                  "accountNumber" : "12345678",
                  "transitNumber" : "12345",
                  "bankName" : "Chase",
                  "bankAddress" : {
                    "line1" : "JP Morgan Chase",
                    "town" : "New York City",
                    "state" : "NY",
                    "postcode" : "10017",
                    "country" : "US"
                  },
                  "institutionNumber" : "123",
                  "swiftCode" : "CHASUS33",
                  "intermediaryBank" : {
                    "bankName" : "Chase",
                    "bankAddress" : {
                      "line1" : "JP Morgan Chase",
                      "town" : "New York City",
                      "state" : "NY",
                      "postcode" : "10017",
                      "country" : "US"
                    },
                    "swiftCode" : "CHASUS33",
                    "routingNumber" : "123456789"
                  }
                },
                "australianDestination" : {
                  "legalName" : "John Doe",
                  "accountNumber" : "12345678",
                  "swiftCode" : "CHASUS33",
                  "bsb" : "123456"
                },
                "swedishBankgiroDestination" : {
                  "bankgiroNumber" : "123-4567",
                  "accountName" : "12345678"
                },
                "logoUrl" : "logo",
                "legalCompanyName" : "The Merchant",
                "primaryColour" : "#000000",
                "customFields" : [ {
                  "key" : "example-label",
                  "value" : "label-value"
                } ],
                "includeBeneficiaryAddressInPaymentDetails" : true
              },
              "settings" : {
                "generateCashCreditGrant" : "ENABLED"
              },
              "accountingDate" : "2022-09-30"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/CreditNoteResponse"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationResponse"
          }
        }
      },
      "PaginationResponse" : {
        "type" : "object",
        "description" : "Results pagination",
        "example" : {
          "after" : "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw==",
          "before" : "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND",
          "totalResultSize" : 100
        },
        "properties" : {
          "after" : {
            "type" : "string",
            "description" : "Copy this value to the `after` parameter of your next request to retrieve the next page of results",
            "nullable" : true,
            "example" : "ZTMwOWU5NDgtMDg4ZS00ZDc3LWI2NTQtY2Q4NTQ5OGYxNTU1IzE2NTgyNjA4NTYwMzMwMTMjREVTQw=="
          },
          "before" : {
            "type" : "string",
            "description" : "Copy this value to the `before` parameter of your next request to retrieve the next page of results",
            "nullable" : true,
            "example" : "NjRlZjJmZjktMmJjYi00M2RiLWI0ZDUtOTAxMDU4MjRiMTdmIzE2NTgyNjA3NTk3NTE2ODEjQVND"
          },
          "totalResultSize" : {
            "type" : "integer",
            "description" : "Total number of entries across all pages",
            "format" : "int64",
            "nullable" : true,
            "example" : 100
          }
        }
      },
      "UpdateCreditNoteEndpointUpdateCreditNoteRequestModel" : {
        "type" : "object",
        "example" : {
          "billingPeriodStart" : "2022-10-01T00:00:00Z",
          "billingPeriodEnd" : "2022-10-30T00:00:00Z",
          "purchaseOrderNumber" : "PO123",
          "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "customerTaxId" : "TAX123",
          "settings" : {
            "generateCashCreditGrant" : "ENABLED"
          },
          "accountingDate" : "2022-09-30"
        },
        "properties" : {
          "billingPeriodStart" : {
            "type" : "string",
            "description" : "Billing period start",
            "nullable" : true,
            "example" : "2022-10-01T00:00:00Z"
          },
          "billingPeriodEnd" : {
            "type" : "string",
            "description" : "Billing period end",
            "nullable" : true,
            "example" : "2022-10-30T00:00:00Z"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer's email addresses, used for sending the Credit Note if provided",
            "nullable" : true,
            "example" : [ "customer@example.com", "customer.alias@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "nullable" : true,
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Credit Note memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Credit Note. These are not interpreted by Sequence; they are present for your use alone.",
            "nullable" : true,
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "customerTaxId" : {
            "type" : "string",
            "description" : "Customer's tax ID",
            "nullable" : true,
            "example" : "TAX123"
          },
          "settings" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/CreditNoteSettings"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "nullable" : true,
            "example" : "2022-09-30"
          }
        }
      },
      "DeleteCreditNoteLineItemGroupEndpointProductDeleteCreditNoteLineItemGroupResponseModel" : {
        "required" : [ "creditNoteId", "grossTotal", "id", "index", "netTotal", "title", "totalTax" ],
        "type" : "object",
        "example" : {
          "id" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec",
          "creditNoteId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "lineItemGroupId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "title" : "Users",
          "description" : "Credit note for users",
          "index" : 2,
          "netTotal" : "51.20",
          "totalTax" : "2.50",
          "grossTotal" : "101.23"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group ID",
            "example" : "e5bc0f12-4bc1-f821-bc2d-04639a16f9ec"
          },
          "creditNoteId" : {
            "type" : "string",
            "description" : "Credit Note ID",
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "lineItemGroupId" : {
            "type" : "string",
            "description" : "Line Item Group ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "title" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Title",
            "example" : "Users"
          },
          "description" : {
            "type" : "string",
            "description" : "Credit Note Line Item Group Description",
            "nullable" : true,
            "example" : "Credit note for users"
          },
          "index" : {
            "type" : "integer",
            "description" : "Index (for maintaining order)",
            "example" : 2
          },
          "netTotal" : {
            "type" : "string",
            "description" : "Net total",
            "example" : "51.20"
          },
          "totalTax" : {
            "type" : "string",
            "description" : "Total tax",
            "example" : "2.50"
          },
          "grossTotal" : {
            "type" : "string",
            "description" : "Gross total",
            "example" : "101.23"
          }
        }
      },
      "InvoiceSummaryResponse" : {
        "required" : [ "totalsByCurrency" ],
        "type" : "object",
        "example" : {
          "totalsByCurrency" : [ {
            "currency" : "GBP",
            "invoiceCount" : 12,
            "grossTotal" : 15400
          }, {
            "currency" : "USD",
            "invoiceCount" : 3,
            "grossTotal" : 980.5
          } ]
        },
        "properties" : {
          "totalsByCurrency" : {
            "type" : "array",
            "description" : "Aggregate totals for the invoices matching the supplied filters, grouped by currency.",
            "example" : [ {
              "currency" : "GBP",
              "invoiceCount" : 12,
              "grossTotal" : 15400
            }, {
              "currency" : "USD",
              "invoiceCount" : 3,
              "grossTotal" : 980.5
            } ],
            "items" : {
              "$ref" : "#/components/schemas/InvoiceSummaryResponseCurrencyTotals"
            }
          }
        }
      },
      "InvoiceSummaryResponseCurrencyTotals" : {
        "required" : [ "currency", "grossTotal", "invoiceCount" ],
        "type" : "object",
        "example" : {
          "currency" : "GBP",
          "invoiceCount" : 12,
          "grossTotal" : 15400
        },
        "properties" : {
          "currency" : {
            "description" : "The currency these totals are denominated in.",
            "$ref" : "#/components/schemas/Currency"
          },
          "invoiceCount" : {
            "type" : "integer",
            "description" : "The number of invoices matching the filters in this currency.",
            "format" : "int64",
            "example" : 12
          },
          "grossTotal" : {
            "type" : "number",
            "description" : "The sum of the gross totals of the matching invoices in this currency.",
            "example" : 15400
          }
        }
      },
      "ListLineItemGroupEndpointProductListLineItemGroupPaginatedResponseModel" : {
        "required" : [ "items", "pagination" ],
        "type" : "object",
        "example" : {
          "items" : [ {
            "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
            "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
            "title" : "Cars",
            "description" : "Charges for cars",
            "index" : 1,
            "netTotal" : "200000.00",
            "totalTax" : "10.00",
            "grossTotal" : "22000.00",
            "taxCategory" : {
              "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
              "name" : "VAT"
            }
          } ],
          "pagination" : {
            "after" : "MDE4NDUyNjYtNmQ2NC03N2M4LTlhZGYtNDQ4N2Q5NGQxNDU3",
            "before" : "MDE4NDQyMWUtYTljYy03MTFiLWFmOTMtYmYwNTExZDRkODMz",
            "totalResultSize" : 10
          }
        },
        "properties" : {
          "items" : {
            "type" : "array",
            "description" : "LineItemGroups",
            "example" : [ {
              "id" : "941272d1-f840-4e16-b698-0cd455c81e0e",
              "invoiceId" : "cd11218d-fa00-4faa-8684-a43113d076a8",
              "title" : "Cars",
              "description" : "Charges for cars",
              "index" : 1,
              "netTotal" : "200000.00",
              "totalTax" : "10.00",
              "grossTotal" : "22000.00",
              "taxCategory" : {
                "id" : "28227c88-6dba-455f-9b30-b9c76957e610",
                "name" : "VAT"
              }
            } ],
            "items" : {
              "$ref" : "#/components/schemas/LineItemGroupResponseModel"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/PaginationMeta"
          }
        }
      },
      "MergeInvoicesEndpointRequestBody" : {
        "required" : [ "invoiceIds" ],
        "type" : "object",
        "example" : {
          "invoiceIds" : [ "bd39e664-a4a2-4515-bd7e-6bc91d484498", "6582c475-7e29-4ea4-b8f8-f071032573a0" ]
        },
        "properties" : {
          "invoiceIds" : {
            "type" : "array",
            "example" : [ "bd39e664-a4a2-4515-bd7e-6bc91d484498", "6582c475-7e29-4ea4-b8f8-f071032573a0" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "ReconcileInvoicesWithIntegrationEndpointReconcileInvoicesWithIntegrationRequest" : {
        "required" : [ "integrationService", "invoiceIds", "propertiesToCompare" ],
        "type" : "object",
        "example" : {
          "integrationService" : "Xero",
          "invoiceIds" : [ ],
          "propertiesToCompare" : [ "INVOICE_NUMBER", "STATUS" ]
        },
        "properties" : {
          "integrationService" : {
            "description" : "Integration service",
            "$ref" : "#/components/schemas/ReconcileInvoicesWithIntegrationEndpointSupportedIntegrationService"
          },
          "invoiceIds" : {
            "type" : "array",
            "description" : "Invoice IDs",
            "example" : [ ],
            "items" : {
              "type" : "string"
            }
          },
          "propertiesToCompare" : {
            "type" : "array",
            "description" : "Property to compare",
            "example" : [ "INVOICE_NUMBER", "STATUS" ],
            "items" : {
              "$ref" : "#/components/schemas/ReconcileInvoicesWithIntegrationEndpointPropertyToCompare"
            }
          }
        }
      },
      "ReconcileInvoicesWithIntegrationEndpointSupportedIntegrationService" : {
        "type" : "string",
        "example" : "Xero",
        "enum" : [ "Xero" ]
      },
      "ReconcileInvoicesWithIntegrationEndpointPropertyToCompare" : {
        "type" : "string",
        "example" : "INVOICE_NUMBER",
        "enum" : [ "INVOICE_NUMBER", "STATUS" ]
      },
      "UpdateInvoicePaymentStatusEndpointRequestModel" : {
        "required" : [ "paymentStatus" ],
        "type" : "object",
        "example" : {
          "paymentStatus" : "PAID"
        },
        "properties" : {
          "paymentStatus" : {
            "description" : "Invoice payment status",
            "$ref" : "#/components/schemas/InvoicePaymentStatus"
          }
        }
      },
      "UpdateInvoiceRenderSettingsEndpointUpdateInvoiceRenderSettingsRequestModel" : {
        "required" : [ "paymentLinkDisplay" ],
        "type" : "object",
        "example" : {
          "paymentLinkDisplay" : "SHOW_PAYMENT_LINK",
          "currencyConversionDisplay" : "SHOW_CURRENCY_CONVERSION"
        },
        "properties" : {
          "paymentLinkDisplay" : {
            "description" : "Payment link display preference. By default, the payment link is shown.",
            "$ref" : "#/components/schemas/PaymentLinkDisplayOption"
          },
          "currencyConversionDisplay" : {
            "description" : "Whether invoices show the regulatory conversion of their totals into the customer's local currency. Omit to leave the current preference unchanged.",
            "nullable" : true,
            "$ref" : "#/components/schemas/CurrencyConversionDisplayOption"
          }
        }
      },
      "UpdateInvoiceRenderSettingsEndpointProductUpdateInvoiceRenderSettingsResponseModel" : {
        "required" : [ "currencyConversionDisplay", "id", "paymentLinkDisplay" ],
        "type" : "object",
        "example" : {
          "id" : "385f41ab-51f9-49c2-8f25-358545106b88",
          "paymentLinkDisplay" : "SHOW_PAYMENT_LINK",
          "currencyConversionDisplay" : "SHOW_CURRENCY_CONVERSION"
        },
        "properties" : {
          "id" : {
            "type" : "string",
            "description" : "Invoice settings ID",
            "example" : "385f41ab-51f9-49c2-8f25-358545106b88"
          },
          "paymentLinkDisplay" : {
            "description" : "Payment link display preference. By default, the payment link is shown.",
            "$ref" : "#/components/schemas/PaymentLinkDisplayOption"
          },
          "currencyConversionDisplay" : {
            "description" : "Whether invoices show the regulatory conversion of their totals into the customer's local currency. By default, the conversion is shown.",
            "$ref" : "#/components/schemas/CurrencyConversionDisplayOption"
          }
        }
      },
      "CreateCreditNoteEndpointCreateCreditNoteRequestModel" : {
        "required" : [ "currency", "customerId" ],
        "type" : "object",
        "example" : {
          "invoiceId" : "af60cab3-812d-4250-a051-0fb7133a00c7",
          "currency" : "GBP",
          "billingPeriodStart" : "2022-10-01T00:00:00Z",
          "billingPeriodEnd" : "2022-10-30T00:00:00Z",
          "purchaseOrderNumber" : "PO123",
          "customerId" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47",
          "customerEmails" : [ "customer@example.com", "customer.alias@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "customerTaxId" : "TAX123",
          "accountingDate" : "2025-08-29"
        },
        "properties" : {
          "invoiceId" : {
            "type" : "string",
            "description" : "Invoice ID",
            "nullable" : true,
            "example" : "af60cab3-812d-4250-a051-0fb7133a00c7"
          },
          "currency" : {
            "description" : "Credit Note currency",
            "$ref" : "#/components/schemas/Currency"
          },
          "billingPeriodStart" : {
            "type" : "string",
            "description" : "Billing period start",
            "nullable" : true,
            "example" : "2022-10-01T00:00:00Z"
          },
          "billingPeriodEnd" : {
            "type" : "string",
            "description" : "Billing period end",
            "nullable" : true,
            "example" : "2022-10-30T00:00:00Z"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "customerId" : {
            "type" : "string",
            "description" : "The ID of the Customer this Credit Note is linked to",
            "example" : "61b083e0-1faa-47ca-9aeb-6205da8f6c47"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer's email addresses, used for sending the Credit Note if provided",
            "nullable" : true,
            "example" : [ "customer@example.com", "customer.alias@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "nullable" : true,
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Credit Note memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Credit Note. These are not interpreted by Sequence; they are present for your use alone.",
            "nullable" : true,
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "customerTaxId" : {
            "type" : "string",
            "description" : "Customer's tax ID",
            "nullable" : true,
            "example" : "TAX123"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "nullable" : true,
            "example" : "2025-08-29"
          }
        }
      },
      "Stable20240101UpdateInvoiceRequest" : {
        "type" : "object",
        "example" : {
          "dueDate" : "2022-09-30",
          "purchaseOrderNumber" : "PO123",
          "reference" : "ref",
          "customerEmails" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
          "customerLegalCompanyName" : "Facebook",
          "customerBillingAddress" : {
            "line1" : "Flat 1",
            "line2" : "15 Yemen Road",
            "town" : "Yemen",
            "state" : "CA",
            "postcode" : "YE1 2YE",
            "country" : "YE"
          },
          "customerShippingAddress" : {
            "line1" : "742 Evergreen Terrace",
            "town" : "Springfield",
            "state" : "CA",
            "postcode" : "12345",
            "country" : "US"
          },
          "memo" : "Thanks",
          "paymentOptions" : [ "BANK_TRANSFER" ],
          "billingPeriod" : {
            "start" : "2022-10-01",
            "endInclusive" : "2022-10-30"
          },
          "metadata" : [ {
            "key" : "example-label",
            "value" : "label-value"
          } ],
          "creditBalances" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)",
          "billingRunId" : "53ff21c8-4872-46c4-83bf-517d54876945",
          "accountingDate" : "2022-09-30",
          "attachmentAssetIds" : [ "99874519-25ce-46ff-8823-093115aa7222" ],
          "currency" : "GBP"
        },
        "properties" : {
          "dueDate" : {
            "type" : "string",
            "description" : "Due date",
            "nullable" : true,
            "example" : "2022-09-30"
          },
          "purchaseOrderNumber" : {
            "type" : "string",
            "description" : "Purchase order number",
            "nullable" : true,
            "example" : "PO123"
          },
          "reference" : {
            "type" : "string",
            "description" : "Reference",
            "nullable" : true,
            "example" : "ref"
          },
          "customerEmails" : {
            "type" : "array",
            "description" : "Customer email addresses, used for sending the Invoice if provided",
            "nullable" : true,
            "example" : [ "customer.user.a@example.com", "customer.user.b@example.com" ],
            "items" : {
              "type" : "string"
            }
          },
          "customerLegalCompanyName" : {
            "type" : "string",
            "description" : "Customer's legal company name",
            "nullable" : true,
            "example" : "Facebook"
          },
          "customerBillingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "customerShippingAddress" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/Address"
          },
          "memo" : {
            "type" : "string",
            "description" : "Invoice memo",
            "nullable" : true,
            "example" : "Thanks"
          },
          "paymentOptions" : {
            "type" : "array",
            "description" : "Invoice payment options",
            "nullable" : true,
            "example" : [ "BANK_TRANSFER" ],
            "items" : {
              "$ref" : "#/components/schemas/InvoicePaymentOption"
            }
          },
          "billingPeriod" : {
            "nullable" : true,
            "$ref" : "#/components/schemas/InclusiveDateRange"
          },
          "metadata" : {
            "type" : "array",
            "description" : "Mapping of key-value pairs to attach to the Invoice. These are not interpreted by Sequence; they are present for your use alone.",
            "nullable" : true,
            "example" : [ {
              "key" : "example-label",
              "value" : "label-value"
            } ],
            "items" : {
              "$ref" : "#/components/schemas/KeyValuePair"
            }
          },
          "creditBalances" : {
            "type" : "string",
            "description" : "Credit balances",
            "nullable" : true,
            "example" : "Verification 2 credit balance: 7/7 (expiring on 4 May 2023)"
          },
          "billingRunId" : {
            "type" : "string",
            "description" : "Billing Run ID",
            "nullable" : true,
            "example" : "53ff21c8-4872-46c4-83bf-517d54876945"
          },
          "accountingDate" : {
            "type" : "string",
            "description" : "Accounting date",
            "nullable" : true,
            "example" : "2022-09-30"
          },
          "attachmentAssetIds" : {
            "type" : "array",
            "description" : "Attachment asset IDs",
            "nullable" : true,
            "example" : [ "99874519-25ce-46ff-8823-093115aa7222" ],
            "items" : {
              "type" : "string"
            }
          },
          "currency" : {
            "description" : "Invoice currency. Can only be updated while invoice status is DRAFT.",
            "nullable" : true,
            "$ref" : "#/components/schemas/Currency"
          }
        }
      }
    },
    "requestBodies" : { },
    "securitySchemes" : { }
  }
}