components:
  schemas:
    Bankaccount:
      allOf:
        - properties:
            account:
              description: "IBAN Account number"
              examples:
                - "DE123456781234565"
              type: "string"
            bank:
              description: "Name of the bank"
              examples:
                - "Bank of Foo"
              type: "string"
            bankcode:
              description: "BIC of bank"
              examples:
                - "DEUTDE2HXXX"
              type: "string"
            holder:
              description: "Name of the account holder"
              examples:
                - "John Doe"
              type: "string"
            id:
              description: "ID of the registered account"
              examples:
                - "123456789"
              type: "string"
            reference:
              description: "For direct debit: Mandate reference number"
              examples:
                - "M1234567890"
              type: "string"
            validfrom:
              description: "Valid from date-time, leave empty if no predefined validity start
                exists. RFC3339 date-time
                https://www.rfc-editor.org/rfc/rfc3339#section-5.6 effectively
                ISO8601."
              examples:
                - "2025-01-31T00:00:00Z"
              format: "date-time"
              type: "string"
            validto:
              description: "Valid to date-time, leave empty if no predefined validity end
                exists. RFC3339 date-time
                https://www.rfc-editor.org/rfc/rfc3339#section-5.6 effectively
                ISO8601."
              examples:
                - "2025-12-31T00:00:00Z"
              format: "date-time"
              type: "string"
          type: "object"
    Creditnote:
      allOf:
        - properties:
            accountingdate:
              description: "Date on which the credit note is booked, normaly the issued date"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            addresses:
              description: "Optional, addresses of the credit note, if not provided they will
                be copied from the identity in the moment of creation."
              items:
                allOf:
                  - properties:
                      city:
                        examples:
                          - "Berlin"
                        type: "string"
                      country:
                        description: "ISO 3166-1 alpha-2 country code"
                        examples:
                          - "DE"
                          - "FR"
                          - "US"
                        type: "string"
                      extra:
                        description: "Extra information for the delivery of the letter"
                        examples:
                          - "C/O Mr. Smith"
                        type: "string"
                      housenumber:
                        examples:
                          - "1"
                        type: "string"
                      info:
                        description: "Label / Additional information about the address. For example if
                          it was verified by some risk check service."
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                          - "default"
                        examples:
                          - "shipping"
                        type: "string"
                      state:
                        examples:
                          - "Berlin"
                        type: "string"
                      street:
                        examples:
                          - "Main Street"
                        type: "string"
                      zipcode:
                        examples:
                          - "10115"
                        type: "string"
                    type: "object"
                  - properties:
                      company:
                        description: "Company"
                        examples:
                          - "ACME Inc."
                        type: "string"
                      firstname:
                        description: "Firstname"
                        examples:
                          - "John"
                        type: "string"
                      lastname:
                        description: "Lastname"
                        examples:
                          - "Doe"
                        type: "string"
                    type: "object"
              type: "array"
            cancelationdate:
              description: "Date of the cancellation of the credit note"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            created:
              description: "Creation date of the credit note"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            currency:
              description: "Inherited from invoice"
              examples:
                - "EUR"
              type: "string"
            detail:
              properties:
                footerText:
                  description: "Remarks at the bottom of the invoice. Each element will go in a
                    seperate paragraph"
                  examples:
                    - - "Line 1"
                      - "Line 2, possibly in a different language"
                  items:
                    examples:
                      - "0% VAT according to ...."
                    type: "string"
                  type: "array"
                footerTextId:
                  description: "ID of a translatable text you configured in Abillify, this will
                    resolve the text for the footer and any footerText that is
                    sent."
                  examples:
                    - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                introText:
                  description: "Remarks at the top of the invoice. Each element will go in a
                    seperate paragraph"
                  examples:
                    - - "Line 1"
                      - "Line 2, possibly in a different language"
                  items:
                    examples:
                      - "0% VAT according to ...."
                    type: "string"
                  type: "array"
                introTextId:
                  description: "ID of a translatable text you configured in Abillify, this will
                    resolve the text for the intro and any introText that is
                    sent."
                  examples:
                    - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                paymentterm:
                  description: "Payment term of the creditnote"
                  examples:
                    - "Der Betrag wird automatisch auf Ihr Konto überwiesen."
                  type: "string"
                paymenttermId:
                  description: "ID of the paymenterm you configured in Abillify, this will resolve
                    the paymentterm text and due date (if not sent) according to
                    your settings"
                  examples:
                    - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                reverseCharge:
                  default: null
                  description: "If set to true or false, this will override the default reverse
                    charge determination for this order."
                  examples:
                    - true
                    - false
                  type: "boolean"
                vatId:
                  description: "VAT ID of the customer for this credit note, inherited from
                    invoice if not defined in payload."
                  examples:
                    - "DE987654321"
                  type: "string"
              type: "object"
            dunninglevel:
              description: "Dunning level of the invoice, null=no dunning, 1=first dunning,
                2=second dunning, ...



                This will be preseved even if the invoice is
                paid after/while dunning."
              examples:
                - 0
              type: "integer"
            dunningstate:
              description: "State of the dunning process"
              enum:
                - "open"
                - "dunning"
                - "paid"
                - "collection"
              examples:
                - "open"
              type: "string"
            id:
              description: "ID of the credit note"
              examples:
                - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
              type: "string"
            identity:
              description: "ID of the identity"
              examples:
                - "1"
              type: "string"
            issued:
              description: "Date printed on the credit note"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            items:
              items:
                allOf:
                  - properties:
                      account:
                        description: "Account on which the voucheritem is booked, i.e. 4300/4400,
                          inherited from the tax profile on create"
                        examples:
                          - "8400"
                        type: "string"
                      costcenter:
                        description: "Optional, Cost center for the line, can be used for reporting"
                        examples:
                          - "8086"
                        type: "string"
                      created:
                        description: "Creation date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      detail:
                        properties:
                          taxprofile:
                            description: "Optional, the tax profile for the line, as defined in your tax
                              jurisdiction settings, if not configured default
                              is used as as fallback."
                            enum:
                              - "default"
                              - "reduced"
                              - "..."
                            examples:
                              - "default"
                            type: "string"
                          vatclause:
                            description: "Optional, VAT clause to be printed on invoice/item, inherited from
                              tax profile on create."
                            examples:
                              - "Umsatzsteuerbefreit gem. UstG. §4 Nr. 1a"
                            type: "string"
                        type: "object"
                      id:
                        description: "ID of the voucher"
                        examples:
                          - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
                        type: "string"
                      kind:
                        description: "principal=goods, ancillary=shipping, payment, discount"
                        enum:
                          - "principal"
                          - "ancillary"
                        examples:
                          - "principal"
                        type: "string"
                      label:
                        description: "Label of the voucheritem"
                        examples:
                          - "Couch Grey 3-Seater"
                        type: "string"
                      modified:
                        description: "Last update date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      net:
                        description: "Net amount of the voucheritem, rounded to 2 decimal places"
                        examples:
                          - -991.6
                        type: "number"
                      number:
                        description: "Your creditnoteNumber, only send this if you want to override the
                          default creditnote number generation."
                        examples:
                          - "1234567890"
                        type: "string"
                      pos:
                        description: "Position of the item in the item list, optional, will be
                          automatically generated if omitted from all items."
                        examples:
                          - 1
                        type: "integer"
                      product_number:
                        description: "Your product number"
                        examples:
                          - "1234567890"
                        type: "string"
                      quantity:
                        description: "Quantity of the items"
                        examples:
                          - 1
                        type: "number"
                      reference:
                        description: "your creditnoteReference  (A unique identifier in your system), if
                          you don't send this Abillify will generate one."
                        examples:
                          - "1234567890"
                        type: "string"
                      servicebegin:
                        description: "Optional, Start date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      serviceend:
                        description: "Optional, End date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      taxaccount:
                        description: "Account on which the tax of the voucheritem is booked, i.e.
                          3801/3806, inherited from the tax profile on create"
                        examples:
                          - "1776"
                        type: "string"
                      taxrate:
                        description: "Taxrate of the voucheritem, inherited from the tax profile on
                          create"
                        examples:
                          - 0.19
                        type: "number"
                      unit:
                        description: "Label for the unit of the items"
                        examples:
                          - "pieces"
                        type: "string"
                      unitprice:
                        description: "Net amount of the voucheritem per unit, rounded to 2 decimal
                          places"
                        examples:
                          - -1190
                        type: "number"
                    type: "object"
              type: "array"
            meta:
              description: "Merchant information related to the entity, you can store any JSON
                here. Size limits according to your contract."
              properties:
                custom_key:
                  description: "Custom key-value pair for merchant specific information"
                  examples:
                    - "custom_value"
                  type: "string"
              type: "object"
            modified:
              description: "Last update date of the credit note"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            net:
              description: "Net amount of the credit note, rounded to 2 decimal places"
              examples:
                - -991.6
              type: "number"
            netbased:
              default: null
              description: "If true the calculations are rounded to 2 decimal places, this is
                the recommended option for B2B business.



                If false (null) the calculations are rounded to
                4 decimal places to achieve better gross amounts for end
                customers."
              examples:
                - true
              type: "boolean"
            number:
              description: "Your creditnoteNumber, only send this if you want to override the
                default invoice number generation."
              examples:
                - "1234567890"
              type: "string"
            orderdate:
              description: "Date of the order"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            ordernumber:
              description: "Your orderNumber"
              examples:
                - "1234567890"
              type: "string"
            paymentkind:
              description: "Kind of payment intended to be used for this order, can be
                different for subsequent invoices.



                PP: Paypal



                CC: Credit Card



                DD: Direct Debit



                CT: Cash Transfer



                CD: Cash on Delivery"
              enum:
                - "PP"
                - "CC"
                - "DD"
                - "CT"
                - "CD"
              examples:
                - "CT"
              type: "string"
            reference:
              description: "Your creditnoteReference (A unique identifier in your system), if
                you don't send this Abillify will generate one."
              examples:
                - "1234567890"
              type: "string"
            tax:
              description: "Tax amount of the credit note, rounded to 2 decimal places"
              examples:
                - -188.4
              type: "number"
            total:
              description: "Total amount of the credit note, rounded to 2 decimal places
                (including tax)"
              examples:
                - -1180
              type: "number"
          type: "object"
    CreditnoteResolved:
      allOf:
        - properties:
            accountingdate:
              description: "Date on which the credit note is booked, normaly the issued date"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            addresses:
              description: "Optional, addresses of the credit note, if not provided they will
                be copied from the identity in the moment of creation."
              items:
                allOf:
                  - properties:
                      city:
                        examples:
                          - "Berlin"
                        type: "string"
                      country:
                        description: "ISO 3166-1 alpha-2 country code"
                        examples:
                          - "DE"
                          - "FR"
                          - "US"
                        type: "string"
                      extra:
                        description: "Extra information for the delivery of the letter"
                        examples:
                          - "C/O Mr. Smith"
                        type: "string"
                      housenumber:
                        examples:
                          - "1"
                        type: "string"
                      info:
                        description: "Label / Additional information about the address. For example if
                          it was verified by some risk check service."
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                          - "default"
                        examples:
                          - "shipping"
                        type: "string"
                      state:
                        examples:
                          - "Berlin"
                        type: "string"
                      street:
                        examples:
                          - "Main Street"
                        type: "string"
                      zipcode:
                        examples:
                          - "10115"
                        type: "string"
                    type: "object"
                  - properties:
                      company:
                        description: "Company"
                        examples:
                          - "ACME Inc."
                        type: "string"
                      firstname:
                        description: "Firstname"
                        examples:
                          - "John"
                        type: "string"
                      lastname:
                        description: "Lastname"
                        examples:
                          - "Doe"
                        type: "string"
                    type: "object"
              type: "array"
            cancelationdate:
              description: "Date of the cancellation of the credit note"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            created:
              description: "Creation date of the credit note"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            currency:
              description: "Inherited from invoice"
              examples:
                - "EUR"
              type: "string"
            detail:
              properties:
                footerText:
                  description: "Remarks at the bottom of the invoice. Each element will go in a
                    seperate paragraph"
                  examples:
                    - - "Line 1"
                      - "Line 2, possibly in a different language"
                  items:
                    examples:
                      - "0% VAT according to ...."
                    type: "string"
                  type: "array"
                footerTextId:
                  description: "ID of a translatable text you configured in Abillify, this will
                    resolve the text for the footer and any footerText that is
                    sent."
                  examples:
                    - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                introText:
                  description: "Remarks at the top of the invoice. Each element will go in a
                    seperate paragraph"
                  examples:
                    - - "Line 1"
                      - "Line 2, possibly in a different language"
                  items:
                    examples:
                      - "0% VAT according to ...."
                    type: "string"
                  type: "array"
                introTextId:
                  description: "ID of a translatable text you configured in Abillify, this will
                    resolve the text for the intro and any introText that is
                    sent."
                  examples:
                    - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                paymentterm:
                  description: "Payment term of the creditnote"
                  examples:
                    - "Der Betrag wird automatisch auf Ihr Konto überwiesen."
                  type: "string"
                paymenttermId:
                  description: "ID of the paymenterm you configured in Abillify, this will resolve
                    the paymentterm text and due date (if not sent) according to
                    your settings"
                  examples:
                    - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                reverseCharge:
                  default: null
                  description: "If set to true or false, this will override the default reverse
                    charge determination for this order."
                  examples:
                    - true
                    - false
                  type: "boolean"
                vatId:
                  description: "VAT ID of the customer for this credit note, inherited from
                    invoice if not defined in payload."
                  examples:
                    - "DE987654321"
                  type: "string"
              type: "object"
            dunninglevel:
              description: "Dunning level of the invoice, null=no dunning, 1=first dunning,
                2=second dunning, ...



                This will be preseved even if the invoice is
                paid after/while dunning."
              examples:
                - 0
              type: "integer"
            dunningstate:
              description: "State of the dunning process"
              enum:
                - "open"
                - "dunning"
                - "paid"
                - "collection"
              examples:
                - "open"
              type: "string"
            id:
              description: "ID of the credit note"
              examples:
                - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
              type: "string"
            identity:
              description: "ID of the identity"
              examples:
                - "1"
              type: "string"
            issued:
              description: "Date printed on the credit note"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            items:
              items:
                allOf:
                  - properties:
                      account:
                        description: "Account on which the voucheritem is booked, i.e. 4300/4400,
                          inherited from the tax profile on create"
                        examples:
                          - "8400"
                        type: "string"
                      costcenter:
                        description: "Optional, Cost center for the line, can be used for reporting"
                        examples:
                          - "8086"
                        type: "string"
                      created:
                        description: "Creation date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      detail:
                        properties:
                          taxprofile:
                            description: "Optional, the tax profile for the line, as defined in your tax
                              jurisdiction settings, if not configured default
                              is used as as fallback."
                            enum:
                              - "default"
                              - "reduced"
                              - "..."
                            examples:
                              - "default"
                            type: "string"
                          vatclause:
                            description: "Optional, VAT clause to be printed on invoice/item, inherited from
                              tax profile on create."
                            examples:
                              - "Umsatzsteuerbefreit gem. UstG. §4 Nr. 1a"
                            type: "string"
                        type: "object"
                      id:
                        description: "ID of the voucher"
                        examples:
                          - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
                        type: "string"
                      kind:
                        description: "principal=goods, ancillary=shipping, payment, discount"
                        enum:
                          - "principal"
                          - "ancillary"
                        examples:
                          - "principal"
                        type: "string"
                      label:
                        description: "Label of the voucheritem"
                        examples:
                          - "Couch Grey 3-Seater"
                        type: "string"
                      modified:
                        description: "Last update date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      net:
                        description: "Net amount of the voucheritem, rounded to 2 decimal places"
                        examples:
                          - -991.6
                        type: "number"
                      number:
                        description: "Your creditnoteNumber, only send this if you want to override the
                          default creditnote number generation."
                        examples:
                          - "1234567890"
                        type: "string"
                      pos:
                        description: "Position of the item in the item list, optional, will be
                          automatically generated if omitted from all items."
                        examples:
                          - 1
                        type: "integer"
                      product_number:
                        description: "Your product number"
                        examples:
                          - "1234567890"
                        type: "string"
                      quantity:
                        description: "Quantity of the items"
                        examples:
                          - 1
                        type: "number"
                      reference:
                        description: "your creditnoteReference  (A unique identifier in your system), if
                          you don't send this Abillify will generate one."
                        examples:
                          - "1234567890"
                        type: "string"
                      servicebegin:
                        description: "Optional, Start date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      serviceend:
                        description: "Optional, End date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      taxaccount:
                        description: "Account on which the tax of the voucheritem is booked, i.e.
                          3801/3806, inherited from the tax profile on create"
                        examples:
                          - "1776"
                        type: "string"
                      taxrate:
                        description: "Taxrate of the voucheritem, inherited from the tax profile on
                          create"
                        examples:
                          - 0.19
                        type: "number"
                      unit:
                        description: "Label for the unit of the items"
                        examples:
                          - "pieces"
                        type: "string"
                      unitprice:
                        description: "Net amount of the voucheritem per unit, rounded to 2 decimal
                          places"
                        examples:
                          - -1190
                        type: "number"
                    type: "object"
              type: "array"
            meta:
              description: "Merchant information related to the entity, you can store any JSON
                here. Size limits according to your contract."
              properties:
                custom_key:
                  description: "Custom key-value pair for merchant specific information"
                  examples:
                    - "custom_value"
                  type: "string"
              type: "object"
            modified:
              description: "Last update date of the credit note"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            net:
              description: "Net amount of the credit note, rounded to 2 decimal places"
              examples:
                - -991.6
              type: "number"
            netbased:
              default: null
              description: "If true the calculations are rounded to 2 decimal places, this is
                the recommended option for B2B business.



                If false (null) the calculations are rounded to
                4 decimal places to achieve better gross amounts for end
                customers."
              examples:
                - true
              type: "boolean"
            number:
              description: "Your creditnoteNumber, only send this if you want to override the
                default invoice number generation."
              examples:
                - "1234567890"
              type: "string"
            orderdate:
              description: "Date of the order"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            ordernumber:
              description: "Your orderNumber"
              examples:
                - "1234567890"
              type: "string"
            paymentkind:
              description: "Kind of payment intended to be used for this order, can be
                different for subsequent invoices.



                PP: Paypal



                CC: Credit Card



                DD: Direct Debit



                CT: Cash Transfer



                CD: Cash on Delivery"
              enum:
                - "PP"
                - "CC"
                - "DD"
                - "CT"
                - "CD"
              examples:
                - "CT"
              type: "string"
            reference:
              description: "Your creditnoteReference (A unique identifier in your system), if
                you don't send this Abillify will generate one."
              examples:
                - "1234567890"
              type: "string"
            tax:
              description: "Tax amount of the credit note, rounded to 2 decimal places"
              examples:
                - -188.4
              type: "number"
            total:
              description: "Total amount of the credit note, rounded to 2 decimal places
                (including tax)"
              examples:
                - -1180
              type: "number"
          type: "object"
        - properties:
            identity:
              properties:
                debtor:
                  description: "The debtor number of the identity, if you do not send this
                    Abillify will generate one."
                  examples:
                    - "10001"
                  type: "string"
                reference:
                  description: "Your identityReference"
                  examples:
                    - "1234567890"
                  type: "string"
              type: "object"
          type: "object"
      type: "object"
    Document:
      allOf:
        - properties:
            communications:
              items:
                properties:
                  comment:
                    description: "Comment of the communication"
                    examples:
                      - "Comment"
                    type: "string"
                  created:
                    description: "Creation date of the communication"
                    examples:
                      - "2020-01-01T00:00:00.000Z"
                    format: "date-time"
                    type: "string"
                  data:
                    description: "Merchant information related to the entity, you can store any JSON
                      here. Size limits according to your contract."
                    properties:
                      custom_key:
                        description: "Custom key-value pair for merchant specific information"
                        examples:
                          - "custom_value"
                        type: "string"
                    type: "object"
                  file:
                    description: "Abillify ID of the file"
                    examples:
                      - "1235"
                    type: "string"
                  id:
                    description: "ID of the communication"
                    examples:
                      - "123456789"
                    type: "string"
                  kind:
                    description: "Kind of document"
                    enum:
                      - "letter"
                      - "email"
                    examples:
                      - "letter"
                    type: "string"
                  label:
                    description: "Label of the communication"
                    examples:
                      - "PDF1234.pdf"
                    type: "string"
                  publicUrl:
                    description: "Public URL of the file"
                    examples:
                      - "https://staging1.abillify.dev/api/v1/communication/123\
                        456789/file"
                    type: "string"
                type: "object"
              type: "array"
            id:
              description: "ID of the invoice"
              examples:
                - "123456789"
              type: "string"
            issued:
              description: "Issue date of the invoice"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            kind:
              description: "Kind of document"
              enum:
                - "invoice"
                - "credit"
              examples:
                - ""
              type: "string"
            reference:
              description: "Your invoiceNumber/creditNumber"
              examples:
                - "1234567890"
              type: "string"
          type: "object"
    DunningSettings:
      description: "Optional, dunning settings for the identity"
      properties:
        customPeriods:
          description: "Optional, custom dunning periods for the identity, if not set the
            default dunning periods will be used."
          properties:
            COLLECTION:
              description: "Days after which the fourth dunning is sent, if not set the
                default dunning period will be used."
              examples:
                - 28
              type: "integer"
            DUNNING1:
              description: "Days after which the first dunning is sent, if not set the default
                dunning period will be used."
              examples:
                - 7
              type: "integer"
            DUNNING2:
              description: "Days after which the second dunning is sent, if not set the
                default dunning period will be used."
              examples:
                - 7
              type: "integer"
            DUNNING3:
              description: "Days after which the third dunning is sent, if not set the default
                dunning period will be used."
              examples:
                - 7
              type: "integer"
            REMINDER:
              description: "Days after which the reminder is sent, if not set the default
                dunning period will be used."
              examples:
                - 7
              type: "integer"
          type: "object"
        delayedUntil:
          description: "Optional, date until the dunning is delayed, if not set the
            dunning will be processed according to the merchant settings."
          examples:
            - "2020-01-01"
          format: "date"
          type: "string"
        deliveryKind:
          default: "email"
          description: "Optional, the kind of communication to be used for dunning, if not
            set the default delivery kind will be used."
          enum:
            - "letter"
            - "email"
          examples:
            - "letter"
          type: "string"
        disabled:
          default: false
          description: "Optional, if set to true the dunning will be disabled for this
            identity, if not set the dunning will be processed according to the
            merchant settings."
          examples:
            - true
            - false
          type: "boolean"
      type: "object"
    Identity:
      allOf:
        - properties:
            addresses:
              items:
                properties:
                  city:
                    examples:
                      - "Berlin"
                    type: "string"
                  country:
                    description: "ISO 3166-1 alpha-2 country code"
                    examples:
                      - "DE"
                      - "FR"
                      - "US"
                    type: "string"
                  extra:
                    description: "Extra information for the delivery of the letter"
                    examples:
                      - "C/O Mr. Smith"
                    type: "string"
                  housenumber:
                    examples:
                      - "1"
                    type: "string"
                  info:
                    description: "Label / Additional information about the address. For example if
                      it was verified by some risk check service."
                    type: "string"
                  kind:
                    description: "Kind of address"
                    enum:
                      - "billing"
                      - "shipping"
                      - "default"
                    examples:
                      - "shipping"
                    type: "string"
                  state:
                    examples:
                      - "Berlin"
                    type: "string"
                  street:
                    examples:
                      - "Main Street"
                    type: "string"
                  zipcode:
                    examples:
                      - "10115"
                    type: "string"
                type: "object"
              type: "array"
            created:
              description: "Creation date of the identity"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            currency:
              default: "Based on merchant settings"
              description: "Main currency of the identity"
              examples:
                - "EUR"
              type: "string"
            debtor:
              description: "The debtor number of the identity, if you do not send this
                Abillify will generate one."
              examples:
                - "1234567890"
              type: "string"
            detail:
              properties:
                dunning:
                  $ref: "#/components/schemas/DunningSettings"
                locale:
                  default: "Based on merchant settings"
                  description: "Locale of the customer, ISO639 & ISO3166"
                  examples:
                    - "de-DE"
                  type: "string"
                vatId:
                  description: "VAT ID of the identity"
                  examples:
                    - "DE123456789"
                  type: "string"
              type: "object"
            emails:
              items:
                properties:
                  email:
                    examples:
                      - "foo@bar.com"
                    type: "string"
                  kind:
                    description: "Kind of email"
                    enum:
                      - "billing"
                      - "shipping"
                      - "default"
                    examples:
                      - "default"
                    type: "string"
                type: "object"
              type: "array"
            id:
              description: "ID of the identity"
              examples:
                - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
              type: "string"
            kind:
              description: "Kind of identity, individual = b2c, incorporate = b2b"
              enum:
                - "individual"
                - "incorporate"
              examples:
                - "individual"
              type: "string"
            meta:
              description: "Merchant information related to the entity, you can store any JSON
                here. Size limits according to your contract."
              properties:
                custom_key:
                  description: "Custom key-value pair for merchant specific information"
                  examples:
                    - "custom_value"
                  type: "string"
              type: "object"
            modified:
              description: "Last update date of the identity"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            name:
              properties:
                birthday:
                  description: "Birthday"
                  examples:
                    - "1970-01-01"
                  type: "string"
                company:
                  description: "Company"
                  examples:
                    - "ACME Inc."
                  type: "string"
                firstname:
                  description: "Firstname"
                  examples:
                    - "John"
                  type: "string"
                lastname:
                  description: "Lastname"
                  examples:
                    - "Doe"
                  type: "string"
                salutation:
                  description: "Salutation"
                  enum:
                    - "mr"
                    - "mrs"
                  examples:
                    - "mr"
                  type: "string"
              type: "object"
            number:
              description: "Your Customernumber"
              examples:
                - "K12345"
              type: "string"
            phones:
              items:
                properties:
                  active:
                    default: true
                    examples:
                      - true
                    type: "boolean"
                  phone:
                    examples:
                      - "+49 30 12345678"
                    type: "string"
                type: "object"
              type: "array"
            reference:
              description: "Your identityReference (A unique identifier in your system), if
                you don't send this Abillify will generate one."
              examples:
                - "1234567890"
              type: "string"
          type: "object"
    Invoice:
      allOf:
        - properties:
            accountingdate:
              description: "Date on which the invoice is booked, normaly the issued date"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            addresses:
              description: "Optional, addresses of the invoice, if not provided they will be
                copied from the identity in the moment of creation."
              items:
                allOf:
                  - properties:
                      city:
                        examples:
                          - "Berlin"
                        type: "string"
                      country:
                        description: "ISO 3166-1 alpha-2 country code"
                        examples:
                          - "DE"
                          - "FR"
                          - "US"
                        type: "string"
                      extra:
                        description: "Extra information for the delivery of the letter"
                        examples:
                          - "C/O Mr. Smith"
                        type: "string"
                      housenumber:
                        examples:
                          - "1"
                        type: "string"
                      info:
                        description: "Label / Additional information about the address. For example if
                          it was verified by some risk check service."
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                          - "default"
                        examples:
                          - "shipping"
                        type: "string"
                      state:
                        examples:
                          - "Berlin"
                        type: "string"
                      street:
                        examples:
                          - "Main Street"
                        type: "string"
                      zipcode:
                        examples:
                          - "10115"
                        type: "string"
                    type: "object"
                  - properties:
                      company:
                        description: "Company"
                        examples:
                          - "ACME Inc."
                        type: "string"
                      firstname:
                        description: "Firstname"
                        examples:
                          - "John"
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                        examples:
                          - "shipping"
                        type: "string"
                      lastname:
                        description: "Lastname"
                        examples:
                          - "Doe"
                        type: "string"
                    type: "object"
              type: "array"
            cancelationdate:
              description: "Date of the cancellation of the invoice"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            created:
              description: "Creation date of the invoice"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            currency:
              default: "If invoice is based on an order, the currency is copied from the
                order, otherwise the customers default currency is used."
              description: "Taken from order"
              examples:
                - "EUR"
              type: "string"
            detail:
              properties:
                dunning:
                  $ref: "#/components/schemas/DunningSettings"
                footerText:
                  description: "Remarks at the bottom of the invoice. Each element will go in a
                    seperate paragraph"
                  items:
                    type: "string"
                  type: "array"
                footerTextId:
                  description: "ID of a translatable text you configured in Abillify, this will
                    resolve the text for the footer and any footerText that is
                    sent."
                  examples:
                    - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                introText:
                  description: "Remarks at the top of the invoice as array-of-string. Each element
                    will go in a seperate paragraph"
                  items:
                    type: "string"
                  type: "array"
                introTextId:
                  description: "ID of a translatable text you configured in Abillify, this will
                    resolve the text for the intro and any introText that is
                    sent."
                  examples:
                    - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                locale:
                  default: "Based on merchant settings, inherited from identity if not defined in
                    payload."
                  description: "Locale of the customer, ISO639 & ISO3166"
                  examples:
                    - "de-DE"
                  type: "string"
                paymentterm:
                  description: "Payment term of the invoice, i.e. 'Zu zahlen innerhalb von 14
                    Tagen'"
                  examples:
                    - "Zu zahlen innerhalb von 14 Tagen"
                  type: "string"
                paymenttermId:
                  description: "ID of the paymenterm you configured in Abillify, this will resolve
                    the paymentterm text and due date (if not sent) according to
                    your settings"
                  examples:
                    - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                placeOfSupplyCountry:
                  default: null
                  description: "Country code of the place of supply for VAT calculation, if not
                    provided the billing address country of voucher>identitiy
                    will be used, with fallback to the default issuing country."
                  examples:
                    - "DE"
                    - "FR"
                    - "CH"
                  type: "string"
                reverseCharge:
                  default: null
                  description: "If set to true or false, this will override the default reverse
                    charge determination for this order."
                  examples:
                    - true
                    - false
                  type: "boolean"
                vatId:
                  description: "VAT ID of the customer for this invoice, inherited from
                    order/identity if not defined in payload."
                  examples:
                    - "DE987654321"
                  type: "string"
              type: "object"
            due:
              description: "Due date of the invoice, relevant for all delay payment methods"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            dunninglevel:
              description: "Dunning level of the invoice, 0=not dunned, 1=first dunning,
                2=second dunning, ..."
              examples:
                - 0
              type: "integer"
            dunningstate:
              description: "State of the dunning process"
              enum:
                - "open"
                - "dunning"
                - "paid"
                - "collection"
                - "writeoff"
                - "cancelled"
              examples:
                - "open"
              type: "string"
            id:
              description: "ID of the invoice"
              examples:
                - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
              type: "string"
            identity:
              description: "ID of the identity"
              examples:
                - "1"
              type: "string"
            issued:
              description: "Date printed on the invoice"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            items:
              items:
                allOf:
                  - properties:
                      account:
                        description: "Account on which the voucheritem is booked, i.e. 4300/4400,
                          inherited from the tax profile on create"
                        examples:
                          - "8400"
                        type: "string"
                      costcenter:
                        description: "Optional, Cost center for the line, can be used for reporting"
                        examples:
                          - "8086"
                        type: "string"
                      created:
                        description: "Creation date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      detail:
                        properties:
                          description:
                            description: "Optional, description of the item"
                            examples:
                              - "This is a product description"
                            type: "string"
                          taxprofile:
                            description: "Optional, the tax profile for the line, as defined in your tax
                              jurisdiction settings, if not configured default
                              is used as as fallback."
                            enum:
                              - "default"
                              - "reduced"
                              - "..."
                            examples:
                              - "default"
                            type: "string"
                          vatclause:
                            description: "Optional, VAT clause to be printed on invoice/item, inherited from
                              tax profile on create."
                            examples:
                              - "Umsatzsteuerbefreit gem. UstG. §4 Nr. 1a"
                            type: "string"
                        type: "object"
                      groupingflag:
                        description: "Optional, grouping flag to group items when booking them, e.g. for
                          different branches, sales teams or to track origin
                          when merging companies, can be used for reporting"
                        examples:
                          - "DE|1234"
                        type: "string"
                      id:
                        description: "ID of the voucher"
                        examples:
                          - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
                        type: "string"
                      kind:
                        description: "principal=goods, ancillary=shipping, payment, discount"
                        enum:
                          - "principal"
                          - "ancillary"
                        examples:
                          - "principal"
                        type: "string"
                      label:
                        description: "Label of the voucheritem"
                        examples:
                          - "Couch Grey 3-Seater"
                        type: "string"
                      modified:
                        description: "Last update date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      net:
                        description: "Net amount of the voucheritem, rounded to 2 decimal places"
                        examples:
                          - 991.6
                        type: "number"
                      pos:
                        description: "Position of the item in the item list, optional, will be
                          automatically generated if omitted from all items."
                        examples:
                          - 1
                        type: "integer"
                      product_number:
                        description: "Your product number"
                        examples:
                          - "1234567890"
                        type: "string"
                      quantity:
                        description: "Quantity of the items"
                        examples:
                          - 1
                        type: "number"
                      reference:
                        description: "Your voucherItemReference (A unique identifier in your system), if
                          you don't send this Abillify will generate one."
                        examples:
                          - "1234567890"
                        type: "string"
                      servicebegin:
                        description: "Optional, Start date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      serviceend:
                        description: "Optional, End date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      taxaccount:
                        description: "Account on which the tax of the voucheritem is booked, i.e.
                          3801/3806, inherited from the tax profile on create"
                        examples:
                          - "1776"
                        type: "string"
                      taxrate:
                        description: "Taxrate of the voucheritem, inherited from the tax profile on
                          create"
                        examples:
                          - 0.19
                        type: "number"
                      unit:
                        description: "Label for the unit of the items"
                        examples:
                          - "pieces"
                        type: "string"
                      unitprice:
                        description: "Net amount of the voucheritem per unit, rounded to 4 decimal
                          places"
                        examples:
                          - 1190
                        type: "number"
                    type: "object"
              type: "array"
            meta:
              description: "Merchant information related to the entity, you can store any JSON
                here. Size limits according to your contract."
              properties:
                custom_key:
                  description: "Custom key-value pair for merchant specific information"
                  examples:
                    - "custom_value"
                  type: "string"
              type: "object"
            modified:
              description: "Last update date of the invoice"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            net:
              description: "Net amount of the invoice, rounded to 2 decimal places"
              examples:
                - 991.6
              type: "number"
            netbased:
              default: null
              description: "If true the calculations are rounded to 2 decimal places, this is
                the recommended option for B2B business.



                If false (null) the calculations are rounded to
                4 decimal places to achieve better gross amounts for end
                customers."
              examples:
                - true
              type: "boolean"
            number:
              description: "Your invoiceNumber, only send this if you want to override the
                default invoice number generation."
              examples:
                - "1234567890"
              type: "string"
            orderdate:
              description: "Date of the order, only send this if invoice it not based on an
                order. (Invoice flow)"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            ordernumber:
              description: "Your orderNumber, only send this if invoice it not based on an
                order. (Invoice flow)"
              examples:
                - "1234567890"
              type: "string"
            paymentkind:
              description: "Kind of payment intended to be used for this order, can be
                different for subsequent invoices.



                PP: Paypal



                CC: Credit Card



                DD: Direct Debit



                CT: Cash Transfer



                CD: Cash on Delivery"
              enum:
                - "PP"
                - "CC"
                - "DD"
                - "CT"
                - "CD"
              examples:
                - "CT"
              type: "string"
            reference:
              description: "Your invoiceReference (A unique identifier in your system), if you
                don't send this Abillify will generate one."
              examples:
                - "1234567890"
              type: "string"
            tax:
              description: "Tax amount of the invoice, rounded to 2 decimal places"
              examples:
                - 188.4
              type: "number"
            total:
              description: "Total amount of the invoice, rounded to 2 decimal places
                (including tax)"
              examples:
                - 1180
              type: "number"
          type: "object"
    InvoiceResolved:
      allOf:
        - properties:
            accountingdate:
              description: "Date on which the invoice is booked, normaly the issued date"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            addresses:
              description: "Optional, addresses of the invoice, if not provided they will be
                copied from the identity in the moment of creation."
              items:
                allOf:
                  - properties:
                      city:
                        examples:
                          - "Berlin"
                        type: "string"
                      country:
                        description: "ISO 3166-1 alpha-2 country code"
                        examples:
                          - "DE"
                          - "FR"
                          - "US"
                        type: "string"
                      extra:
                        description: "Extra information for the delivery of the letter"
                        examples:
                          - "C/O Mr. Smith"
                        type: "string"
                      housenumber:
                        examples:
                          - "1"
                        type: "string"
                      info:
                        description: "Label / Additional information about the address. For example if
                          it was verified by some risk check service."
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                          - "default"
                        examples:
                          - "shipping"
                        type: "string"
                      state:
                        examples:
                          - "Berlin"
                        type: "string"
                      street:
                        examples:
                          - "Main Street"
                        type: "string"
                      zipcode:
                        examples:
                          - "10115"
                        type: "string"
                    type: "object"
                  - properties:
                      company:
                        description: "Company"
                        examples:
                          - "ACME Inc."
                        type: "string"
                      firstname:
                        description: "Firstname"
                        examples:
                          - "John"
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                        examples:
                          - "shipping"
                        type: "string"
                      lastname:
                        description: "Lastname"
                        examples:
                          - "Doe"
                        type: "string"
                    type: "object"
              type: "array"
            cancelationdate:
              description: "Date of the cancellation of the invoice"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            created:
              description: "Creation date of the invoice"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            currency:
              default: "If invoice is based on an order, the currency is copied from the
                order, otherwise the customers default currency is used."
              description: "Taken from order"
              examples:
                - "EUR"
              type: "string"
            detail:
              properties:
                dunning:
                  $ref: "#/components/schemas/DunningSettings"
                footerText:
                  description: "Remarks at the bottom of the invoice. Each element will go in a
                    seperate paragraph"
                  items:
                    type: "string"
                  type: "array"
                footerTextId:
                  description: "ID of a translatable text you configured in Abillify, this will
                    resolve the text for the footer and any footerText that is
                    sent."
                  examples:
                    - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                introText:
                  description: "Remarks at the top of the invoice as array-of-string. Each element
                    will go in a seperate paragraph"
                  items:
                    type: "string"
                  type: "array"
                introTextId:
                  description: "ID of a translatable text you configured in Abillify, this will
                    resolve the text for the intro and any introText that is
                    sent."
                  examples:
                    - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                locale:
                  default: "Based on merchant settings, inherited from identity if not defined in
                    payload."
                  description: "Locale of the customer, ISO639 & ISO3166"
                  examples:
                    - "de-DE"
                  type: "string"
                paymentterm:
                  description: "Payment term of the invoice, i.e. 'Zu zahlen innerhalb von 14
                    Tagen'"
                  examples:
                    - "Zu zahlen innerhalb von 14 Tagen"
                  type: "string"
                paymenttermId:
                  description: "ID of the paymenterm you configured in Abillify, this will resolve
                    the paymentterm text and due date (if not sent) according to
                    your settings"
                  examples:
                    - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                  type: "string"
                placeOfSupplyCountry:
                  default: null
                  description: "Country code of the place of supply for VAT calculation, if not
                    provided the billing address country of voucher>identitiy
                    will be used, with fallback to the default issuing country."
                  examples:
                    - "DE"
                    - "FR"
                    - "CH"
                  type: "string"
                reverseCharge:
                  default: null
                  description: "If set to true or false, this will override the default reverse
                    charge determination for this order."
                  examples:
                    - true
                    - false
                  type: "boolean"
                vatId:
                  description: "VAT ID of the customer for this invoice, inherited from
                    order/identity if not defined in payload."
                  examples:
                    - "DE987654321"
                  type: "string"
              type: "object"
            due:
              description: "Due date of the invoice, relevant for all delay payment methods"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            dunninglevel:
              description: "Dunning level of the invoice, 0=not dunned, 1=first dunning,
                2=second dunning, ..."
              examples:
                - 0
              type: "integer"
            dunningstate:
              description: "State of the dunning process"
              enum:
                - "open"
                - "dunning"
                - "paid"
                - "collection"
                - "writeoff"
                - "cancelled"
              examples:
                - "open"
              type: "string"
            id:
              description: "ID of the invoice"
              examples:
                - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
              type: "string"
            identity:
              description: "ID of the identity"
              examples:
                - "1"
              type: "string"
            issued:
              description: "Date printed on the invoice"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            items:
              items:
                allOf:
                  - properties:
                      account:
                        description: "Account on which the voucheritem is booked, i.e. 4300/4400,
                          inherited from the tax profile on create"
                        examples:
                          - "8400"
                        type: "string"
                      costcenter:
                        description: "Optional, Cost center for the line, can be used for reporting"
                        examples:
                          - "8086"
                        type: "string"
                      created:
                        description: "Creation date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      detail:
                        properties:
                          description:
                            description: "Optional, description of the item"
                            examples:
                              - "This is a product description"
                            type: "string"
                          taxprofile:
                            description: "Optional, the tax profile for the line, as defined in your tax
                              jurisdiction settings, if not configured default
                              is used as as fallback."
                            enum:
                              - "default"
                              - "reduced"
                              - "..."
                            examples:
                              - "default"
                            type: "string"
                          vatclause:
                            description: "Optional, VAT clause to be printed on invoice/item, inherited from
                              tax profile on create."
                            examples:
                              - "Umsatzsteuerbefreit gem. UstG. §4 Nr. 1a"
                            type: "string"
                        type: "object"
                      groupingflag:
                        description: "Optional, grouping flag to group items when booking them, e.g. for
                          different branches, sales teams or to track origin
                          when merging companies, can be used for reporting"
                        examples:
                          - "DE|1234"
                        type: "string"
                      id:
                        description: "ID of the voucher"
                        examples:
                          - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
                        type: "string"
                      kind:
                        description: "principal=goods, ancillary=shipping, payment, discount"
                        enum:
                          - "principal"
                          - "ancillary"
                        examples:
                          - "principal"
                        type: "string"
                      label:
                        description: "Label of the voucheritem"
                        examples:
                          - "Couch Grey 3-Seater"
                        type: "string"
                      modified:
                        description: "Last update date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      net:
                        description: "Net amount of the voucheritem, rounded to 2 decimal places"
                        examples:
                          - 991.6
                        type: "number"
                      pos:
                        description: "Position of the item in the item list, optional, will be
                          automatically generated if omitted from all items."
                        examples:
                          - 1
                        type: "integer"
                      product_number:
                        description: "Your product number"
                        examples:
                          - "1234567890"
                        type: "string"
                      quantity:
                        description: "Quantity of the items"
                        examples:
                          - 1
                        type: "number"
                      reference:
                        description: "Your voucherItemReference (A unique identifier in your system), if
                          you don't send this Abillify will generate one."
                        examples:
                          - "1234567890"
                        type: "string"
                      servicebegin:
                        description: "Optional, Start date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      serviceend:
                        description: "Optional, End date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      taxaccount:
                        description: "Account on which the tax of the voucheritem is booked, i.e.
                          3801/3806, inherited from the tax profile on create"
                        examples:
                          - "1776"
                        type: "string"
                      taxrate:
                        description: "Taxrate of the voucheritem, inherited from the tax profile on
                          create"
                        examples:
                          - 0.19
                        type: "number"
                      unit:
                        description: "Label for the unit of the items"
                        examples:
                          - "pieces"
                        type: "string"
                      unitprice:
                        description: "Net amount of the voucheritem per unit, rounded to 4 decimal
                          places"
                        examples:
                          - 1190
                        type: "number"
                    type: "object"
              type: "array"
            meta:
              description: "Merchant information related to the entity, you can store any JSON
                here. Size limits according to your contract."
              properties:
                custom_key:
                  description: "Custom key-value pair for merchant specific information"
                  examples:
                    - "custom_value"
                  type: "string"
              type: "object"
            modified:
              description: "Last update date of the invoice"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            net:
              description: "Net amount of the invoice, rounded to 2 decimal places"
              examples:
                - 991.6
              type: "number"
            netbased:
              default: null
              description: "If true the calculations are rounded to 2 decimal places, this is
                the recommended option for B2B business.



                If false (null) the calculations are rounded to
                4 decimal places to achieve better gross amounts for end
                customers."
              examples:
                - true
              type: "boolean"
            number:
              description: "Your invoiceNumber, only send this if you want to override the
                default invoice number generation."
              examples:
                - "1234567890"
              type: "string"
            orderdate:
              description: "Date of the order, only send this if invoice it not based on an
                order. (Invoice flow)"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            ordernumber:
              description: "Your orderNumber, only send this if invoice it not based on an
                order. (Invoice flow)"
              examples:
                - "1234567890"
              type: "string"
            paymentkind:
              description: "Kind of payment intended to be used for this order, can be
                different for subsequent invoices.



                PP: Paypal



                CC: Credit Card



                DD: Direct Debit



                CT: Cash Transfer



                CD: Cash on Delivery"
              enum:
                - "PP"
                - "CC"
                - "DD"
                - "CT"
                - "CD"
              examples:
                - "CT"
              type: "string"
            reference:
              description: "Your invoiceReference (A unique identifier in your system), if you
                don't send this Abillify will generate one."
              examples:
                - "1234567890"
              type: "string"
            tax:
              description: "Tax amount of the invoice, rounded to 2 decimal places"
              examples:
                - 188.4
              type: "number"
            total:
              description: "Total amount of the invoice, rounded to 2 decimal places
                (including tax)"
              examples:
                - 1180
              type: "number"
          type: "object"
        - properties:
            identity:
              properties:
                debtor:
                  description: "The debtor number of the identity, if you do not send this
                    Abillify will generate one."
                  examples:
                    - "10001"
                  type: "string"
                reference:
                  description: "Your identityReference"
                  examples:
                    - "1234567890"
                  type: "string"
              type: "object"
          type: "object"
      type: "object"
    Order:
      allOf:
        - properties:
            addresses:
              description: "Optional, addresses of the invoice, if not provided they will be
                copied from the identity in the moment of creation."
              items:
                allOf:
                  - properties:
                      city:
                        examples:
                          - "Berlin"
                        type: "string"
                      country:
                        description: "ISO 3166-1 alpha-2 country code"
                        examples:
                          - "DE"
                          - "FR"
                          - "US"
                        type: "string"
                      extra:
                        description: "Extra information for the delivery of the letter"
                        examples:
                          - "C/O Mr. Smith"
                        type: "string"
                      housenumber:
                        examples:
                          - "1"
                        type: "string"
                      info:
                        description: "Label / Additional information about the address. For example if
                          it was verified by some risk check service."
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                          - "default"
                        examples:
                          - "shipping"
                        type: "string"
                      state:
                        examples:
                          - "Berlin"
                        type: "string"
                      street:
                        examples:
                          - "Main Street"
                        type: "string"
                      zipcode:
                        examples:
                          - "10115"
                        type: "string"
                    type: "object"
                  - properties:
                      company:
                        description: "Company"
                        examples:
                          - "ACME Inc."
                        type: "string"
                      firstname:
                        description: "Firstname"
                        examples:
                          - "John"
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                        examples:
                          - "shipping"
                        type: "string"
                      lastname:
                        description: "Lastname"
                        examples:
                          - "Doe"
                        type: "string"
                    type: "object"
              type: "array"
            cancellationdate:
              description: "Date after which the unattached amount of the order is accounted
                as overpayment"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            created:
              description: "Creation date of the order"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            currency:
              default: "Inherited from identity if omitted"
              description: "Main currency of the order"
              examples:
                - "EUR"
              type: "string"
            detail:
              properties:
                locale:
                  default: "Based on merchant settings, inherited from identity if not defined in
                    payload."
                  description: "Locale of the customer, ISO639 & ISO3166"
                  examples:
                    - "de-DE"
                  type: "string"
                reverseCharge:
                  default: null
                  description: "If set to true or false, this will override the default reverse
                    charge determination for this order."
                  examples:
                    - true
                    - false
                  type: "boolean"
                vatId:
                  description: "VAT ID of the customer for this order, inherited from identity if
                    not defined in payload."
                  examples:
                    - "DE987654321"
                  type: "string"
              type: "object"
            id:
              description: "ID of the order"
              examples:
                - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
              type: "string"
            identity:
              description: "ID of the identity"
              examples:
                - "1"
              type: "string"
            items:
              items:
                allOf:
                  - properties:
                      account:
                        description: "Account on which the voucheritem is booked, i.e. 4300/4400,
                          inherited from the tax profile on create"
                        examples:
                          - "8400"
                        type: "string"
                      costcenter:
                        description: "Optional, Cost center for the line, can be used for reporting"
                        examples:
                          - "8086"
                        type: "string"
                      created:
                        description: "Creation date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      detail:
                        properties:
                          description:
                            description: "Optional, description of the item"
                            examples:
                              - "This is a product description"
                            type: "string"
                          taxprofile:
                            description: "Optional, the tax profile for the line, as defined in your tax
                              jurisdiction settings, if not configured default
                              is used as as fallback."
                            enum:
                              - "default"
                              - "reduced"
                              - "..."
                            examples:
                              - "default"
                            type: "string"
                          vatclause:
                            description: "Optional, VAT clause to be printed on invoice/item, inherited from
                              tax profile on create."
                            examples:
                              - "Umsatzsteuerbefreit gem. UstG. §4 Nr. 1a"
                            type: "string"
                        type: "object"
                      groupingflag:
                        description: "Optional, grouping flag to group items when booking them, e.g. for
                          different branches, sales teams or to track origin
                          when merging companies, can be used for reporting"
                        examples:
                          - "DE|1234"
                        type: "string"
                      id:
                        description: "ID of the voucher"
                        examples:
                          - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
                        type: "string"
                      kind:
                        description: "principal=goods, ancillary=shipping, payment, discount"
                        enum:
                          - "principal"
                          - "ancillary"
                        examples:
                          - "principal"
                        type: "string"
                      label:
                        description: "Label of the voucheritem"
                        examples:
                          - "Couch Grey 3-Seater"
                        type: "string"
                      modified:
                        description: "Last update date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      net:
                        description: "Net amount of the voucheritem, rounded to 2 decimal places"
                        examples:
                          - 991.6
                        type: "number"
                      pos:
                        description: "Position of the item in the item list, optional, will be
                          automatically generated if omitted from all items."
                        examples:
                          - 1
                        type: "integer"
                      product_number:
                        description: "Your product number"
                        examples:
                          - "1234567890"
                        type: "string"
                      quantity:
                        description: "Quantity of the items"
                        examples:
                          - 1
                        type: "number"
                      reference:
                        description: "Your voucherItemReference (A unique identifier in your system), if
                          you don't send this Abillify will generate one."
                        examples:
                          - "1234567890"
                        type: "string"
                      servicebegin:
                        description: "Optional, Start date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      serviceend:
                        description: "Optional, End date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      taxaccount:
                        description: "Account on which the tax of the voucheritem is booked, i.e.
                          3801/3806, inherited from the tax profile on create"
                        examples:
                          - "1776"
                        type: "string"
                      taxrate:
                        description: "Taxrate of the voucheritem, inherited from the tax profile on
                          create"
                        examples:
                          - 0.19
                        type: "number"
                      unit:
                        description: "Label for the unit of the items"
                        examples:
                          - "pieces"
                        type: "string"
                      unitprice:
                        description: "Net amount of the voucheritem per unit, rounded to 4 decimal
                          places"
                        examples:
                          - 1190
                        type: "number"
                    type: "object"
              type: "array"
            meta:
              description: "Merchant information related to the entity, you can store any JSON
                here. Size limits according to your contract."
              properties:
                custom_key:
                  description: "Custom key-value pair for merchant specific information"
                  examples:
                    - "custom_value"
                  type: "string"
              type: "object"
            modified:
              description: "Last update date of the order"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            net:
              description: "Net amount of the order, rounded to 2 decimal places"
              examples:
                - 1000
              type: "number"
            netbased:
              default: null
              description: "If true the calculations are rounded to 2 decimal places, this is
                the recommended option for B2B business.



                If false (null) the calculations are rounded to
                4 decimal places to achieve better gross amounts for end
                customers."
              examples:
                - true
              type: "boolean"
            orderdate:
              description: "Date of the order"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            ordernumber:
              description: "Your orderNumber"
              examples:
                - "1234"
              type: "string"
            paymentkind:
              description: "Kind of payment intended to be used for this order, can be
                different for subsequent invoices.



                PP: Paypal



                CC: Credit Card



                DD: Direct Debit



                CT: Cash Transfer



                CD: Cash on Delivery"
              enum:
                - "PP"
                - "CC"
                - "DD"
                - "CT"
                - "CD"
              examples:
                - "CT"
              type: "string"
            reference:
              description: "Your orderReference (A unique identifier in your system), if you
                don't send this Abillify will generate one."
              examples:
                - "123456789098765443"
              type: "string"
            tax:
              description: "Tax amount of the order, rounded to 2 decimal places"
              examples:
                - 119
              type: "number"
            total:
              description: "Total amount of the order, rounded to 2 decimal places (including
                tax)"
              examples:
                - 1190
              type: "number"
          type: "object"
    OrderResolved:
      allOf:
        - properties:
            addresses:
              description: "Optional, addresses of the invoice, if not provided they will be
                copied from the identity in the moment of creation."
              items:
                allOf:
                  - properties:
                      city:
                        examples:
                          - "Berlin"
                        type: "string"
                      country:
                        description: "ISO 3166-1 alpha-2 country code"
                        examples:
                          - "DE"
                          - "FR"
                          - "US"
                        type: "string"
                      extra:
                        description: "Extra information for the delivery of the letter"
                        examples:
                          - "C/O Mr. Smith"
                        type: "string"
                      housenumber:
                        examples:
                          - "1"
                        type: "string"
                      info:
                        description: "Label / Additional information about the address. For example if
                          it was verified by some risk check service."
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                          - "default"
                        examples:
                          - "shipping"
                        type: "string"
                      state:
                        examples:
                          - "Berlin"
                        type: "string"
                      street:
                        examples:
                          - "Main Street"
                        type: "string"
                      zipcode:
                        examples:
                          - "10115"
                        type: "string"
                    type: "object"
                  - properties:
                      company:
                        description: "Company"
                        examples:
                          - "ACME Inc."
                        type: "string"
                      firstname:
                        description: "Firstname"
                        examples:
                          - "John"
                        type: "string"
                      kind:
                        description: "Kind of address"
                        enum:
                          - "billing"
                          - "shipping"
                        examples:
                          - "shipping"
                        type: "string"
                      lastname:
                        description: "Lastname"
                        examples:
                          - "Doe"
                        type: "string"
                    type: "object"
              type: "array"
            cancellationdate:
              description: "Date after which the unattached amount of the order is accounted
                as overpayment"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            created:
              description: "Creation date of the order"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            currency:
              default: "Inherited from identity if omitted"
              description: "Main currency of the order"
              examples:
                - "EUR"
              type: "string"
            detail:
              properties:
                locale:
                  default: "Based on merchant settings, inherited from identity if not defined in
                    payload."
                  description: "Locale of the customer, ISO639 & ISO3166"
                  examples:
                    - "de-DE"
                  type: "string"
                reverseCharge:
                  default: null
                  description: "If set to true or false, this will override the default reverse
                    charge determination for this order."
                  examples:
                    - true
                    - false
                  type: "boolean"
                vatId:
                  description: "VAT ID of the customer for this order, inherited from identity if
                    not defined in payload."
                  examples:
                    - "DE987654321"
                  type: "string"
              type: "object"
            id:
              description: "ID of the order"
              examples:
                - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
              type: "string"
            identity:
              description: "ID of the identity"
              examples:
                - "1"
              type: "string"
            items:
              items:
                allOf:
                  - properties:
                      account:
                        description: "Account on which the voucheritem is booked, i.e. 4300/4400,
                          inherited from the tax profile on create"
                        examples:
                          - "8400"
                        type: "string"
                      costcenter:
                        description: "Optional, Cost center for the line, can be used for reporting"
                        examples:
                          - "8086"
                        type: "string"
                      created:
                        description: "Creation date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      detail:
                        properties:
                          description:
                            description: "Optional, description of the item"
                            examples:
                              - "This is a product description"
                            type: "string"
                          taxprofile:
                            description: "Optional, the tax profile for the line, as defined in your tax
                              jurisdiction settings, if not configured default
                              is used as as fallback."
                            enum:
                              - "default"
                              - "reduced"
                              - "..."
                            examples:
                              - "default"
                            type: "string"
                          vatclause:
                            description: "Optional, VAT clause to be printed on invoice/item, inherited from
                              tax profile on create."
                            examples:
                              - "Umsatzsteuerbefreit gem. UstG. §4 Nr. 1a"
                            type: "string"
                        type: "object"
                      groupingflag:
                        description: "Optional, grouping flag to group items when booking them, e.g. for
                          different branches, sales teams or to track origin
                          when merging companies, can be used for reporting"
                        examples:
                          - "DE|1234"
                        type: "string"
                      id:
                        description: "ID of the voucher"
                        examples:
                          - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
                        type: "string"
                      kind:
                        description: "principal=goods, ancillary=shipping, payment, discount"
                        enum:
                          - "principal"
                          - "ancillary"
                        examples:
                          - "principal"
                        type: "string"
                      label:
                        description: "Label of the voucheritem"
                        examples:
                          - "Couch Grey 3-Seater"
                        type: "string"
                      modified:
                        description: "Last update date of the voucher"
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      net:
                        description: "Net amount of the voucheritem, rounded to 2 decimal places"
                        examples:
                          - 991.6
                        type: "number"
                      pos:
                        description: "Position of the item in the item list, optional, will be
                          automatically generated if omitted from all items."
                        examples:
                          - 1
                        type: "integer"
                      product_number:
                        description: "Your product number"
                        examples:
                          - "1234567890"
                        type: "string"
                      quantity:
                        description: "Quantity of the items"
                        examples:
                          - 1
                        type: "number"
                      reference:
                        description: "Your voucherItemReference (A unique identifier in your system), if
                          you don't send this Abillify will generate one."
                        examples:
                          - "1234567890"
                        type: "string"
                      servicebegin:
                        description: "Optional, Start date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      serviceend:
                        description: "Optional, End date of the service, e.g. for subscriptions, also
                          used for PRAP calculation if enabled."
                        examples:
                          - "2020-01-01T00:00:00.000Z"
                        type: "string"
                      taxaccount:
                        description: "Account on which the tax of the voucheritem is booked, i.e.
                          3801/3806, inherited from the tax profile on create"
                        examples:
                          - "1776"
                        type: "string"
                      taxrate:
                        description: "Taxrate of the voucheritem, inherited from the tax profile on
                          create"
                        examples:
                          - 0.19
                        type: "number"
                      unit:
                        description: "Label for the unit of the items"
                        examples:
                          - "pieces"
                        type: "string"
                      unitprice:
                        description: "Net amount of the voucheritem per unit, rounded to 4 decimal
                          places"
                        examples:
                          - 1190
                        type: "number"
                    type: "object"
              type: "array"
            meta:
              description: "Merchant information related to the entity, you can store any JSON
                here. Size limits according to your contract."
              properties:
                custom_key:
                  description: "Custom key-value pair for merchant specific information"
                  examples:
                    - "custom_value"
                  type: "string"
              type: "object"
            modified:
              description: "Last update date of the order"
              examples:
                - "2020-01-01T00:00:00.000Z"
              format: "date-time"
              type: "string"
            net:
              description: "Net amount of the order, rounded to 2 decimal places"
              examples:
                - 1000
              type: "number"
            netbased:
              default: null
              description: "If true the calculations are rounded to 2 decimal places, this is
                the recommended option for B2B business.



                If false (null) the calculations are rounded to
                4 decimal places to achieve better gross amounts for end
                customers."
              examples:
                - true
              type: "boolean"
            orderdate:
              description: "Date of the order"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            ordernumber:
              description: "Your orderNumber"
              examples:
                - "1234"
              type: "string"
            paymentkind:
              description: "Kind of payment intended to be used for this order, can be
                different for subsequent invoices.



                PP: Paypal



                CC: Credit Card



                DD: Direct Debit



                CT: Cash Transfer



                CD: Cash on Delivery"
              enum:
                - "PP"
                - "CC"
                - "DD"
                - "CT"
                - "CD"
              examples:
                - "CT"
              type: "string"
            reference:
              description: "Your orderReference (A unique identifier in your system), if you
                don't send this Abillify will generate one."
              examples:
                - "123456789098765443"
              type: "string"
            tax:
              description: "Tax amount of the order, rounded to 2 decimal places"
              examples:
                - 119
              type: "number"
            total:
              description: "Total amount of the order, rounded to 2 decimal places (including
                tax)"
              examples:
                - 1190
              type: "number"
          type: "object"
        - properties:
            identity:
              properties:
                debtor:
                  description: "The debtor number of the identity, if you do not send this
                    Abillify will generate one."
                  examples:
                    - "10001"
                  type: "string"
                reference:
                  description: "Your identityReference"
                  examples:
                    - "1234567890"
                  type: "string"
              type: "object"
          type: "object"
      type: "object"
    productgroups:
      allOf:
        - properties:
            client:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          required:
            - "client"
          type: "object"
        - properties:
            created:
              default: "now()"
              description: "Date the record was created at"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
            id:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            modified:
              default: "now()"
              description: "Last modification time of record"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          required:
            - "id"
          type: "object"
        - properties:
            reference:
              description: "Your unique id for the element, ie. the id of the element in your
                database"
              examples:
                - "abcdefg"
              type: "string"
          type: "object"
        - properties:
            committed:
              description: "Entity was committed to external system and should not be changed
                any more"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          type: "object"
        - properties:
            meta:
              description: "Merchant data related to the entity"
              type: "object"
          type: "object"
        - properties:
            active:
              default: true
              examples:
                - false
              type: "boolean"
            description_long_localized:
              default: "{}"
              description: "Long descritpion of productgroup, localized, allows html/markdown,
                shown on checkout"
              examples:
                - de: "Beschreibung auf Deutsch"
                  en: "Description in English"
              type: "object"
            description_short_localized:
              default: "{}"
              description: "Description of productgroup, localized, plain text, shown on
                checkout and invoice"
              examples:
                - de: "Beschreibung auf Deutsch"
                  en: "Description in English"
              type: "object"
            label:
              description: "Label of product group, internal use"
              examples:
                - "abcdefg"
              type: "string"
            parent:
              description: "Parent product group"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            title_localized:
              default: "{}"
              description: "Title of productgroup, localized, plain text, show on checkout and
                invoice, if not defined label is used"
              examples:
                - de: "Titel auf Deutsch"
                  en: "Title in english"
              type: "object"
          type: "object"
      description: ""
      title: "productgroups"
    productprices:
      allOf:
        - properties:
            client:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          required:
            - "client"
          type: "object"
        - properties:
            created:
              default: "now()"
              description: "Date the record was created at"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
            id:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            modified:
              default: "now()"
              description: "Last modification time of record"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          required:
            - "id"
          type: "object"
        - properties:
            reference:
              description: "Your unique id for the element, ie. the id of the element in your
                database"
              examples:
                - "abcdefg"
              type: "string"
          type: "object"
        - properties:
            meta:
              description: "Merchant data related to the entity"
              type: "object"
          type: "object"
        - properties:
            committed:
              description: "Entity was committed to external system and should not be changed
                any more"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          type: "object"
        - properties:
            product:
              description: "Id of the product that is linked to the element."
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          required:
            - "product"
          type: "object"
        - properties:
            active:
              default: true
              description: "M: At least one price must be active"
              examples:
                - false
              type: "boolean"
            amount:
              description: "Net price in currency, i.e. 10.00"
              examples:
                - "12345.45"
              pattern: "^-?[0-9]+(\\.[0-9]+)?$"
              type: "string"
            currency:
              description: "Currency i.e. EUR | USD ..."
              examples:
                - "abcdefg"
              type: "string"
            filter:
              default: "{}"
              description: "Filter for availability, i.e. {language: [de]} or
                {shippingCountry: [de]}"
              type: "object"
            label:
              description: "Name of the price, not visible to customer, i.e. T-Shirt EUR"
              examples:
                - "abcdefg"
              type: "string"
            old_amount:
              description: "Old net price, to show price reductions, in currency, i.e. 15.00"
              examples:
                - "12345.45"
              pattern: "^-?[0-9]+(\\.[0-9]+)?$"
              type: "string"
            taxprofile:
              description: "Tax profile of the price, as defined in tax jurisdiction, i.e
                default | reduced"
              examples:
                - "abcdefg"
              type: "string"
            validfrom:
              description: "Price valid from. M: At least one price must be in past or null"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
            validto:
              description: "Price valid to. M: at least one price must be valid"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          required:
            - "label"
            - "currency"
            - "amount"
            - "taxprofile"
          type: "object"
      description: ""
      title: "productprices"
    products:
      allOf:
        - properties:
            client:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          required:
            - "client"
          type: "object"
        - properties:
            created:
              default: "now()"
              description: "Date the record was created at"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
            id:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            modified:
              default: "now()"
              description: "Last modification time of record"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          required:
            - "id"
          type: "object"
        - properties:
            reference:
              description: "Your unique id for the element, ie. the id of the element in your
                database"
              examples:
                - "abcdefg"
              type: "string"
          type: "object"
        - properties:
            committed:
              description: "Entity was committed to external system and should not be changed
                any more"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          type: "object"
        - properties:
            meta:
              description: "Merchant data related to the entity"
              type: "object"
          type: "object"
        - properties:
            active:
              default: true
              description: ""
              examples:
                - false
              type: "boolean"
            billing_interval_align:
              description: "Defines how the billing interval is aligned, only if kind is plan,
                i.e. plan_interval = month, billling_interval = quarter,
                billing_interval_align = start -> billed on Jan, Apr, Jul, Oct"
              enum:
                - "start"
                - "end"
              type: "string"
            billing_interval_partial:
              description: "Only relevant for kind = plan, when to send first last invoice,
                i.e. if product is bought on 15th of month, invoice at end of
                month = partial or invoice with end of first full month = full"
              enum:
                - "full"
                - "partial"
              type: "string"
            billing_start_alignment:
              description: "LEGACY"
              examples:
                - "abcdefg"
              type: "string"
            billling_interval:
              description: "Billing interval of plan, only if kind is plan, i.e. plan_interval
                = month, billling_interval = quarter -> billed every 3 months"
              enum:
                - "month"
                - "quarter"
                - "year"
                - "term"
              type: "string"
            description_long_localized:
              default: "{}"
              description: "Long descritpion of product, localized, allows html/markdown,
                shown on checkout"
              examples:
                - de: "Beschreibung auf Deutsch"
                  en: "Description in English"
              type: "object"
            description_short_localized:
              default: "{}"
              description: "Description of product, localized, plain text, shown on checkout
                and invoice"
              examples:
                - de: "Beschreibung auf Deutsch"
                  en: "Description in English"
              type: "object"
            filter:
              default: "{}"
              description: "Filter for availability, i.e. {language: [de]} or
                {shippingCountry: [de]}"
              type: "object"
            kind:
              default: "item"
              description: "Kind of product, defines behaviour in shop and billing, i.e. item
                is a one time product, plan is a recurring product, variant is a
                variation of a parent product, addon is an additional product
                that can only be booked together with another product"
              enum:
                - "item"
                - "variant"
                - "plan"
                - "addon"
              examples:
                - "item"
                - "variant"
              type: "string"
            label:
              description: "Label of product, internal use"
              examples:
                - "abcdefg"
              type: "string"
            parent:
              description: "Parent product of the product, mostly used when kind is variant or
                addon, but can also be used to group different models of the
                same product."
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            plan_interval:
              description: "Interval of plan, only if kind is plan"
              enum:
                - "day"
                - "week"
                - "month"
                - "quarter"
                - "year"
              type: "string"
            plan_interval_amount:
              description: "Only relevant for kind = plan, number of product_interval the
                contract is made for, i.e. 12 + product_interval = month -> 12
                month"
              examples:
                - 12
              format: "int32"
              type: "integer"
            plan_interval_minimum:
              description: "Only relevant for kind = plan, number of min intervals, i.e.
                plan_interval = month, plan_interval_amount = 1,
                plan_interval_minimum = 3 -> minimum contract duration 3 months"
              examples:
                - 3
              format: "int32"
              type: "integer"
            subsequent_product:
              description: "Product that is newer version of this product, if disabled or
                validto ended"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            title_localized:
              default: "{}"
              description: "Title of product, localized, plain text, show on checkout and
                invoice, if not defined label is used"
              examples:
                - de: "Produktname"
                  en: "Product name"
              type: "object"
            unit:
              default: ""
              description: "Unit of item, i.e. Pieces or Liters, shown on checkout and
                invoice"
              examples:
                - "abcdefg"
              type: "string"
            validfrom:
              description: "Avaiable after"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
            validto:
              description: "Avaiable until"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          required:
            - "label"
          type: "object"
      description: ""
      title: "products"
    Report:
      allOf:
        - properties:
            created:
              description: "Creation date of the voucher"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            file:
              description: "Abillify ID of the file"
              examples:
                - "1"
              type: "string"
            filename:
              description: "Filename of the report"
              examples:
                - "1234567890.pdf"
              type: "string"
            filesize:
              description: "Filesize of the report in bytes"
              examples:
                - 123456
              type: "integer"
            id:
              description: "ID of the voucher"
              examples:
                - "5e4a7b2b-1b0b-4c7a-8f0a-5b9b6b7c8d9e"
              type: "string"
            kind:
              description: "Kind of the report"
              enum:
                - "datev_buchungen"
                - "datev_debitoren"
                - "aar"
                - "dunning"
                - "custom"
              examples:
                - "datev_buchungen"
              type: "string"
            modified:
              description: "Last update date of the voucher"
              examples:
                - "2020-01-01T00:00:00.000Z"
              type: "string"
            reference:
              description: "Your unique identifier for this item"
              examples:
                - "1234567890"
              type: "string"
          type: "object"
    TaskResponse:
      properties:
        job:
          description: "Job ID"
          examples:
            - "1"
          type: "string"
        result:
          examples:
            - "OK"
          type: "string"
        resultcode:
          examples:
            - "0"
          type: "string"
    transactions:
      allOf:
        - properties:
            client:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          required:
            - "client"
          type: "object"
        - properties:
            created:
              default: "now()"
              description: "Date the record was created at"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
            id:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            modified:
              default: "now()"
              description: "Last modification time of record"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          required:
            - "id"
          type: "object"
        - properties:
            reference:
              description: "Your unique id for the element, ie. the id of the element in your
                database"
              examples:
                - "abcdefg"
              type: "string"
          type: "object"
        - properties:
            committed:
              description: "Entity was committed to external system and should not be changed
                any more"
              examples:
                - "2022-07-29 17:23:47"
              format: "string"
              pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
              type: "string"
          type: "object"
        - properties:
            meta:
              description: "Merchant data related to the entity"
              type: "object"
          type: "object"
        - properties:
            identity:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          type: "object"
        - properties:
            channel:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          type: "object"
        - properties:
            paymentmethod:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          type: "object"
        - properties:
            voucher:
              description: "Id of the voucher that is linked to the element."
              examples:
                - 1
              pattern: "^-?[0-9]+$"
              type: "string"
          type: "object"
        - properties:
            caseid:
              description: "Id of the debt collection case"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          type: "object"
        - properties:
            file:
              description: "Unique ID provided by Abillify"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
          type: "object"
        - properties:
            account:
              description: ""
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            amount:
              default: 0
              description: ""
              examples:
                - "12345.45"
              pattern: "^-?[0-9]+(\\.[0-9]+)?$"
              type: "string"
            bookingdate:
              description: ""
              examples:
                - "2022-07-31"
              format: "date"
              type: "string"
            cause:
              default: "NONE"
              description: "transaction_cause_type"
              enum:
                - "NONE"
                - "UNKNOWN"
                - "BOUNCED"
                - "REJECTED"
                - "WRONG"
                - "AMBIGUOUS"
              type: "string"
            confirmed:
              default: false
              description: ""
              examples:
                - false
              type: "boolean"
            currency:
              default: "EUR"
              description: ""
              examples:
                - "EUR"
              maxLength: 3
              minLength: 3
              type: "string"
            exported:
              default: false
              description: ""
              examples:
                - false
              type: "boolean"
            external:
              description: ""
              items:
                examples:
                  - "some text"
                type: "string"
              type: "array"
            fee:
              default: 0
              description: ""
              examples:
                - "12345.45"
              pattern: "^-?[0-9]+(\\.[0-9]+)?$"
              type: "string"
            kind:
              default: "DB"
              description: ""
              enum:
                - "PA"
                - "CP"
                - "CD"
                - "DB"
                - "RF"
                - "RB"
                - "RV"
                - "CB"
                - "RC"
                - "RG"
                - "RR"
                - "DR"
                - "CF"
                - "SF"
                - "DV"
                - "IS"
                - "DP"
                - "AV"
                - "CK"
                - "AP"
              type: "string"
            label:
              description: ""
              examples:
                - "abcdefg"
              type: "string"
            method:
              description: "paymentmethod_kind_type"
              enum:
                - "CC"
                - "DD"
                - "CT"
                - "PP"
                - "IV"
                - "CD"
                - "DC"
                - "VA"
                - "OT"
                - "UA"
                - "WT"
                - "RM"
                - "CL"
                - "SO"
                - "AD"
                - "ID"
                - "MA"
                - "AV"
                - "PS"
                - "TY"
                - "BP"
                - "FA"
                - "BR"
                - "ST"
                - "AP"
                - "BC"
                - "WI"
                - "KL"
                - "PG"
                - "SP"
                - "MO"
                - "FI"
              type: "string"
            operations:
              description: ""
              examples:
                - "123456789"
              format: "int32"
              type: "integer"
            parent:
              description: "References field 'id' of model transactions"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            peer:
              description: ""
              examples:
                - "abcdefg"
              type: "string"
            processfile:
              description: "References field 'id' of model files"
              examples:
                - "123456789"
              pattern: "^-?[0-9]+$"
              type: "string"
            result:
              description: ""
              examples:
                - "abcdefg"
              type: "string"
            resultcode:
              default: 0
              description: ""
              examples:
                - "123456789"
              format: "int32"
              type: "integer"
            uniqueid:
              description: ""
              examples:
                - "abcdefg"
              type: "string"
            valuedate:
              default: "now()"
              description: ""
              examples:
                - "2022-07-31"
              format: "date"
              type: "string"
          type: "object"
      description: ""
      title: "transactions"
  securitySchemes:
    basic:
      description: "Basic authentication is a simple authentication scheme built into
        the HTTP protocol. To use it, send your HTTP requests with an
        Authorization header that contains the word Basic followed by a space
        and a base64-encoded string `username:password`.<br /><br />Example:
        `Authorization: Basic ZGVtbzpwQDU1dzByZA==`"
      scheme: "basic"
      type: "http"
