{"openapi":"3.1.0","info":{"title":"AbaNinja Documents API - Recurring Invoices","version":"3.0.0","x-domain-id":"documents"},"servers":[{"url":"https://api.abaninja.ch","description":"The AbaNinja API server"}],"tags":[{"name":"document-recurring-invoices","description":"Manage recurring invoices","x-displayName":"Recurring Invoices"}],"security":[{"ApiToken":[]}],"paths":{"/accounts/{accountUuid}/documents/v2/recurring-invoices":{"get":{"tags":["document-recurring-invoices"],"summary":"Get recurring invoices","description":"Get recurring invoices","operationId":"documents_list_recurring_invoices_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"updatedSince","in":"query","description":"filter for updated items","required":false,"schema":{}},{"name":"limit","in":"query","description":"pagination limit","required":false,"schema":{"type":["number","null"],"maximum":400,"minimum":1}},{"name":"page","in":"query","description":"pagination page","required":false,"schema":{"type":["number","null"],"default":1,"minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Recurring Invoice Collection Item Resource","description":"Resource used in collections","properties":{"uuid":{"type":"string","format":"uuid"},"id":{"type":"number","format":"int64","deprecated":true},"currencyCode":{"type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"currencyCodeRecognized":{"description":"when importing invoices and detecting the currency, this field contains the detected value","type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"title":{"type":["string","null"]},"reference":{"type":"string"},"status":{"type":"string","enum":["draft","open","sending","send-failed","sent","viewed","approved","declined","partial","paid","in-payment","collected","planned","pending","archived","cancelled","converted","due","reminder","first-dunning","second-dunning","final-dunning","inactive","active","inbox","expired","done","assign","awaiting-payment","error"]},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"receiver":{"properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"personUuid":{"type":["string","null"],"format":"uuid"}}},"documentTotal":{"type":"number","format":"float"},"frequency":{"type":["string","null"],"enum":["weekly","two_weeks","four_weeks","monthly","three_months","six_months","annually"]},"isLastOfMonth":{"type":"boolean"},"isRecurringActive":{"type":"boolean"},"pricesIncludeVat":{"type":"boolean"},"startDate":{"type":["string","null"],"format":"date"},"updatedAt":{"type":"string","format":"date-time"},"isTemplate":{"type":"boolean"},"recurringInvoiceNumber":{"type":"string"},"billingPeriod":{"type":"string","enum":["CURRENT","PREVIOUS","NEXT","NONE"]}},"type":"object"}}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"0ccdf21f5aa2f15fe83cc2045062e325","x-required-scopes":["customers"]},"post":{"tags":["document-recurring-invoices"],"summary":"Create recurring invoice","description":"Create recurring invoice","operationId":"documents_create_recurring_invoices","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create recurring invoices","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/recurring-invoice.schema.json","title":"Recurring invoices","description":"A Schema for creating recurring invoices in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"receiver":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json","description":"Invoice Receiver for AbaNinja Invoice Json","type":"object","$defs":{"personAddress":{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},"companyAddress":{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"contactPersonUuid":{"type":["null","string"],"format":"uuid","description":"UUID of contact person inside company"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"},"additionalReceivers":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false}}},"required":["addressUuid","companyUuid"]},"additionalCompanyReceiver":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false},"customerNumberReceiver":{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}},"properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"contactPersonUuid":{"type":["null","string"],"format":"uuid","description":"UUID of contact person inside company"},"additionalReceivers":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false}},"customerNumber":{"type":"string"}},"required":["addressUuid","personUuid","companyUuid","customerNumber"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":["null","string"],"format":"date"},"frequency":{"enum":["weekly","two_weeks","four_weeks","monthly","three_months","six_months","annually"]},"isRecurringActive":{"type":"boolean","default":false},"isLastOfMonth":{"type":"boolean","default":false,"description":"send invoice always at end of month. Only has an effect with frequencies monthly, three_months and six_months."},"paymentInstructions":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json","title":"Payment Instructions","description":"Payment Instruction Schema for AbaNinja Invoice Json","$defs":{"ibanInstruction":{"title":"IBAN","type":"object","properties":{"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"reference":{"type":["null","string"],"pattern":"^RF[0-9]{2}[A-Za-z0-9]{1,21}$","description":"SCOR Reference"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},"qrIbanInstruction":{"title":"QR-IBAN","type":"object","properties":{"qrIban":{"type":"string","pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$"},"reference":{"type":["null","string"],"pattern":"^[0-9]{2,27}$","description":"QRR Reference"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"},"reference":{"type":["null","string"],"pattern":"(^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)","description":"QRR or SCOR Reference"}},"required":["bankAccountUuid"]}},"properties":{"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"reference":{"type":["null","string"],"pattern":"(^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)","description":"QRR or SCOR Reference"},"qrIban":{"type":"string","pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$"},"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["iban","qrIban","bankAccountUuid"]},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json","description":"Schema for an invoice position item for the AbaNinja API","type":"object","properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"uuid":{"type":["string","null"],"format":"uuid","description":"UUID to use. Especially needed for updating positions without re-creating them"},"kind":{"const":"page_break"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"},"title":{"type":"string","maximum":255},"text":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"$defs":{"productPosition":{"type":"object","properties":{"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"subtitlePosition":{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},"textPosition":{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},"sectionTotalPosition":{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"pageBreakPosition":{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}},"required":["kind","productUuid","singlePrice","productDescription","title","text","items"]},"minItems":1},"cashDiscounts":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/cash-discount.schema.json","description":"Cash Discount Schema for AbaNinja Invoice Json","type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":60,"description":"Number of days"},"percentage":{"type":"number","minimum":0.5,"maximum":100}},"required":["days","percentage"]},"description":"Skonto","maxItems":3},"documentDiscount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"},"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"title":{"type":["null","string"],"maxLength":75},"reference":{"type":["string"],"maxLength":255},"customField1":{"type":["null","string"],"maxLength":255},"customField2":{"type":["null","string"],"maxLength":255},"customField3":{"type":["null","string"],"maxLength":255},"customField4":{"type":["null","string"],"maxLength":255},"terms":{"type":["string"]},"publicNotes":{"type":["null","string"]},"footerText":{"type":["null","string"]}},"required":["receiver","startDate","frequency","paymentInstructions","documentTotal","pricesIncludeVat","positions","currencyCode"]},"minItems":1}},"required":["documents"],"$defs":{"singleRecurringInvoice":{"type":"object","properties":{"receiver":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json","description":"Invoice Receiver for AbaNinja Invoice Json","type":"object","$defs":{"personAddress":{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},"companyAddress":{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"contactPersonUuid":{"type":["null","string"],"format":"uuid","description":"UUID of contact person inside company"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"},"additionalReceivers":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false}}},"required":["addressUuid","companyUuid"]},"additionalCompanyReceiver":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false},"customerNumberReceiver":{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}},"properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"contactPersonUuid":{"type":["null","string"],"format":"uuid","description":"UUID of contact person inside company"},"additionalReceivers":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false}},"customerNumber":{"type":"string"}},"required":["addressUuid","personUuid","companyUuid","customerNumber"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":["null","string"],"format":"date"},"frequency":{"enum":["weekly","two_weeks","four_weeks","monthly","three_months","six_months","annually"]},"isRecurringActive":{"type":"boolean","default":false},"isLastOfMonth":{"type":"boolean","default":false,"description":"send invoice always at end of month. Only has an effect with frequencies monthly, three_months and six_months."},"paymentInstructions":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json","title":"Payment Instructions","description":"Payment Instruction Schema for AbaNinja Invoice Json","$defs":{"ibanInstruction":{"title":"IBAN","type":"object","properties":{"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"reference":{"type":["null","string"],"pattern":"^RF[0-9]{2}[A-Za-z0-9]{1,21}$","description":"SCOR Reference"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},"qrIbanInstruction":{"title":"QR-IBAN","type":"object","properties":{"qrIban":{"type":"string","pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$"},"reference":{"type":["null","string"],"pattern":"^[0-9]{2,27}$","description":"QRR Reference"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"},"reference":{"type":["null","string"],"pattern":"(^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)","description":"QRR or SCOR Reference"}},"required":["bankAccountUuid"]}},"properties":{"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"reference":{"type":["null","string"],"pattern":"(^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)","description":"QRR or SCOR Reference"},"qrIban":{"type":"string","pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$"},"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["iban","qrIban","bankAccountUuid"]},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json","description":"Schema for an invoice position item for the AbaNinja API","type":"object","properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"uuid":{"type":["string","null"],"format":"uuid","description":"UUID to use. Especially needed for updating positions without re-creating them"},"kind":{"const":"page_break"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"},"title":{"type":"string","maximum":255},"text":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"$defs":{"productPosition":{"type":"object","properties":{"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"subtitlePosition":{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},"textPosition":{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},"sectionTotalPosition":{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"pageBreakPosition":{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}},"required":["kind","productUuid","singlePrice","productDescription","title","text","items"]},"minItems":1},"cashDiscounts":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/cash-discount.schema.json","description":"Cash Discount Schema for AbaNinja Invoice Json","type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":60,"description":"Number of days"},"percentage":{"type":"number","minimum":0.5,"maximum":100}},"required":["days","percentage"]},"description":"Skonto","maxItems":3},"documentDiscount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"},"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"title":{"type":["null","string"],"maxLength":75},"reference":{"type":["string"],"maxLength":255},"customField1":{"type":["null","string"],"maxLength":255},"customField2":{"type":["null","string"],"maxLength":255},"customField3":{"type":["null","string"],"maxLength":255},"customField4":{"type":["null","string"],"maxLength":255},"terms":{"type":["string"]},"publicNotes":{"type":["null","string"]},"footerText":{"type":["null","string"]}},"required":["receiver","startDate","frequency","paymentInstructions","documentTotal","pricesIncludeVat","positions","currencyCode"]}}}}}},"responses":{"201":{"description":"Recurring invoice created","content":{"application/json":{"schema":{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Recurring Invoice Resource","properties":{"uuid":{"type":"string","format":"uuid"},"currencyCode":{"type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"currencyCodeRecognized":{"description":"when importing invoices and detecting the currency, this field contains the detected value","type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"title":{"type":["string","null"]},"reference":{"type":"string"},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"status":{"type":"string","enum":["draft","open","sending","send-failed","sent","viewed","approved","declined","partial","paid","in-payment","collected","planned","pending","archived","cancelled","converted","due","reminder","first-dunning","second-dunning","final-dunning","inactive","active","inbox","expired","done","assign","awaiting-payment","error"]},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"terms":{"type":"string"},"publicNotes":{"type":["string","null"]},"footerText":{"type":["string","null"]},"receiver":{"properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"contactPersonUuid":{"type":["string","null"],"format":"uuid"},"additionalReceivers":{"type":"array","items":{"properties":{"personUuid":{"type":"string","format":"uuid"}},"type":"object"}},"receiverInformation":{"title":"Receiver Information Resource","description":"Receiver information resource","properties":{"customerNumber":{"type":["string","null"],"readOnly":true},"companyName":{"type":["string","null"],"readOnly":true},"name":{"type":["string","null"],"readOnly":true},"nameWithSalutation":{"type":["string","null"],"readOnly":true},"careOfAddress":{"type":["string","null"],"readOnly":true},"address":{"type":["string","null"],"readOnly":true},"extension":{"type":["string","null"],"readOnly":true},"houseNumber":{"type":["string","null"],"readOnly":true},"zipCode":{"type":["string","null"],"readOnly":true},"city":{"type":["string","null"],"readOnly":true},"countryCode":{"type":["string","null"],"readOnly":true},"email":{"type":["string","null"],"format":"email","readOnly":true},"language":{"type":["string","null"],"readOnly":true,"enum":["de","en","fr","it"]},"deliveryAddress":{"properties":{"companyName":{"type":["string","null"],"readOnly":true},"name":{"type":["string","null"],"readOnly":true},"nameWithSalutation":{"type":["string","null"],"readOnly":true},"careOfAddress":{"type":["string","null"],"readOnly":true},"address":{"type":["string","null"],"readOnly":true},"extension":{"type":["string","null"],"readOnly":true},"houseNumber":{"type":["string","null"],"readOnly":true},"zipCode":{"type":["string","null"],"readOnly":true},"city":{"type":["string","null"],"readOnly":true},"countryCode":{"type":["string","null"],"readOnly":true}},"type":"object","readOnly":true},"additionalReceivers":{"type":"array","items":{"properties":{"fullName":{"type":["string","null"],"readOnly":true},"email":{"type":["string","null"],"readOnly":true}},"type":"object"},"readOnly":true}},"type":"object"},"personUuid":{"type":["string","null"],"format":"uuid"}}},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"nextSendDate":{"type":["string","null"],"format":"date"},"frequency":{"type":["string","null"],"enum":["weekly","two_weeks","four_weeks","monthly","three_months","six_months","annually"]},"isRecurringActive":{"type":"boolean"},"isLastOfMonth":{"type":"boolean"},"paymentInstructions":{"properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}}},"pricesIncludeVat":{"type":"boolean"},"paymentTerms":{"type":["integer","null"],"deprecated":true},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"productNumber":{"type":"string"},"productDescription":{"type":"string"},"productUuid":{"type":["string","null"],"format":"uuid"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"properties":{"amount":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"}}},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"quantity":{"type":["number","null"],"format":"float"},"unitUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityEmployeeUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityStartDate":{"type":["string","null"],"format":"date-time"},"relatedInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"originalInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"items":{"type":"array","items":{"properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["product"]},"productNumber":{"type":"string"},"productDescription":{"type":"string"},"productUuid":{"type":["string","null"],"format":"uuid"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"properties":{"amount":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"}}},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"quantity":{"type":["number","null"],"format":"float"},"unitUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityEmployeeUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityStartDate":{"type":["string","null"],"format":"date-time"},"relatedInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"originalInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"unitCode":{"type":"string"}}}},"unitCode":{"type":"string"},"text":{"type":"string"}}}},"isTemplate":{"type":"boolean"},"recurringInvoiceNumber":{"type":"string"},"type":{"type":"string","enum":["recurring_invoice"]},"cashDiscounts":{"type":"array","items":{"properties":{"days":{"type":"number","format":"int64"},"percentage":{"type":"number","format":"float"}},"type":"object"},"maxItems":3,"minItems":0},"documentDiscount":{"properties":{"amount":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"}}}},"type":"object"}}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":201},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"202":{"description":"Asynchronous processing","content":{"application/json":{"schema":{"properties":{"data":{"title":"Asynchronous Import Resource","description":"Resource for asynchronous document imports","properties":{"status":{"type":"string","format":"uri"},"queueUuid":{"type":"string","format":"uuid"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":202},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ccdc56d8add840f09795e78a859d1943","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{recurringInvoiceUuid}":{"get":{"tags":["document-recurring-invoices"],"summary":"Get recurring invoice","description":"Get a single recurring invoice","operationId":"documents_get_recurring_invoices","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"recurringInvoiceUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Recurring Invoice Resource","properties":{"uuid":{"type":"string","format":"uuid"},"currencyCode":{"type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"currencyCodeRecognized":{"description":"when importing invoices and detecting the currency, this field contains the detected value","type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"title":{"type":["string","null"]},"reference":{"type":"string"},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"status":{"type":"string","enum":["draft","open","sending","send-failed","sent","viewed","approved","declined","partial","paid","in-payment","collected","planned","pending","archived","cancelled","converted","due","reminder","first-dunning","second-dunning","final-dunning","inactive","active","inbox","expired","done","assign","awaiting-payment","error"]},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"terms":{"type":"string"},"publicNotes":{"type":["string","null"]},"footerText":{"type":["string","null"]},"receiver":{"properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"contactPersonUuid":{"type":["string","null"],"format":"uuid"},"additionalReceivers":{"type":"array","items":{"properties":{"personUuid":{"type":"string","format":"uuid"}},"type":"object"}},"receiverInformation":{"title":"Receiver Information Resource","description":"Receiver information resource","properties":{"customerNumber":{"type":["string","null"],"readOnly":true},"companyName":{"type":["string","null"],"readOnly":true},"name":{"type":["string","null"],"readOnly":true},"nameWithSalutation":{"type":["string","null"],"readOnly":true},"careOfAddress":{"type":["string","null"],"readOnly":true},"address":{"type":["string","null"],"readOnly":true},"extension":{"type":["string","null"],"readOnly":true},"houseNumber":{"type":["string","null"],"readOnly":true},"zipCode":{"type":["string","null"],"readOnly":true},"city":{"type":["string","null"],"readOnly":true},"countryCode":{"type":["string","null"],"readOnly":true},"email":{"type":["string","null"],"format":"email","readOnly":true},"language":{"type":["string","null"],"readOnly":true,"enum":["de","en","fr","it"]},"deliveryAddress":{"properties":{"companyName":{"type":["string","null"],"readOnly":true},"name":{"type":["string","null"],"readOnly":true},"nameWithSalutation":{"type":["string","null"],"readOnly":true},"careOfAddress":{"type":["string","null"],"readOnly":true},"address":{"type":["string","null"],"readOnly":true},"extension":{"type":["string","null"],"readOnly":true},"houseNumber":{"type":["string","null"],"readOnly":true},"zipCode":{"type":["string","null"],"readOnly":true},"city":{"type":["string","null"],"readOnly":true},"countryCode":{"type":["string","null"],"readOnly":true}},"type":"object","readOnly":true},"additionalReceivers":{"type":"array","items":{"properties":{"fullName":{"type":["string","null"],"readOnly":true},"email":{"type":["string","null"],"readOnly":true}},"type":"object"},"readOnly":true}},"type":"object"},"personUuid":{"type":["string","null"],"format":"uuid"}}},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"nextSendDate":{"type":["string","null"],"format":"date"},"frequency":{"type":["string","null"],"enum":["weekly","two_weeks","four_weeks","monthly","three_months","six_months","annually"]},"isRecurringActive":{"type":"boolean"},"isLastOfMonth":{"type":"boolean"},"paymentInstructions":{"properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}}},"pricesIncludeVat":{"type":"boolean"},"paymentTerms":{"type":["integer","null"],"deprecated":true},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"productNumber":{"type":"string"},"productDescription":{"type":"string"},"productUuid":{"type":["string","null"],"format":"uuid"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"properties":{"amount":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"}}},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"quantity":{"type":["number","null"],"format":"float"},"unitUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityEmployeeUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityStartDate":{"type":["string","null"],"format":"date-time"},"relatedInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"originalInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"items":{"type":"array","items":{"properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["product"]},"productNumber":{"type":"string"},"productDescription":{"type":"string"},"productUuid":{"type":["string","null"],"format":"uuid"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"properties":{"amount":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"}}},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"quantity":{"type":["number","null"],"format":"float"},"unitUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityEmployeeUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityStartDate":{"type":["string","null"],"format":"date-time"},"relatedInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"originalInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"unitCode":{"type":"string"}}}},"unitCode":{"type":"string"},"text":{"type":"string"}}}},"isTemplate":{"type":"boolean"},"recurringInvoiceNumber":{"type":"string"},"type":{"type":"string","enum":["recurring_invoice"]},"cashDiscounts":{"type":"array","items":{"properties":{"days":{"type":"number","format":"int64"},"percentage":{"type":"number","format":"float"}},"type":"object"},"maxItems":3,"minItems":0},"documentDiscount":{"properties":{"amount":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"}}}},"type":"object"}}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"438bf040f7a75b30e2e4beda77ab7cb8","x-required-scopes":["customers"]},"patch":{"tags":["document-recurring-invoices"],"summary":"Update recurring invoice","description":"Update recurring invoice","operationId":"documents_update_recurring_invoices_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"recurringInvoiceUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update recurring invoice","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/recurring-invoice.schema.json","title":"Recurring invoices","description":"A Schema for creating recurring invoices in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"receiver":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json","description":"Invoice Receiver for AbaNinja Invoice Json","type":"object","$defs":{"personAddress":{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},"companyAddress":{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"contactPersonUuid":{"type":["null","string"],"format":"uuid","description":"UUID of contact person inside company"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"},"additionalReceivers":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false}}},"required":["addressUuid","companyUuid"]},"additionalCompanyReceiver":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false},"customerNumberReceiver":{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}},"properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"contactPersonUuid":{"type":["null","string"],"format":"uuid","description":"UUID of contact person inside company"},"additionalReceivers":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false}},"customerNumber":{"type":"string"}},"required":["addressUuid","personUuid","companyUuid","customerNumber"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":["null","string"],"format":"date"},"frequency":{"enum":["weekly","two_weeks","four_weeks","monthly","three_months","six_months","annually"]},"isRecurringActive":{"type":"boolean","default":false},"isLastOfMonth":{"type":"boolean","default":false,"description":"send invoice always at end of month. Only has an effect with frequencies monthly, three_months and six_months."},"paymentInstructions":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json","title":"Payment Instructions","description":"Payment Instruction Schema for AbaNinja Invoice Json","$defs":{"ibanInstruction":{"title":"IBAN","type":"object","properties":{"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"reference":{"type":["null","string"],"pattern":"^RF[0-9]{2}[A-Za-z0-9]{1,21}$","description":"SCOR Reference"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},"qrIbanInstruction":{"title":"QR-IBAN","type":"object","properties":{"qrIban":{"type":"string","pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$"},"reference":{"type":["null","string"],"pattern":"^[0-9]{2,27}$","description":"QRR Reference"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"},"reference":{"type":["null","string"],"pattern":"(^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)","description":"QRR or SCOR Reference"}},"required":["bankAccountUuid"]}},"properties":{"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"reference":{"type":["null","string"],"pattern":"(^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)","description":"QRR or SCOR Reference"},"qrIban":{"type":"string","pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$"},"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["iban","qrIban","bankAccountUuid"]},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json","description":"Schema for an invoice position item for the AbaNinja API","type":"object","properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"uuid":{"type":["string","null"],"format":"uuid","description":"UUID to use. Especially needed for updating positions without re-creating them"},"kind":{"const":"page_break"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"},"title":{"type":"string","maximum":255},"text":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"$defs":{"productPosition":{"type":"object","properties":{"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"subtitlePosition":{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},"textPosition":{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},"sectionTotalPosition":{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"pageBreakPosition":{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}},"required":["kind","productUuid","singlePrice","productDescription","title","text","items"]},"minItems":1},"cashDiscounts":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/cash-discount.schema.json","description":"Cash Discount Schema for AbaNinja Invoice Json","type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":60,"description":"Number of days"},"percentage":{"type":"number","minimum":0.5,"maximum":100}},"required":["days","percentage"]},"description":"Skonto","maxItems":3},"documentDiscount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"},"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"title":{"type":["null","string"],"maxLength":75},"reference":{"type":["string"],"maxLength":255},"customField1":{"type":["null","string"],"maxLength":255},"customField2":{"type":["null","string"],"maxLength":255},"customField3":{"type":["null","string"],"maxLength":255},"customField4":{"type":["null","string"],"maxLength":255},"terms":{"type":["string"]},"publicNotes":{"type":["null","string"]},"footerText":{"type":["null","string"]}},"required":["receiver","startDate","frequency","paymentInstructions","documentTotal","pricesIncludeVat","positions","currencyCode"]},"minItems":1}},"required":["documents"],"$defs":{"singleRecurringInvoice":{"type":"object","properties":{"receiver":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-receiver.schema.json","description":"Invoice Receiver for AbaNinja Invoice Json","type":"object","$defs":{"personAddress":{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},"companyAddress":{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"contactPersonUuid":{"type":["null","string"],"format":"uuid","description":"UUID of contact person inside company"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"},"additionalReceivers":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false}}},"required":["addressUuid","companyUuid"]},"additionalCompanyReceiver":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false},"customerNumberReceiver":{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}},"properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"contactPersonUuid":{"type":["null","string"],"format":"uuid","description":"UUID of contact person inside company"},"additionalReceivers":{"type":"array","maxItems":5,"items":{"type":"object","properties":{"personUuid":{"type":"string","format":"uuid","description":"UUID of contact person inside given company"}},"required":["personUuid"],"additionalProperties":false}},"customerNumber":{"type":"string"}},"required":["addressUuid","personUuid","companyUuid","customerNumber"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":["null","string"],"format":"date"},"frequency":{"enum":["weekly","two_weeks","four_weeks","monthly","three_months","six_months","annually"]},"isRecurringActive":{"type":"boolean","default":false},"isLastOfMonth":{"type":"boolean","default":false,"description":"send invoice always at end of month. Only has an effect with frequencies monthly, three_months and six_months."},"paymentInstructions":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions.schema.json","title":"Payment Instructions","description":"Payment Instruction Schema for AbaNinja Invoice Json","$defs":{"ibanInstruction":{"title":"IBAN","type":"object","properties":{"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"reference":{"type":["null","string"],"pattern":"^RF[0-9]{2}[A-Za-z0-9]{1,21}$","description":"SCOR Reference"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},"qrIbanInstruction":{"title":"QR-IBAN","type":"object","properties":{"qrIban":{"type":"string","pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$"},"reference":{"type":["null","string"],"pattern":"^[0-9]{2,27}$","description":"QRR Reference"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"},"reference":{"type":["null","string"],"pattern":"(^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)","description":"QRR or SCOR Reference"}},"required":["bankAccountUuid"]}},"properties":{"iban":{"type":"string","pattern":"^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}"},"bic":{"type":["null","string"],"pattern":"^[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$"},"reference":{"type":["null","string"],"pattern":"(^[0-9]{2,27}$)|(^RF[0-9]{2}[A-Za-z0-9]{1,21}$)","description":"QRR or SCOR Reference"},"qrIban":{"type":"string","pattern":"^(CH|LI)[0-9]{2}(30[0-9]{3}|31[0-9]{3})[a-zA-Z0-9]{12}$"},"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["iban","qrIban","bankAccountUuid"]},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json","description":"Schema for an invoice position item for the AbaNinja API","type":"object","properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"uuid":{"type":["string","null"],"format":"uuid","description":"UUID to use. Especially needed for updating positions without re-creating them"},"kind":{"const":"page_break"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"},"title":{"type":"string","maximum":255},"text":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"$defs":{"productPosition":{"type":"object","properties":{"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"subtitlePosition":{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},"textPosition":{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},"sectionTotalPosition":{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"pageBreakPosition":{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}},"required":["kind","productUuid","singlePrice","productDescription","title","text","items"]},"minItems":1},"cashDiscounts":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/cash-discount.schema.json","description":"Cash Discount Schema for AbaNinja Invoice Json","type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":60,"description":"Number of days"},"percentage":{"type":"number","minimum":0.5,"maximum":100}},"required":["days","percentage"]},"description":"Skonto","maxItems":3},"documentDiscount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"},"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"title":{"type":["null","string"],"maxLength":75},"reference":{"type":["string"],"maxLength":255},"customField1":{"type":["null","string"],"maxLength":255},"customField2":{"type":["null","string"],"maxLength":255},"customField3":{"type":["null","string"],"maxLength":255},"customField4":{"type":["null","string"],"maxLength":255},"terms":{"type":["string"]},"publicNotes":{"type":["null","string"]},"footerText":{"type":["null","string"]}},"required":["receiver","startDate","frequency","paymentInstructions","documentTotal","pricesIncludeVat","positions","currencyCode"]}}}}}},"responses":{"200":{"description":"Recurring invoice updated","content":{"application/json":{"schema":{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Recurring Invoice Resource","properties":{"uuid":{"type":"string","format":"uuid"},"currencyCode":{"type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"currencyCodeRecognized":{"description":"when importing invoices and detecting the currency, this field contains the detected value","type":["string","null"],"format":"iso-4217","maxLength":3,"minLength":3},"title":{"type":["string","null"]},"reference":{"type":"string"},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"status":{"type":"string","enum":["draft","open","sending","send-failed","sent","viewed","approved","declined","partial","paid","in-payment","collected","planned","pending","archived","cancelled","converted","due","reminder","first-dunning","second-dunning","final-dunning","inactive","active","inbox","expired","done","assign","awaiting-payment","error"]},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"terms":{"type":"string"},"publicNotes":{"type":["string","null"]},"footerText":{"type":["string","null"]},"receiver":{"properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"contactPersonUuid":{"type":["string","null"],"format":"uuid"},"additionalReceivers":{"type":"array","items":{"properties":{"personUuid":{"type":"string","format":"uuid"}},"type":"object"}},"receiverInformation":{"title":"Receiver Information Resource","description":"Receiver information resource","properties":{"customerNumber":{"type":["string","null"],"readOnly":true},"companyName":{"type":["string","null"],"readOnly":true},"name":{"type":["string","null"],"readOnly":true},"nameWithSalutation":{"type":["string","null"],"readOnly":true},"careOfAddress":{"type":["string","null"],"readOnly":true},"address":{"type":["string","null"],"readOnly":true},"extension":{"type":["string","null"],"readOnly":true},"houseNumber":{"type":["string","null"],"readOnly":true},"zipCode":{"type":["string","null"],"readOnly":true},"city":{"type":["string","null"],"readOnly":true},"countryCode":{"type":["string","null"],"readOnly":true},"email":{"type":["string","null"],"format":"email","readOnly":true},"language":{"type":["string","null"],"readOnly":true,"enum":["de","en","fr","it"]},"deliveryAddress":{"properties":{"companyName":{"type":["string","null"],"readOnly":true},"name":{"type":["string","null"],"readOnly":true},"nameWithSalutation":{"type":["string","null"],"readOnly":true},"careOfAddress":{"type":["string","null"],"readOnly":true},"address":{"type":["string","null"],"readOnly":true},"extension":{"type":["string","null"],"readOnly":true},"houseNumber":{"type":["string","null"],"readOnly":true},"zipCode":{"type":["string","null"],"readOnly":true},"city":{"type":["string","null"],"readOnly":true},"countryCode":{"type":["string","null"],"readOnly":true}},"type":"object","readOnly":true},"additionalReceivers":{"type":"array","items":{"properties":{"fullName":{"type":["string","null"],"readOnly":true},"email":{"type":["string","null"],"readOnly":true}},"type":"object"},"readOnly":true}},"type":"object"},"personUuid":{"type":["string","null"],"format":"uuid"}}},"startDate":{"type":["string","null"],"format":"date"},"endDate":{"type":["string","null"],"format":"date"},"nextSendDate":{"type":["string","null"],"format":"date"},"frequency":{"type":["string","null"],"enum":["weekly","two_weeks","four_weeks","monthly","three_months","six_months","annually"]},"isRecurringActive":{"type":"boolean"},"isLastOfMonth":{"type":"boolean"},"paymentInstructions":{"properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}}},"pricesIncludeVat":{"type":"boolean"},"paymentTerms":{"type":["integer","null"],"deprecated":true},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"productNumber":{"type":"string"},"productDescription":{"type":"string"},"productUuid":{"type":["string","null"],"format":"uuid"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"properties":{"amount":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"}}},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"quantity":{"type":["number","null"],"format":"float"},"unitUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityEmployeeUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityStartDate":{"type":["string","null"],"format":"date-time"},"relatedInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"originalInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"items":{"type":"array","items":{"properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["product"]},"productNumber":{"type":"string"},"productDescription":{"type":"string"},"productUuid":{"type":["string","null"],"format":"uuid"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"properties":{"amount":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"}}},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"quantity":{"type":["number","null"],"format":"float"},"unitUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityEmployeeUuid":{"type":["string","null"],"format":"uuid"},"employeeActivityStartDate":{"type":["string","null"],"format":"date-time"},"relatedInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"originalInvoice":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"number":{"type":"string"}},"type":["object","null"]},"unitCode":{"type":"string"}}}},"unitCode":{"type":"string"},"text":{"type":"string"}}}},"isTemplate":{"type":"boolean"},"recurringInvoiceNumber":{"type":"string"},"type":{"type":"string","enum":["recurring_invoice"]},"cashDiscounts":{"type":"array","items":{"properties":{"days":{"type":"number","format":"int64"},"percentage":{"type":"number","format":"float"}},"type":"object"},"maxItems":3,"minItems":0},"documentDiscount":{"properties":{"amount":{"type":"number","format":"float"},"percentage":{"type":"number","format":"float"}}}},"type":"object"}}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c1aa815d1c66d5a3cb1e1e633f0d50c1","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/bulk-actions":{"get":{"tags":["document-recurring-invoices"],"summary":"Get bulk actions","description":"Get recurring invoice bulk actions","operationId":"documents_list_bulk_actions_7","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"forList","in":"query","description":"filter list actions","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"type":"object","example":{"archive":"Archive","cancel":"Cancel","delete":"Delete"},"additionalProperties":{"description":"description of the action","type":"string"},"propertyNames":{"enum":["paymentAdd","archive","cancel","cancelPermanently","clone","collectInvoice","convertCNDN","convertCNI","convertDNI","convertIC","convertDN","convertT","convertCN","convert","convertTemplateToContractNote","convertTemplateToCreditNote","convertTemplateToDeliveryNote","convertTI","convertTemplateToQuote","convertToTemplate","createFinal","createInstalments","createPartial","createOnAccount","customerPortalUrl","delete","dissolve","downloadPdf","downloadPaymentConfirmation","dunningPrint","dunningSent","dunningDate","setDunningAmounts","edit","activity","info","email","markApproved","markDeclined","markSent","massDownloadZip","massDunningPrint","massDunningSent","massPrint","massSent","offsetCreditNotes","offsetInvoices","offsetReceipts","offsetSupplierCreditNotes","plannedMail","print","regeneratePdf","resync","restore","save","sendPaymentConfirmation","sendAbaNet","sendDeepSign","sign","signSupplierCreditNote","sync"]}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"133ba048cc8bd19d3ec3662e8ce76c5c","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/calculate":{"post":{"tags":["document-recurring-invoices"],"summary":"Calculate amounts of new document","description":"Calculates the amounts of a document for previewing without manipulating any resources","operationId":"documents_create_calculate_4","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Document to calculate","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/invoice-calculate.schema.json","description":"A Schema for calculating invoices in AbaNinja over API","type":"object","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json","description":"Schema for an invoice position item for the AbaNinja API","type":"object","properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"uuid":{"type":["string","null"],"format":"uuid","description":"UUID to use. Especially needed for updating positions without re-creating them"},"kind":{"const":"page_break"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"},"title":{"type":"string","maximum":255},"text":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"$defs":{"productPosition":{"type":"object","properties":{"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"subtitlePosition":{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},"textPosition":{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},"sectionTotalPosition":{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"pageBreakPosition":{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}},"required":["kind","productUuid","singlePrice","productDescription","title","text","items"]}},"documentDiscount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"title":"Calculation Resource","properties":{"total":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"type":"number","format":"float"},"roundingDifference":{"type":"number","format":"float"},"taxes":{"type":"array","items":{"properties":{"rate":{"type":"number","format":"float"},"value":{"type":"number","format":"float"},"name":{"type":"string"},"baseSum":{"type":"number","format":"float"}},"type":"object"}}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fecfb8eb5550302a187d837ed5637263","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/calculate":{"post":{"tags":["document-recurring-invoices"],"summary":"Calculate amounts of an existing document","description":"Calculates the amounts of an existing document for previewing without manipulating any resources","operationId":"documents_create_calculate_9","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Document to calculate","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/invoice-calculate.schema.json","description":"A Schema for calculating invoices in AbaNinja over API","type":"object","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-position.schema.json","description":"Schema for an invoice position item for the AbaNinja API","type":"object","properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"uuid":{"type":["string","null"],"format":"uuid","description":"UUID to use. Especially needed for updating positions without re-creating them"},"kind":{"const":"page_break"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"},"title":{"type":"string","maximum":255},"text":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"$defs":{"productPosition":{"type":"object","properties":{"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"subtitlePosition":{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},"textPosition":{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},"sectionTotalPosition":{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"pageBreakPosition":{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"properties":{"positionNumber":{"type":"integer","minimum":1,"description":"Defines order of the position inside position table. 1=first position, 2=second position. Must be a unique value otherwise unexpected sorting can occur"},"kind":{"const":"product"},"unitUuid":{"type":["null","string"],"format":"uuid","description":"UUID of Unit. Defaults to the unit of the product or C62 - Pieces. Takes precedence over \"unitCode\""},"unitCode":{"type":["null","string"],"description":"ISO Code for Unit. Default: unit of the product if given or C62 - Pieces","default":"C62","deprecated":true},"quantity":{"type":["number","null"],"default":1},"singlePrice":{"type":["number","null"],"description":"Defaults to the products price if given. Otherwise 0.00."},"discount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\""},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"]},"productUuid":false,"productNumber":{"type":["string","null"],"maxLength":255,"description":"The productNumber to set. If an existing products number is used, the actual product will be linked and its unit will be used. Takes precedence over \"unitUuid\" and \"unitCode\""},"productDescription":{"type":["string","null"],"description":"Required if there is no existing product with the given productNumber or the productNumber is not sent"}},"required":["kind","productUuid","singlePrice","productDescription"]},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}},"required":["kind","productUuid","singlePrice","productDescription","title","text","items"]}},"documentDiscount":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","description":"Discount Object Schema for AbaNinja Invoice Json","properties":{"percentage":{"type":"number","minimum":0},"amount":{"type":"number","minimum":0}},"required":["percentage","amount"]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"title":"Calculation Resource","properties":{"total":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"type":"number","format":"float"},"roundingDifference":{"type":"number","format":"float"},"taxes":{"type":"array","items":{"properties":{"rate":{"type":"number","format":"float"},"value":{"type":"number","format":"float"},"name":{"type":"string"},"baseSum":{"type":"number","format":"float"}},"type":"object"}}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"cf68adfa85b798bfac343c10366cdfa6","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/comments":{"get":{"tags":["document-recurring-invoices"],"summary":"Get comment collection","description":"fetches comments of a document via pagination","operationId":"documents_list_comments_6","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","schema":{"type":["integer","null"],"default":1,"minimum":1}},{"name":"perPage","in":"query","schema":{"type":["integer","null"],"minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"type":"array","items":{"title":"Document Comment Resource","properties":{"uuid":{"type":"string","format":"uuid"},"authorUserUuid":{"type":["string","null"],"format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"userName":{"type":"string"},"comment":{"type":"string"},"type":{"description":"Defines if it is only for internal use or if customers can see the comments","type":"string","enum":["intern","extern"]},"isDeletable":{"description":"if the current user can delete the comment","type":"boolean"}},"type":"object"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"properties":{"pagination":{"properties":{"currentPage":{"type":"integer","minimum":1},"firstPageUrl":{"type":["string","null"],"format":"uri"},"from":{"type":["integer","null"],"example":1},"lastPage":{"type":"integer"},"lastPageUrl":{"type":"string","format":"uri"},"nextPageUrl":{"type":["string","null"],"format":"uri"},"perPage":{"type":"integer","example":50},"previousPageUrl":{"type":["string","null"],"format":"uri"},"to":{"type":["integer","null"],"example":50},"totalItems":{"type":"integer"}},"type":"object"}},"type":"object"}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"95791f2a7ad52d23f3ed2ab62c57b60e","x-required-scopes":["customers"]},"post":{"tags":["document-recurring-invoices"],"summary":"Create comment","description":"creates a new comment on a document either for internal or external use","operationId":"documents_create_comments_6","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Comment to create","required":true,"content":{"application/json":{"schema":{"title":"Create Document Comment Request","required":["comment","type"],"properties":{"comment":{"type":"string","minLength":3},"type":{"description":"Defines if it is only for internal use or if customers can see the comments","type":"string","enum":["intern","extern"]}},"type":"object"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"title":"Document Comment Resource","properties":{"uuid":{"type":"string","format":"uuid"},"authorUserUuid":{"type":["string","null"],"format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"userName":{"type":"string"},"comment":{"type":"string"},"type":{"description":"Defines if it is only for internal use or if customers can see the comments","type":"string","enum":["intern","extern"]},"isDeletable":{"description":"if the current user can delete the comment","type":"boolean"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":201},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"599f3ba010f9f8bf972681da94b2f108","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/files":{"get":{"tags":["document-recurring-invoices"],"summary":"Get Files","description":"Returns a list of files","operationId":"documents_list_files_5","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","schema":{"type":["integer","null"],"default":1,"minimum":1}},{"name":"perPage","in":"query","schema":{"type":["integer","null"],"minimum":1}},{"name":"kind","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["invoice","invoice_attachment","invoice_payments","imported_invoice"]}}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"type":"array","items":{"title":"Document File Resource","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":["string","null"],"format":"date-time"},"archivedReason":{"type":["string","null"],"enum":["SENT_NEW_DOCUMENT","CANCELATION","DUNNING","PAYMENT_OFFSET","PAYMENT_CONFIRMED","PAYMENT_CANCELED","MANUAL_RECREATION"]},"fileSize":{"type":"integer","format":"int64"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["invoice","invoice_attachment","invoice_payments","imported_invoice"]}},"type":"object"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"properties":{"pagination":{"properties":{"currentPage":{"type":"integer","minimum":1},"firstPageUrl":{"type":["string","null"],"format":"uri"},"from":{"type":["integer","null"],"example":1},"lastPage":{"type":"integer"},"lastPageUrl":{"type":"string","format":"uri"},"nextPageUrl":{"type":["string","null"],"format":"uri"},"perPage":{"type":"integer","example":50},"previousPageUrl":{"type":["string","null"],"format":"uri"},"to":{"type":["integer","null"],"example":50},"totalItems":{"type":"integer"}},"type":"object"}},"type":"object"}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8b88fc431da9a5f07872f3afb1b1bf50","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{recurringInvoiceUuid}/actions":{"get":{"tags":["document-recurring-invoices"],"summary":"Get actions","description":"Get recurring invoice actions","operationId":"documents_list_actions_7","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"recurringInvoiceUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"forList","in":"query","description":"filter list actions","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"type":"object","example":{"archive":"Archive","cancel":"Cancel","delete":"Delete"},"additionalProperties":{"description":"description of the action","type":"string"},"propertyNames":{"enum":["paymentAdd","archive","cancel","cancelPermanently","clone","collectInvoice","convertCNDN","convertCNI","convertDNI","convertIC","convertDN","convertT","convertCN","convert","convertTemplateToContractNote","convertTemplateToCreditNote","convertTemplateToDeliveryNote","convertTI","convertTemplateToQuote","convertToTemplate","createFinal","createInstalments","createPartial","createOnAccount","customerPortalUrl","delete","dissolve","downloadPdf","downloadPaymentConfirmation","dunningPrint","dunningSent","dunningDate","setDunningAmounts","edit","activity","info","email","markApproved","markDeclined","markSent","massDownloadZip","massDunningPrint","massDunningSent","massPrint","massSent","offsetCreditNotes","offsetInvoices","offsetReceipts","offsetSupplierCreditNotes","plannedMail","print","regeneratePdf","resync","restore","save","sendPaymentConfirmation","sendAbaNet","sendDeepSign","sign","signSupplierCreditNote","sync"]}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fdd840f3cb592a50844bf53e4b749117","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/bulk-actions/archive":{"patch":{"tags":["document-recurring-invoices"],"summary":"Execute archive bulk action","description":"Marks the document as archived","operationId":"documents_bulk_archive_recurring_invoices","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"documentUuids":{"type":"array","items":{"type":"string","format":"uuid"}}},"type":"object"}}}},"responses":{"200":{"description":"Successfully bulk executed action","content":{"application/json":{"schema":{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e804352cea922c679e758b6ebd5c3eb4","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/actions/archive":{"patch":{"tags":["document-recurring-invoices"],"summary":"Execute archive action","description":"Archives the document","operationId":"documents_update_archive_7","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c02a264c5adb9724453b80cb3a0e12ce","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/actions/cancel":{"patch":{"tags":["document-recurring-invoices"],"summary":"Execute cancel action","description":"Cancels and moves the document back to draft","operationId":"documents_update_cancel_7","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"11c0e0f0d30e6229df83b9a5c3b996c0","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/actions/cancelPermanently":{"patch":{"tags":["document-recurring-invoices"],"summary":"Execute cancelPermanently action","description":"Cancels the document permanently. It cannot be edited afterwards","operationId":"documents_update_cancelPermanently_7","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c79a05cfbac16cdbdc437d1d74d705e8","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/actions/clone":{"patch":{"tags":["document-recurring-invoices"],"summary":"Execute clone action","description":"Creates a copy of the document","operationId":"documents_update_clone_6","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"properties":{"data":{"properties":{"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"id":{"type":"integer","deprecated":true},"uuid":{"type":"string","format":"uuid"},"isTemplate":{"type":"boolean"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c2ffafd519c664250d06da8b1abe706e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/actions/delete":{"patch":{"tags":["document-recurring-invoices"],"summary":"Execute delete action","description":"Deletes a document","operationId":"documents_update_delete_7","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"af6ca697e5a8093820541904b166988e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/actions/restore":{"patch":{"tags":["document-recurring-invoices"],"summary":"Execute restore action","description":"Restores an archived document","operationId":"documents_update_restore_7","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"properties":{"data":{"properties":{"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"id":{"type":"integer","deprecated":true},"uuid":{"type":"string","format":"uuid"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9d5b484083830f7cda89dfbf73923215","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/comments/{commentUuid}":{"get":{"tags":["document-recurring-invoices"],"summary":"Get comment","description":"fetches a single comment of a document","operationId":"documents_get_comments_6","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"title":"Document Comment Resource","properties":{"uuid":{"type":"string","format":"uuid"},"authorUserUuid":{"type":["string","null"],"format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"userName":{"type":"string"},"comment":{"type":"string"},"type":{"description":"Defines if it is only for internal use or if customers can see the comments","type":"string","enum":["intern","extern"]},"isDeletable":{"description":"if the current user can delete the comment","type":"boolean"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"a0661ee987e4eaa1afd23310f54dc9e5","x-required-scopes":["customers"]},"delete":{"tags":["document-recurring-invoices"],"summary":"Delete comment","description":"deletes a comment of a document, which cannot be restored anymore afterwards.","operationId":"documents_delete_comments_6","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"commentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Successful response"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"de243a9c105add749aaaf6ba9695a7e9","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/recurring-invoices/{documentUuid}/files/{fileUuid}":{"get":{"tags":["document-recurring-invoices"],"summary":"Get File","description":"Returns a file","operationId":"documents_get_files_5","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fileUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"title":"Document File Detail Resource","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":["string","null"],"format":"date-time"},"archivedReason":{"type":["string","null"],"enum":["SENT_NEW_DOCUMENT","CANCELATION","DUNNING","PAYMENT_OFFSET","PAYMENT_CONFIRMED","PAYMENT_CANCELED","MANUAL_RECREATION"]},"fileSize":{"type":"integer","format":"int64"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["invoice","invoice_attachment","invoice_payments","imported_invoice"]},"fileUrl":{"type":["string","null"],"format":"uri"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c0e4f093ef0d3d51a091ac1561f4ef3e","x-required-scopes":["customers"]}}},"components":{"securitySchemes":{"ApiToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Create tokens in Settings > API Token."}}}}