info:
  contact:
    email: "platform+support@abillify.me"
    name: "Abillify Platform GmbH"
    url: "https://abillify.me"
  description: "This is the API documentation for the Abillify API. It is based on
    the OpenAPI 3.1.0 specification. You can find out more about the OpenAPI
    specification at https://swagger.io/specification/.


    Not all of the fields will be relevant depending on your implementation
    and the Abillify features being used.


    For specific implementation details, please refer your implementation
    guideline or contact your Abillify representative."
  title: "Abillify Platform API"
  version: "dev"
openapi: "3.1.0"
paths:
  /creditnotes:
    get:
      operationId: "creditnotes-list"
      parameters:
        - in: "query"
          name: "page"
          schema:
            default: 1
            examples:
              - 3
            type: "integer"
        - in: "query"
          name: "pageSize"
          schema:
            default: 1
            examples:
              - 20
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - description: "Filters for LIST calls. Supports multiple filtering operators."
          in: "query"
          name: "query"
          required: false
          schema:
            additionalProperties:
              oneOf:
                - type: "string"
                - items:
                    type: "string"
                  type: "array"
                - type: "number"
                - items:
                    type: "number"
                  type: "array"
            examples:
              - created: "2023-01-01 00:00:00"
                "created[$gt]": "2023-01-01"
                "created[$gte]": "2023-01-01"
                "created[$in]":
                  - "2023-01-01 00:00:00"
                  - "2023-01-01 00:00:01"
                "created[$lt]": "2023-01-01"
                "created[$lte]": "2023-01-01"
                "created[$ne]": "2023-01-03 00:00:00"
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  page:
                    default: 1
                    examples:
                      - 3
                    type: "integer"
                  pageSize:
                    default: 1
                    examples:
                      - 20
                    type: "integer"
                  query:
                    additionalProperties:
                      oneOf:
                        - type: "string"
                        - items:
                            type: "string"
                          type: "array"
                        - type: "number"
                        - items:
                            type: "number"
                          type: "array"
                    examples:
                      - created: "2023-01-01 00:00:00"
                        "created[$gt]": "2023-01-01"
                        "created[$gte]": "2023-01-01"
                        "created[$in]":
                          - "2023-01-01 00:00:00"
                          - "2023-01-01 00:00:01"
                        "created[$lt]": "2023-01-01"
                        "created[$lte]": "2023-01-01"
                        "created[$ne]": "2023-01-03 00:00:00"
                    type: "object"
                  rows:
                    items:
                      $ref: "#/components/schemas/CreditnoteResolved"
                    type: "array"
                  sort:
                    examples:
                      - "created"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "List creditnotes with pagination"
      tags:
        - "creditnotes"
  "/creditnotes/{creditnoteReference}":
    get:
      operationId: "creditnotes-getByReference"
      parameters:
        - description: "Your creditnoteReference (e.g. Credit note ID in your system)"
          in: "path"
          name: "creditnoteReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreditnoteResolved"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get credit notes by creditnoteReference"
      tags:
        - "creditnotes"
    put:
      description: "Updating items: No partial updates of items are supported. If you
        provide items in the update call, the existing items will be completely
        replaced by the new items. If you do not provide any items, the existing
        items will remain unchanged."
      operationId: "creditnotes-update"
      parameters:
        - description: "Your creditnoteReference"
          in: "path"
          name: "creditnoteReference"
          required: true
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            examples:
              full-cancel:
                description: "Use this if the entire credit note was canceled, this can only be
                  used if no document was created yet."
                summary: "Cancel entire credit note"
                value:
                  cancelationdate: "2024-01-01T00:00:00.000Z"
                  state: "canceled"
              update-addresses:
                description: "Use this to update the addresses of the credit note, only possible
                  if no document was created yet."
                summary: "Update Addresses"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
            schema:
              allOf:
                - properties:
                    accountingdate:
                      description: "Date on which the credit note is booked, normaly the issued date"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    addresses:
                      description: "Optional, addresses of the credit note, if not provided they will
                        be copied from the identity in the moment of creation."
                      items:
                        allOf:
                          - properties:
                              city:
                                examples:
                                  - "Berlin"
                                type: "string"
                              country:
                                description: "ISO 3166-1 alpha-2 country code"
                                examples:
                                  - "DE"
                                  - "FR"
                                  - "US"
                                type: "string"
                              extra:
                                description: "Extra information for the delivery of the letter"
                                examples:
                                  - "C/O Mr. Smith"
                                type: "string"
                              housenumber:
                                examples:
                                  - "1"
                                type: "string"
                              info:
                                description: "Label / Additional information about the address. For example if
                                  it was verified by some risk check service."
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                  - "default"
                                examples:
                                  - "shipping"
                                type: "string"
                              state:
                                examples:
                                  - "Berlin"
                                type: "string"
                              street:
                                examples:
                                  - "Main Street"
                                type: "string"
                              zipcode:
                                examples:
                                  - "10115"
                                type: "string"
                            type: "object"
                          - properties:
                              company:
                                description: "Company"
                                examples:
                                  - "ACME Inc."
                                type: "string"
                              firstname:
                                description: "Firstname"
                                examples:
                                  - "John"
                                type: "string"
                              lastname:
                                description: "Lastname"
                                examples:
                                  - "Doe"
                                type: "string"
                            type: "object"
                      type: "array"
                    cancelationdate:
                      description: "Date of the cancellation of the credit note"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    detail:
                      properties:
                        footerText:
                          description: "Remarks at the bottom of the invoice. Each element will go in a
                            seperate paragraph"
                          examples:
                            - - "Line 1"
                              - "Line 2, possibly in a different language"
                          items:
                            examples:
                              - "0% VAT according to ...."
                            type: "string"
                          type: "array"
                        footerTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the footer and any footerText
                            that is sent."
                          examples:
                            - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        introText:
                          description: "Remarks at the top of the invoice. Each element will go in a
                            seperate paragraph"
                          examples:
                            - - "Line 1"
                              - "Line 2, possibly in a different language"
                          items:
                            examples:
                              - "0% VAT according to ...."
                            type: "string"
                          type: "array"
                        introTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the intro and any introText
                            that is sent."
                          examples:
                            - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        paymentterm:
                          description: "Payment term of the creditnote"
                          examples:
                            - "Der Betrag wird automatisch auf Ihr Konto
                              überwiesen."
                          type: "string"
                        paymenttermId:
                          description: "ID of the paymenterm you configured in Abillify, this will resolve
                            the paymentterm text and due date (if not sent)
                            according to your settings"
                          examples:
                            - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        reverseCharge:
                          default: null
                          description: "If set to true or false, this will override the default reverse
                            charge determination for this order."
                          examples:
                            - true
                            - false
                          type: "boolean"
                        vatId:
                          description: "VAT ID of the customer for this credit note, inherited from
                            invoice if not defined in payload."
                          examples:
                            - "DE987654321"
                          type: "string"
                      type: "object"
                    issued:
                      description: "Date printed on the credit note"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    items:
                      items:
                        allOf:
                          - properties:
                              costcenter:
                                description: "Optional, Cost center for the line, can be used for reporting"
                                examples:
                                  - "8086"
                                type: "string"
                              detail:
                                properties:
                                  taxprofile:
                                    description: "Optional, the tax profile for the line, as defined in your tax
                                      jurisdiction settings, if not configured
                                      default is used as as fallback."
                                    enum:
                                      - "default"
                                      - "reduced"
                                      - "..."
                                    examples:
                                      - "default"
                                    type: "string"
                                type: "object"
                              kind:
                                description: "principal=goods, ancillary=shipping, payment, discount"
                                enum:
                                  - "principal"
                                  - "ancillary"
                                examples:
                                  - "principal"
                                type: "string"
                              label:
                                description: "Label of the voucheritem"
                                examples:
                                  - "Couch Grey 3-Seater"
                                type: "string"
                              number:
                                description: "Your creditnoteNumber, only send this if you want to override the
                                  default creditnote number generation."
                                examples:
                                  - "1234567890"
                                type: "string"
                              pos:
                                description: "Position of the item in the item list, optional, will be
                                  automatically generated if omitted from all
                                  items."
                                examples:
                                  - 1
                                type: "integer"
                              product_number:
                                description: "Your product number"
                                examples:
                                  - "1234567890"
                                type: "string"
                              quantity:
                                description: "Quantity of the items"
                                examples:
                                  - 1
                                type: "number"
                              reference:
                                description: "your creditnoteReference  (A unique identifier in your system), if
                                  you don't send this Abillify will generate
                                  one."
                                examples:
                                  - "1234567890"
                                type: "string"
                              servicebegin:
                                description: "Optional, Start date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              serviceend:
                                description: "Optional, End date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              unit:
                                description: "Label for the unit of the items"
                                examples:
                                  - "pieces"
                                type: "string"
                              unitprice:
                                description: "Net amount of the voucheritem per unit, rounded to 2 decimal
                                  places"
                                examples:
                                  - -1190
                                type: "number"
                            type: "object"
                      type: "array"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    netbased:
                      default: null
                      description: "If true the calculations are rounded to 2 decimal places, this is
                        the recommended option for B2B business.



                        If false (null) the calculations
                        are rounded to 4 decimal places to achieve better gross
                        amounts for end customers."
                      examples:
                        - true
                      type: "boolean"
                    number:
                      description: "Your creditnoteNumber, only send this if you want to override the
                        default invoice number generation."
                      examples:
                        - "1234567890"
                      type: "string"
                    paymentkind:
                      description: "Kind of payment intended to be used for this order, can be
                        different for subsequent invoices.



                        PP: Paypal



                        CC: Credit Card



                        DD: Direct Debit



                        CT: Cash Transfer



                        CD: Cash on Delivery"
                      enum:
                        - "PP"
                        - "CC"
                        - "DD"
                        - "CT"
                        - "CD"
                      examples:
                        - "CT"
                      type: "string"
                    reference:
                      description: "Your creditnoteReference (A unique identifier in your system), if
                        you don't send this Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Creditnote"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Update credit note by creditnoteReference"
      tags:
        - "creditnotes"
  "/creditnotes/{creditnoteReference}/commitCreditnote":
    post:
      description: "Lock the creditnote data.



        Please be aware that this operation is not reversible and
        executed asynchronously."
      operationId: "creditnotes-commitCreditnote"
      parameters:
        - description: "Reference of the creditnote"
          in: "path"
          name: "creditnoteReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              description: "Addition information, if required Abillify will inform you."
              examples:
                - attachments:
                    - filname: "overwrite_filename.svg"
                      url: "https://abillify.me/wp-content/themes/abillify/assets/images/logo.svg"
                  data: "123"
                  notifyUrl: "https://yourdomain.com/notify"
              properties:
                attachments:
                  items:
                    properties:
                      filename:
                        description: "The filename of the attachment, if not provided the filename from
                          the URL will be used."
                        type: "string"
                      url:
                        description: "The URL of the attachment where Abillify will download the
                          attachment from."
                        format: "uri"
                        type: "string"
                    type: "object"
                  type: "array"
                notifyUrl:
                  description: "The URL where Abillify will send a POST request with the paylaod
                    `{\"result\":\"OK\",\"resultcode\":\"0\",\"job\":\"ID of job
                    returned in task start call\",\"notification\":\"ID of the
                    notification\"}` when the task is completed."
                  format: "uri"
                  type: "string"
              type: "object"
        required: false
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResponse"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Commit Creditnote"
      tags:
        - "creditnotes"
  "/creditnotes/{creditnoteReference}/documents":
    get:
      operationId: "creditnotes-getDocuments"
      parameters:
        - description: "Your creditnoteReference"
          in: "path"
          name: "creditnoteReference"
          required: true
          schema:
            type: "string"
        - description: "Limit number of returned items, 0 means no limit"
          in: "query"
          name: "limit"
          schema:
            default: 0
            examples:
              - 100
            type: "integer"
        - in: "query"
          name: "offset"
          schema:
            default: 0
            examples:
              - 10
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - in: "query"
          name: "search"
          schema:
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/Document"
                type: "array"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get document URLs for creditnote"
      tags:
        - "creditnotes"
  "/creditnotes/{creditnoteReference}/generateDocument":
    post:
      description: "Generate and ship the document for the credit note and lock the
        credit note data.



        Please be aware that this operation is not reversible and
        executed asynchronously.



        The document will be available for download after the task is
        completed."
      operationId: "creditnotes-generateCreditnoteDocument"
      parameters:
        - description: "Reference of the credit note"
          in: "path"
          name: "creditnoteReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              description: "Addition information, if required Abillify will inform you."
              examples:
                - attachments:
                    - filname: "overwrite_filename.svg"
                      url: "https://abillify.me/wp-content/themes/abillify/assets/images/logo.svg"
                  data: "123"
                  notifyUrl: "https://yourdomain.com/notify"
              properties:
                attachments:
                  items:
                    properties:
                      filename:
                        description: "The filename of the attachment, if not provided the filename from
                          the URL will be used."
                        type: "string"
                      url:
                        description: "The URL of the attachment where Abillify will download the
                          attachment from."
                        format: "uri"
                        type: "string"
                    type: "object"
                  type: "array"
                notifyUrl:
                  description: "The URL where Abillify will send a POST request with the paylaod
                    `{\"result\":\"OK\",\"resultcode\":\"0\",\"job\":\"ID of job
                    returned in task start call\",\"notification\":\"ID of the
                    notification\"}` when the task is completed."
                  format: "uri"
                  type: "string"
              type: "object"
        required: false
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResponse"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Generate Document"
      tags:
        - "creditnotes"
  "/creditnotes/{creditnoteReference}/resendCreditnote":
    post:
      description: "Re-Send the document e-mail to the customer."
      operationId: "creditnotes-resendCreditnote"
      parameters:
        - description: "Reference of the credit note"
          in: "path"
          name: "creditnoteReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              description: "Addition information, if required Abillify will inform you."
              examples:
                - data: "123"
              properties: {}
              type: "object"
        required: false
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResponse"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Resend Invoice"
      tags:
        - "creditnotes"
  /identities:
    get:
      operationId: "identities-list"
      parameters:
        - in: "query"
          name: "page"
          schema:
            default: 1
            examples:
              - 3
            type: "integer"
        - in: "query"
          name: "pageSize"
          schema:
            default: 1
            examples:
              - 20
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - description: "Filters for LIST calls. Supports multiple filtering operators."
          in: "query"
          name: "query"
          required: false
          schema:
            additionalProperties:
              oneOf:
                - type: "string"
                - items:
                    type: "string"
                  type: "array"
                - type: "number"
                - items:
                    type: "number"
                  type: "array"
            examples:
              - created: "2023-01-01 00:00:00"
                "created[$gt]": "2023-01-01"
                "created[$gte]": "2023-01-01"
                "created[$in]":
                  - "2023-01-01 00:00:00"
                  - "2023-01-01 00:00:01"
                "created[$lt]": "2023-01-01"
                "created[$lte]": "2023-01-01"
                "created[$ne]": "2023-01-03 00:00:00"
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  page:
                    default: 1
                    examples:
                      - 3
                    type: "integer"
                  pageSize:
                    default: 1
                    examples:
                      - 20
                    type: "integer"
                  query:
                    additionalProperties:
                      oneOf:
                        - type: "string"
                        - items:
                            type: "string"
                          type: "array"
                        - type: "number"
                        - items:
                            type: "number"
                          type: "array"
                    examples:
                      - created: "2023-01-01 00:00:00"
                        "created[$gt]": "2023-01-01"
                        "created[$gte]": "2023-01-01"
                        "created[$in]":
                          - "2023-01-01 00:00:00"
                          - "2023-01-01 00:00:01"
                        "created[$lt]": "2023-01-01"
                        "created[$lte]": "2023-01-01"
                        "created[$ne]": "2023-01-03 00:00:00"
                    type: "object"
                  rows:
                    items:
                      $ref: "#/components/schemas/Identity"
                    type: "array"
                  sort:
                    examples:
                      - "created"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "List identities with pagination"
      tags:
        - "identities"
    post:
      operationId: "identities-create"
      parameters:
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    addresses:
                      items:
                        properties:
                          city:
                            examples:
                              - "Berlin"
                            type: "string"
                          country:
                            description: "ISO 3166-1 alpha-2 country code"
                            examples:
                              - "DE"
                              - "FR"
                              - "US"
                            type: "string"
                          extra:
                            description: "Extra information for the delivery of the letter"
                            examples:
                              - "C/O Mr. Smith"
                            type: "string"
                          housenumber:
                            examples:
                              - "1"
                            type: "string"
                          info:
                            description: "Label / Additional information about the address. For example if
                              it was verified by some risk check service."
                            type: "string"
                          kind:
                            description: "Kind of address"
                            enum:
                              - "billing"
                              - "shipping"
                              - "default"
                            examples:
                              - "shipping"
                            type: "string"
                          state:
                            examples:
                              - "Berlin"
                            type: "string"
                          street:
                            examples:
                              - "Main Street"
                            type: "string"
                          zipcode:
                            examples:
                              - "10115"
                            type: "string"
                        type: "object"
                      type: "array"
                    currency:
                      default: "Based on merchant settings"
                      description: "Main currency of the identity"
                      examples:
                        - "EUR"
                      type: "string"
                    debtor:
                      description: "The debtor number of the identity, if you do not send this
                        Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                    detail:
                      properties:
                        dunning:
                          $ref: "#/components/schemas/DunningSettings"
                        locale:
                          default: "Based on merchant settings"
                          description: "Locale of the customer, ISO639 & ISO3166"
                          examples:
                            - "de-DE"
                          type: "string"
                        vatId:
                          description: "VAT ID of the identity"
                          examples:
                            - "DE123456789"
                          type: "string"
                      type: "object"
                    emails:
                      items:
                        properties:
                          email:
                            examples:
                              - "foo@bar.com"
                            type: "string"
                          kind:
                            description: "Kind of email"
                            enum:
                              - "billing"
                              - "shipping"
                              - "default"
                            examples:
                              - "default"
                            type: "string"
                        type: "object"
                      type: "array"
                    kind:
                      description: "Kind of identity, individual = b2c, incorporate = b2b"
                      enum:
                        - "individual"
                        - "incorporate"
                      examples:
                        - "individual"
                      type: "string"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    name:
                      properties:
                        birthday:
                          description: "Birthday"
                          examples:
                            - "1970-01-01"
                          type: "string"
                        company:
                          description: "Company"
                          examples:
                            - "ACME Inc."
                          type: "string"
                        firstname:
                          description: "Firstname"
                          examples:
                            - "John"
                          type: "string"
                        lastname:
                          description: "Lastname"
                          examples:
                            - "Doe"
                          type: "string"
                        salutation:
                          description: "Salutation"
                          enum:
                            - "mr"
                            - "mrs"
                          examples:
                            - "mr"
                          type: "string"
                      type: "object"
                    number:
                      description: "Your Customernumber"
                      examples:
                        - "K12345"
                      type: "string"
                    phones:
                      items:
                        properties:
                          active:
                            default: true
                            examples:
                              - true
                            type: "boolean"
                          phone:
                            examples:
                              - "+49 30 12345678"
                            type: "string"
                        type: "object"
                      type: "array"
                    reference:
                      description: "Your identityReference (A unique identifier in your system), if
                        you don't send this Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Identity"
          description: "Successful request"
          links:
            GetIdentityByReference:
              description: "The `reference` of the identity can be used to get the identity by
                reference."
              operationId: "identities-getByReference"
              parameters:
                reference: "$response.body#/reference"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create identities"
      tags:
        - "identities"
  "/identities/{identityReference}":
    get:
      operationId: "identities-getByReference"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Identity"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get identity by identityReference"
      tags:
        - "identities"
    put:
      operationId: "identities-upsert"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            examples:
              create-b2b:
                description: "Creates a B2B identity with the minimal required fields."
                summary: "Create B2B"
                value:
                  detail:
                    vatId: "DE123456789"
                  kind: "incorporate"
                  name:
                    company: "ACME Inc."
              create-b2c:
                description: "Creates a B2C identity with the minimal required fields."
                summary: "Create B2C"
                value:
                  kind: "individual"
                  name:
                    firstname: "John"
                    lastname: "Doe"
              update-addresses:
                description: "Use this to update the addresses of the identity.



                  **Note**: This will fail if the identity
                  does not exist yet, because other mandatory fields are
                  missing."
                summary: "Update Addresses"
                value:
                  addresses:
                    - city: "Berlin"
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      housenumber: "1"
                      info: "string"
                      kind: "billing"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                    - city: "Berlin"
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
            schema:
              allOf:
                - properties:
                    addresses:
                      items:
                        properties:
                          city:
                            examples:
                              - "Berlin"
                            type: "string"
                          country:
                            description: "ISO 3166-1 alpha-2 country code"
                            examples:
                              - "DE"
                              - "FR"
                              - "US"
                            type: "string"
                          extra:
                            description: "Extra information for the delivery of the letter"
                            examples:
                              - "C/O Mr. Smith"
                            type: "string"
                          housenumber:
                            examples:
                              - "1"
                            type: "string"
                          info:
                            description: "Label / Additional information about the address. For example if
                              it was verified by some risk check service."
                            type: "string"
                          kind:
                            description: "Kind of address"
                            enum:
                              - "billing"
                              - "shipping"
                              - "default"
                            examples:
                              - "shipping"
                            type: "string"
                          state:
                            examples:
                              - "Berlin"
                            type: "string"
                          street:
                            examples:
                              - "Main Street"
                            type: "string"
                          zipcode:
                            examples:
                              - "10115"
                            type: "string"
                        type: "object"
                      type: "array"
                    currency:
                      default: "Based on merchant settings"
                      description: "Main currency of the identity"
                      examples:
                        - "EUR"
                      type: "string"
                    debtor:
                      description: "The debtor number of the identity, if you do not send this
                        Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                    detail:
                      properties:
                        dunning:
                          $ref: "#/components/schemas/DunningSettings"
                        locale:
                          default: "Based on merchant settings"
                          description: "Locale of the customer, ISO639 & ISO3166"
                          examples:
                            - "de-DE"
                          type: "string"
                        vatId:
                          description: "VAT ID of the identity"
                          examples:
                            - "DE123456789"
                          type: "string"
                      type: "object"
                    emails:
                      items:
                        properties:
                          email:
                            examples:
                              - "foo@bar.com"
                            type: "string"
                          kind:
                            description: "Kind of email"
                            enum:
                              - "billing"
                              - "shipping"
                              - "default"
                            examples:
                              - "default"
                            type: "string"
                        type: "object"
                      type: "array"
                    kind:
                      description: "Kind of identity, individual = b2c, incorporate = b2b"
                      enum:
                        - "individual"
                        - "incorporate"
                      examples:
                        - "individual"
                      type: "string"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    name:
                      properties:
                        birthday:
                          description: "Birthday"
                          examples:
                            - "1970-01-01"
                          type: "string"
                        company:
                          description: "Company"
                          examples:
                            - "ACME Inc."
                          type: "string"
                        firstname:
                          description: "Firstname"
                          examples:
                            - "John"
                          type: "string"
                        lastname:
                          description: "Lastname"
                          examples:
                            - "Doe"
                          type: "string"
                        salutation:
                          description: "Salutation"
                          enum:
                            - "mr"
                            - "mrs"
                          examples:
                            - "mr"
                          type: "string"
                      type: "object"
                    number:
                      description: "Your Customernumber"
                      examples:
                        - "K12345"
                      type: "string"
                    phones:
                      items:
                        properties:
                          active:
                            default: true
                            examples:
                              - true
                            type: "boolean"
                          phone:
                            examples:
                              - "+49 30 12345678"
                            type: "string"
                        type: "object"
                      type: "array"
                    reference:
                      description: "Your identityReference (A unique identifier in your system), if
                        you don't send this Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                  required:
                    - "reference"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Identity"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create or update identity by your customer number"
      tags:
        - "identities"
  "/identities/{identityReference}/bankaccount":
    post:
      operationId: "identities-createBankaccountByIdentityReference"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    account:
                      description: "IBAN Account number"
                      examples:
                        - "DE123456781234565"
                      type: "string"
                    bankcode:
                      description: "BIC of bank"
                      examples:
                        - "DEUTDE2HXXX"
                      type: "string"
                    holder:
                      description: "Name of the account holder"
                      examples:
                        - "John Doe"
                      type: "string"
                    reference:
                      description: "For direct debit: Mandate reference number"
                      examples:
                        - "M1234567890"
                      type: "string"
                    validfrom:
                      description: "Valid from date-time, leave empty if no predefined validity start
                        exists. RFC3339 date-time
                        https://www.rfc-editor.org/rfc/rfc3339#section-5.6
                        effectively ISO8601."
                      examples:
                        - "2025-01-31T00:00:00Z"
                      format: "date-time"
                      type: "string"
                    validto:
                      description: "Valid to date-time, leave empty if no predefined validity end
                        exists. RFC3339 date-time
                        https://www.rfc-editor.org/rfc/rfc3339#section-5.6
                        effectively ISO8601."
                      examples:
                        - "2025-12-31T00:00:00Z"
                      format: "date-time"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Bankaccount"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create bank account for identity by identityReference"
      tags:
        - "identities"
  "/identities/{identityReference}/bankaccounts":
    get:
      operationId: "identities-getBankaccountByIdentityReference"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Bankaccount"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get stored bank accounts for identity by identityReference"
      tags:
        - "identities"
  "/identities/{identityReference}/creditnotes":
    get:
      operationId: "identities-getCreditnotesByIdentityReference"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Creditnote"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get credit notes for identity by identityReference"
      tags:
        - "identities"
    post:
      description: "This will create a creditnote assigned to the given identity.



        The `netbased` flag is used to determine if the invoice should
        be calculated with net prices or gross prices. If `netbased` is set to
        `true`, the prices will be calculated with net prices. If `netbased` is
        set to `false`, the prices will be calculated with gross prices.



        The `paymentkind` is used to determine the payment method. The
        following payment methods are available:


        - `CT` - Credit Transfer

        - `DD` - Direct Debit

        - `CC` - Credit Card

        - `PP` - PayPal

        - `IN` - Invoice

        - `OT` - Other



        The `items` array contains the items of the invoice. Each item
        must have a `label`, `quantity`, `unit`, `unitprice`, and `detail`
        field. The `detail` field is an object that can contain additional
        information about the item, if tax jurisdiction is used this should
        contain the items `taxprofile`.



        The `addresses` array contains the addresses of the invoice.
        Each address must have a `kind`, `firstname`, `lastname`, `street`,
        `housenumber`, `zipcode`, `city`, and `country` field. The `extra` field
        is optional and can be used to provide additional information about the
        address."
      operationId: "identities-createCreditnote"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            examples:
              create-creditnote-with-netbased:
                description: "Create creditnote, with net based calculation, mainly for used for
                  b2b"
                summary: "Create Net Based (B2B)"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "billing"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                  currency: "EUR"
                  items:
                    - constcenter: "1234"
                      detail:
                        taxprofile: "default"
                      label: "Product 1"
                      quantity: 1
                      unit: "pcs"
                      unitprice: "-100.00"
                  label: "Creditnote for graceful refund of your order xyz123"
                  netbased: true
                  orderdate: "2020-01-01T00:00:00.000Z"
                  ordernumber: "xyz-1234"
                  paymentkind: "CT"
                  reference: "1234567890"
              create-invoice-without-netbased:
                description: "Create invoice, without net based calculation, mainly used for b2c
                  to achieve gross prices of e.g. 99.99"
                summary: "Create Gross Based (B2C)"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "billing"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                  currency: "EUR"
                  items:
                    - constcenter: "1234"
                      detail:
                        description: "This is a product description"
                        taxprofile: "default"
                      label: "Product 1"
                      quantity: 1
                      unit: "pcs"
                      unitprice: "-84.0252"
                  label: "Creditnote for graceful refund of your order xyz123"
                  netbased: false
                  orderdate: "2020-01-01T00:00:00.000Z"
                  ordernumber: "xyz-1234"
                  paymentkind: "CT"
                  reference: "1234567890"
            schema:
              allOf:
                - properties:
                    accountingdate:
                      description: "Date on which the credit note is booked, normaly the issued date"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    addresses:
                      description: "Optional, addresses of the credit note, if not provided they will
                        be copied from the identity in the moment of creation."
                      items:
                        allOf:
                          - properties:
                              city:
                                examples:
                                  - "Berlin"
                                type: "string"
                              country:
                                description: "ISO 3166-1 alpha-2 country code"
                                examples:
                                  - "DE"
                                  - "FR"
                                  - "US"
                                type: "string"
                              extra:
                                description: "Extra information for the delivery of the letter"
                                examples:
                                  - "C/O Mr. Smith"
                                type: "string"
                              housenumber:
                                examples:
                                  - "1"
                                type: "string"
                              info:
                                description: "Label / Additional information about the address. For example if
                                  it was verified by some risk check service."
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                  - "default"
                                examples:
                                  - "shipping"
                                type: "string"
                              state:
                                examples:
                                  - "Berlin"
                                type: "string"
                              street:
                                examples:
                                  - "Main Street"
                                type: "string"
                              zipcode:
                                examples:
                                  - "10115"
                                type: "string"
                            type: "object"
                          - properties:
                              company:
                                description: "Company"
                                examples:
                                  - "ACME Inc."
                                type: "string"
                              firstname:
                                description: "Firstname"
                                examples:
                                  - "John"
                                type: "string"
                              lastname:
                                description: "Lastname"
                                examples:
                                  - "Doe"
                                type: "string"
                            type: "object"
                      type: "array"
                    cancelationdate:
                      description: "Date of the cancellation of the credit note"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    detail:
                      properties:
                        footerText:
                          description: "Remarks at the bottom of the invoice. Each element will go in a
                            seperate paragraph"
                          examples:
                            - - "Line 1"
                              - "Line 2, possibly in a different language"
                          items:
                            examples:
                              - "0% VAT according to ...."
                            type: "string"
                          type: "array"
                        footerTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the footer and any footerText
                            that is sent."
                          examples:
                            - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        introText:
                          description: "Remarks at the top of the invoice. Each element will go in a
                            seperate paragraph"
                          examples:
                            - - "Line 1"
                              - "Line 2, possibly in a different language"
                          items:
                            examples:
                              - "0% VAT according to ...."
                            type: "string"
                          type: "array"
                        introTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the intro and any introText
                            that is sent."
                          examples:
                            - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        paymentterm:
                          description: "Payment term of the creditnote"
                          examples:
                            - "Der Betrag wird automatisch auf Ihr Konto
                              überwiesen."
                          type: "string"
                        paymenttermId:
                          description: "ID of the paymenterm you configured in Abillify, this will resolve
                            the paymentterm text and due date (if not sent)
                            according to your settings"
                          examples:
                            - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        reverseCharge:
                          default: null
                          description: "If set to true or false, this will override the default reverse
                            charge determination for this order."
                          examples:
                            - true
                            - false
                          type: "boolean"
                        vatId:
                          description: "VAT ID of the customer for this credit note, inherited from
                            invoice if not defined in payload."
                          examples:
                            - "DE987654321"
                          type: "string"
                      type: "object"
                    issued:
                      description: "Date printed on the credit note"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    items:
                      items:
                        allOf:
                          - properties:
                              costcenter:
                                description: "Optional, Cost center for the line, can be used for reporting"
                                examples:
                                  - "8086"
                                type: "string"
                              detail:
                                properties:
                                  taxprofile:
                                    description: "Optional, the tax profile for the line, as defined in your tax
                                      jurisdiction settings, if not configured
                                      default is used as as fallback."
                                    enum:
                                      - "default"
                                      - "reduced"
                                      - "..."
                                    examples:
                                      - "default"
                                    type: "string"
                                type: "object"
                              kind:
                                description: "principal=goods, ancillary=shipping, payment, discount"
                                enum:
                                  - "principal"
                                  - "ancillary"
                                examples:
                                  - "principal"
                                type: "string"
                              label:
                                description: "Label of the voucheritem"
                                examples:
                                  - "Couch Grey 3-Seater"
                                type: "string"
                              number:
                                description: "Your creditnoteNumber, only send this if you want to override the
                                  default creditnote number generation."
                                examples:
                                  - "1234567890"
                                type: "string"
                              pos:
                                description: "Position of the item in the item list, optional, will be
                                  automatically generated if omitted from all
                                  items."
                                examples:
                                  - 1
                                type: "integer"
                              product_number:
                                description: "Your product number"
                                examples:
                                  - "1234567890"
                                type: "string"
                              quantity:
                                description: "Quantity of the items"
                                examples:
                                  - 1
                                type: "number"
                              reference:
                                description: "your creditnoteReference  (A unique identifier in your system), if
                                  you don't send this Abillify will generate
                                  one."
                                examples:
                                  - "1234567890"
                                type: "string"
                              servicebegin:
                                description: "Optional, Start date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              serviceend:
                                description: "Optional, End date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              unit:
                                description: "Label for the unit of the items"
                                examples:
                                  - "pieces"
                                type: "string"
                              unitprice:
                                description: "Net amount of the voucheritem per unit, rounded to 2 decimal
                                  places"
                                examples:
                                  - -1190
                                type: "number"
                            type: "object"
                      type: "array"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    netbased:
                      default: null
                      description: "If true the calculations are rounded to 2 decimal places, this is
                        the recommended option for B2B business.



                        If false (null) the calculations
                        are rounded to 4 decimal places to achieve better gross
                        amounts for end customers."
                      examples:
                        - true
                      type: "boolean"
                    number:
                      description: "Your creditnoteNumber, only send this if you want to override the
                        default invoice number generation."
                      examples:
                        - "1234567890"
                      type: "string"
                    paymentkind:
                      description: "Kind of payment intended to be used for this order, can be
                        different for subsequent invoices.



                        PP: Paypal



                        CC: Credit Card



                        DD: Direct Debit



                        CT: Cash Transfer



                        CD: Cash on Delivery"
                      enum:
                        - "PP"
                        - "CC"
                        - "DD"
                        - "CT"
                        - "CD"
                      examples:
                        - "CT"
                      type: "string"
                    reference:
                      description: "Your creditnoteReference (A unique identifier in your system), if
                        you don't send this Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Creditnote"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create creditnote for identity by identityReference"
      tags:
        - "identities"
        - "creditnotes"
  "/identities/{identityReference}/documents":
    get:
      operationId: "identities-getDocuments"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
        - description: "Limit number of returned items, 0 means no limit"
          in: "query"
          name: "limit"
          schema:
            default: 0
            examples:
              - 100
            type: "integer"
        - in: "query"
          name: "offset"
          schema:
            default: 0
            examples:
              - 10
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - in: "query"
          name: "search"
          schema:
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/Document"
                type: "array"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get document URLs for identity by identityReference"
      tags:
        - "identities"
  "/identities/{identityReference}/invoices":
    get:
      operationId: "identities-getInvoicesByIdentityReference"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Invoice"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get invoices for identity by identityReference"
      tags:
        - "identities"
    post:
      description: "This will create an invoice assigned to the given identity.



        The `netbased` flag is used to determine if the invoice should
        be calculated with net prices or gross prices. If `netbased` is set to
        `true`, the prices will be calculated with net prices. If `netbased` is
        set to `false`, the prices will be calculated with gross prices.



        The `paymentkind` is used to determine the payment method. The
        following payment methods are available:


        - `CT` - Credit Transfer

        - `DD` - Direct Debit

        - `CC` - Credit Card

        - `PP` - PayPal

        - `IN` - Invoice

        - `OT` - Other



        The `items` array contains the items of the invoice. Each item
        must have a `label`, `quantity`, `unit`, `unitprice`, and `detail`
        field. The `detail` field is an object that can contain additional
        information about the item, if tax jurisdiction is used this should
        contain the items `taxprofile`.



        The `addresses` array contains the addresses of the invoice.
        Each address must have a `kind`, `firstname`, `lastname`, `street`,
        `housenumber`, `zipcode`, `city`, and `country` field. The `extra` field
        is optional and can be used to provide additional information about the
        address."
      operationId: "identities-createInvoice"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            examples:
              create-invoice-with-netbased:
                description: "Create invoice, with net based calculation, mainly for used for
                  b2b"
                summary: "Create Net Based (B2B)"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "billing"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                  currency: "EUR"
                  items:
                    - constcenter: "1234"
                      detail:
                        taxprofile: "default"
                      label: "Product 1"
                      quantity: 1
                      unit: "pcs"
                      unitprice: "100.00"
                  netbased: true
                  orderdate: "2020-01-01T00:00:00.000Z"
                  ordernumber: "xyz-1234"
                  paymentkind: "CT"
                  reference: "1234567890"
              create-invoice-without-netbased:
                description: "Create invoice, without net based calculation, mainly used for b2c
                  to achieve gross prices of e.g. 99.99"
                summary: "Create Gross Based (B2C)"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "billing"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                  currency: "EUR"
                  items:
                    - constcenter: "1234"
                      detail:
                        description: "This is a product description"
                        taxprofile: "default"
                      label: "Product 1"
                      quantity: 1
                      unit: "pcs"
                      unitprice: "84.0252"
                  netbased: false
                  orderdate: "2020-01-01T00:00:00.000Z"
                  ordernumber: "xyz-1234"
                  paymentkind: "CT"
                  reference: "1234567890"
            schema:
              allOf:
                - properties:
                    accountingdate:
                      description: "Date on which the invoice is booked, normaly the issued date"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    addresses:
                      description: "Optional, addresses of the invoice, if not provided they will be
                        copied from the identity in the moment of creation."
                      items:
                        allOf:
                          - properties:
                              city:
                                examples:
                                  - "Berlin"
                                type: "string"
                              country:
                                description: "ISO 3166-1 alpha-2 country code"
                                examples:
                                  - "DE"
                                  - "FR"
                                  - "US"
                                type: "string"
                              extra:
                                description: "Extra information for the delivery of the letter"
                                examples:
                                  - "C/O Mr. Smith"
                                type: "string"
                              housenumber:
                                examples:
                                  - "1"
                                type: "string"
                              info:
                                description: "Label / Additional information about the address. For example if
                                  it was verified by some risk check service."
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                  - "default"
                                examples:
                                  - "shipping"
                                type: "string"
                              state:
                                examples:
                                  - "Berlin"
                                type: "string"
                              street:
                                examples:
                                  - "Main Street"
                                type: "string"
                              zipcode:
                                examples:
                                  - "10115"
                                type: "string"
                            type: "object"
                          - properties:
                              company:
                                description: "Company"
                                examples:
                                  - "ACME Inc."
                                type: "string"
                              firstname:
                                description: "Firstname"
                                examples:
                                  - "John"
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                examples:
                                  - "shipping"
                                type: "string"
                              lastname:
                                description: "Lastname"
                                examples:
                                  - "Doe"
                                type: "string"
                            type: "object"
                      type: "array"
                    cancelationdate:
                      description: "Date of the cancellation of the invoice"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    currency:
                      default: "If invoice is based on an order, the currency is copied from the
                        order, otherwise the customers default currency is
                        used."
                      description: "Taken from order"
                      examples:
                        - "EUR"
                      type: "string"
                    detail:
                      properties:
                        dunning:
                          $ref: "#/components/schemas/DunningSettings"
                        footerText:
                          description: "Remarks at the bottom of the invoice. Each element will go in a
                            seperate paragraph"
                          items:
                            type: "string"
                          type: "array"
                        footerTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the footer and any footerText
                            that is sent."
                          examples:
                            - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        introText:
                          description: "Remarks at the top of the invoice as array-of-string. Each element
                            will go in a seperate paragraph"
                          items:
                            type: "string"
                          type: "array"
                        introTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the intro and any introText
                            that is sent."
                          examples:
                            - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        locale:
                          default: "Based on merchant settings, inherited from identity if not defined in
                            payload."
                          description: "Locale of the customer, ISO639 & ISO3166"
                          examples:
                            - "de-DE"
                          type: "string"
                        paymentterm:
                          description: "Payment term of the invoice, i.e. 'Zu zahlen innerhalb von 14
                            Tagen'"
                          examples:
                            - "Zu zahlen innerhalb von 14 Tagen"
                          type: "string"
                        paymenttermId:
                          description: "ID of the paymenterm you configured in Abillify, this will resolve
                            the paymentterm text and due date (if not sent)
                            according to your settings"
                          examples:
                            - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        placeOfSupplyCountry:
                          default: null
                          description: "Country code of the place of supply for VAT calculation, if not
                            provided the billing address country of
                            voucher>identitiy will be used, with fallback to the
                            default issuing country."
                          examples:
                            - "DE"
                            - "FR"
                            - "CH"
                          type: "string"
                        reverseCharge:
                          default: null
                          description: "If set to true or false, this will override the default reverse
                            charge determination for this order."
                          examples:
                            - true
                            - false
                          type: "boolean"
                        vatId:
                          description: "VAT ID of the customer for this invoice, inherited from
                            order/identity if not defined in payload."
                          examples:
                            - "DE987654321"
                          type: "string"
                      type: "object"
                    due:
                      description: "Due date of the invoice, relevant for all delay payment methods"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    issued:
                      description: "Date printed on the invoice"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    items:
                      items:
                        allOf:
                          - properties:
                              costcenter:
                                description: "Optional, Cost center for the line, can be used for reporting"
                                examples:
                                  - "8086"
                                type: "string"
                              detail:
                                properties:
                                  description:
                                    description: "Optional, description of the item"
                                    examples:
                                      - "This is a product description"
                                    type: "string"
                                  taxprofile:
                                    description: "Optional, the tax profile for the line, as defined in your tax
                                      jurisdiction settings, if not configured
                                      default is used as as fallback."
                                    enum:
                                      - "default"
                                      - "reduced"
                                      - "..."
                                    examples:
                                      - "default"
                                    type: "string"
                                type: "object"
                              groupingflag:
                                description: "Optional, grouping flag to group items when booking them, e.g. for
                                  different branches, sales teams or to track
                                  origin when merging companies, can be used for
                                  reporting"
                                examples:
                                  - "DE|1234"
                                type: "string"
                              kind:
                                description: "principal=goods, ancillary=shipping, payment, discount"
                                enum:
                                  - "principal"
                                  - "ancillary"
                                examples:
                                  - "principal"
                                type: "string"
                              label:
                                description: "Label of the voucheritem"
                                examples:
                                  - "Couch Grey 3-Seater"
                                type: "string"
                              pos:
                                description: "Position of the item in the item list, optional, will be
                                  automatically generated if omitted from all
                                  items."
                                examples:
                                  - 1
                                type: "integer"
                              product_number:
                                description: "Your product number"
                                examples:
                                  - "1234567890"
                                type: "string"
                              quantity:
                                description: "Quantity of the items"
                                examples:
                                  - 1
                                type: "number"
                              reference:
                                description: "Your voucherItemReference (A unique identifier in your system), if
                                  you don't send this Abillify will generate
                                  one."
                                examples:
                                  - "1234567890"
                                type: "string"
                              servicebegin:
                                description: "Optional, Start date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              serviceend:
                                description: "Optional, End date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              unit:
                                description: "Label for the unit of the items"
                                examples:
                                  - "pieces"
                                type: "string"
                              unitprice:
                                description: "Net amount of the voucheritem per unit, rounded to 4 decimal
                                  places"
                                examples:
                                  - 1190
                                type: "number"
                            type: "object"
                      type: "array"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    netbased:
                      default: null
                      description: "If true the calculations are rounded to 2 decimal places, this is
                        the recommended option for B2B business.



                        If false (null) the calculations
                        are rounded to 4 decimal places to achieve better gross
                        amounts for end customers."
                      examples:
                        - true
                      type: "boolean"
                    number:
                      description: "Your invoiceNumber, only send this if you want to override the
                        default invoice number generation."
                      examples:
                        - "1234567890"
                      type: "string"
                    orderdate:
                      description: "Date of the order, only send this if invoice it not based on an
                        order. (Invoice flow)"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    ordernumber:
                      description: "Your orderNumber, only send this if invoice it not based on an
                        order. (Invoice flow)"
                      examples:
                        - "1234567890"
                      type: "string"
                    paymentkind:
                      description: "Kind of payment intended to be used for this order, can be
                        different for subsequent invoices.



                        PP: Paypal



                        CC: Credit Card



                        DD: Direct Debit



                        CT: Cash Transfer



                        CD: Cash on Delivery"
                      enum:
                        - "PP"
                        - "CC"
                        - "DD"
                        - "CT"
                        - "CD"
                      examples:
                        - "CT"
                      type: "string"
                    reference:
                      description: "Your invoiceReference (A unique identifier in your system), if you
                        don't send this Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Invoice"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create invoice for identity by identityReference"
      tags:
        - "identities"
        - "invoices"
  "/identities/{identityReference}/orders":
    get:
      operationId: "identities-getOrdersByIdentityReference"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Order"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get orders for identity by identityReference"
      tags:
        - "identities"
    post:
      description: "This will create an order assigned to the given identity.



        The `netbased` flag is used to determine if the order should be
        calculated with net prices or gross prices. If `netbased` is set to
        `true`, the prices will be calculated with net prices. If `netbased` is
        set to `false`, the prices will be calculated with gross prices.



        The `paymentkind` is used to determine the payment method. The
        following payment methods are available:


        - `CT` - Credit Transfer

        - `DD` - Direct Debit

        - `CC` - Credit Card

        - `PP` - PayPal

        - `IN` - Invoice

        - `OT` - Other



        The `items` array contains the items of the order. Each item
        must have a `label`, `quantity`, `unit`, `unitprice`, and `detail`
        field. The `detail` field is an object that can contain additional
        information about the item, if tax jurisdiction is used this should
        contain the items `taxprofile`.



        The `addresses` array contains the addresses of the order. Each
        address must have a `kind`, `firstname`, `lastname`, `street`,
        `housenumber`, `zipcode`, `city`, and `country` field. The `extra` field
        is optional and can be used to provide additional information about the
        address."
      operationId: "identities-createOrder"
      parameters:
        - description: "Your identityReference"
          in: "path"
          name: "identityReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            examples:
              create-order-with-net:
                description: "Create order, with net based calculation, for B2B orders"
                summary: "Create Order (B2B)"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "billing"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                  currency: "EUR"
                  items:
                    - constcenter: "1234"
                      detail:
                        taxprofile: "default"
                      label: "Product 1"
                      quantity: 1
                      unit: "pcs"
                      unitprice: "100.00"
                  netbased: true
                  orderdate: "2020-01-01T00:00:00.000Z"
                  ordernumber: "XYZ-12345"
                  paymentkind: "CT"
                  reference: "1234567890"
            schema:
              allOf:
                - properties:
                    addresses:
                      description: "Optional, addresses of the invoice, if not provided they will be
                        copied from the identity in the moment of creation."
                      items:
                        allOf:
                          - properties:
                              city:
                                examples:
                                  - "Berlin"
                                type: "string"
                              country:
                                description: "ISO 3166-1 alpha-2 country code"
                                examples:
                                  - "DE"
                                  - "FR"
                                  - "US"
                                type: "string"
                              extra:
                                description: "Extra information for the delivery of the letter"
                                examples:
                                  - "C/O Mr. Smith"
                                type: "string"
                              housenumber:
                                examples:
                                  - "1"
                                type: "string"
                              info:
                                description: "Label / Additional information about the address. For example if
                                  it was verified by some risk check service."
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                  - "default"
                                examples:
                                  - "shipping"
                                type: "string"
                              state:
                                examples:
                                  - "Berlin"
                                type: "string"
                              street:
                                examples:
                                  - "Main Street"
                                type: "string"
                              zipcode:
                                examples:
                                  - "10115"
                                type: "string"
                            type: "object"
                          - properties:
                              company:
                                description: "Company"
                                examples:
                                  - "ACME Inc."
                                type: "string"
                              firstname:
                                description: "Firstname"
                                examples:
                                  - "John"
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                examples:
                                  - "shipping"
                                type: "string"
                              lastname:
                                description: "Lastname"
                                examples:
                                  - "Doe"
                                type: "string"
                            type: "object"
                      type: "array"
                    cancellationdate:
                      description: "Date after which the unattached amount of the order is accounted
                        as overpayment"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    currency:
                      default: "Inherited from identity if omitted"
                      description: "Main currency of the order"
                      examples:
                        - "EUR"
                      type: "string"
                    detail:
                      properties:
                        locale:
                          default: "Based on merchant settings, inherited from identity if not defined in
                            payload."
                          description: "Locale of the customer, ISO639 & ISO3166"
                          examples:
                            - "de-DE"
                          type: "string"
                        reverseCharge:
                          default: null
                          description: "If set to true or false, this will override the default reverse
                            charge determination for this order."
                          examples:
                            - true
                            - false
                          type: "boolean"
                        vatId:
                          description: "VAT ID of the customer for this order, inherited from identity if
                            not defined in payload."
                          examples:
                            - "DE987654321"
                          type: "string"
                      type: "object"
                    items:
                      items:
                        allOf:
                          - properties:
                              costcenter:
                                description: "Optional, Cost center for the line, can be used for reporting"
                                examples:
                                  - "8086"
                                type: "string"
                              detail:
                                properties:
                                  description:
                                    description: "Optional, description of the item"
                                    examples:
                                      - "This is a product description"
                                    type: "string"
                                  taxprofile:
                                    description: "Optional, the tax profile for the line, as defined in your tax
                                      jurisdiction settings, if not configured
                                      default is used as as fallback."
                                    enum:
                                      - "default"
                                      - "reduced"
                                      - "..."
                                    examples:
                                      - "default"
                                    type: "string"
                                type: "object"
                              groupingflag:
                                description: "Optional, grouping flag to group items when booking them, e.g. for
                                  different branches, sales teams or to track
                                  origin when merging companies, can be used for
                                  reporting"
                                examples:
                                  - "DE|1234"
                                type: "string"
                              kind:
                                description: "principal=goods, ancillary=shipping, payment, discount"
                                enum:
                                  - "principal"
                                  - "ancillary"
                                examples:
                                  - "principal"
                                type: "string"
                              label:
                                description: "Label of the voucheritem"
                                examples:
                                  - "Couch Grey 3-Seater"
                                type: "string"
                              pos:
                                description: "Position of the item in the item list, optional, will be
                                  automatically generated if omitted from all
                                  items."
                                examples:
                                  - 1
                                type: "integer"
                              product_number:
                                description: "Your product number"
                                examples:
                                  - "1234567890"
                                type: "string"
                              quantity:
                                description: "Quantity of the items"
                                examples:
                                  - 1
                                type: "number"
                              reference:
                                description: "Your voucherItemReference (A unique identifier in your system), if
                                  you don't send this Abillify will generate
                                  one."
                                examples:
                                  - "1234567890"
                                type: "string"
                              servicebegin:
                                description: "Optional, Start date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              serviceend:
                                description: "Optional, End date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              unit:
                                description: "Label for the unit of the items"
                                examples:
                                  - "pieces"
                                type: "string"
                              unitprice:
                                description: "Net amount of the voucheritem per unit, rounded to 4 decimal
                                  places"
                                examples:
                                  - 1190
                                type: "number"
                            type: "object"
                      type: "array"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    netbased:
                      default: null
                      description: "If true the calculations are rounded to 2 decimal places, this is
                        the recommended option for B2B business.



                        If false (null) the calculations
                        are rounded to 4 decimal places to achieve better gross
                        amounts for end customers."
                      examples:
                        - true
                      type: "boolean"
                    orderdate:
                      description: "Date of the order"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    paymentkind:
                      description: "Kind of payment intended to be used for this order, can be
                        different for subsequent invoices.



                        PP: Paypal



                        CC: Credit Card



                        DD: Direct Debit



                        CT: Cash Transfer



                        CD: Cash on Delivery"
                      enum:
                        - "PP"
                        - "CC"
                        - "DD"
                        - "CT"
                        - "CD"
                      examples:
                        - "CT"
                      type: "string"
                    reference:
                      description: "Your orderReference (A unique identifier in your system), if you
                        don't send this Abillify will generate one."
                      examples:
                        - "123456789098765443"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Order"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create order for identity by identityReference"
      tags:
        - "identities"
        - "orders"
  /invoices:
    get:
      operationId: "invoices-list"
      parameters:
        - in: "query"
          name: "page"
          schema:
            default: 1
            examples:
              - 3
            type: "integer"
        - in: "query"
          name: "pageSize"
          schema:
            default: 1
            examples:
              - 20
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - description: "Filters for LIST calls. Supports multiple filtering operators."
          in: "query"
          name: "query"
          required: false
          schema:
            additionalProperties:
              oneOf:
                - type: "string"
                - items:
                    type: "string"
                  type: "array"
                - type: "number"
                - items:
                    type: "number"
                  type: "array"
            examples:
              - created: "2023-01-01 00:00:00"
                "created[$gt]": "2023-01-01"
                "created[$gte]": "2023-01-01"
                "created[$in]":
                  - "2023-01-01 00:00:00"
                  - "2023-01-01 00:00:01"
                "created[$lt]": "2023-01-01"
                "created[$lte]": "2023-01-01"
                "created[$ne]": "2023-01-03 00:00:00"
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  page:
                    default: 1
                    examples:
                      - 3
                    type: "integer"
                  pageSize:
                    default: 1
                    examples:
                      - 20
                    type: "integer"
                  query:
                    additionalProperties:
                      oneOf:
                        - type: "string"
                        - items:
                            type: "string"
                          type: "array"
                        - type: "number"
                        - items:
                            type: "number"
                          type: "array"
                    examples:
                      - created: "2023-01-01 00:00:00"
                        "created[$gt]": "2023-01-01"
                        "created[$gte]": "2023-01-01"
                        "created[$in]":
                          - "2023-01-01 00:00:00"
                          - "2023-01-01 00:00:01"
                        "created[$lt]": "2023-01-01"
                        "created[$lte]": "2023-01-01"
                        "created[$ne]": "2023-01-03 00:00:00"
                    type: "object"
                  rows:
                    items:
                      $ref: "#/components/schemas/InvoiceResolved"
                    type: "array"
                  sort:
                    examples:
                      - "created"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "List invoices with pagination"
      tags:
        - "invoices"
  "/invoices/{invoiceReference}":
    get:
      operationId: "invoices-getByReference"
      parameters:
        - description: "Your orderReference (The Order ID in your system)"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/InvoiceResolved"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get Invoice by invoiceReference"
      tags:
        - "invoices"
    put:
      description: "Updating items: No partial updates of items are supported. If you
        provide items in the update call, the existing items will be completely
        replaced by the new items. If you do not provide any items, the existing
        items will remain unchanged."
      operationId: "invoices-update"
      parameters:
        - description: "Your invoiceReference (The Order ID in your system)"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            examples:
              full-cancel:
                description: "Use this if the entire invoice was canceled, this can only be used
                  if no document was created yet."
                summary: "Cancel entire invoice"
                value:
                  cancelationdate: "2024-01-01T00:00:00.000Z"
                  state: "canceled"
              update-addresses:
                description: "Use this to update the addresses of the invoice, only possible if
                  no document was created yet."
                summary: "Update Addresses"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
            schema:
              allOf:
                - properties:
                    accountingdate:
                      description: "Date on which the invoice is booked, normaly the issued date"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    addresses:
                      description: "Optional, addresses of the invoice, if not provided they will be
                        copied from the identity in the moment of creation."
                      items:
                        allOf:
                          - properties:
                              city:
                                examples:
                                  - "Berlin"
                                type: "string"
                              country:
                                description: "ISO 3166-1 alpha-2 country code"
                                examples:
                                  - "DE"
                                  - "FR"
                                  - "US"
                                type: "string"
                              extra:
                                description: "Extra information for the delivery of the letter"
                                examples:
                                  - "C/O Mr. Smith"
                                type: "string"
                              housenumber:
                                examples:
                                  - "1"
                                type: "string"
                              info:
                                description: "Label / Additional information about the address. For example if
                                  it was verified by some risk check service."
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                  - "default"
                                examples:
                                  - "shipping"
                                type: "string"
                              state:
                                examples:
                                  - "Berlin"
                                type: "string"
                              street:
                                examples:
                                  - "Main Street"
                                type: "string"
                              zipcode:
                                examples:
                                  - "10115"
                                type: "string"
                            type: "object"
                          - properties:
                              company:
                                description: "Company"
                                examples:
                                  - "ACME Inc."
                                type: "string"
                              firstname:
                                description: "Firstname"
                                examples:
                                  - "John"
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                examples:
                                  - "shipping"
                                type: "string"
                              lastname:
                                description: "Lastname"
                                examples:
                                  - "Doe"
                                type: "string"
                            type: "object"
                      type: "array"
                    cancelationdate:
                      description: "Date of the cancellation of the invoice"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    currency:
                      default: "If invoice is based on an order, the currency is copied from the
                        order, otherwise the customers default currency is
                        used."
                      description: "Taken from order"
                      examples:
                        - "EUR"
                      type: "string"
                    detail:
                      properties:
                        dunning:
                          $ref: "#/components/schemas/DunningSettings"
                        footerText:
                          description: "Remarks at the bottom of the invoice. Each element will go in a
                            seperate paragraph"
                          items:
                            type: "string"
                          type: "array"
                        footerTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the footer and any footerText
                            that is sent."
                          examples:
                            - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        introText:
                          description: "Remarks at the top of the invoice as array-of-string. Each element
                            will go in a seperate paragraph"
                          items:
                            type: "string"
                          type: "array"
                        introTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the intro and any introText
                            that is sent."
                          examples:
                            - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        locale:
                          default: "Based on merchant settings, inherited from identity if not defined in
                            payload."
                          description: "Locale of the customer, ISO639 & ISO3166"
                          examples:
                            - "de-DE"
                          type: "string"
                        paymentterm:
                          description: "Payment term of the invoice, i.e. 'Zu zahlen innerhalb von 14
                            Tagen'"
                          examples:
                            - "Zu zahlen innerhalb von 14 Tagen"
                          type: "string"
                        paymenttermId:
                          description: "ID of the paymenterm you configured in Abillify, this will resolve
                            the paymentterm text and due date (if not sent)
                            according to your settings"
                          examples:
                            - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        placeOfSupplyCountry:
                          default: null
                          description: "Country code of the place of supply for VAT calculation, if not
                            provided the billing address country of
                            voucher>identitiy will be used, with fallback to the
                            default issuing country."
                          examples:
                            - "DE"
                            - "FR"
                            - "CH"
                          type: "string"
                        reverseCharge:
                          default: null
                          description: "If set to true or false, this will override the default reverse
                            charge determination for this order."
                          examples:
                            - true
                            - false
                          type: "boolean"
                        vatId:
                          description: "VAT ID of the customer for this invoice, inherited from
                            order/identity if not defined in payload."
                          examples:
                            - "DE987654321"
                          type: "string"
                      type: "object"
                    due:
                      description: "Due date of the invoice, relevant for all delay payment methods"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    issued:
                      description: "Date printed on the invoice"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    items:
                      items:
                        allOf:
                          - properties:
                              costcenter:
                                description: "Optional, Cost center for the line, can be used for reporting"
                                examples:
                                  - "8086"
                                type: "string"
                              detail:
                                properties:
                                  description:
                                    description: "Optional, description of the item"
                                    examples:
                                      - "This is a product description"
                                    type: "string"
                                  taxprofile:
                                    description: "Optional, the tax profile for the line, as defined in your tax
                                      jurisdiction settings, if not configured
                                      default is used as as fallback."
                                    enum:
                                      - "default"
                                      - "reduced"
                                      - "..."
                                    examples:
                                      - "default"
                                    type: "string"
                                type: "object"
                              groupingflag:
                                description: "Optional, grouping flag to group items when booking them, e.g. for
                                  different branches, sales teams or to track
                                  origin when merging companies, can be used for
                                  reporting"
                                examples:
                                  - "DE|1234"
                                type: "string"
                              kind:
                                description: "principal=goods, ancillary=shipping, payment, discount"
                                enum:
                                  - "principal"
                                  - "ancillary"
                                examples:
                                  - "principal"
                                type: "string"
                              label:
                                description: "Label of the voucheritem"
                                examples:
                                  - "Couch Grey 3-Seater"
                                type: "string"
                              pos:
                                description: "Position of the item in the item list, optional, will be
                                  automatically generated if omitted from all
                                  items."
                                examples:
                                  - 1
                                type: "integer"
                              product_number:
                                description: "Your product number"
                                examples:
                                  - "1234567890"
                                type: "string"
                              quantity:
                                description: "Quantity of the items"
                                examples:
                                  - 1
                                type: "number"
                              reference:
                                description: "Your voucherItemReference (A unique identifier in your system), if
                                  you don't send this Abillify will generate
                                  one."
                                examples:
                                  - "1234567890"
                                type: "string"
                              servicebegin:
                                description: "Optional, Start date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              serviceend:
                                description: "Optional, End date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              unit:
                                description: "Label for the unit of the items"
                                examples:
                                  - "pieces"
                                type: "string"
                              unitprice:
                                description: "Net amount of the voucheritem per unit, rounded to 4 decimal
                                  places"
                                examples:
                                  - 1190
                                type: "number"
                            type: "object"
                      type: "array"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    netbased:
                      default: null
                      description: "If true the calculations are rounded to 2 decimal places, this is
                        the recommended option for B2B business.



                        If false (null) the calculations
                        are rounded to 4 decimal places to achieve better gross
                        amounts for end customers."
                      examples:
                        - true
                      type: "boolean"
                    number:
                      description: "Your invoiceNumber, only send this if you want to override the
                        default invoice number generation."
                      examples:
                        - "1234567890"
                      type: "string"
                    orderdate:
                      description: "Date of the order, only send this if invoice it not based on an
                        order. (Invoice flow)"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    ordernumber:
                      description: "Your orderNumber, only send this if invoice it not based on an
                        order. (Invoice flow)"
                      examples:
                        - "1234567890"
                      type: "string"
                    paymentkind:
                      description: "Kind of payment intended to be used for this order, can be
                        different for subsequent invoices.



                        PP: Paypal



                        CC: Credit Card



                        DD: Direct Debit



                        CT: Cash Transfer



                        CD: Cash on Delivery"
                      enum:
                        - "PP"
                        - "CC"
                        - "DD"
                        - "CT"
                        - "CD"
                      examples:
                        - "CT"
                      type: "string"
                    reference:
                      description: "Your invoiceReference (A unique identifier in your system), if you
                        don't send this Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Invoice"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Update invoice by invoiceReference"
      tags:
        - "invoices"
  "/invoices/{invoiceReference}/commitInvoice":
    post:
      description: "Lock the invoice data.



        Please be aware that this operation is not reversible and
        executed asynchronously."
      operationId: "invoices-commitInvoice"
      parameters:
        - description: "Reference of the invoice"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              description: "Addition information, if required Abillify will inform you."
              examples:
                - attachments:
                    - filname: "overwrite_filename.svg"
                      url: "https://abillify.me/wp-content/themes/abillify/assets/images/logo.svg"
                  data: "123"
                  notifyUrl: "https://yourdomain.com/notify"
              properties:
                attachments:
                  items:
                    properties:
                      filename:
                        description: "The filename of the attachment, if not provided the filename from
                          the URL will be used."
                        type: "string"
                      url:
                        description: "The URL of the attachment where Abillify will download the
                          attachment from."
                        format: "uri"
                        type: "string"
                    type: "object"
                  type: "array"
                notifyUrl:
                  description: "The URL where Abillify will send a POST request with the paylaod
                    `{\"result\":\"OK\",\"resultcode\":\"0\",\"job\":\"ID of job
                    returned in task start call\",\"notification\":\"ID of the
                    notification\"}` when the task is completed."
                  format: "uri"
                  type: "string"
              type: "object"
        required: false
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResponse"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Commit Invoice"
      tags:
        - "invoices"
  "/invoices/{invoiceReference}/creditnotes":
    get:
      operationId: "invoices-getCreditnotesByinvoiceReference"
      parameters:
        - description: "Your invoiceReference"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Creditnote"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get credit notes for invoice by reference"
      tags:
        - "invoices"
    post:
      description: "The credit note will be created with the same currency and
        identity as the invoice.



        The credit note will be created with the same addresses as the
        invoice unless you provide different addresses with this call."
      operationId: "invoices-createCreditnote"
      parameters:
        - description: "Your invoiceReference"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    accountingdate:
                      description: "Date on which the credit note is booked, normaly the issued date"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    addresses:
                      description: "Optional, addresses of the credit note, if not provided they will
                        be copied from the identity in the moment of creation."
                      items:
                        allOf:
                          - properties:
                              city:
                                examples:
                                  - "Berlin"
                                type: "string"
                              country:
                                description: "ISO 3166-1 alpha-2 country code"
                                examples:
                                  - "DE"
                                  - "FR"
                                  - "US"
                                type: "string"
                              extra:
                                description: "Extra information for the delivery of the letter"
                                examples:
                                  - "C/O Mr. Smith"
                                type: "string"
                              housenumber:
                                examples:
                                  - "1"
                                type: "string"
                              info:
                                description: "Label / Additional information about the address. For example if
                                  it was verified by some risk check service."
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                  - "default"
                                examples:
                                  - "shipping"
                                type: "string"
                              state:
                                examples:
                                  - "Berlin"
                                type: "string"
                              street:
                                examples:
                                  - "Main Street"
                                type: "string"
                              zipcode:
                                examples:
                                  - "10115"
                                type: "string"
                            type: "object"
                          - properties:
                              company:
                                description: "Company"
                                examples:
                                  - "ACME Inc."
                                type: "string"
                              firstname:
                                description: "Firstname"
                                examples:
                                  - "John"
                                type: "string"
                              lastname:
                                description: "Lastname"
                                examples:
                                  - "Doe"
                                type: "string"
                            type: "object"
                      type: "array"
                    cancelationdate:
                      description: "Date of the cancellation of the credit note"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    detail:
                      properties:
                        footerText:
                          description: "Remarks at the bottom of the invoice. Each element will go in a
                            seperate paragraph"
                          examples:
                            - - "Line 1"
                              - "Line 2, possibly in a different language"
                          items:
                            examples:
                              - "0% VAT according to ...."
                            type: "string"
                          type: "array"
                        footerTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the footer and any footerText
                            that is sent."
                          examples:
                            - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        introText:
                          description: "Remarks at the top of the invoice. Each element will go in a
                            seperate paragraph"
                          examples:
                            - - "Line 1"
                              - "Line 2, possibly in a different language"
                          items:
                            examples:
                              - "0% VAT according to ...."
                            type: "string"
                          type: "array"
                        introTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the intro and any introText
                            that is sent."
                          examples:
                            - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        paymentterm:
                          description: "Payment term of the creditnote"
                          examples:
                            - "Der Betrag wird automatisch auf Ihr Konto
                              überwiesen."
                          type: "string"
                        paymenttermId:
                          description: "ID of the paymenterm you configured in Abillify, this will resolve
                            the paymentterm text and due date (if not sent)
                            according to your settings"
                          examples:
                            - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        reverseCharge:
                          default: null
                          description: "If set to true or false, this will override the default reverse
                            charge determination for this order."
                          examples:
                            - true
                            - false
                          type: "boolean"
                        vatId:
                          description: "VAT ID of the customer for this credit note, inherited from
                            invoice if not defined in payload."
                          examples:
                            - "DE987654321"
                          type: "string"
                      type: "object"
                    issued:
                      description: "Date printed on the credit note"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    items:
                      items:
                        allOf:
                          - properties:
                              costcenter:
                                description: "Optional, Cost center for the line, can be used for reporting"
                                examples:
                                  - "8086"
                                type: "string"
                              detail:
                                properties:
                                  taxprofile:
                                    description: "Optional, the tax profile for the line, as defined in your tax
                                      jurisdiction settings, if not configured
                                      default is used as as fallback."
                                    enum:
                                      - "default"
                                      - "reduced"
                                      - "..."
                                    examples:
                                      - "default"
                                    type: "string"
                                type: "object"
                              kind:
                                description: "principal=goods, ancillary=shipping, payment, discount"
                                enum:
                                  - "principal"
                                  - "ancillary"
                                examples:
                                  - "principal"
                                type: "string"
                              label:
                                description: "Label of the voucheritem"
                                examples:
                                  - "Couch Grey 3-Seater"
                                type: "string"
                              number:
                                description: "Your creditnoteNumber, only send this if you want to override the
                                  default creditnote number generation."
                                examples:
                                  - "1234567890"
                                type: "string"
                              pos:
                                description: "Position of the item in the item list, optional, will be
                                  automatically generated if omitted from all
                                  items."
                                examples:
                                  - 1
                                type: "integer"
                              product_number:
                                description: "Your product number"
                                examples:
                                  - "1234567890"
                                type: "string"
                              quantity:
                                description: "Quantity of the items"
                                examples:
                                  - 1
                                type: "number"
                              reference:
                                description: "your creditnoteReference  (A unique identifier in your system), if
                                  you don't send this Abillify will generate
                                  one."
                                examples:
                                  - "1234567890"
                                type: "string"
                              servicebegin:
                                description: "Optional, Start date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              serviceend:
                                description: "Optional, End date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              unit:
                                description: "Label for the unit of the items"
                                examples:
                                  - "pieces"
                                type: "string"
                              unitprice:
                                description: "Net amount of the voucheritem per unit, rounded to 2 decimal
                                  places"
                                examples:
                                  - -1190
                                type: "number"
                            type: "object"
                      type: "array"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    netbased:
                      default: null
                      description: "If true the calculations are rounded to 2 decimal places, this is
                        the recommended option for B2B business.



                        If false (null) the calculations
                        are rounded to 4 decimal places to achieve better gross
                        amounts for end customers."
                      examples:
                        - true
                      type: "boolean"
                    number:
                      description: "Your creditnoteNumber, only send this if you want to override the
                        default invoice number generation."
                      examples:
                        - "1234567890"
                      type: "string"
                    paymentkind:
                      description: "Kind of payment intended to be used for this order, can be
                        different for subsequent invoices.



                        PP: Paypal



                        CC: Credit Card



                        DD: Direct Debit



                        CT: Cash Transfer



                        CD: Cash on Delivery"
                      enum:
                        - "PP"
                        - "CC"
                        - "DD"
                        - "CT"
                        - "CD"
                      examples:
                        - "CT"
                      type: "string"
                    reference:
                      description: "Your creditnoteReference (A unique identifier in your system), if
                        you don't send this Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Creditnote"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create credit note for invoice"
      tags:
        - "invoices"
        - "creditnotes"
  "/invoices/{invoiceReference}/documents":
    get:
      operationId: "invoices-getDocuments"
      parameters:
        - description: "Your invoiceReference"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
        - description: "Limit number of returned items, 0 means no limit"
          in: "query"
          name: "limit"
          schema:
            default: 0
            examples:
              - 100
            type: "integer"
        - in: "query"
          name: "offset"
          schema:
            default: 0
            examples:
              - 10
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - in: "query"
          name: "search"
          schema:
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/Document"
                type: "array"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get document URLs for invoice"
      tags:
        - "invoices"
  "/invoices/{invoiceReference}/generateDocument":
    post:
      description: "Generate and ship the document for the invoice and lock the
        invoice data.



        Please be aware that this operation is not reversible and
        executed asynchronously.



        The document will be available for download after the task is
        completed."
      operationId: "invoices-generateInvoiceDocument"
      parameters:
        - description: "Reference of the invoice"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              description: "Addition information, if required Abillify will inform you."
              examples:
                - attachments:
                    - filname: "overwrite_filename.svg"
                      url: "https://abillify.me/wp-content/themes/abillify/assets/images/logo.svg"
                  data: "123"
                  notifyUrl: "https://yourdomain.com/notify"
              properties:
                attachments:
                  items:
                    properties:
                      filename:
                        description: "The filename of the attachment, if not provided the filename from
                          the URL will be used."
                        type: "string"
                      url:
                        description: "The URL of the attachment where Abillify will download the
                          attachment from."
                        format: "uri"
                        type: "string"
                    type: "object"
                  type: "array"
                notifyUrl:
                  description: "The URL where Abillify will send a POST request with the paylaod
                    `{\"result\":\"OK\",\"resultcode\":\"0\",\"job\":\"ID of job
                    returned in task start call\",\"notification\":\"ID of the
                    notification\"}` when the task is completed."
                  format: "uri"
                  type: "string"
              type: "object"
        required: false
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResponse"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Generate Document"
      tags:
        - "invoices"
  "/invoices/{invoiceReference}/importExternalDocument":
    post:
      description: "Imports a document created outside the system and links it to an
        existing voucher record. This document can then be used for dunning and
        if configured collection."
      operationId: "invoices-importExternalDocument"
      parameters:
        - description: "Your invoiceReference (The Invoice ID in your system)"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                description:
                  description: "Label of the communication, additional information about the
                    document. Shown in our UI."
                  example: "250 2.0.0 OK: queued as
                    <34dc61dc-321a-efc3-c9ae-804939cacc45@mailserver.com>"
                  type: "string"
                file:
                  description: "File to upload"
                  format: "binary"
                  type: "string"
                filename:
                  description: "Name of the file, including extension. This will also be visible
                    to your customer if the document is sent as an attachment.
                    Allowed extensions are: pdf and eml"
                  example: "RE12345.pdf"
                  type: "string"
                kind:
                  description: "Kind of communication, use what best describes the document, use
                    \"invoice\" for the orignal invoice that was sent to the
                    customer."
                  enum:
                    - "invoice"
                    - "creditnote"
                    - "reminder"
                    - "dunning1"
                    - "dunning2"
                    - "dunning3"
                    - "dunning4"
                    - "email"
                    - "letter"
                  example: "invoice"
                  type: "string"
                label:
                  description: "Label of the communication to identity the document. Shown in our
                    UI."
                  example: "E-Mail Invoice"
                  type: "string"
              required:
                - "kind"
                - "file"
                - "filename"
              type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  communicationReference:
                    description: "Reference of created communication"
                    example: "_12345"
                    type: "string"
                  fileReference:
                    description: "Reference of created file"
                    example: "_67890"
                    type: "string"
                  voucherReference:
                    description: "Reference of the voucher"
                    example: "_1234"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Import External Document"
      tags:
        - "invoices"
  "/invoices/{invoiceReference}/modifyDunning":
    post:
      description: "Modify the dunning process for the current invoice."
      operationId: "invoices-modifyDunning"
      parameters:
        - description: "Reference of the invoice"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            examples:
              modify-dunninglevel:
                description: "Set the dunning level to a specific level, e.g. if the the
                  customer should directly receive dunning 1 instead of
                  reminder."
                summary: "Modify Dunning Level"
                value:
                  dunninglevel: 1
              modify-start-dunning-date:
                description: "Set the start dunning date to a specific date. E.g. if your
                  dunning letters have not been sent due to issues with your
                  mail server, you may want to restart dunning with dunning 1
                  and recalculate fees and interest on a different date thant he
                  due date."
                summary: "Modify Start Dunning Date"
                value:
                  dunninglevel: 1
                  startDunningDate: "2024-01-01"
            schema:
              description: "Parameters for the dunning run."
              examples:
                - data: "123"
              properties:
                dunninglevel:
                  description: "The dunning level at which the dunning should be resumed, if set
                    to Reminder the next operation will be Dunning1 etc. If the
                    dunning level should not be altered, do not send the field.

                    0 = None, 1 = Reminder, 2 = Dunning
                    1...\n"
                  required: false
                  type: "number"
                startDunningDate:
                  description: "The date that should be used as basis for dunning, interest will
                    be calculated from this date.

                    If not provided the due date of the
                    invoice is used (default behaviour)."
                  format: "date"
                  required: false
                  type: "string"
              type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResponse"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Modify Dunning"
      tags:
        - "invoices"
  "/invoices/{invoiceReference}/resendInvoice":
    post:
      description: "Re-Send the document e-mail to the customer."
      operationId: "invoices-resendInvoice"
      parameters:
        - description: "Reference of the invoice"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              description: "Addition information, if required Abillify will inform you."
              examples:
                - data: "123"
              properties: {}
              type: "object"
        required: false
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TaskResponse"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Resend Invoice"
      tags:
        - "invoices"
  /orders:
    get:
      operationId: "orders-list"
      parameters:
        - in: "query"
          name: "page"
          schema:
            default: 1
            examples:
              - 3
            type: "integer"
        - in: "query"
          name: "pageSize"
          schema:
            default: 1
            examples:
              - 20
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - description: "Filters for LIST calls. Supports multiple filtering operators."
          in: "query"
          name: "query"
          required: false
          schema:
            additionalProperties:
              oneOf:
                - type: "string"
                - items:
                    type: "string"
                  type: "array"
                - type: "number"
                - items:
                    type: "number"
                  type: "array"
            examples:
              - created: "2023-01-01 00:00:00"
                "created[$gt]": "2023-01-01"
                "created[$gte]": "2023-01-01"
                "created[$in]":
                  - "2023-01-01 00:00:00"
                  - "2023-01-01 00:00:01"
                "created[$lt]": "2023-01-01"
                "created[$lte]": "2023-01-01"
                "created[$ne]": "2023-01-03 00:00:00"
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  page:
                    default: 1
                    examples:
                      - 3
                    type: "integer"
                  pageSize:
                    default: 1
                    examples:
                      - 20
                    type: "integer"
                  query:
                    additionalProperties:
                      oneOf:
                        - type: "string"
                        - items:
                            type: "string"
                          type: "array"
                        - type: "number"
                        - items:
                            type: "number"
                          type: "array"
                    examples:
                      - created: "2023-01-01 00:00:00"
                        "created[$gt]": "2023-01-01"
                        "created[$gte]": "2023-01-01"
                        "created[$in]":
                          - "2023-01-01 00:00:00"
                          - "2023-01-01 00:00:01"
                        "created[$lt]": "2023-01-01"
                        "created[$lte]": "2023-01-01"
                        "created[$ne]": "2023-01-03 00:00:00"
                    type: "object"
                  rows:
                    items:
                      $ref: "#/components/schemas/OrderResolved"
                    type: "array"
                  sort:
                    examples:
                      - "created"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "List orders with pagination"
      tags:
        - "orders"
  "/orders/{orderReference}":
    get:
      operationId: "orders-getByReference"
      parameters:
        - description: "Your orderReference (The Order ID in your system)"
          in: "path"
          name: "orderReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OrderResolved"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get order by orderReference"
      tags:
        - "orders"
    put:
      operationId: "orders-update"
      parameters:
        - description: "Your orderReference (The Order ID in your system)"
          in: "path"
          name: "orderReference"
          required: true
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            examples:
              full-cancel:
                description: "Use this if the entire order was canceled, this can only be used
                  if no invoice was created yet"
                summary: "Cancel entire order"
                value:
                  cancelationdate: "2024-01-01T00:00:00.000Z"
                  state: "canceled"
              partial-cancel:
                description: "Use this to send the modified/current state of the order"
                summary: "Cancel order partially"
                value:
                  items:
                    - account: "8400"
                      detail:
                        taxtype: "RC"
                        trackingnumber: "XY1234567453533534534"
                        vatclause: "Umsatzsteuerbefreit gem. UstG. §4 Nr. 1a"
                      kind: "principal"
                      label: "Couch Grey 1-Seater"
                      net: "100.00"
                      pos: 1
                      product_number: "1234567890"
                      quantity: 1
                      reference: "1234567890"
                      tax: "19.00"
                      taxaccount: "1776"
                      taxrate: "0.19"
                      total: "119.00"
                      unit: "pieces"
                      unitnet: "100.00"
                      unittax: "19.00"
                  net: "100.00"
                  tax: "19.00"
                  total: "119.00"
              update-addresses:
                description: "Use this to update the addresses of the order"
                summary: "Update Addresses"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
            schema:
              allOf:
                - properties:
                    addresses:
                      description: "Optional, addresses of the invoice, if not provided they will be
                        copied from the identity in the moment of creation."
                      items:
                        allOf:
                          - properties:
                              city:
                                examples:
                                  - "Berlin"
                                type: "string"
                              country:
                                description: "ISO 3166-1 alpha-2 country code"
                                examples:
                                  - "DE"
                                  - "FR"
                                  - "US"
                                type: "string"
                              extra:
                                description: "Extra information for the delivery of the letter"
                                examples:
                                  - "C/O Mr. Smith"
                                type: "string"
                              housenumber:
                                examples:
                                  - "1"
                                type: "string"
                              info:
                                description: "Label / Additional information about the address. For example if
                                  it was verified by some risk check service."
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                  - "default"
                                examples:
                                  - "shipping"
                                type: "string"
                              state:
                                examples:
                                  - "Berlin"
                                type: "string"
                              street:
                                examples:
                                  - "Main Street"
                                type: "string"
                              zipcode:
                                examples:
                                  - "10115"
                                type: "string"
                            type: "object"
                          - properties:
                              company:
                                description: "Company"
                                examples:
                                  - "ACME Inc."
                                type: "string"
                              firstname:
                                description: "Firstname"
                                examples:
                                  - "John"
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                examples:
                                  - "shipping"
                                type: "string"
                              lastname:
                                description: "Lastname"
                                examples:
                                  - "Doe"
                                type: "string"
                            type: "object"
                      type: "array"
                    cancellationdate:
                      description: "Date after which the unattached amount of the order is accounted
                        as overpayment"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    currency:
                      default: "Inherited from identity if omitted"
                      description: "Main currency of the order"
                      examples:
                        - "EUR"
                      type: "string"
                    detail:
                      properties:
                        locale:
                          default: "Based on merchant settings, inherited from identity if not defined in
                            payload."
                          description: "Locale of the customer, ISO639 & ISO3166"
                          examples:
                            - "de-DE"
                          type: "string"
                        reverseCharge:
                          default: null
                          description: "If set to true or false, this will override the default reverse
                            charge determination for this order."
                          examples:
                            - true
                            - false
                          type: "boolean"
                        vatId:
                          description: "VAT ID of the customer for this order, inherited from identity if
                            not defined in payload."
                          examples:
                            - "DE987654321"
                          type: "string"
                      type: "object"
                    items:
                      items:
                        allOf:
                          - properties:
                              costcenter:
                                description: "Optional, Cost center for the line, can be used for reporting"
                                examples:
                                  - "8086"
                                type: "string"
                              detail:
                                properties:
                                  description:
                                    description: "Optional, description of the item"
                                    examples:
                                      - "This is a product description"
                                    type: "string"
                                  taxprofile:
                                    description: "Optional, the tax profile for the line, as defined in your tax
                                      jurisdiction settings, if not configured
                                      default is used as as fallback."
                                    enum:
                                      - "default"
                                      - "reduced"
                                      - "..."
                                    examples:
                                      - "default"
                                    type: "string"
                                type: "object"
                              groupingflag:
                                description: "Optional, grouping flag to group items when booking them, e.g. for
                                  different branches, sales teams or to track
                                  origin when merging companies, can be used for
                                  reporting"
                                examples:
                                  - "DE|1234"
                                type: "string"
                              kind:
                                description: "principal=goods, ancillary=shipping, payment, discount"
                                enum:
                                  - "principal"
                                  - "ancillary"
                                examples:
                                  - "principal"
                                type: "string"
                              label:
                                description: "Label of the voucheritem"
                                examples:
                                  - "Couch Grey 3-Seater"
                                type: "string"
                              pos:
                                description: "Position of the item in the item list, optional, will be
                                  automatically generated if omitted from all
                                  items."
                                examples:
                                  - 1
                                type: "integer"
                              product_number:
                                description: "Your product number"
                                examples:
                                  - "1234567890"
                                type: "string"
                              quantity:
                                description: "Quantity of the items"
                                examples:
                                  - 1
                                type: "number"
                              reference:
                                description: "Your voucherItemReference (A unique identifier in your system), if
                                  you don't send this Abillify will generate
                                  one."
                                examples:
                                  - "1234567890"
                                type: "string"
                              servicebegin:
                                description: "Optional, Start date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              serviceend:
                                description: "Optional, End date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              unit:
                                description: "Label for the unit of the items"
                                examples:
                                  - "pieces"
                                type: "string"
                              unitprice:
                                description: "Net amount of the voucheritem per unit, rounded to 4 decimal
                                  places"
                                examples:
                                  - 1190
                                type: "number"
                            type: "object"
                      type: "array"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    netbased:
                      default: null
                      description: "If true the calculations are rounded to 2 decimal places, this is
                        the recommended option for B2B business.



                        If false (null) the calculations
                        are rounded to 4 decimal places to achieve better gross
                        amounts for end customers."
                      examples:
                        - true
                      type: "boolean"
                    orderdate:
                      description: "Date of the order"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    paymentkind:
                      description: "Kind of payment intended to be used for this order, can be
                        different for subsequent invoices.



                        PP: Paypal



                        CC: Credit Card



                        DD: Direct Debit



                        CT: Cash Transfer



                        CD: Cash on Delivery"
                      enum:
                        - "PP"
                        - "CC"
                        - "DD"
                        - "CT"
                        - "CD"
                      examples:
                        - "CT"
                      type: "string"
                    reference:
                      description: "Your orderReference (A unique identifier in your system), if you
                        don't send this Abillify will generate one."
                      examples:
                        - "123456789098765443"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Order"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Update order by orderReference"
      tags:
        - "orders"
  "/orders/{orderReference}/documents":
    get:
      operationId: "orders-getDocuments"
      parameters:
        - description: "Your orderNumber"
          in: "path"
          name: "orderReference"
          required: true
          schema:
            type: "string"
        - description: "Limit number of returned items, 0 means no limit"
          in: "query"
          name: "limit"
          schema:
            default: 0
            examples:
              - 100
            type: "integer"
        - in: "query"
          name: "offset"
          schema:
            default: 0
            examples:
              - 10
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - in: "query"
          name: "search"
          schema:
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/Document"
                type: "array"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get document URLs for order"
      tags:
        - "orders"
  "/orders/{orderReference}/invoices":
    get:
      operationId: "orders-getInvoicesByOrderReference"
      parameters:
        - description: "Your orderReference (The Order ID in your system)"
          in: "path"
          name: "orderReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Invoice"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get invoices for order by reference"
      tags:
        - "orders"
    post:
      description: "The invoice will be created with the same currency and identity as
        the order.



        The invoice will be created with the same addresses as the order
        unless you provide different addresses with this call."
      operationId: "orders-createInvoices"
      parameters:
        - description: "Your orderReference (The Order ID in your system)"
          in: "path"
          name: "orderReference"
          required: true
          schema:
            type: "string"
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            examples:
              create-invoice-with-netbased:
                description: "Create invoice assigned to order, with net based calculation,
                  mainly for used for b2b"
                summary: "Create Net Based (B2B)"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "billing"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                  currency: "EUR"
                  items:
                    - constcenter: "1234"
                      detail:
                        description: "This is a product description"
                        taxprofile: "default"
                      label: "Product 1"
                      quantity: 1
                      unit: "pcs"
                      unitprice: "100.00"
                  netbased: true
                  paymentkind: "CT"
                  reference: "1234567890"
              create-invoice-without-netbased:
                description: "Create invoice assigned to order, without net based calculation,
                  mainly used for b2c to achieve gross prices of e.g. 99.99"
                summary: "Create Gross Based (B2C)"
                value:
                  addresses:
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "billing"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                    - city: "Berlin"
                      company: "ACME Inc."
                      country: "DE"
                      extra: "C/O Mr. Smith"
                      firstname: "John"
                      housenumber: "1"
                      info: "string"
                      kind: "shipping"
                      lastname: "Doe"
                      state: "Berlin"
                      street: "Main Street"
                      zipcode: "10115"
                  currency: "EUR"
                  items:
                    - constcenter: "1234"
                      detail:
                        description: "This is a product description"
                        taxprofile: "default"
                      label: "Product 1"
                      quantity: 1
                      unit: "pcs"
                      unitprice: "84.0252"
                  netbased: false
                  paymentkind: "CT"
                  reference: "1234567890"
            schema:
              allOf:
                - properties:
                    accountingdate:
                      description: "Date on which the invoice is booked, normaly the issued date"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    addresses:
                      description: "Optional, addresses of the invoice, if not provided they will be
                        copied from the identity in the moment of creation."
                      items:
                        allOf:
                          - properties:
                              city:
                                examples:
                                  - "Berlin"
                                type: "string"
                              country:
                                description: "ISO 3166-1 alpha-2 country code"
                                examples:
                                  - "DE"
                                  - "FR"
                                  - "US"
                                type: "string"
                              extra:
                                description: "Extra information for the delivery of the letter"
                                examples:
                                  - "C/O Mr. Smith"
                                type: "string"
                              housenumber:
                                examples:
                                  - "1"
                                type: "string"
                              info:
                                description: "Label / Additional information about the address. For example if
                                  it was verified by some risk check service."
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                  - "default"
                                examples:
                                  - "shipping"
                                type: "string"
                              state:
                                examples:
                                  - "Berlin"
                                type: "string"
                              street:
                                examples:
                                  - "Main Street"
                                type: "string"
                              zipcode:
                                examples:
                                  - "10115"
                                type: "string"
                            type: "object"
                          - properties:
                              company:
                                description: "Company"
                                examples:
                                  - "ACME Inc."
                                type: "string"
                              firstname:
                                description: "Firstname"
                                examples:
                                  - "John"
                                type: "string"
                              kind:
                                description: "Kind of address"
                                enum:
                                  - "billing"
                                  - "shipping"
                                examples:
                                  - "shipping"
                                type: "string"
                              lastname:
                                description: "Lastname"
                                examples:
                                  - "Doe"
                                type: "string"
                            type: "object"
                      type: "array"
                    cancelationdate:
                      description: "Date of the cancellation of the invoice"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    currency:
                      default: "If invoice is based on an order, the currency is copied from the
                        order, otherwise the customers default currency is
                        used."
                      description: "Taken from order"
                      examples:
                        - "EUR"
                      type: "string"
                    detail:
                      properties:
                        dunning:
                          $ref: "#/components/schemas/DunningSettings"
                        footerText:
                          description: "Remarks at the bottom of the invoice. Each element will go in a
                            seperate paragraph"
                          items:
                            type: "string"
                          type: "array"
                        footerTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the footer and any footerText
                            that is sent."
                          examples:
                            - "5ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        introText:
                          description: "Remarks at the top of the invoice as array-of-string. Each element
                            will go in a seperate paragraph"
                          items:
                            type: "string"
                          type: "array"
                        introTextId:
                          description: "ID of a translatable text you configured in Abillify, this will
                            resolve the text for the intro and any introText
                            that is sent."
                          examples:
                            - "6ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        locale:
                          default: "Based on merchant settings, inherited from identity if not defined in
                            payload."
                          description: "Locale of the customer, ISO639 & ISO3166"
                          examples:
                            - "de-DE"
                          type: "string"
                        paymentterm:
                          description: "Payment term of the invoice, i.e. 'Zu zahlen innerhalb von 14
                            Tagen'"
                          examples:
                            - "Zu zahlen innerhalb von 14 Tagen"
                          type: "string"
                        paymenttermId:
                          description: "ID of the paymenterm you configured in Abillify, this will resolve
                            the paymentterm text and due date (if not sent)
                            according to your settings"
                          examples:
                            - "4ad2114c-9bf0-4dd2-a058-a4047dbabdeb"
                          type: "string"
                        placeOfSupplyCountry:
                          default: null
                          description: "Country code of the place of supply for VAT calculation, if not
                            provided the billing address country of
                            voucher>identitiy will be used, with fallback to the
                            default issuing country."
                          examples:
                            - "DE"
                            - "FR"
                            - "CH"
                          type: "string"
                        reverseCharge:
                          default: null
                          description: "If set to true or false, this will override the default reverse
                            charge determination for this order."
                          examples:
                            - true
                            - false
                          type: "boolean"
                        vatId:
                          description: "VAT ID of the customer for this invoice, inherited from
                            order/identity if not defined in payload."
                          examples:
                            - "DE987654321"
                          type: "string"
                      type: "object"
                    due:
                      description: "Due date of the invoice, relevant for all delay payment methods"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    issued:
                      description: "Date printed on the invoice"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    items:
                      items:
                        allOf:
                          - properties:
                              costcenter:
                                description: "Optional, Cost center for the line, can be used for reporting"
                                examples:
                                  - "8086"
                                type: "string"
                              detail:
                                properties:
                                  description:
                                    description: "Optional, description of the item"
                                    examples:
                                      - "This is a product description"
                                    type: "string"
                                  taxprofile:
                                    description: "Optional, the tax profile for the line, as defined in your tax
                                      jurisdiction settings, if not configured
                                      default is used as as fallback."
                                    enum:
                                      - "default"
                                      - "reduced"
                                      - "..."
                                    examples:
                                      - "default"
                                    type: "string"
                                type: "object"
                              groupingflag:
                                description: "Optional, grouping flag to group items when booking them, e.g. for
                                  different branches, sales teams or to track
                                  origin when merging companies, can be used for
                                  reporting"
                                examples:
                                  - "DE|1234"
                                type: "string"
                              kind:
                                description: "principal=goods, ancillary=shipping, payment, discount"
                                enum:
                                  - "principal"
                                  - "ancillary"
                                examples:
                                  - "principal"
                                type: "string"
                              label:
                                description: "Label of the voucheritem"
                                examples:
                                  - "Couch Grey 3-Seater"
                                type: "string"
                              pos:
                                description: "Position of the item in the item list, optional, will be
                                  automatically generated if omitted from all
                                  items."
                                examples:
                                  - 1
                                type: "integer"
                              product_number:
                                description: "Your product number"
                                examples:
                                  - "1234567890"
                                type: "string"
                              quantity:
                                description: "Quantity of the items"
                                examples:
                                  - 1
                                type: "number"
                              reference:
                                description: "Your voucherItemReference (A unique identifier in your system), if
                                  you don't send this Abillify will generate
                                  one."
                                examples:
                                  - "1234567890"
                                type: "string"
                              servicebegin:
                                description: "Optional, Start date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              serviceend:
                                description: "Optional, End date of the service, e.g. for subscriptions, also
                                  used for PRAP calculation if enabled."
                                examples:
                                  - "2020-01-01T00:00:00.000Z"
                                type: "string"
                              unit:
                                description: "Label for the unit of the items"
                                examples:
                                  - "pieces"
                                type: "string"
                              unitprice:
                                description: "Net amount of the voucheritem per unit, rounded to 4 decimal
                                  places"
                                examples:
                                  - 1190
                                type: "number"
                            type: "object"
                      type: "array"
                    meta:
                      description: "Merchant information related to the entity, you can store any JSON
                        here. Size limits according to your contract."
                      properties:
                        custom_key:
                          description: "Custom key-value pair for merchant specific information"
                          examples:
                            - "custom_value"
                          type: "string"
                      type: "object"
                    netbased:
                      default: null
                      description: "If true the calculations are rounded to 2 decimal places, this is
                        the recommended option for B2B business.



                        If false (null) the calculations
                        are rounded to 4 decimal places to achieve better gross
                        amounts for end customers."
                      examples:
                        - true
                      type: "boolean"
                    number:
                      description: "Your invoiceNumber, only send this if you want to override the
                        default invoice number generation."
                      examples:
                        - "1234567890"
                      type: "string"
                    orderdate:
                      description: "Date of the order, only send this if invoice it not based on an
                        order. (Invoice flow)"
                      examples:
                        - "2020-01-01T00:00:00.000Z"
                      type: "string"
                    ordernumber:
                      description: "Your orderNumber, only send this if invoice it not based on an
                        order. (Invoice flow)"
                      examples:
                        - "1234567890"
                      type: "string"
                    paymentkind:
                      description: "Kind of payment intended to be used for this order, can be
                        different for subsequent invoices.



                        PP: Paypal



                        CC: Credit Card



                        DD: Direct Debit



                        CT: Cash Transfer



                        CD: Cash on Delivery"
                      enum:
                        - "PP"
                        - "CC"
                        - "DD"
                        - "CT"
                        - "CD"
                      examples:
                        - "CT"
                      type: "string"
                    reference:
                      description: "Your invoiceReference (A unique identifier in your system), if you
                        don't send this Abillify will generate one."
                      examples:
                        - "1234567890"
                      type: "string"
                  type: "object"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Invoice"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create invoice for order"
      tags:
        - "orders"
  "/orders/{orderReference}/invoices/{invoiceReference}/creditnotes":
    get:
      operationId: "orders-getCreditnotesByOrderReference"
      parameters:
        - description: "Your orderReference (The Order ID in your system)"
          in: "path"
          name: "orderReference"
          required: true
          schema:
            type: "string"
        - description: "Your invoiceReference"
          in: "path"
          name: "invoiceReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Creditnote"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get credit notes for order by reference"
      tags:
        - "orders"
  /productgroups:
    get:
      operationId: "productgroups-list"
      parameters:
        - in: "query"
          name: "page"
          schema:
            default: 1
            examples:
              - 3
            type: "integer"
        - in: "query"
          name: "pageSize"
          schema:
            default: 1
            examples:
              - 20
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - description: "Filters for LIST calls. Supports multiple filtering operators."
          in: "query"
          name: "query"
          required: false
          schema:
            additionalProperties:
              oneOf:
                - type: "string"
                - items:
                    type: "string"
                  type: "array"
                - type: "number"
                - items:
                    type: "number"
                  type: "array"
            examples:
              - created: "2023-01-01 00:00:00"
                "created[$gt]": "2023-01-01"
                "created[$gte]": "2023-01-01"
                "created[$in]":
                  - "2023-01-01 00:00:00"
                  - "2023-01-01 00:00:01"
                "created[$lt]": "2023-01-01"
                "created[$lte]": "2023-01-01"
                "created[$ne]": "2023-01-03 00:00:00"
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  page:
                    default: 1
                    examples:
                      - 3
                    type: "integer"
                  pageSize:
                    default: 1
                    examples:
                      - 20
                    type: "integer"
                  query:
                    additionalProperties:
                      oneOf:
                        - type: "string"
                        - items:
                            type: "string"
                          type: "array"
                        - type: "number"
                        - items:
                            type: "number"
                          type: "array"
                    examples:
                      - created: "2023-01-01 00:00:00"
                        "created[$gt]": "2023-01-01"
                        "created[$gte]": "2023-01-01"
                        "created[$in]":
                          - "2023-01-01 00:00:00"
                          - "2023-01-01 00:00:01"
                        "created[$lt]": "2023-01-01"
                        "created[$lte]": "2023-01-01"
                        "created[$ne]": "2023-01-03 00:00:00"
                    type: "object"
                  rows:
                    items:
                      $ref: "#/components/schemas/productgroups"
                    type: "array"
                  sort:
                    examples:
                      - "created"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "List productgroups with pagination"
      tags:
        - "products"
    post:
      operationId: "productgroups-create"
      parameters:
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    reference:
                      description: "Your unique id for the element, ie. the id of the element in your
                        database"
                      examples:
                        - "abcdefg"
                      type: "string"
                  type: "object"
                - properties:
                    meta:
                      description: "Merchant data related to the entity"
                      type: "object"
                  type: "object"
                - properties:
                    active:
                      default: true
                      examples:
                        - false
                      type: "boolean"
                    description_long_localized:
                      default: "{}"
                      description: "Long descritpion of productgroup, localized, allows html/markdown,
                        shown on checkout"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    description_short_localized:
                      default: "{}"
                      description: "Description of productgroup, localized, plain text, shown on
                        checkout and invoice"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    label:
                      description: "Label of product group, internal use"
                      examples:
                        - "abcdefg"
                      type: "string"
                    parent:
                      description: "Parent product group"
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                    title_localized:
                      default: "{}"
                      description: "Title of productgroup, localized, plain text, show on checkout and
                        invoice, if not defined label is used"
                      examples:
                        - de: "Titel auf Deutsch"
                          en: "Title in english"
                      type: "object"
                  type: "object"
              description: ""
              title: "productgroups"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/productgroups"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create productgroups"
      tags:
        - "products"
    put:
      operationId: "productgroups-upsert"
      parameters:
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    reference:
                      description: "Your unique id for the element, ie. the id of the element in your
                        database"
                      examples:
                        - "abcdefg"
                      type: "string"
                  required:
                    - "reference"
                  type: "object"
                - properties:
                    meta:
                      description: "Merchant data related to the entity"
                      type: "object"
                  type: "object"
                - properties:
                    active:
                      default: true
                      examples:
                        - false
                      type: "boolean"
                    description_long_localized:
                      default: "{}"
                      description: "Long descritpion of productgroup, localized, allows html/markdown,
                        shown on checkout"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    description_short_localized:
                      default: "{}"
                      description: "Description of productgroup, localized, plain text, shown on
                        checkout and invoice"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    label:
                      description: "Label of product group, internal use"
                      examples:
                        - "abcdefg"
                      type: "string"
                    parent:
                      description: "Parent product group"
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                    title_localized:
                      default: "{}"
                      description: "Title of productgroup, localized, plain text, show on checkout and
                        invoice, if not defined label is used"
                      examples:
                        - de: "Titel auf Deutsch"
                          en: "Title in english"
                      type: "object"
                  required: []
                  type: "object"
              description: ""
              title: "productgroups"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/productgroups"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create or update productgroups by your unique ID"
      tags:
        - "products"
  "/productgroups/byReference/{reference}":
    get:
      operationId: "productgroups-getByReference"
      parameters:
        - description: "Your unique ID of the object"
          in: "path"
          name: "reference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/productgroups"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get productgroups by your unique ID"
      tags:
        - "products"
  /productprices:
    get:
      operationId: "productprices-list"
      parameters:
        - in: "query"
          name: "page"
          schema:
            default: 1
            examples:
              - 3
            type: "integer"
        - in: "query"
          name: "pageSize"
          schema:
            default: 1
            examples:
              - 20
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - description: "Filters for LIST calls. Supports multiple filtering operators."
          in: "query"
          name: "query"
          required: false
          schema:
            additionalProperties:
              oneOf:
                - type: "string"
                - items:
                    type: "string"
                  type: "array"
                - type: "number"
                - items:
                    type: "number"
                  type: "array"
            examples:
              - created: "2023-01-01 00:00:00"
                "created[$gt]": "2023-01-01"
                "created[$gte]": "2023-01-01"
                "created[$in]":
                  - "2023-01-01 00:00:00"
                  - "2023-01-01 00:00:01"
                "created[$lt]": "2023-01-01"
                "created[$lte]": "2023-01-01"
                "created[$ne]": "2023-01-03 00:00:00"
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  page:
                    default: 1
                    examples:
                      - 3
                    type: "integer"
                  pageSize:
                    default: 1
                    examples:
                      - 20
                    type: "integer"
                  query:
                    additionalProperties:
                      oneOf:
                        - type: "string"
                        - items:
                            type: "string"
                          type: "array"
                        - type: "number"
                        - items:
                            type: "number"
                          type: "array"
                    examples:
                      - created: "2023-01-01 00:00:00"
                        "created[$gt]": "2023-01-01"
                        "created[$gte]": "2023-01-01"
                        "created[$in]":
                          - "2023-01-01 00:00:00"
                          - "2023-01-01 00:00:01"
                        "created[$lt]": "2023-01-01"
                        "created[$lte]": "2023-01-01"
                        "created[$ne]": "2023-01-03 00:00:00"
                    type: "object"
                  rows:
                    items:
                      $ref: "#/components/schemas/productprices"
                    type: "array"
                  sort:
                    examples:
                      - "created"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "List productprices with pagination"
      tags:
        - "products"
    post:
      operationId: "productprices-create"
      parameters:
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    reference:
                      description: "Your unique id for the element, ie. the id of the element in your
                        database"
                      examples:
                        - "abcdefg"
                      type: "string"
                  type: "object"
                - properties:
                    meta:
                      description: "Merchant data related to the entity"
                      type: "object"
                  type: "object"
                - properties:
                    product:
                      description: "Id of the product that is linked to the element."
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                  required:
                    - "product"
                  type: "object"
                - properties:
                    active:
                      default: true
                      description: "M: At least one price must be active"
                      examples:
                        - false
                      type: "boolean"
                    amount:
                      description: "Net price in currency, i.e. 10.00"
                      examples:
                        - "12345.45"
                      pattern: "^-?[0-9]+(\\.[0-9]+)?$"
                      type: "string"
                    currency:
                      description: "Currency i.e. EUR | USD ..."
                      examples:
                        - "abcdefg"
                      type: "string"
                    filter:
                      default: "{}"
                      description: "Filter for availability, i.e. {language: [de]} or
                        {shippingCountry: [de]}"
                      type: "object"
                    label:
                      description: "Name of the price, not visible to customer, i.e. T-Shirt EUR"
                      examples:
                        - "abcdefg"
                      type: "string"
                    old_amount:
                      description: "Old net price, to show price reductions, in currency, i.e. 15.00"
                      examples:
                        - "12345.45"
                      pattern: "^-?[0-9]+(\\.[0-9]+)?$"
                      type: "string"
                    taxprofile:
                      description: "Tax profile of the price, as defined in tax jurisdiction, i.e
                        default | reduced"
                      examples:
                        - "abcdefg"
                      type: "string"
                    validfrom:
                      description: "Price valid from. M: At least one price must be in past or null"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                    validto:
                      description: "Price valid to. M: at least one price must be valid"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                  required:
                    - "label"
                    - "currency"
                    - "amount"
                    - "taxprofile"
                  type: "object"
              description: ""
              title: "productprices"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/productprices"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create productprices"
      tags:
        - "products"
    put:
      operationId: "productprices-upsert"
      parameters:
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    reference:
                      description: "Your unique id for the element, ie. the id of the element in your
                        database"
                      examples:
                        - "abcdefg"
                      type: "string"
                  required:
                    - "reference"
                  type: "object"
                - properties:
                    meta:
                      description: "Merchant data related to the entity"
                      type: "object"
                  type: "object"
                - properties:
                    product:
                      description: "Id of the product that is linked to the element."
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                  type: "object"
                - properties:
                    active:
                      default: true
                      description: "M: At least one price must be active"
                      examples:
                        - false
                      type: "boolean"
                    amount:
                      description: "Net price in currency, i.e. 10.00"
                      examples:
                        - "12345.45"
                      pattern: "^-?[0-9]+(\\.[0-9]+)?$"
                      type: "string"
                    currency:
                      description: "Currency i.e. EUR | USD ..."
                      examples:
                        - "abcdefg"
                      type: "string"
                    filter:
                      default: "{}"
                      description: "Filter for availability, i.e. {language: [de]} or
                        {shippingCountry: [de]}"
                      type: "object"
                    label:
                      description: "Name of the price, not visible to customer, i.e. T-Shirt EUR"
                      examples:
                        - "abcdefg"
                      type: "string"
                    old_amount:
                      description: "Old net price, to show price reductions, in currency, i.e. 15.00"
                      examples:
                        - "12345.45"
                      pattern: "^-?[0-9]+(\\.[0-9]+)?$"
                      type: "string"
                    taxprofile:
                      description: "Tax profile of the price, as defined in tax jurisdiction, i.e
                        default | reduced"
                      examples:
                        - "abcdefg"
                      type: "string"
                    validfrom:
                      description: "Price valid from. M: At least one price must be in past or null"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                    validto:
                      description: "Price valid to. M: at least one price must be valid"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                  type: "object"
              description: ""
              title: "productprices"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/productprices"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create or update productprices by your unique ID"
      tags:
        - "products"
  "/productprices/byReference/{reference}":
    get:
      operationId: "productprices-getByReference"
      parameters:
        - description: "Your unique ID of the object"
          in: "path"
          name: "reference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/productprices"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get productprices by your unique ID"
      tags:
        - "products"
  /products:
    get:
      operationId: "products-list"
      parameters:
        - in: "query"
          name: "page"
          schema:
            default: 1
            examples:
              - 3
            type: "integer"
        - in: "query"
          name: "pageSize"
          schema:
            default: 1
            examples:
              - 20
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - description: "Filters for LIST calls. Supports multiple filtering operators."
          in: "query"
          name: "query"
          required: false
          schema:
            additionalProperties:
              oneOf:
                - type: "string"
                - items:
                    type: "string"
                  type: "array"
                - type: "number"
                - items:
                    type: "number"
                  type: "array"
            examples:
              - created: "2023-01-01 00:00:00"
                "created[$gt]": "2023-01-01"
                "created[$gte]": "2023-01-01"
                "created[$in]":
                  - "2023-01-01 00:00:00"
                  - "2023-01-01 00:00:01"
                "created[$lt]": "2023-01-01"
                "created[$lte]": "2023-01-01"
                "created[$ne]": "2023-01-03 00:00:00"
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  page:
                    default: 1
                    examples:
                      - 3
                    type: "integer"
                  pageSize:
                    default: 1
                    examples:
                      - 20
                    type: "integer"
                  query:
                    additionalProperties:
                      oneOf:
                        - type: "string"
                        - items:
                            type: "string"
                          type: "array"
                        - type: "number"
                        - items:
                            type: "number"
                          type: "array"
                    examples:
                      - created: "2023-01-01 00:00:00"
                        "created[$gt]": "2023-01-01"
                        "created[$gte]": "2023-01-01"
                        "created[$in]":
                          - "2023-01-01 00:00:00"
                          - "2023-01-01 00:00:01"
                        "created[$lt]": "2023-01-01"
                        "created[$lte]": "2023-01-01"
                        "created[$ne]": "2023-01-03 00:00:00"
                    type: "object"
                  rows:
                    items:
                      $ref: "#/components/schemas/products"
                    type: "array"
                  sort:
                    examples:
                      - "created"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "List products with pagination"
      tags:
        - "products"
    post:
      operationId: "products-create"
      parameters:
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    reference:
                      description: "Your unique id for the element, ie. the id of the element in your
                        database"
                      examples:
                        - "abcdefg"
                      type: "string"
                  type: "object"
                - properties:
                    meta:
                      description: "Merchant data related to the entity"
                      type: "object"
                  type: "object"
                - properties:
                    active:
                      default: true
                      description: ""
                      examples:
                        - false
                      type: "boolean"
                    billing_interval_align:
                      description: "Defines how the billing interval is aligned, only if kind is plan,
                        i.e. plan_interval = month, billling_interval = quarter,
                        billing_interval_align = start -> billed on Jan, Apr,
                        Jul, Oct"
                      enum:
                        - "start"
                        - "end"
                      type: "string"
                    billing_interval_partial:
                      description: "Only relevant for kind = plan, when to send first last invoice,
                        i.e. if product is bought on 15th of month, invoice at
                        end of month = partial or invoice with end of first full
                        month = full"
                      enum:
                        - "full"
                        - "partial"
                      type: "string"
                    billing_start_alignment:
                      description: "LEGACY"
                      examples:
                        - "abcdefg"
                      type: "string"
                    billling_interval:
                      description: "Billing interval of plan, only if kind is plan, i.e. plan_interval
                        = month, billling_interval = quarter -> billed every 3
                        months"
                      enum:
                        - "month"
                        - "quarter"
                        - "year"
                        - "term"
                      type: "string"
                    description_long_localized:
                      default: "{}"
                      description: "Long descritpion of product, localized, allows html/markdown,
                        shown on checkout"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    description_short_localized:
                      default: "{}"
                      description: "Description of product, localized, plain text, shown on checkout
                        and invoice"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    filter:
                      default: "{}"
                      description: "Filter for availability, i.e. {language: [de]} or
                        {shippingCountry: [de]}"
                      type: "object"
                    kind:
                      default: "item"
                      description: "Kind of product, defines behaviour in shop and billing, i.e. item
                        is a one time product, plan is a recurring product,
                        variant is a variation of a parent product, addon is an
                        additional product that can only be booked together with
                        another product"
                      enum:
                        - "item"
                        - "variant"
                        - "plan"
                        - "addon"
                      examples:
                        - "item"
                        - "variant"
                      type: "string"
                    label:
                      description: "Label of product, internal use"
                      examples:
                        - "abcdefg"
                      type: "string"
                    parent:
                      description: "Parent product of the product, mostly used when kind is variant or
                        addon, but can also be used to group different models of
                        the same product."
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                    plan_interval:
                      description: "Interval of plan, only if kind is plan"
                      enum:
                        - "day"
                        - "week"
                        - "month"
                        - "quarter"
                        - "year"
                      type: "string"
                    plan_interval_amount:
                      description: "Only relevant for kind = plan, number of product_interval the
                        contract is made for, i.e. 12 + product_interval = month
                        -> 12 month"
                      examples:
                        - 12
                      format: "int32"
                      type: "integer"
                    plan_interval_minimum:
                      description: "Only relevant for kind = plan, number of min intervals, i.e.
                        plan_interval = month, plan_interval_amount = 1,
                        plan_interval_minimum = 3 -> minimum contract duration 3
                        months"
                      examples:
                        - 3
                      format: "int32"
                      type: "integer"
                    subsequent_product:
                      description: "Product that is newer version of this product, if disabled or
                        validto ended"
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                    title_localized:
                      default: "{}"
                      description: "Title of product, localized, plain text, show on checkout and
                        invoice, if not defined label is used"
                      examples:
                        - de: "Produktname"
                          en: "Product name"
                      type: "object"
                    unit:
                      default: ""
                      description: "Unit of item, i.e. Pieces or Liters, shown on checkout and
                        invoice"
                      examples:
                        - "abcdefg"
                      type: "string"
                    validfrom:
                      description: "Avaiable after"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                    validto:
                      description: "Avaiable until"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                  required:
                    - "label"
                  type: "object"
              description: ""
              title: "products"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/products"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create products"
      tags:
        - "products"
    put:
      operationId: "products-upsert"
      parameters:
        - description: "Set this optional header to the same value for idempotent
            requests. If the request is repeated with the same idempotency key,
            the server will return the same response as for the first request.
            Our servers retain the idempotency key and their result for 24 hours
            after the initial request, if not defined otherwise in your Abillify
            contract."
          in: "header"
          name: "Idempotency-Key"
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    reference:
                      description: "Your unique id for the element, ie. the id of the element in your
                        database"
                      examples:
                        - "abcdefg"
                      type: "string"
                  required:
                    - "reference"
                  type: "object"
                - properties:
                    meta:
                      description: "Merchant data related to the entity"
                      type: "object"
                  type: "object"
                - properties:
                    active:
                      default: true
                      description: ""
                      examples:
                        - false
                      type: "boolean"
                    billing_interval_align:
                      description: "Defines how the billing interval is aligned, only if kind is plan,
                        i.e. plan_interval = month, billling_interval = quarter,
                        billing_interval_align = start -> billed on Jan, Apr,
                        Jul, Oct"
                      enum:
                        - "start"
                        - "end"
                      type: "string"
                    billing_interval_partial:
                      description: "Only relevant for kind = plan, when to send first last invoice,
                        i.e. if product is bought on 15th of month, invoice at
                        end of month = partial or invoice with end of first full
                        month = full"
                      enum:
                        - "full"
                        - "partial"
                      type: "string"
                    billing_start_alignment:
                      description: "LEGACY"
                      examples:
                        - "abcdefg"
                      type: "string"
                    billling_interval:
                      description: "Billing interval of plan, only if kind is plan, i.e. plan_interval
                        = month, billling_interval = quarter -> billed every 3
                        months"
                      enum:
                        - "month"
                        - "quarter"
                        - "year"
                        - "term"
                      type: "string"
                    description_long_localized:
                      default: "{}"
                      description: "Long descritpion of product, localized, allows html/markdown,
                        shown on checkout"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    description_short_localized:
                      default: "{}"
                      description: "Description of product, localized, plain text, shown on checkout
                        and invoice"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    detail_merge:
                      default: "{}"
                      description: "As an alternative to attribute 'detail', this attribute can be
                        used to set individual subvalues instead of setting the
                        whole property again"
                      type: "object"
                    filter:
                      default: "{}"
                      description: "Filter for availability, i.e. {language: [de]} or
                        {shippingCountry: [de]}"
                      type: "object"
                    kind:
                      default: "item"
                      description: "Kind of product, defines behaviour in shop and billing, i.e. item
                        is a one time product, plan is a recurring product,
                        variant is a variation of a parent product, addon is an
                        additional product that can only be booked together with
                        another product"
                      enum:
                        - "item"
                        - "variant"
                        - "plan"
                        - "addon"
                      examples:
                        - "item"
                        - "variant"
                      type: "string"
                    label:
                      description: "Label of product, internal use"
                      examples:
                        - "abcdefg"
                      type: "string"
                    parent:
                      description: "Parent product of the product, mostly used when kind is variant or
                        addon, but can also be used to group different models of
                        the same product."
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                    plan_interval:
                      description: "Interval of plan, only if kind is plan"
                      enum:
                        - "day"
                        - "week"
                        - "month"
                        - "quarter"
                        - "year"
                      type: "string"
                    plan_interval_amount:
                      description: "Only relevant for kind = plan, number of product_interval the
                        contract is made for, i.e. 12 + product_interval = month
                        -> 12 month"
                      examples:
                        - 12
                      format: "int32"
                      type: "integer"
                    plan_interval_minimum:
                      description: "Only relevant for kind = plan, number of min intervals, i.e.
                        plan_interval = month, plan_interval_amount = 1,
                        plan_interval_minimum = 3 -> minimum contract duration 3
                        months"
                      examples:
                        - 3
                      format: "int32"
                      type: "integer"
                    subsequent_product:
                      description: "Product that is newer version of this product, if disabled or
                        validto ended"
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                    title_localized:
                      default: "{}"
                      description: "Title of product, localized, plain text, show on checkout and
                        invoice, if not defined label is used"
                      examples:
                        - de: "Produktname"
                          en: "Product name"
                      type: "object"
                    unit:
                      default: ""
                      description: "Unit of item, i.e. Pieces or Liters, shown on checkout and
                        invoice"
                      examples:
                        - "abcdefg"
                      type: "string"
                    validfrom:
                      description: "Avaiable after"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                    validto:
                      description: "Avaiable until"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                  type: "object"
              description: ""
              title: "products"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/products"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Create or update products by your unique ID"
      tags:
        - "products"
  "/products/{reference}/productgroups/{productgroupReference}":
    delete:
      operationId: "products-removeFromProductgroupByReference"
      parameters:
        - description: "Your unique ID of the object"
          in: "path"
          name: "reference"
          required: true
          schema:
            type: "string"
        - description: "Your unique ID of the object"
          in: "path"
          name: "productgroupReference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  result:
                    description: "Result of the operation"
                    examples:
                      - "OK"
                    type: "string"
                  resultcode:
                    description: "Result code of the operation"
                    examples:
                      - "0"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Remove a product from a productgroup by your unique IDs"
      tags:
        - "products"
    post:
      operationId: "products-addToProductgroupByReference"
      parameters:
        - description: "Your unique ID of the object"
          in: "path"
          name: "reference"
          required: true
          schema:
            type: "string"
        - description: "Your unique ID of the object"
          in: "path"
          name: "productgroupReference"
          required: true
          schema:
            type: "string"
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - properties:
                    reference:
                      description: "Your unique id for the element, ie. the id of the element in your
                        database"
                      examples:
                        - "abcdefg"
                      type: "string"
                  type: "object"
                - properties:
                    meta:
                      description: "Merchant data related to the entity"
                      type: "object"
                  type: "object"
                - properties:
                    active:
                      default: true
                      description: ""
                      examples:
                        - false
                      type: "boolean"
                    billing_interval_align:
                      description: "Defines how the billing interval is aligned, only if kind is plan,
                        i.e. plan_interval = month, billling_interval = quarter,
                        billing_interval_align = start -> billed on Jan, Apr,
                        Jul, Oct"
                      enum:
                        - "start"
                        - "end"
                      type: "string"
                    billing_interval_partial:
                      description: "Only relevant for kind = plan, when to send first last invoice,
                        i.e. if product is bought on 15th of month, invoice at
                        end of month = partial or invoice with end of first full
                        month = full"
                      enum:
                        - "full"
                        - "partial"
                      type: "string"
                    billing_start_alignment:
                      description: "LEGACY"
                      examples:
                        - "abcdefg"
                      type: "string"
                    billling_interval:
                      description: "Billing interval of plan, only if kind is plan, i.e. plan_interval
                        = month, billling_interval = quarter -> billed every 3
                        months"
                      enum:
                        - "month"
                        - "quarter"
                        - "year"
                        - "term"
                      type: "string"
                    description_long_localized:
                      default: "{}"
                      description: "Long descritpion of product, localized, allows html/markdown,
                        shown on checkout"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    description_short_localized:
                      default: "{}"
                      description: "Description of product, localized, plain text, shown on checkout
                        and invoice"
                      examples:
                        - de: "Beschreibung auf Deutsch"
                          en: "Description in English"
                      type: "object"
                    filter:
                      default: "{}"
                      description: "Filter for availability, i.e. {language: [de]} or
                        {shippingCountry: [de]}"
                      type: "object"
                    kind:
                      default: "item"
                      description: "Kind of product, defines behaviour in shop and billing, i.e. item
                        is a one time product, plan is a recurring product,
                        variant is a variation of a parent product, addon is an
                        additional product that can only be booked together with
                        another product"
                      enum:
                        - "item"
                        - "variant"
                        - "plan"
                        - "addon"
                      examples:
                        - "item"
                        - "variant"
                      type: "string"
                    label:
                      description: "Label of product, internal use"
                      examples:
                        - "abcdefg"
                      type: "string"
                    parent:
                      description: "Parent product of the product, mostly used when kind is variant or
                        addon, but can also be used to group different models of
                        the same product."
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                    plan_interval:
                      description: "Interval of plan, only if kind is plan"
                      enum:
                        - "day"
                        - "week"
                        - "month"
                        - "quarter"
                        - "year"
                      type: "string"
                    plan_interval_amount:
                      description: "Only relevant for kind = plan, number of product_interval the
                        contract is made for, i.e. 12 + product_interval = month
                        -> 12 month"
                      examples:
                        - 12
                      format: "int32"
                      type: "integer"
                    plan_interval_minimum:
                      description: "Only relevant for kind = plan, number of min intervals, i.e.
                        plan_interval = month, plan_interval_amount = 1,
                        plan_interval_minimum = 3 -> minimum contract duration 3
                        months"
                      examples:
                        - 3
                      format: "int32"
                      type: "integer"
                    subsequent_product:
                      description: "Product that is newer version of this product, if disabled or
                        validto ended"
                      examples:
                        - "123456789"
                      pattern: "^-?[0-9]+$"
                      type: "string"
                    title_localized:
                      default: "{}"
                      description: "Title of product, localized, plain text, show on checkout and
                        invoice, if not defined label is used"
                      examples:
                        - de: "Produktname"
                          en: "Product name"
                      type: "object"
                    unit:
                      default: ""
                      description: "Unit of item, i.e. Pieces or Liters, shown on checkout and
                        invoice"
                      examples:
                        - "abcdefg"
                      type: "string"
                    validfrom:
                      description: "Avaiable after"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                    validto:
                      description: "Avaiable until"
                      examples:
                        - "2022-07-29 17:23:47"
                      format: "string"
                      pattern: "^d{4}-d{2}-d{2} d{2}:d{2}:d{2}$"
                      type: "string"
                  required:
                    - "label"
                  type: "object"
              description: ""
              title: "products"
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  result:
                    description: "Result of the operation"
                    examples:
                      - "OK"
                    type: "string"
                  resultcode:
                    description: "Result code of the operation"
                    examples:
                      - "0"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Add a product to a productgroup by your unique IDs"
      tags:
        - "products"
  "/products/byReference/{reference}":
    get:
      operationId: "products-getByReference"
      parameters:
        - description: "Your unique ID of the object"
          in: "path"
          name: "reference"
          required: true
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/products"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get products by your unique ID"
      tags:
        - "products"
  /reports:
    get:
      description: "Fetch generated reports, use the id returned to download the
        report using the report download
        [endpoint](/api/reports/reports-download)."
      operationId: "reports-find"
      parameters:
        - description: "Get PDFs for documents created before this timestamp"
          in: "query"
          name: "query[created][$lte]"
          required: false
          schema:
            type: "string"
        - description: "Get PDFs for documents created after this timestamp"
          in: "query"
          name: "query[created][$gte]"
          required: false
          schema:
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: "#/components/schemas/Report"
                type: "array"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Retrieve your reports"
      tags:
        - "reports"
  "/reports/{id}/download":
    get:
      description: "Download the report with the given ID"
      operationId: "reports-download"
      parameters:
        - description: "Unique ID of report provided by Abillify"
          in: "path"
          name: "id"
          required: true
          schema:
            pattern: "^[0-9]+$"
            type: "string"
      responses:
        "200":
          content:
            application/octet-stream:
              schema:
                format: "binary"
                type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Fetch report"
      tags:
        - "reports"
  /transactions:
    get:
      description: "Get filtered list of transactions"
      operationId: "transactions-list"
      parameters:
        - in: "query"
          name: "page"
          schema:
            default: 1
            examples:
              - 3
            type: "integer"
        - in: "query"
          name: "pageSize"
          schema:
            default: 1
            examples:
              - 20
            type: "integer"
        - in: "query"
          name: "sort"
          schema:
            examples:
              - "created"
            type: "string"
        - description: "Filters for LIST calls. Supports multiple filtering operators."
          in: "query"
          name: "query"
          required: false
          schema:
            additionalProperties:
              oneOf:
                - type: "string"
                - items:
                    type: "string"
                  type: "array"
                - type: "number"
                - items:
                    type: "number"
                  type: "array"
            examples:
              - created: "2023-01-01 00:00:00"
                "created[$gt]": "2023-01-01"
                "created[$gte]": "2023-01-01"
                "created[$in]":
                  - "2023-01-01 00:00:00"
                  - "2023-01-01 00:00:01"
                "created[$lt]": "2023-01-01"
                "created[$lte]": "2023-01-01"
                "created[$ne]": "2023-01-03 00:00:00"
            type: "object"
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  page:
                    default: 1
                    examples:
                      - 3
                    type: "integer"
                  pageSize:
                    default: 1
                    examples:
                      - 20
                    type: "integer"
                  query:
                    additionalProperties:
                      oneOf:
                        - type: "string"
                        - items:
                            type: "string"
                          type: "array"
                        - type: "number"
                        - items:
                            type: "number"
                          type: "array"
                    examples:
                      - created: "2023-01-01 00:00:00"
                        "created[$gt]": "2023-01-01"
                        "created[$gte]": "2023-01-01"
                        "created[$in]":
                          - "2023-01-01 00:00:00"
                          - "2023-01-01 00:00:01"
                        "created[$lt]": "2023-01-01"
                        "created[$lte]": "2023-01-01"
                        "created[$ne]": "2023-01-03 00:00:00"
                    type: "object"
                  rows:
                    items:
                      $ref: "#/components/schemas/transactions"
                    type: "array"
                  sort:
                    examples:
                      - "created"
                    type: "string"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "List transactions with pagination"
      tags:
        - "transactions"
  "/transactions/{id}":
    get:
      description: "Retrieve transaction by its Abillify ID"
      operationId: "transactions-get"
      parameters:
        - description: "Unique ID provided by Abillify"
          in: "path"
          name: "id"
          required: true
          schema:
            pattern: "^[0-9]+$"
            type: "string"
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/transactions"
          description: "Successful request"
        "400":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Bad request"
        "500":
          content:
            application/json:
              schema:
                properties:
                  code:
                    description: "Error code, e.g. 400, 404, 500, detailing the type of error."
                    examples:
                      - 400
                    type: "integer"
                  details:
                    description: "Additional details about the error, e.g. affected fields and hints
                      to resolve the error."
                    items:
                      properties:
                        error:
                          description: "Text describing the error."
                          examples:
                            - "Value for field 'debtor' is of wrong type,
                              expected bigint."
                          type: "string"
                        fields:
                          description: "Fields affected by the error."
                          items:
                            examples:
                              - "debtor"
                            type: "string"
                          type: "array"
                        hint:
                          description: "Hint to resolve the error."
                          examples:
                            - "Value must be a number or a string containing
                              only a number."
                          type: "string"
                      type: "object"
                    type: "array"
                  message:
                    description: "Text describing the error."
                    examples:
                      - "InvalidValue, see error details"
                    type: "string"
                  name:
                    description: "Name of the error, e.g. ClientError, ServerError, detailing who
                      caused the error."
                    examples:
                      - "ClientError"
                    type: "string"
                  type:
                    description: "Type of the error, e.g. ERR_NOT_FOUND, ERR_INVALID_VALUE,
                      detailing the error type."
                    examples:
                      - "ERR_INVALID_VALUE"
                    type: "string"
          description: "Server error"
      summary: "Get one transaction"
      tags:
        - "transactions"
security:
  - basic: []
servers:
  - description: "Abillify API - Staging 1"
    url: "https://staging1.abillify.dev/api"
tags:
  - name: "transactions"
    x-displayName: "Transactions"
  - name: "identities"
    x-displayName: "Identities"
  - name: "orders"
    x-displayName: "Orders"
  - name: "invoices"
    x-displayName: "Invoices"
  - name: "creditnotes"
    x-displayName: "Creditnotes"
  - name: "reports"
    x-displayName: "Reports"
  - name: "products"
    x-displayName: "Products"
webhooks:
  workflowWebhook:
    post:
      description: "This endpoint is used to receive workflow events from the Abillify
        platform. The events are triggered by the workflow engine and are sent
        to the configured URL. The events are sent as POST requests with a JSON
        payload. The payload is described in the event description."
      operationId: "workflowWebhook"
      requestBody:
        content:
          application/json:
            schema:
              properties:
                client:
                  description: "Abillify Merchant ID"
                  examples:
                    - "10001"
                  type: "string"
                due:
                  description: "Due date of the voucher"
                  examples:
                    - "2020-01-01T00:00:00.000Z"
                  type: "string"
                identityReference:
                  description: "Your identity reference"
                  examples:
                    - "12345"
                  type: "string"
                job:
                  description: "ID of the job that sent the notificaiton"
                  examples:
                    - "1"
                  type: "string"
                label:
                  description: "Label of the voucher"
                  examples:
                    - "Invoice"
                  type: "string"
                number:
                  description: "The vouchers number"
                  examples:
                    - "RE12345"
                  type: "string"
                ordernumber:
                  description: "Your order reference, if presented"
                  examples:
                    - "1234567890"
                  type: "string"
                state:
                  description: "State of the voucher"
                  enum:
                    - "none"
                    - "paid"
                    - "canceled"
                  examples:
                    - "open"
                  type: "string"
                total:
                  description: "Total amount of the voucher, rounded to 2 decimal places"
                  examples:
                    - 1190
                  type: "number"
                unpaid:
                  description: "Unpaid amount of the voucher, rounded to 2 decimal places"
                  examples:
                    - 1190
                  type: "number"
                voucherReference:
                  description: "Your voucher reference"
                  examples:
                    - "1234567890"
                  type: "string"
                workflow:
                  description: "Name of your workflow"
                  examples:
                    - "Invoice Due"
                  type: "string"
              type: "object"
      responses:
        "200":
          description: "Return a 200 status to indicate that the data was received
            successfully"
      security: []
      tags:
        - "webhooks"
