{"openapi":"3.1.0","info":{"title":"AbaNinja Documents API","version":"3.0.0","x-domain-id":"documents"},"servers":[{"url":"https://api.abaninja.ch","description":"The AbaNinja API server"}],"tags":[{"name":"document-common","description":"Manage documents","x-displayName":"Common"},{"name":"document-contract-note-settings","description":"Manage contract note settings","x-displayName":"Contract Note Settings"},{"name":"document-credit-note-settings","description":"Manage credit note settings","x-displayName":"Credit Note Settings"},{"name":"document-delivery-note-settings","description":"Manage delivery note settings","x-displayName":"Delivery Note Settings"},{"name":"document-invoice-settings","description":"Manage invoice settings","x-displayName":"Invoice Settings"},{"name":"document-receipt-settings","description":"Manage receipt settings","x-displayName":"Receipt Settings"},{"name":"document-quote-settings","description":"Manage quote settings","x-displayName":"Quote Settings"},{"name":"document-invoices","description":"Manage invoice documents","x-displayName":"Invoices"},{"name":"document-receipts","description":"Manage receipt documents","x-displayName":"Receipts"},{"name":"document-credit-notes","description":"Manage credit notes","x-displayName":"Credit Notes"},{"name":"document-recurring-invoices","description":"Manage recurring invoices","x-displayName":"Recurring Invoices"},{"name":"document-quotes","description":"Manage quote documents","x-displayName":"Quotes"},{"name":"document-contract-notes","description":"Manage contract notes","x-displayName":"Contract Notes"},{"name":"document-delivery-notes","description":"Manage delivery notes","x-displayName":"Delivery Notes"},{"name":"document-supplier-credit-notes","description":"Manage supplier credit notes","x-displayName":"Supplier Credit Notes"}],"security":[{"ApiToken":[]}],"paths":{"/accounts/{accountUuid}/documents/v2/contract-notes":{"get":{"tags":["document-contract-notes"],"summary":"Get contract notes","description":"Get contract notes","operationId":"documents_list_contract_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"is_template","in":"query","description":"get templates","required":false,"schema":{"type":"boolean","default":false}},{"name":"updatedSince","in":"query","description":"filter for updated items","required":false,"schema":{"anyOf":[{"type":["string","null"],"format":"date","default":null},{"type":["string","null"],"format":"date-time","default":null}]}},{"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Contract Note 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"]},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"contractNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"receiver":{"oneOf":[{"title":"Lite Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"},{"title":"Lite Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"contractNoteNumber":{"type":"string"},"isArchived":{"type":"boolean"},"isCancelled":{"type":"boolean"},"updatedAt":{"type":"string","format":"date-time"},"isTemplate":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9db0a2564b6304a1241d4736af44a54b","x-required-scopes":["customers"]},"post":{"tags":["document-contract-notes"],"summary":"Create contract note","description":"Create contract note","operationId":"documents_create_contract_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create contract notes","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/contract-note.schema.json","title":"Contract notes","description":"A Schema for creating contract notes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"contractNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"null"},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions-bank-account.schema.json","title":"Payment Instructions Bank Account","description":"Payment Instruction Schema for AbaNinja Invoice Json without reference","oneOf":[{"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})?$"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},{"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}$"}},"required":["qrIban"]},{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}],"$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})?$"}},"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}$"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}}}]},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice 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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["contractNoteDate","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleContractNote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"contractNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"null"},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions-bank-account.schema.json","title":"Payment Instructions Bank Account","description":"Payment Instruction Schema for AbaNinja Invoice Json without reference","oneOf":[{"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})?$"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},{"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}$"}},"required":["qrIban"]},{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}],"$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})?$"}},"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}$"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}}}]},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice 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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["contractNoteDate","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"201":{"description":"Contract note created","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Contract Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"contractNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"contractNoteNumber":{"type":"string"},"type":{"type":"string","enum":["invoice"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"202":{"description":"Asynchronous processing","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":202}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"5947827fb8b1020bac675f59b57ad23e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes":{"get":{"tags":["document-credit-notes"],"summary":"Get credit notes","description":"Get credit notes","operationId":"documents_list_credit_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"is_template","in":"query","description":"get templates","required":false,"schema":{"type":"boolean","default":false}},{"name":"updatedSince","in":"query","description":"filter for updated items","required":false,"schema":{"anyOf":[{"type":["string","null"],"format":"date","default":null},{"type":["string","null"],"format":"date-time","default":null}]}},{"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Credit Note 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},"creditNoteNumber":{"type":"string"},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"documentTotal":{"type":"number","format":"float"},"creditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"updatedAt":{"type":"string","format":"date-time"},"isArchived":{"type":"boolean"},"isCancelled":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"receiver":{"oneOf":[{"title":"Lite Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"},{"title":"Lite Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"}]},"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"]},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"title":{"type":["string","null"]},"isTemplate":{"type":"boolean"}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8d4bd89274dc8315dfa9083245f0589d","x-required-scopes":["customers"]},"post":{"tags":["document-credit-notes"],"summary":"Create credit note","description":"Create credit note","operationId":"documents_create_credit_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create credit notes","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/credit-note.schema.json","title":"Credit notes","description":"A Schema for creating credit notes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"creditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["creditNoteDate","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleCreditNote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"creditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["creditNoteDate","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"201":{"description":"Credit note created","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Credit Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"creditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"creditNoteNumber":{"type":"string"},"openAmount":{"type":"number","format":"float"},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"type":{"type":"string","enum":["credit_note"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"202":{"description":"Asynchronous processing","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":202}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"a90ef75e0081e26fcf3d71b054d22145","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes":{"get":{"tags":["document-delivery-notes"],"summary":"Get delivery notes","description":"Get delivery notes","operationId":"documents_list_delivery_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"is_template","in":"query","description":"get templates","required":false,"schema":{"type":"boolean","default":false}},{"name":"updatedSince","in":"query","description":"filter for updated items","required":false,"schema":{"anyOf":[{"type":["string","null"],"format":"date","default":null},{"type":["string","null"],"format":"date-time","default":null}]}},{"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Delivery Note 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},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"deliveryNoteDate":{"type":["string","null"],"format":"date"},"deliveryNoteNumber":{"type":"string"},"isArchived":{"type":"boolean"},"isCancelled":{"type":"boolean"},"receiver":{"oneOf":[{"title":"Lite Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"},{"title":"Lite Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"}]},"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"]},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"title":{"type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"},"isTemplate":{"type":"boolean"}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"1438e5773c6363e26cc28ba03ab1fc0b","x-required-scopes":["customers"]},"post":{"tags":["document-delivery-notes"],"summary":"Create delivery note","description":"Create delivery note","operationId":"documents_create_delivery_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create delivery notes","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/delivery-note.schema.json","title":"Delivery notes","description":"A Schema for creating delivery notes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"deliveryNoteDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"pricesIncludeVat":{"type":"boolean","description":"Controls if prices includes vat or not. If omitted the accounts default setting is used."},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},"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"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}}},"minItems":1},"documentDiscount":{"description":"Discount, which only will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["deliveryNoteDate","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleDeliveryNote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"deliveryNoteDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"pricesIncludeVat":{"type":"boolean","description":"Controls if prices includes vat or not. If omitted the accounts default setting is used."},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},"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"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}}},"minItems":1},"documentDiscount":{"description":"Discount, which only will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["deliveryNoteDate","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"201":{"description":"Delivery note created","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Delivery Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"deliveryNoteDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"deliveryNoteNumber":{"type":"string"},"type":{"type":"string","enum":["delivery_note"]},"documentDiscount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"202":{"description":"Asynchronous processing","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":202}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"7da60322aa209b143e5a26078a43b05c","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices":{"get":{"tags":["document-invoices"],"summary":"Get invoices","description":"Get invoices","operationId":"documents_list_invoices","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"is_template","in":"query","description":"get templates","required":false,"schema":{"type":"boolean","default":false}},{"name":"updatedSince","in":"query","description":"filter for updated items","required":false,"schema":{"anyOf":[{"type":["string","null"],"format":"date","default":null},{"type":["string","null"],"format":"date-time","default":null}]}},{"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"oneOf":[{"title":"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"]},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"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"]},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"invoiceDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"receiver":{"oneOf":[{"title":"Lite Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"},{"title":"Lite Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"isArchived":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isImported":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"updatedAt":{"type":"string","format":"date-time"},"isTemplate":{"type":"boolean"}},"type":"object"},{"title":"Imported 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"]},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"reference":{"type":"string"},"number":{"type":"string","deprecated":true},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"invoiceDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"receiver":{"oneOf":[{"oneOf":[{"title":"Lite Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"},{"title":"Lite Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"}]},{"type":"null"}]},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"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"]},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"balance":{"type":"number","format":"float","deprecated":true},"openAmount":{"type":"number","format":"float"},"archived":{"type":"boolean","deprecated":true},"isArchived":{"type":"boolean"},"cancelled":{"type":"boolean","deprecated":true},"isCancelled":{"type":"boolean"},"isImported":{"type":"boolean"},"isTemplate":{"type":"boolean"},"cashDiscounts":{"type":"array","items":{"properties":{"days":{"type":"number","format":"int64"},"percentage":{"type":"number","format":"float"}},"type":"object"},"maxItems":3,"minItems":0},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}]}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fe69a694d64645f98325550841e6e705","x-required-scopes":["customers"]},"post":{"tags":["document-invoices"],"summary":"Create invoice","description":"Create invoices","operationId":"documents_create_invoices","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create 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/invoice.schema.json","title":"Invoices","description":"A Schema for creating invoices in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice includes vat or not"},"isVariantInvoice":{"type":"boolean","default":false},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["invoiceDate","paymentInstructions","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleInvoice":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice includes vat or not"},"isVariantInvoice":{"type":"boolean","default":false},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["invoiceDate","paymentInstructions","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"201":{"description":"Invoice created","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"isVariantInvoice":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"isCollectiveBill":{"type":"boolean"},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"bookedAt":{"type":["string","null"],"format":"date-time"},"syncedAt":{"type":["string","null"],"format":"date-time"},"syncMessage":{"type":["string","null"]},"syncStatus":{"type":["string","null"],"enum":["OK","FAILED","INCORRECT_STATE","GENERAL_ERROR","CONNECTION_ERROR","BLOCKED_PREVIOUS_NOT_SYNCED"]},"cashDiscounts":{"type":"array","items":{"properties":{"days":{"type":"number","format":"int64"},"percentage":{"type":"number","format":"float"}},"type":"object"},"maxItems":3,"minItems":0},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"202":{"description":"Asynchronous processing","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":202}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d5df668659a1d982c4a0ef984338993b","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/queue":{"get":{"tags":["document-common"],"summary":"Get queues","description":"Get the document-mass-import queues","operationId":"documents_list_queue","parameters":[{"name":"accountUuid","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":"type","in":"query","schema":{"type":["string","null"],"enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"array","items":{"title":"Mass Document Import Queue Collection Resource","description":"Describes the status of an document mass import, used in collections","properties":{"uuid":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"total":{"type":"integer"},"successful":{"type":"integer"},"failed":{"type":"integer"},"status":{"type":"string","enum":["pending","failed","finished","aborted"]}},"type":"object"}},"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"}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers","https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"1a624e567dbd96d00cf952077f416109","x-required-scopes":["customers","suppliers"]}},"/accounts/{accountUuid}/documents/v2/quotes":{"get":{"tags":["document-quotes"],"summary":"Get quotes","description":"Get quotes","operationId":"documents_list_quotes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"is_template","in":"query","description":"get templates","required":false,"schema":{"type":"boolean","default":false}},{"name":"updatedSince","in":"query","description":"filter for updated items","required":false,"schema":{"anyOf":[{"type":["string","null"],"format":"date","default":null},{"type":["string","null"],"format":"date-time","default":null}]}},{"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Quote 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"]},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"receiver":{"oneOf":[{"title":"Lite Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"},{"title":"Lite Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"isArchived":{"type":"boolean"},"isCancelled":{"type":"boolean"},"quoteDate":{"type":["string","null"],"format":"date"},"validUntilDate":{"type":["string","null"],"format":"date"},"quoteNumber":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"isTemplate":{"type":"boolean"}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"831a23e436a51206a09a1cbe95341724","x-required-scopes":["customers"]},"post":{"tags":["document-quotes"],"summary":"Create quote","description":"Create quotes","operationId":"documents_create_quotes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create quotes","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/quote.schema.json","title":"Quotes","description":"A Schema for creating quotes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"quoteDate":{"type":"string","format":"date"},"validUntilDate":{"type":["null","string"],"format":"date"},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"signaturePage":{"type":"boolean","default":false},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified",null]},"signees":{"description":"if set at least one of each signee type (receiver, sender) is required","type":["array","null"],"maxItems":2,"minItems":2,"items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-signee.schema.json","title":"Signee","description":"Signee for documents","type":"object","oneOf":[{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}],"properties":{"type":{"type":"string","enum":["receiver","sender"]},"signOrder":{"description":"Order of the signature","type":"number","format":"int64"}},"required":["type"],"$defs":{"receiverSignee":{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},"senderSignee":{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}}}}},"required":["quoteDate","documentTotal","pricesIncludeVat","positions"],"if":{"anyOf":[{"properties":{"signaturePage":{"const":true}},"required":["signaturePage"]},{"properties":{"signees":{"type":"array"}},"required":["signees"]}]},"then":{"properties":{"signees":{"type":"array"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["signees","receiver"]},"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleQuote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"quoteDate":{"type":"string","format":"date"},"validUntilDate":{"type":["null","string"],"format":"date"},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"signaturePage":{"type":"boolean","default":false},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified",null]},"signees":{"description":"if set at least one of each signee type (receiver, sender) is required","type":["array","null"],"maxItems":2,"minItems":2,"items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-signee.schema.json","title":"Signee","description":"Signee for documents","type":"object","oneOf":[{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}],"properties":{"type":{"type":"string","enum":["receiver","sender"]},"signOrder":{"description":"Order of the signature","type":"number","format":"int64"}},"required":["type"],"$defs":{"receiverSignee":{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},"senderSignee":{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}}}}},"required":["quoteDate","documentTotal","pricesIncludeVat","positions"],"if":{"anyOf":[{"properties":{"signaturePage":{"const":true}},"required":["signaturePage"]},{"properties":{"signees":{"type":"array"}},"required":["signees"]}]},"then":{"properties":{"signees":{"type":"array"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["signees","receiver"]},"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"201":{"description":"Quote created","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Quote 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"quoteDate":{"type":["string","null"],"format":"date"},"validUntilDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"quoteNumber":{"type":"string"},"type":{"type":"string","enum":["quote"]},"signaturePage":{"type":"boolean"},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified"]},"signees":{"type":["array","null"],"items":{"title":"Signee Resource","properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["receiver","sender"]},"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"userUuid":{"type":["string","null"],"format":"uuid"},"signOrder":{"type":"number","format":"int64"},"companyName":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"completedAt":{"type":["string","null"],"format":"date-time"},"signStatus":{"type":"string","enum":["pending","signed","rejected"]},"comment":{"type":["string","null"]}},"type":"object"}},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"202":{"description":"Asynchronous processing","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":202}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"99bbefa05498a3318792b040a26f923d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/receipts":{"get":{"tags":["document-receipts"],"summary":"Get receipts","description":"Get receipts","operationId":"documents_list_receipts","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"updatedSince","in":"query","description":"filter for updated items","required":false,"schema":{"anyOf":[{"type":["string","null"],"format":"date","default":null},{"type":["string","null"],"format":"date-time","default":null}]}},{"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"oneOf":[{"title":"Receipt Collection Item Resource","description":"Resource used in collections","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"]},"number":{"type":"string","deprecated":true},"receiptNumber":{"type":"string"},"reference":{"type":"string"},"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"documentTotal":{"type":"number","format":"float"},"isArchived":{"type":"boolean"},"archived":{"type":"boolean","deprecated":true},"isCancelled":{"type":"boolean"},"cancelled":{"type":"boolean","deprecated":true},"openAmount":{"type":"number","format":"float"},"balance":{"type":"number","format":"float","deprecated":true},"isTemplate":{"type":"boolean"}},"type":"object"}]}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"167ed3bd2bcd729a3763b621ccd898b4","x-required-scopes":["suppliers"]}},"/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":{"anyOf":[{"type":["string","null"],"format":"date","default":null},{"type":["string","null"],"format":"date-time","default":null}]}},{"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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":{"oneOf":[{"title":"Lite Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"},{"title":"Lite Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"}]},"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"}},"required":["receiver","startDate","frequency","paymentInstructions","documentTotal","pricesIncludeVat","positions"]},"minItems":1}},"required":["documents"],"$defs":{"singleRecurringInvoice":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"}},"required":["receiver","startDate","frequency","paymentInstructions","documentTotal","pricesIncludeVat","positions"]}}}}}},"responses":{"201":{"description":"Recurring invoice created","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"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":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"paymentTerms":{"type":["integer","null"],"deprecated":true},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"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":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"202":{"description":"Asynchronous processing","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":202}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ccdc56d8add840f09795e78a859d1943","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/statistics":{"get":{"tags":["document-common"],"summary":"Get document statistics","description":"Get statistics of saved documents and their location","operationId":"documents_list_statistics","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Document statistics resource","properties":{"total":{"type":"number","format":"int64","minimum":0},"deepBox":{"type":"number","format":"int64","minimum":0},"s3":{"type":"number","format":"int64","minimum":0}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/profile","https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"81e8bf43b3f06636d92f5cd48689c497","x-required-scopes":["profile","settings"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes":{"get":{"tags":["document-supplier-credit-notes"],"summary":"Get supplier credit notes","description":"Get supplier credit notes","operationId":"documents_list_supplier_credit_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"updatedSince","in":"query","description":"filter for updated items","required":false,"schema":{"anyOf":[{"type":["string","null"],"format":"date","default":null},{"type":["string","null"],"format":"date-time","default":null}]}},{"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Supplier Credit Note Collection Item Resource","description":"Resource used in collections","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},"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"]},"receiver":{"oneOf":[{"title":"Lite Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"},{"title":"Lite Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"}]},"supplierCreditNoteNumber":{"type":"string"},"supplierCreditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"documentTotal":{"type":"number","format":"float"}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"7af80e2db1037132be0f8b1612e3dade","x-required-scopes":["suppliers"]},"post":{"tags":["document-supplier-credit-notes"],"summary":"Create supplier credit notes","description":"Create supplier credit notes","operationId":"documents_create_supplier_credit_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create supplier credit notes","required":true,"content":{"multipart/form-data":{"schema":{"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/import-supplier-credit-note-multipart.schema.json","description":"A Schema for importing supplier credit note pdfs in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"documentFile":{"type":"string","description":"The file name when uploading the document as multipart request"},"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"supplierCreditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"reference":{"type":"string"},"documentTotal":{"type":"number","exclusiveMinimum":0,"description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"wasTaxIncluded":{"type":"boolean","default":false,"description":"Controls whether tax was included during supplier credit note invoicing"}},"required":["currencyCode","receiver","supplierCreditNoteDate","dueDate","documentTotal","taxPositions"]}},"required":["documentFile"]},"minItems":1}},"required":["documents"],"$defs":{"singleDocument":{"type":"object","properties":{"documentFile":{"type":"string","description":"The file name when uploading the document as multipart request"},"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"supplierCreditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"reference":{"type":"string"},"documentTotal":{"type":"number","exclusiveMinimum":0,"description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"wasTaxIncluded":{"type":"boolean","default":false,"description":"Controls whether tax was included during supplier credit note invoicing"}},"required":["currencyCode","receiver","supplierCreditNoteDate","dueDate","documentTotal","taxPositions"]}},"required":["documentFile"]}}},"files":{"type":"array","items":{"type":"string","format":"binary"},"maximum":5,"minimum":1}},"type":"object"}},"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/import-supplier-credit-note.schema.json","description":"A Schema for importing supplier credit note pdfs in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"documentUrl":{"type":"string","format":"uri","description":"The url where to download the document file to import"},"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"supplierCreditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"reference":{"type":"string"},"documentTotal":{"type":"number","exclusiveMinimum":0,"description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"wasTaxIncluded":{"type":"boolean","default":false,"description":"Controls whether tax was included during supplier credit note invoicing"}},"required":["currencyCode","receiver","supplierCreditNoteDate","dueDate","documentTotal","taxPositions"]}},"required":["documentUrl"]},"minItems":1}},"required":["documents"],"$defs":{"singleDocument":{"type":"object","properties":{"documentUrl":{"type":"string","format":"uri","description":"The url where to download the document file to import"},"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"supplierCreditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"reference":{"type":"string"},"documentTotal":{"type":"number","exclusiveMinimum":0,"description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"wasTaxIncluded":{"type":"boolean","default":false,"description":"Controls whether tax was included during supplier credit note invoicing"}},"required":["currencyCode","receiver","supplierCreditNoteDate","dueDate","documentTotal","taxPositions"]}},"required":["documentUrl"]}}}}}},"responses":{"201":{"description":"Supplier credit note created","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Supplier Credit Note 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},"receiver":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"supplierCreditNoteNumber":{"type":"string"},"supplierCreditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Receipt Tax Position Resource","properties":{"id":{"type":"integer","format":"int64"},"accountNumber":{"type":"integer","format":"int64"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float"},"taxRateUuid":{"type":["string","null"],"format":"uuid"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"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"]},"type":{"type":"string","enum":["supplier_credit_note"]},"wasTaxIncluded":{"type":"boolean"},"wasRecognitionLimitReached":{"type":"boolean"}},"type":"object"}}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"202":{"description":"Asynchronous processing","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":202}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"1be3ab7dd3d00097957a7711dc3471e8","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{contractNoteUuid}":{"get":{"tags":["document-contract-notes"],"summary":"Get contract note","description":"Get a single contract note","operationId":"documents_get_contract_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"contractNoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Contract Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"contractNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"contractNoteNumber":{"type":"string"},"type":{"type":"string","enum":["invoice"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8d0777ed212d601681f61034a2a959dc","x-required-scopes":["customers"]},"patch":{"tags":["document-contract-notes"],"summary":"Update contract note","description":"Update contract note","operationId":"documents_update_contract_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"contractNoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update contract note","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/contract-note.schema.json","title":"Contract notes","description":"A Schema for creating contract notes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"contractNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"null"},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions-bank-account.schema.json","title":"Payment Instructions Bank Account","description":"Payment Instruction Schema for AbaNinja Invoice Json without reference","oneOf":[{"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})?$"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},{"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}$"}},"required":["qrIban"]},{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}],"$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})?$"}},"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}$"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}}}]},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice 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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["contractNoteDate","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleContractNote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"contractNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"null"},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions-bank-account.schema.json","title":"Payment Instructions Bank Account","description":"Payment Instruction Schema for AbaNinja Invoice Json without reference","oneOf":[{"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})?$"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},{"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}$"}},"required":["qrIban"]},{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}],"$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})?$"}},"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}$"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}}}]},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice 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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["contractNoteDate","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"200":{"description":"Contract note updated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Contract Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"contractNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"contractNoteNumber":{"type":"string"},"type":{"type":"string","enum":["invoice"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"915f78a8d733cdf8ee22d0d97917f50f","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/bulk-actions":{"get":{"tags":["document-contract-notes"],"summary":"Get bulk actions","description":"Get contract note bulk actions","operationId":"documents_list_bulk_actions","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"b8875754b8467ffddf56c709dcb4104f","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/calculate":{"post":{"tags":["document-contract-notes"],"summary":"Calculate amounts of new document","description":"Calculates the amounts of a document for previewing without manipulating any resources","operationId":"documents_create_calculate_2","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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Contract Note Calculation Resource","type":"object","allOf":[{"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"},{"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"}},"totalInvoicedAmount":{"description":"sum of all related invoices of this contract note","type":["number","null"],"format":"float"}},"type":"object"}]},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"851ab113a60c0ead90b00ab863698423","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{creditNoteUuid}":{"get":{"tags":["document-credit-notes"],"summary":"Get credit note","description":"Get a single credit note","operationId":"documents_get_credit_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"creditNoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Credit Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"creditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"creditNoteNumber":{"type":"string"},"openAmount":{"type":"number","format":"float"},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"type":{"type":"string","enum":["credit_note"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"0ee21eb03b479538feec66f12d63a72f","x-required-scopes":["customers"]},"patch":{"tags":["document-credit-notes"],"summary":"Update credit note","description":"Update credit note","operationId":"documents_update_credit_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"creditNoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update credit note","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/credit-note.schema.json","title":"Credit notes","description":"A Schema for creating credit notes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"creditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["creditNoteDate","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleCreditNote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"creditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["creditNoteDate","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"200":{"description":"Credit note updated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Credit Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"creditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"creditNoteNumber":{"type":"string"},"openAmount":{"type":"number","format":"float"},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"type":{"type":"string","enum":["credit_note"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"2d75c52735462a49f0d1cb27159bb31d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/bulk-actions":{"get":{"tags":["document-credit-notes"],"summary":"Get bulk actions","description":"Get credit note bulk actions","operationId":"documents_list_bulk_actions_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e2333cc358a4a64bc96f2e38fbafdacc","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/calculate":{"post":{"tags":["document-credit-notes"],"summary":"Calculate amounts of new document","description":"Calculates the amounts of a document for previewing without manipulating any resources","operationId":"documents_create_calculate","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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"74a0f0fee1f36d628fac8d546f2287d5","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{deliveryNoteUuid}":{"get":{"tags":["document-delivery-notes"],"summary":"Get delivery note","description":"Get a single delivery note","operationId":"documents_get_delivery_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deliveryNoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Delivery Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"deliveryNoteDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"deliveryNoteNumber":{"type":"string"},"type":{"type":"string","enum":["delivery_note"]},"documentDiscount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"1ac7e32b908780789b3c8908825959ca","x-required-scopes":["customers"]},"patch":{"tags":["document-delivery-notes"],"summary":"Update delivery note","description":"Update delivery note","operationId":"documents_update_delivery_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deliveryNoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update delivery note","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/delivery-note.schema.json","title":"Delivery notes","description":"A Schema for creating delivery notes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"deliveryNoteDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"pricesIncludeVat":{"type":"boolean","description":"Controls if prices includes vat or not. If omitted the accounts default setting is used."},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},"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"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}}},"minItems":1},"documentDiscount":{"description":"Discount, which only will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["deliveryNoteDate","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleDeliveryNote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"deliveryNoteDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"pricesIncludeVat":{"type":"boolean","description":"Controls if prices includes vat or not. If omitted the accounts default setting is used."},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},"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"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}}},"minItems":1},"documentDiscount":{"description":"Discount, which only will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["deliveryNoteDate","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"200":{"description":"Delivery note updated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Delivery Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"deliveryNoteDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"deliveryNoteNumber":{"type":"string"},"type":{"type":"string","enum":["delivery_note"]},"documentDiscount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"892eb85d36362f2cd12fd629be1d6f60","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions":{"get":{"tags":["document-delivery-notes"],"summary":"Get bulk actions","description":"Get delivery note bulk actions","operationId":"documents_list_bulk_actions_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e123f8667ec9f086949ded528e403d7b","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{invoiceUuid}":{"get":{"tags":["document-invoices"],"summary":"Get invoice","description":"Get a single invoice","operationId":"documents_get_invoices","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"oneOf":[{"title":"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"isVariantInvoice":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"isCollectiveBill":{"type":"boolean"},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"bookedAt":{"type":["string","null"],"format":"date-time"},"syncedAt":{"type":["string","null"],"format":"date-time"},"syncMessage":{"type":["string","null"]},"syncStatus":{"type":["string","null"],"enum":["OK","FAILED","INCORRECT_STATE","GENERAL_ERROR","CONNECTION_ERROR","BLOCKED_PREVIOUS_NOT_SYNCED"]},"cashDiscounts":{"type":"array","items":{"properties":{"days":{"type":"number","format":"int64"},"percentage":{"type":"number","format":"float"}},"type":"object"},"maxItems":3,"minItems":0},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Imported Invoice Resource","properties":{"documentUrl":{"type":["string","null"],"format":"uri"},"documentData":{"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},"reference":{"type":"string"},"publicNotes":{"type":["string","null"]},"receiver":{"oneOf":[{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},{"type":"null"}]},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"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"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Tax Position Resource","properties":{"uuid":{"type":"string","format":"uuid"},"id":{"type":"number","format":"int64","deprecated":true},"accountNumber":{"type":["number","null"],"format":"int64","deprecated":true},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float","deprecated":true},"vatUuid":{"type":["string","null"],"format":"uuid","deprecated":true},"taxRateUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"wasRecognitionLimitReached":{"type":"boolean"},"hasCustomPaymentSlip":{"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)","type":"boolean"}},"type":"object"}},"type":"object"}]}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"555ecc2a277c4d6831a7d652d2b19bc9","x-required-scopes":["customers"]},"patch":{"tags":["document-invoices"],"summary":"Update invoice","description":"Update invoice","operationId":"documents_update_invoices","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update 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/invoice.schema.json","title":"Invoices","description":"A Schema for creating invoices in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice includes vat or not"},"isVariantInvoice":{"type":"boolean","default":false},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["invoiceDate","paymentInstructions","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleInvoice":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice includes vat or not"},"isVariantInvoice":{"type":"boolean","default":false},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["invoiceDate","paymentInstructions","documentTotal","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"200":{"description":"Invoice updated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"oneOf":[{"title":"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"isVariantInvoice":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"isCollectiveBill":{"type":"boolean"},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"bookedAt":{"type":["string","null"],"format":"date-time"},"syncedAt":{"type":["string","null"],"format":"date-time"},"syncMessage":{"type":["string","null"]},"syncStatus":{"type":["string","null"],"enum":["OK","FAILED","INCORRECT_STATE","GENERAL_ERROR","CONNECTION_ERROR","BLOCKED_PREVIOUS_NOT_SYNCED"]},"cashDiscounts":{"type":"array","items":{"properties":{"days":{"type":"number","format":"int64"},"percentage":{"type":"number","format":"float"}},"type":"object"},"maxItems":3,"minItems":0},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Imported Invoice Resource","properties":{"documentUrl":{"type":["string","null"],"format":"uri"},"documentData":{"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},"reference":{"type":"string"},"publicNotes":{"type":["string","null"]},"receiver":{"oneOf":[{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},{"type":"null"}]},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"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"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Tax Position Resource","properties":{"uuid":{"type":"string","format":"uuid"},"id":{"type":"number","format":"int64","deprecated":true},"accountNumber":{"type":["number","null"],"format":"int64","deprecated":true},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float","deprecated":true},"vatUuid":{"type":["string","null"],"format":"uuid","deprecated":true},"taxRateUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"wasRecognitionLimitReached":{"type":"boolean"},"hasCustomPaymentSlip":{"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)","type":"boolean"}},"type":"object"}},"type":"object"}]}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"842b28b467741ee232dd1604dc14c3ae","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions":{"get":{"tags":["document-invoices"],"summary":"Get bulk actions","description":"Get invoice bulk actions","operationId":"documents_list_bulk_actions_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"664ce4e360c1ffcaac5a88b94d3647ae","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/calculate":{"post":{"tags":["document-invoices"],"summary":"Calculate amounts of new document","description":"Calculates the amounts of a document for previewing without manipulating any resources","operationId":"documents_create_calculate_3","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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"da911941ed564e0285e8375bdd8de007","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/import":{"post":{"tags":["document-invoices"],"summary":"Import invoice","description":"Import invoice from PDF","operationId":"documents_create_import","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Import invoices","required":true,"content":{"multipart/form-data":{"schema":{"properties":{"data":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/import-invoice-multipart.schema.json","description":"A Schema for importing invoice pdfs in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"documentFile":{"type":"string","description":"The file name when uploading the document as multipart request"},"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"invoiceNumber":{"type":["null","string"]},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"reference":{"type":["string"],"maxLength":255},"publicNotes":{"type":["null","string"]}},"required":["currencyCode","receiver","invoiceDate","dueDate","paymentInstructions","documentTotal","taxPositions"]}},"required":["documentFile"]},"minItems":1}},"required":["documents"],"$defs":{"singleDocument":{"type":"object","properties":{"documentFile":{"type":"string","description":"The file name when uploading the document as multipart request"},"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"invoiceNumber":{"type":["null","string"]},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"reference":{"type":["string"],"maxLength":255},"publicNotes":{"type":["null","string"]}},"required":["currencyCode","receiver","invoiceDate","dueDate","paymentInstructions","documentTotal","taxPositions"]}},"required":["documentFile"]}}},"files":{"type":"array","items":{"type":"string","format":"binary"},"maximum":5,"minimum":1}},"type":"object"}},"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/import-invoice.schema.json","description":"A Schema for importing invoice pdfs in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"documentUrl":{"type":"string","format":"uri","description":"The url where to download the document file to import"},"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"invoiceNumber":{"type":["null","string"]},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"reference":{"type":["string"],"maxLength":255},"publicNotes":{"type":["null","string"]},"hasCustomPaymentSlip":{"type":"boolean","default":false,"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)"}},"required":["currencyCode","receiver","invoiceDate","dueDate","paymentInstructions","documentTotal","taxPositions"]}},"required":["documentUrl"]},"minItems":1}},"required":["documents"],"$defs":{"singleDocument":{"type":"object","properties":{"documentUrl":{"type":"string","format":"uri","description":"The url where to download the document file to import"},"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"invoiceNumber":{"type":["null","string"]},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"reference":{"type":["string"],"maxLength":255},"publicNotes":{"type":["null","string"]},"hasCustomPaymentSlip":{"type":"boolean","default":false,"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)"}},"required":["currencyCode","receiver","invoiceDate","dueDate","paymentInstructions","documentTotal","taxPositions"]}},"required":["documentUrl"]}}}}}},"responses":{"201":{"description":"Invoice created","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Imported Invoice Resource","properties":{"documentUrl":{"type":["string","null"],"format":"uri"},"documentData":{"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},"reference":{"type":"string"},"publicNotes":{"type":["string","null"]},"receiver":{"oneOf":[{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},{"type":"null"}]},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"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"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Tax Position Resource","properties":{"uuid":{"type":"string","format":"uuid"},"id":{"type":"number","format":"int64","deprecated":true},"accountNumber":{"type":["number","null"],"format":"int64","deprecated":true},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float","deprecated":true},"vatUuid":{"type":["string","null"],"format":"uuid","deprecated":true},"taxRateUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"wasRecognitionLimitReached":{"type":"boolean"},"hasCustomPaymentSlip":{"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)","type":"boolean"}},"type":"object"}},"type":"object"}}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"202":{"description":"Asynchronous processing","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":202}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e9b69e6c492f9b24d798b7c5ef0f86fc","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/queue/{queueUuid}":{"get":{"tags":["document-common"],"summary":"Get queue status","description":"Get the status of the document-mass-import queue","operationId":"documents_get_queue","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"queueUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Mass Document Import Queue Resource","description":"Describes the status of an document mass import","properties":{"uuid":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"total":{"type":"integer"},"successful":{"type":"integer"},"failed":{"type":"integer"},"status":{"type":"string","enum":["pending","failed","finished","aborted"]},"details":{"type":["array","null"],"items":{"title":"Mass Document Json Import Detail Resource","properties":{"status":{"type":"string","enum":["pending","failed","finished","aborted"]},"message":{"type":["string","null"]},"invoice":{"oneOf":[{"title":"Imported Invoice Resource","properties":{"documentUrl":{"type":["string","null"],"format":"uri"},"documentData":{"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},"reference":{"type":"string"},"publicNotes":{"type":["string","null"]},"receiver":{"oneOf":[{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},{"type":"null"}]},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"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"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Tax Position Resource","properties":{"uuid":{"type":"string","format":"uuid"},"id":{"type":"number","format":"int64","deprecated":true},"accountNumber":{"type":["number","null"],"format":"int64","deprecated":true},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float","deprecated":true},"vatUuid":{"type":["string","null"],"format":"uuid","deprecated":true},"taxRateUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"wasRecognitionLimitReached":{"type":"boolean"},"hasCustomPaymentSlip":{"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)","type":"boolean"}},"type":"object"}},"type":"object"},{"title":"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"isVariantInvoice":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"isCollectiveBill":{"type":"boolean"},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"bookedAt":{"type":["string","null"],"format":"date-time"},"syncedAt":{"type":["string","null"],"format":"date-time"},"syncMessage":{"type":["string","null"]},"syncStatus":{"type":["string","null"],"enum":["OK","FAILED","INCORRECT_STATE","GENERAL_ERROR","CONNECTION_ERROR","BLOCKED_PREVIOUS_NOT_SYNCED"]},"cashDiscounts":{"type":"array","items":{"properties":{"days":{"type":"number","format":"int64"},"percentage":{"type":"number","format":"float"}},"type":"object"},"maxItems":3,"minItems":0},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"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":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"paymentTerms":{"type":["integer","null"],"deprecated":true},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"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":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Credit Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"creditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"creditNoteNumber":{"type":"string"},"openAmount":{"type":"number","format":"float"},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"type":{"type":"string","enum":["credit_note"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Quote 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"quoteDate":{"type":["string","null"],"format":"date"},"validUntilDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"quoteNumber":{"type":"string"},"type":{"type":"string","enum":["quote"]},"signaturePage":{"type":"boolean"},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified"]},"signees":{"type":["array","null"],"items":{"title":"Signee Resource","properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["receiver","sender"]},"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"userUuid":{"type":["string","null"],"format":"uuid"},"signOrder":{"type":"number","format":"int64"},"companyName":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"completedAt":{"type":["string","null"],"format":"date-time"},"signStatus":{"type":"string","enum":["pending","signed","rejected"]},"comment":{"type":["string","null"]}},"type":"object"}},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Delivery Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"deliveryNoteDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"deliveryNoteNumber":{"type":"string"},"type":{"type":"string","enum":["delivery_note"]},"documentDiscount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Contract Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"contractNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"contractNoteNumber":{"type":"string"},"type":{"type":"string","enum":["invoice"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Supplier Credit Note 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},"receiver":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"supplierCreditNoteNumber":{"type":"string"},"supplierCreditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Receipt Tax Position Resource","properties":{"id":{"type":"integer","format":"int64"},"accountNumber":{"type":"integer","format":"int64"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float"},"taxRateUuid":{"type":["string","null"],"format":"uuid"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"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"]},"type":{"type":"string","enum":["supplier_credit_note"]},"wasTaxIncluded":{"type":"boolean"},"wasRecognitionLimitReached":{"type":"boolean"}},"type":"object"},{"type":"null"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers","https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"87b422a0b55aea120a99abab47af38ef","x-required-scopes":["customers","suppliers"]},"delete":{"tags":["document-common"],"summary":"Delete queue","description":"Delete the document-mass-import queue. Can only be done as long as the queue is aborted, finished or failed.","operationId":"documents_delete_queue","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"queueUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Successful response"},"400":{"description":"Bad Request, for instance when queue is still pending","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers","https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"a4d754a6c2d7f83f9014ccef4dec070a","x-required-scopes":["customers","suppliers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{quoteUuid}":{"get":{"tags":["document-quotes"],"summary":"Get quote","description":"Get a single quote","operationId":"documents_get_quotes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"quoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Quote 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"quoteDate":{"type":["string","null"],"format":"date"},"validUntilDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"quoteNumber":{"type":"string"},"type":{"type":"string","enum":["quote"]},"signaturePage":{"type":"boolean"},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified"]},"signees":{"type":["array","null"],"items":{"title":"Signee Resource","properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["receiver","sender"]},"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"userUuid":{"type":["string","null"],"format":"uuid"},"signOrder":{"type":"number","format":"int64"},"companyName":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"completedAt":{"type":["string","null"],"format":"date-time"},"signStatus":{"type":"string","enum":["pending","signed","rejected"]},"comment":{"type":["string","null"]}},"type":"object"}},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8a2a61a8436b9ba0d7949a11cc335c1c","x-required-scopes":["customers"]},"patch":{"tags":["document-quotes"],"summary":"Update quote","description":"Update quote","operationId":"documents_update_quotes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"quoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update quote","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/quote.schema.json","title":"Quotes","description":"A Schema for creating quotes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"quoteDate":{"type":"string","format":"date"},"validUntilDate":{"type":["null","string"],"format":"date"},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"signaturePage":{"type":"boolean","default":false},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified",null]},"signees":{"description":"if set at least one of each signee type (receiver, sender) is required","type":["array","null"],"maxItems":2,"minItems":2,"items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-signee.schema.json","title":"Signee","description":"Signee for documents","type":"object","oneOf":[{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}],"properties":{"type":{"type":"string","enum":["receiver","sender"]},"signOrder":{"description":"Order of the signature","type":"number","format":"int64"}},"required":["type"],"$defs":{"receiverSignee":{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},"senderSignee":{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}}}}},"required":["quoteDate","documentTotal","pricesIncludeVat","positions"],"if":{"anyOf":[{"properties":{"signaturePage":{"const":true}},"required":["signaturePage"]},{"properties":{"signees":{"type":"array"}},"required":["signees"]}]},"then":{"properties":{"signees":{"type":"array"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["signees","receiver"]},"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1}},"required":["documents"],"$defs":{"singleQuote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"quoteDate":{"type":"string","format":"date"},"validUntilDate":{"type":["null","string"],"format":"date"},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"signaturePage":{"type":"boolean","default":false},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified",null]},"signees":{"description":"if set at least one of each signee type (receiver, sender) is required","type":["array","null"],"maxItems":2,"minItems":2,"items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-signee.schema.json","title":"Signee","description":"Signee for documents","type":"object","oneOf":[{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}],"properties":{"type":{"type":"string","enum":["receiver","sender"]},"signOrder":{"description":"Order of the signature","type":"number","format":"int64"}},"required":["type"],"$defs":{"receiverSignee":{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},"senderSignee":{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}}}}},"required":["quoteDate","documentTotal","pricesIncludeVat","positions"],"if":{"anyOf":[{"properties":{"signaturePage":{"const":true}},"required":["signaturePage"]},{"properties":{"signees":{"type":"array"}},"required":["signees"]}]},"then":{"properties":{"signees":{"type":"array"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["signees","receiver"]},"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}}}},"responses":{"200":{"description":"Quote updated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Quote 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"quoteDate":{"type":["string","null"],"format":"date"},"validUntilDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"quoteNumber":{"type":"string"},"type":{"type":"string","enum":["quote"]},"signaturePage":{"type":"boolean"},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified"]},"signees":{"type":["array","null"],"items":{"title":"Signee Resource","properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["receiver","sender"]},"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"userUuid":{"type":["string","null"],"format":"uuid"},"signOrder":{"type":"number","format":"int64"},"companyName":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"completedAt":{"type":["string","null"],"format":"date-time"},"signStatus":{"type":"string","enum":["pending","signed","rejected"]},"comment":{"type":["string","null"]}},"type":"object"}},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9522edd35bb09efd6f54e4b72c2ddf5d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/bulk-actions":{"get":{"tags":["document-quotes"],"summary":"Get bulk actions","description":"Get quote bulk actions","operationId":"documents_list_bulk_actions_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"af83b8860f04611ab8893c1c58906bec","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/calculate":{"post":{"tags":["document-quotes"],"summary":"Calculate amounts of new document","description":"Calculates the amounts of a document for previewing without manipulating any resources","operationId":"documents_create_calculate_5","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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ffd68eec742e89cc330f104e2eb996ce","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/receipts/bulk-actions":{"get":{"tags":["document-receipts"],"summary":"Get bulk actions","description":"Get receipt bulk actions","operationId":"documents_list_bulk_actions_6","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"8b790c818770cc127fd555c004407a4b","x-required-scopes":["suppliers"]}},"/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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"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":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"paymentTerms":{"type":["integer","null"],"deprecated":true},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"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":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"}},"required":["receiver","startDate","frequency","paymentInstructions","documentTotal","pricesIncludeVat","positions"]},"minItems":1}},"required":["documents"],"$defs":{"singleRecurringInvoice":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"}},"required":["receiver","startDate","frequency","paymentInstructions","documentTotal","pricesIncludeVat","positions"]}}}}}},"responses":{"200":{"description":"Recurring invoice updated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"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":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"paymentTerms":{"type":["integer","null"],"deprecated":true},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"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":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fecfb8eb5550302a187d837ed5637263","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{supplierCreditNoteUuid}":{"get":{"tags":["document-supplier-credit-notes"],"summary":"Get supplier credit note","description":"Get a single supplier credit note","operationId":"documents_get_supplier_credit_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"supplierCreditNoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Supplier Credit Note 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},"receiver":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"supplierCreditNoteNumber":{"type":"string"},"supplierCreditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Receipt Tax Position Resource","properties":{"id":{"type":"integer","format":"int64"},"accountNumber":{"type":"integer","format":"int64"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float"},"taxRateUuid":{"type":["string","null"],"format":"uuid"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"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"]},"type":{"type":"string","enum":["supplier_credit_note"]},"wasTaxIncluded":{"type":"boolean"},"wasRecognitionLimitReached":{"type":"boolean"}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"9116ca8fca3b969df4aaae57c3e4d535","x-required-scopes":["suppliers"]},"patch":{"tags":["document-supplier-credit-notes"],"summary":"Update supplier credit note","description":"Update supplier credit note","operationId":"documents_update_supplier_credit_notes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"supplierCreditNoteUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update supplier credit note","required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/import-supplier-credit-note.update.schema.json","description":"A Schema for updating an imported supplier credit note in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"supplierCreditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"reference":{"type":"string"},"documentTotal":{"type":"number","exclusiveMinimum":0,"description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"wasTaxIncluded":{"type":"boolean","default":false,"description":"Controls whether tax was included during supplier credit note invoicing"}},"required":["currencyCode","receiver","supplierCreditNoteDate","dueDate","documentTotal","taxPositions"]}},"required":["documentData"]},"maxItems":1,"minItems":1}},"required":["documents"],"$defs":{"singleDocument":{"type":"object","properties":{"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"supplierCreditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"reference":{"type":"string"},"documentTotal":{"type":"number","exclusiveMinimum":0,"description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"wasTaxIncluded":{"type":"boolean","default":false,"description":"Controls whether tax was included during supplier credit note invoicing"}},"required":["currencyCode","receiver","supplierCreditNoteDate","dueDate","documentTotal","taxPositions"]}},"required":["documentData"]}}}}}},"responses":{"200":{"description":"Supplier credit note updated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Supplier Credit Note 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},"receiver":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"supplierCreditNoteNumber":{"type":"string"},"supplierCreditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Receipt Tax Position Resource","properties":{"id":{"type":"integer","format":"int64"},"accountNumber":{"type":"integer","format":"int64"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float"},"taxRateUuid":{"type":["string","null"],"format":"uuid"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"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"]},"type":{"type":"string","enum":["supplier_credit_note"]},"wasTaxIncluded":{"type":"boolean"},"wasRecognitionLimitReached":{"type":"boolean"}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"a6329e81489eec62d7e674368e7492a9","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/bulk-actions":{"get":{"tags":["document-supplier-credit-notes"],"summary":"Get bulk actions","description":"Get supplier credit note bulk actions","operationId":"documents_list_bulk_actions_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"21e2d9ace3155762312873f76962c4b2","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/{type}/{invoiceUuid}/preview":{"post":{"tags":["document-invoices","document-contract-notes","document-recurring-invoices","document-quotes","document-delivery-notes","document-credit-notes"],"summary":"Create preview","description":"Creates a new PDF preview for a document or returns the sent PDF if one exists","operationId":"documents_create_preview","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"path","description":"Type of the document","required":true,"schema":{"type":"string","enum":["invoices","contract-notes","recurring-invoices","quotes","delivery-notes","credit-notes"]}}],"requestBody":{"description":"Create a PDF preview for a document overwriting the stored values. Omit to simply return the PDF for stored values.","required":false,"content":{"application/json":{"schema":{"oneOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/invoice.preview.schema.json","title":"Invoices","description":"A Schema for previewing invoices in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice includes vat or not"},"isVariantInvoice":{"type":"boolean","default":false},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["invoiceDate","paymentInstructions","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1,"maxItems":1}},"$defs":{"singleInvoice":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice includes vat or not"},"isVariantInvoice":{"type":"boolean","default":false},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["invoiceDate","paymentInstructions","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/contract-note.preview.schema.json","title":"Contract notes","description":"A Schema for previewing contract notes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"contractNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"null"},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions-bank-account.schema.json","title":"Payment Instructions Bank Account","description":"Payment Instruction Schema for AbaNinja Invoice Json without reference","oneOf":[{"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})?$"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},{"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}$"}},"required":["qrIban"]},{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}],"$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})?$"}},"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}$"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}}}]},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["contractNoteDate","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1,"maxItems":1}},"$defs":{"singleContractNote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"contractNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"null"},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/payment-instructions-bank-account.schema.json","title":"Payment Instructions Bank Account","description":"Payment Instruction Schema for AbaNinja Invoice Json without reference","oneOf":[{"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})?$"}},"required":["iban"],"if":{"properties":{"iban":{"not":{"pattern":"^(CH|LI)[0-9]{2}[a-zA-Z0-9]{1,30}$"}}}},"then":{"required":["bic"]}},{"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}$"}},"required":["qrIban"]},{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}],"$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})?$"}},"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}$"}},"required":["qrIban"]},"bankAccountReference":{"title":"Bank Account UUID","type":"object","properties":{"bankAccountUuid":{"type":"string","format":"uuid","description":"Identifier of the bank account"}},"required":["bankAccountUuid"]}}}]},"pricesIncludeVat":{"type":"boolean","description":"Controls if singlePrice includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["contractNoteDate","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/recurring-invoice.preview.schema.json","title":"Recurring invoices","description":"A Schema for previewing recurring invoices in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"}},"required":["receiver","startDate","frequency","paymentInstructions","pricesIncludeVat","positions"]},"minItems":1,"maxItems":1}},"$defs":{"singleRecurringInvoice":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"billingPeriod":{"type":"string","enum":["NONE","CURRENT","PREVIOUS","NEXT"],"default":"NONE"}},"required":["receiver","startDate","frequency","paymentInstructions","pricesIncludeVat","positions"]}}},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/quote.preview.schema.json","title":"Quotes","description":"A Schema for previewing quotes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"quoteDate":{"type":"string","format":"date"},"validUntilDate":{"type":["null","string"],"format":"date"},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"signaturePage":{"type":"boolean","default":false},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified",null]},"signees":{"description":"if set at least one of each signee type (receiver, sender) is required","type":["array","null"],"maxItems":2,"minItems":2,"items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-signee.schema.json","title":"Signee","description":"Signee for documents","type":"object","oneOf":[{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}],"properties":{"type":{"type":"string","enum":["receiver","sender"]},"signOrder":{"description":"Order of the signature","type":"number","format":"int64"}},"required":["type"],"$defs":{"receiverSignee":{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},"senderSignee":{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}}}}},"required":["quoteDate","pricesIncludeVat","positions"],"if":{"anyOf":[{"properties":{"signaturePage":{"const":true}},"required":["signaturePage"]},{"properties":{"signees":{"type":"array"}},"required":["signees"]}]},"then":{"properties":{"signees":{"type":"array"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["signees","receiver"]},"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1,"maxItems":1}},"$defs":{"singleQuote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"quoteDate":{"type":"string","format":"date"},"validUntilDate":{"type":["null","string"],"format":"date"},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"signaturePage":{"type":"boolean","default":false},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified",null]},"signees":{"description":"if set at least one of each signee type (receiver, sender) is required","type":["array","null"],"maxItems":2,"minItems":2,"items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-signee.schema.json","title":"Signee","description":"Signee for documents","type":"object","oneOf":[{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}],"properties":{"type":{"type":"string","enum":["receiver","sender"]},"signOrder":{"description":"Order of the signature","type":"number","format":"int64"}},"required":["type"],"$defs":{"receiverSignee":{"title":"Receiver signee","type":"object","properties":{"type":{"const":"receiver"},"personUuid":{"description":"If the receiver address is a company, a person is needed","type":["null","string"],"format":"uuid"}}},"senderSignee":{"title":"Sender signee","type":"object","properties":{"type":{"const":"sender"},"userUuid":{"type":"string","format":"uuid"}},"required":["userUuid"]}}}}},"required":["quoteDate","pricesIncludeVat","positions"],"if":{"anyOf":[{"properties":{"signaturePage":{"const":true}},"required":["signaturePage"]},{"properties":{"signees":{"type":"array"}},"required":["signees"]}]},"then":{"properties":{"signees":{"type":"array"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["signees","receiver"]},"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/delivery-note.preview.schema.json","title":"Delivery notes","description":"A Schema for previewing delivery notes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"deliveryNoteDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},"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"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}}},"minItems":1}},"required":["deliveryNoteDate","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1,"maxItems":1}},"$defs":{"singleDeliveryNote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"deliveryNoteDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"positions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/delivery-note-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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]},"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"]},"dividerPosition":{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},"groupPosition":{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber, productDescription and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["productDescription"]}],"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":"Price, which will be used when converting the delivery note to another document like an invoice"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/discount-object.schema.json","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"vatUuid":{"type":["null","string"],"format":"uuid","description":"UUID of VAT to use. Takes precedence over \"vat\". Used only when converting the delivery note to another document like an invoice."},"vat":{"type":["null","object"],"properties":{"percentage":{"type":"number","minimum":0,"maximum":100}},"required":["percentage"],"description":"VAT to use. Is precedented by \"vatUuid\". Used only when converting the delivery note to another document like an invoice."}},"required":["kind"]}],"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"}}},"minItems":1},"showCollapsed":{"type":"boolean","default":true}},"required":["title","kind","items"]}}},"minItems":1}},"required":["deliveryNoteDate","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}},{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/credit-note.preview.schema.json","title":"Credit notes","description":"A Schema for previewing credit notes in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"creditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["creditNoteDate","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]},"minItems":1,"maxItems":1}},"$defs":{"singleCreditNote":{"type":"object","allOf":[{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/invoice-general-header.schema.json","description":"Schema for Invoice header properties valid for all invoice types (creditnote, recurring etc.)","type":"object","properties":{"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":["currencyCode"]}],"properties":{"isTemplate":{"type":"boolean"},"creditNoteDate":{"type":"string","format":"date"},"dueDate":{"type":["null","string"],"format":"date"},"pricesIncludeVat":{"type":"boolean","description":"Controls if single_price and position_total includes vat or not"},"documentTotal":{"type":"number","description":"Total Amount incl. VAT","deprecated":true},"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]}}},"minItems":1},"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]}},"required":["creditNoteDate","pricesIncludeVat","positions"],"anyOf":[{"properties":{"isTemplate":{"const":true},"receiver":{"oneOf":[{"type":"null"},{"$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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}]}},"required":["isTemplate"]},{"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}}},"required":["receiver"]}]}}}]}}}},"responses":{"201":{"description":"Created a preview PDF","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Created Preview Resource","description":"Created PDF preview","properties":{"previewUrl":{"type":"string","format":"uri"},"downloadUrl":{"type":"string","format":"uri"},"expiresAt":{"type":["string","null"],"format":"date-time"}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"82f90a22d3bd897616be85162928664b","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/{type}/preview/{previewUuid}":{"get":{"tags":["document-invoices","document-contract-notes","document-recurring-invoices","document-quotes","document-delivery-notes","document-credit-notes"],"summary":"Show PDF Preview","description":"Returns a previously created PDF preview file","operationId":"documents_get_preview","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"previewUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"type","in":"path","description":"Type of the document","required":true,"schema":{"type":"string","enum":["invoices","contract-notes","recurring-invoices","quotes","delivery-notes","credit-notes"]}},{"name":"forceDownload","in":"query","description":"If true, then the file shall be sent as Content-Disposition: attachment","required":false,"schema":{"type":"boolean","default":false}},{"name":"cert","in":"query","description":"Signature parameter, generated and returned when creating preview","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","headers":{"Content-Type":{"schema":{"type":"string","enum":["application/pdf"]}},"Content-Disposition":{"description":"\"inline\" or \"attachment\", based on the forceDownload query param","schema":{"type":"string","example":"attachment; filename=\"invoice-preview.pdf\""}}},"content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"403":{"description":"Invalid signature","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Preview not available anymore","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[],"x-legacy-operation-id":"8d06ad9a9255dd0c78752532e7de7c76"}},"/accounts/{accountUuid}/documents/v2/contract-notes/{contractNoteUuid}/actions":{"get":{"tags":["document-contract-notes"],"summary":"Get actions","description":"Get contract note actions","operationId":"documents_list_actions","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"contractNoteUuid","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d1c140ffccc2e11c19438254ad4a2e31","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/calculate":{"post":{"tags":["document-contract-notes"],"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_7","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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Contract Note Calculation Resource","type":"object","allOf":[{"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"},{"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"}},"totalInvoicedAmount":{"description":"sum of all related invoices of this contract note","type":["number","null"],"format":"float"}},"type":"object"}]},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d12c6622445bdbc4db99c8b20e80d327","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/comments":{"get":{"tags":["document-credit-notes"],"summary":"Get comment collection","description":"fetches comments of a document via pagination","operationId":"documents_list_comments","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"6e93fdec3c8cee14ef9bc0f66ccb81e6","x-required-scopes":["customers"]},"post":{"tags":["document-credit-notes"],"summary":"Create comment","description":"creates a new comment on a document either for internal or external use","operationId":"documents_create_comments","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"275b6cf024bbbdc0d849e052e3b81c50","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/files":{"get":{"tags":["document-credit-notes"],"summary":"Get Files","description":"Returns a list of files","operationId":"documents_list_files","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e1608e02afc72894957bce3e57d8e893","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/bulk-actions/archive":{"patch":{"tags":["document-contract-notes"],"summary":"Execute archive bulk action","description":"Marks the document as archived","operationId":"documents_bulk_archive_contract_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d775dfce02b2896ae9654dbc0524e564","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/bulk-actions/collectInvoice":{"patch":{"tags":["document-contract-notes"],"summary":"Execute collectInvoice bulk action","description":"Creates a collective invoice out of the selected items","operationId":"documents_bulk_collect_invoice_contract_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d5c7dd0a0e35121b16fc6e09f7d8bc9a","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/bulk-actions/markSent":{"patch":{"tags":["document-contract-notes"],"summary":"Execute markSent bulk action","description":"Triggers the mark sent action for each document","operationId":"documents_bulk_mark_sent_contract_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ab43ab995f920c11f0424707f8369c52","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/bulk-actions/massDownloadZip":{"patch":{"tags":["document-contract-notes"],"summary":"Execute massDownloadZip bulk action","description":"Zips and downloads each document. The result is sent to the inbox","operationId":"documents_bulk_mass_download_zip_contract_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"string"}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e7d767ed28b5b3312f3634f2438f2daa","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/bulk-actions/massPrint":{"patch":{"tags":["document-contract-notes"],"summary":"Execute massPrint bulk action","description":"Triggers the print action for each document","operationId":"documents_bulk_mass_print_contract_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"}]}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"dd1758c6bf7b3dbadac7ebebacb01026","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/bulk-actions/massSent":{"patch":{"tags":["document-contract-notes"],"summary":"Execute massSent bulk action","description":"Triggers the send action for each document","operationId":"documents_bulk_mass_sent_contract_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9fded55d13c56148fbbcd777c0e017f2","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/bulk-actions/plannedMail":{"patch":{"tags":["document-contract-notes"],"summary":"Execute plannedMail bulk action","description":"Triggers the plan mail action for each document","operationId":"documents_bulk_planned_mail_contract_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"3b1d285309f492e7a14d4ce2c7b74f62","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/settings/default-conditions":{"get":{"tags":["document-contract-note-settings"],"summary":"Get contract-note default-condition settings","description":"Get contract-note default-condition settings","operationId":"documents_list_default_conditions","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Document default-conditions settings resource","properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"1e9548ca4713c5c8deae937395249279","x-required-scopes":["settings"]},"patch":{"tags":["document-contract-note-settings"],"summary":"Update contract-note default-condition settings","description":"Update contract-note default-condition settings","operationId":"documents_update_default_conditions","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"default-condition settings","required":true,"content":{"application/json":{"schema":{"title":"Update default-condition settings request","required":[],"properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Document default-conditions settings resource","properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"1368952b076a6b5d200de8444941397d","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{creditNoteUuid}/actions":{"get":{"tags":["document-credit-notes"],"summary":"Get actions","description":"Get credit note actions","operationId":"documents_list_actions_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"creditNoteUuid","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"b678f5939f42c4714d9fb421af5b4b45","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/calculate":{"post":{"tags":["document-credit-notes"],"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_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":"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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ae3996333fdee330090cf8df08a826f4","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/comments":{"get":{"tags":["document-credit-notes"],"summary":"Get comment collection","description":"fetches comments of a document via pagination","operationId":"documents_list_comments_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"dafd6e5283ffed80b5878c6362de9731","x-required-scopes":["customers"]},"post":{"tags":["document-credit-notes"],"summary":"Create comment","description":"creates a new comment on a document either for internal or external use","operationId":"documents_create_comments_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fe1c4d6608bb86eb27c393b2800dc27c","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/files":{"get":{"tags":["document-credit-notes"],"summary":"Get Files","description":"Returns a list of files","operationId":"documents_list_files_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"5db6349299eb0e6fa61e614c5a166611","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/bulk-actions/archive":{"patch":{"tags":["document-credit-notes"],"summary":"Execute archive bulk action","description":"Marks the document as archived","operationId":"documents_bulk_archive_credit_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fe2c354d7e629bf26c5ceebcd370a898","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/bulk-actions/markSent":{"patch":{"tags":["document-credit-notes"],"summary":"Execute markSent bulk action","description":"Triggers the mark sent action for each document","operationId":"documents_bulk_mark_sent_credit_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d2a22458422f33c7099a67602dadb693","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/bulk-actions/massDownloadZip":{"patch":{"tags":["document-credit-notes"],"summary":"Execute massDownloadZip bulk action","description":"Zips and downloads each document. The result is sent to the inbox","operationId":"documents_bulk_mass_download_zip_credit_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"string"}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d2d476a0258aac95312c674af13ef6cf","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/bulk-actions/massPrint":{"patch":{"tags":["document-credit-notes"],"summary":"Execute massPrint bulk action","description":"Triggers the print action for each document","operationId":"documents_bulk_mass_print_credit_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"}]}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"faaa525f8c485094a9478f6191aa8142","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/bulk-actions/massSent":{"patch":{"tags":["document-credit-notes"],"summary":"Execute massSent bulk action","description":"Triggers the send action for each document","operationId":"documents_bulk_mass_sent_credit_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"b2f6750ceb5c83bde88c68c72e2eaba5","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/bulk-actions/plannedMail":{"patch":{"tags":["document-credit-notes"],"summary":"Execute plannedMail bulk action","description":"Triggers the plan mail action for each document","operationId":"documents_bulk_planned_mail_credit_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fe64b1c5584a116cd14716caac38e514","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{deliveryNoteUuid}/actions":{"get":{"tags":["document-delivery-notes"],"summary":"Get actions","description":"Get delivery note actions","operationId":"documents_list_actions_3","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"deliveryNoteUuid","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"70264a0226eb1bc5efebb51665ea8cd8","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/comments":{"get":{"tags":["document-delivery-notes"],"summary":"Get comment collection","description":"fetches comments of a document via pagination","operationId":"documents_list_comments_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d18eb8dd504c1571ec784e7998bcbe5f","x-required-scopes":["customers"]},"post":{"tags":["document-delivery-notes"],"summary":"Create comment","description":"creates a new comment on a document either for internal or external use","operationId":"documents_create_comments_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9209effa08b9e7e3a4240700742c8eb7","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/files":{"get":{"tags":["document-delivery-notes"],"summary":"Get Files","description":"Returns a list of files","operationId":"documents_list_files_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9f80d84e95dd95fff5a99921dd29f47c","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/archive":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute archive bulk action","description":"Marks the document as archived","operationId":"documents_bulk_archive_delivery_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"eaa505933512cf1a6436a3fca207119e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/collectInvoice":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute collectInvoice bulk action","description":"Creates a collective invoice out of the selected items","operationId":"documents_bulk_collect_invoice_delivery_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8d540243f673767389902dde7c3d481c","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/markSent":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute markSent bulk action","description":"Triggers the mark sent action for each document","operationId":"documents_bulk_mark_sent_delivery_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ee177c8191210e7c48aa0e23ba941224","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/massDownloadZip":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute massDownloadZip bulk action","description":"Zips and downloads each document. The result is sent to the inbox","operationId":"documents_bulk_mass_download_zip_delivery_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"string"}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"5562375bacde3f171ad8b3561ce43369","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/massPrint":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute massPrint bulk action","description":"Triggers the print action for each document","operationId":"documents_bulk_mass_print_delivery_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"}]}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"1a1f8d5730f0c56c1eb53810ad96f05b","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/massSent":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute massSent bulk action","description":"Triggers the send action for each document","operationId":"documents_bulk_mass_sent_delivery_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e1d8d6c7863dc40f097267d0b3118f71","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/bulk-actions/plannedMail":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute plannedMail bulk action","description":"Triggers the plan mail action for each document","operationId":"documents_bulk_planned_mail_delivery_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"144db6b1700d8516da9a2d68aa5eb2e1","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/settings/default-conditions":{"get":{"tags":["document-delivery-note-settings"],"summary":"Get delivery-note default-condition settings","description":"Get delivery-note default-condition settings","operationId":"documents_list_default_conditions_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Document default-conditions settings resource","properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"b6d1479c6346c0fcdea00f944aae8187","x-required-scopes":["settings"]},"patch":{"tags":["document-delivery-note-settings"],"summary":"Update delivery-note default-condition settings","description":"Update delivery-note default-condition settings","operationId":"documents_update_default_conditions_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"default-condition settings","required":true,"content":{"application/json":{"schema":{"title":"Update default-condition settings request","required":[],"properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Document default-conditions settings resource","properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"9af9beaa1162f2cccd0a90cb19e6da39","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/documents/{documentUuid}/document-flow":{"get":{"tags":["document-common"],"summary":"Get document flow","description":"Get the document flow of a document","operationId":"documents_list_document_flow","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":"Successful return of a document flow","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"array","items":{"title":"Document Flow Item Resource","properties":{"uuid":{"type":"string","format":"uuid"},"documentFlowUuid":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"from":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"isDeleted":{"type":"boolean"},"isTemplate":{"type":"boolean"},"date":{"type":["string","null"],"format":"date"},"number":{"type":"string"},"amount":{"type":"number"},"currency":{"type":["string","null"],"format":"iso-4217"}},"type":"object"},"to":{"properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"isDeleted":{"type":"boolean"},"isTemplate":{"type":"boolean"},"date":{"type":["string","null"],"format":"date"},"number":{"type":"string"},"amount":{"type":"number"},"currency":{"type":["string","null"],"format":"iso-4217"}},"type":"object"}},"type":"object"}},"status":{"example":200}},"type":"object"}]}}}},"204":{"description":"No document flow items"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"21c085a1a741e30dfe2571ab5a41a0e9","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/calculate":{"post":{"tags":["document-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_8","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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"99e51274059b24273cc1a7a9d2d7b0f4","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/comments":{"get":{"tags":["document-invoices"],"summary":"Get comment collection","description":"fetches comments of a document via pagination","operationId":"documents_list_comments_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fcfe8946e7cdae82f6870309cd5c1393","x-required-scopes":["customers"]},"post":{"tags":["document-invoices"],"summary":"Create comment","description":"creates a new comment on a document either for internal or external use","operationId":"documents_create_comments_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8ea4767deb924e56186994aba0ad53a2","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/files":{"get":{"tags":["document-invoices"],"summary":"Get Files","description":"Returns a list of files","operationId":"documents_list_files_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"6fa6ff32d1f63e5d77e0047570be0030","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{invoiceUuid}/actions":{"get":{"tags":["document-invoices"],"summary":"Get actions","description":"Get invoice actions","operationId":"documents_list_actions_4","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceUuid","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"66e7004c366931541983e1f9eedc3ac5","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{invoiceUuid}/dunning-preview":{"post":{"tags":["document-invoices"],"summary":"Create dunning preview","description":"Create a PDF preview for a dunning","operationId":"documents_create_dunning_preview","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Create a PDF preview for a dunning","required":true,"content":{"application/json":{"schema":{"title":"CreateDunningPdfPreviewRequest","required":["dunningLevel"],"properties":{"dunningLevel":{"type":"integer","enum":[1,2,3]}},"type":"object"}}}},"responses":{"201":{"description":"Created a preview PDF","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Created Preview Resource","description":"Created PDF preview","properties":{"previewUrl":{"type":"string","format":"uri"},"downloadUrl":{"type":"string","format":"uri"},"expiresAt":{"type":["string","null"],"format":"date-time"}},"type":"object"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"da94c9c1a86eaff6ce08ec6a22a7a660","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{invoiceUuid}/dunnings":{"get":{"tags":["document-invoices"],"summary":"Get Dunnings","description":"Lists all active dunnings of a document","operationId":"documents_list_dunnings","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"array","items":{"title":"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"]},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"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"]},"sentStatus":{"type":"string","enum":["OPEN","SENDING","ERROR","SENT"]},"customField1":{"type":["string","null"]},"customField2":{"type":["string","null"]},"customField3":{"type":["string","null"]},"customField4":{"type":["string","null"]},"invoiceDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"receiver":{"oneOf":[{"title":"Lite Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"},{"title":"Lite Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"customerNumber":{"type":["string","null"]},"name":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"isArchived":{"type":"boolean"},"isCancelled":{"type":"boolean"},"isImported":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"updatedAt":{"type":"string","format":"date-time"},"isTemplate":{"type":"boolean"}},"type":"object"}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"f03419e7c01e18b5fe495ac542484858","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions/archive":{"patch":{"tags":["document-invoices"],"summary":"Execute archive bulk action","description":"Marks the document as archived","operationId":"documents_bulk_archive_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"997a4ab335ebf2f8e6c949f0e89b8959","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions/collectInvoice":{"patch":{"tags":["document-invoices"],"summary":"Execute collectInvoice bulk action","description":"Creates a collective invoice out of the selected items","operationId":"documents_bulk_collect_invoice_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"bd898195fb417fb24f664667ec39308e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions/markSent":{"patch":{"tags":["document-invoices"],"summary":"Execute markSent bulk action","description":"Triggers the mark sent action for each document","operationId":"documents_bulk_mark_sent_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"15a53f6fad0938faefaa4527c4013e61","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massDownloadZip":{"patch":{"tags":["document-invoices"],"summary":"Execute massDownloadZip bulk action","description":"Zips and downloads each document. The result is sent to the inbox","operationId":"documents_bulk_mass_download_zip_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"string"}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"b219f23419c1d956d6f6c4be3ec5be60","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massDunningPrint":{"patch":{"tags":["document-invoices"],"summary":"Execute massDunningPrint bulk action","description":"Triggers the print dunning action for each document","operationId":"documents_bulk_mass_dunning_print_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"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"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"}]}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"14cb5f4cdf980f903d1c2dcdece79bb6","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massDunningSent":{"patch":{"tags":["document-invoices"],"summary":"Execute massDunningSent bulk action","description":"Triggers the send dunning action for each document","operationId":"documents_bulk_mass_dunning_sent_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"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"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"}]}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"01436644d3e31ef4e525db0d165d58f9","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massPrint":{"patch":{"tags":["document-invoices"],"summary":"Execute massPrint bulk action","description":"Triggers the print action for each document","operationId":"documents_bulk_mass_print_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"}]}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"218e514b971420e8b48c1591caa7d1a2","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions/massSent":{"patch":{"tags":["document-invoices"],"summary":"Execute massSent bulk action","description":"Triggers the send action for each document","operationId":"documents_bulk_mass_sent_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"42a1ebc75935d36bee650f96a88ea3e1","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/bulk-actions/plannedMail":{"patch":{"tags":["document-invoices"],"summary":"Execute plannedMail bulk action","description":"Triggers the plan mail action for each document","operationId":"documents_bulk_planned_mail_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"1c652b7f187c9b8f069bb1f6e0175b34","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/import/{invoiceUuid}":{"patch":{"tags":["document-invoices"],"summary":"Update imported invoice","description":"Update imported invoice from PDF","operationId":"documents_update_import","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"invoiceUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update imported 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/import-invoice.update.schema.json","description":"A Schema for updating an imported invoice in AbaNinja over API","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"invoiceNumber":{"type":["null","string"]},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"reference":{"type":["string"],"maxLength":255},"publicNotes":{"type":["null","string"]},"hasCustomPaymentSlip":{"type":"boolean","default":false,"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)"}},"required":["currencyCode","receiver","invoiceDate","dueDate","paymentInstructions","documentTotal","taxPositions"]}},"required":["documentData"]},"maxItems":1,"minItems":1}},"required":["documents"],"$defs":{"singleDocument":{"type":"object","properties":{"documentData":{"type":"object","description":"Additional Data for the invoice document","properties":{"currencyCode":{"type":"string","pattern":"^[A-Z]{3}$"},"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","oneOf":[{"type":"object","properties":{"addressUuid":{"type":"string","format":"uuid"},"personUuid":{"type":"string","format":"uuid"},"deliveryAddressUuid":{"type":["null","string"],"format":"uuid"}},"required":["addressUuid","personUuid"]},{"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"]},{"type":"object","properties":{"customerNumber":{"type":"string"}},"required":["customerNumber"]}],"$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"]}}},"invoiceNumber":{"type":["null","string"]},"invoiceDate":{"type":"string","format":"date"},"dueDate":{"type":"string","format":"date"},"deliveryDate":{"type":["null","string"],"format":"date"},"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","oneOf":[{"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"]}},{"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"]},{"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"]}],"$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"]}}},"documentTotal":{"type":"number","description":"Total Amount incl. VAT"},"taxPositions":{"type":"array","items":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.abaninja.ch/schemas/2.0.0/subschemas/tax-position.schema.json","description":"A Schema for tax positions for imported invoices","type":"object","properties":{"id":{"type":["integer","null"],"exclusiveMinimum":0,"deprecated":true,"description":"identifier of the object. \"uuid\" should be used instead"},"uuid":{"type":["string","null"],"format":"uuid"},"accountNumber":{"type":"integer","minimum":1000,"maximum":999999999999,"deprecated":true,"description":"The booking account number. Use bookingAccountUuid instead."},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean","default":false,"description":"controls if amount already includes tax or not"},"amount":{"type":"number"},"taxRate":{"type":"number","minimum":0,"maximum":100,"deprecated":true,"description":"Tax Rate to apply. Use \"taxRateUuid\" instead"},"taxRateUuid":{"type":["null","string"],"format":"uuid"}},"required":["amount"]},"minItems":1},"reference":{"type":["string"],"maxLength":255},"publicNotes":{"type":["null","string"]},"hasCustomPaymentSlip":{"type":"boolean","default":false,"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)"}},"required":["currencyCode","receiver","invoiceDate","dueDate","paymentInstructions","documentTotal","taxPositions"]}},"required":["documentData"]}}}}}},"responses":{"200":{"description":"Imported invoice updated","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"title":"Imported Invoice Resource","properties":{"documentUrl":{"type":["string","null"],"format":"uri"},"documentData":{"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},"reference":{"type":"string"},"publicNotes":{"type":["string","null"]},"receiver":{"oneOf":[{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},{"type":"null"}]},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"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"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Tax Position Resource","properties":{"uuid":{"type":"string","format":"uuid"},"id":{"type":"number","format":"int64","deprecated":true},"accountNumber":{"type":["number","null"],"format":"int64","deprecated":true},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float","deprecated":true},"vatUuid":{"type":["string","null"],"format":"uuid","deprecated":true},"taxRateUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"wasRecognitionLimitReached":{"type":"boolean"},"hasCustomPaymentSlip":{"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)","type":"boolean"}},"type":"object"}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8b093251e6f795a2c9eea3c4654a74a7","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/conditions":{"get":{"tags":["document-invoice-settings"],"summary":"Get invoice payment-condition setting","description":"Get invoice payment-condition setting","operationId":"documents_list_conditions","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Payment Condition Settings Resource","properties":{"paymentTerms":{"type":["number","null"],"format":"int32"},"paymentConditions":{"type":"array","items":{"required":["condition"],"properties":{"condition":{"type":"number","enum":[1,2,3]},"amount":{"type":["number","null"],"format":"float"},"days":{"type":["number","null"],"format":"int32"}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"674a7b0719936a0da13e27af9a3ffa92","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update invoice payment-condition setting","description":"Update invoice payment-condition setting","operationId":"documents_update_conditions","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"payment-conditions settings","required":true,"content":{"application/json":{"schema":{"title":"Update condition settings request","required":[],"properties":{"paymentTerms":{"type":["number","null"],"format":"int32"},"paymentConditions":{"type":"array","items":{"required":["condition"],"properties":{"condition":{"type":"number","enum":[1,2,3]},"amount":{"type":"number","format":"float"},"days":{"type":"number","format":"int32"}},"type":"object"}}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Payment Condition Settings Resource","properties":{"paymentTerms":{"type":["number","null"],"format":"int32"},"paymentConditions":{"type":"array","items":{"required":["condition"],"properties":{"condition":{"type":"number","enum":[1,2,3]},"amount":{"type":["number","null"],"format":"float"},"days":{"type":["number","null"],"format":"int32"}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"83b21ac75caf80912adc7a1c9463fd56","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/default-conditions":{"get":{"tags":["document-invoice-settings"],"summary":"Get invoice default-condition settings","description":"Get invoice default-condition settings","operationId":"documents_list_default_conditions_3","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Document default-conditions settings resource","properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"5e7f045877040458d5ad0de0201d3bca","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update invoice default-condition settings","description":"Update invoice default-condition settings","operationId":"documents_update_default_conditions_3","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"default-condition settings","required":true,"content":{"application/json":{"schema":{"title":"Update default-condition settings request","required":[],"properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Document default-conditions settings resource","properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"3a860d16bad0ec900190074558839ae0","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/dunnings":{"get":{"tags":["document-invoice-settings"],"summary":"Get Dunning Settings","description":"Returns all dunning settings","operationId":"documents_list_dunnings_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"DunningSettingsResourceSchema","properties":{"enableDunning":{"type":"boolean"},"enableDunningAmount":{"type":"boolean"},"dunningType":{"type":"integer","enum":[1,2]},"dunningLevel1":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"dunningLevel2":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"dunningLevel3":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"1cc4d2bcac25f4737d9bc0f721e14a83","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update Dunning Settings","description":"Updates the accounts dunning settings","operationId":"documents_update_dunnings","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update the settings","required":true,"content":{"application/json":{"schema":{"title":"Update Dunning Settings Request","required":[],"properties":{"enableDunning":{"type":"boolean"},"enableDunningAmount":{"type":"boolean"},"dunningType":{"type":"integer","enum":[1,2]},"dunningLevel1":{"properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"}},"type":"object"}},"type":"object"},"dunningLevel2":{"properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"}},"type":"object"}},"type":"object"},"dunningLevel3":{"properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"DunningSettingsResourceSchema","properties":{"enableDunning":{"type":"boolean"},"enableDunningAmount":{"type":"boolean"},"dunningType":{"type":"integer","enum":[1,2]},"dunningLevel1":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"dunningLevel2":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"dunningLevel3":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"bef43cc22918cc3dbaeb167898970b5d","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/payment-slip":{"get":{"tags":["document-invoice-settings"],"summary":"Get payment slip settings","description":"Get invoices payment slip settings","operationId":"documents_list_payment_slip","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Payment Slip Settings","properties":{"newPage":{"type":"boolean"},"showAmount":{"type":"boolean"},"addAdditionalProcedures":{"type":"boolean"},"additionalProcedures1":{"type":["string","null"]},"additionalProcedures2":{"type":["string","null"]},"enableAdvertisementImage":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"fc22ea92b07600a88a26a7579429465e","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update payment slip settings","description":"Update invoices payment slip settings","operationId":"documents_update_payment_slip","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"payment slip settings","required":true,"content":{"application/json":{"schema":{"title":"Update payment slip request","required":[],"properties":{"newPage":{"type":"boolean"},"showAmount":{"type":"boolean"},"addAdditionalProcedures":{"type":"boolean"},"additionalProcedures1":{"type":["string","null"]},"additionalProcedures2":{"type":["string","null"]},"enableAdvertisementImage":{"type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Payment Slip Settings","properties":{"newPage":{"type":"boolean"},"showAmount":{"type":"boolean"},"addAdditionalProcedures":{"type":"boolean"},"additionalProcedures1":{"type":["string","null"]},"additionalProcedures2":{"type":["string","null"]},"enableAdvertisementImage":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"de427db7137c89b0d76d3ff7142d3dca","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/queue/{queueUuid}/abort":{"post":{"tags":["document-common"],"summary":"Abort queue","description":"Abort the document-mass-import queue. No other items will be processed. Can only be done as long as the queue is not aborted, finished or failed.","operationId":"documents_create_abort","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"queueUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Mass Document Import Queue Resource","description":"Describes the status of an document mass import","properties":{"uuid":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"total":{"type":"integer"},"successful":{"type":"integer"},"failed":{"type":"integer"},"status":{"type":"string","enum":["pending","failed","finished","aborted"]},"details":{"type":["array","null"],"items":{"title":"Mass Document Json Import Detail Resource","properties":{"status":{"type":"string","enum":["pending","failed","finished","aborted"]},"message":{"type":["string","null"]},"invoice":{"oneOf":[{"title":"Imported Invoice Resource","properties":{"documentUrl":{"type":["string","null"],"format":"uri"},"documentData":{"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},"reference":{"type":"string"},"publicNotes":{"type":["string","null"]},"receiver":{"oneOf":[{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},{"type":"null"}]},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"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"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Tax Position Resource","properties":{"uuid":{"type":"string","format":"uuid"},"id":{"type":"number","format":"int64","deprecated":true},"accountNumber":{"type":["number","null"],"format":"int64","deprecated":true},"bookingAccountUuid":{"type":["string","null"],"format":"uuid"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float","deprecated":true},"vatUuid":{"type":["string","null"],"format":"uuid","deprecated":true},"taxRateUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"wasRecognitionLimitReached":{"type":"boolean"},"hasCustomPaymentSlip":{"description":"if the invoice has a custom payment slip (true) or if it will be generated by AbaNinja (false)","type":"boolean"}},"type":"object"}},"type":"object"},{"title":"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"invoiceDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"nextDunningDate":{"type":["string","null"],"format":"date"},"customDunningDate":{"type":["string","null"],"format":"date"},"dunningLevel":{"type":"string","enum":["REMINDER","FIRST_DUNNING","FINAL_DUNNING","NO_DUNNING"]},"paymentInstructions":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"isVariantInvoice":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"isCollectiveBill":{"type":"boolean"},"invoiceNumber":{"description":"Equals to importedInvoiceNumber if set, otherwise systemInvoiceNumber","type":"string","deprecated":true},"importedInvoiceNumber":{"description":"The recognized invoiceNumber of the imported document","type":["string","null"]},"systemInvoiceNumber":{"description":"The invoiceNumber generated by AbaNinja","type":"string"},"openAmount":{"type":"number","format":"float"},"type":{"type":"string","enum":["invoice"]},"subtype":{"type":["string","null"],"enum":["partial","final","on_account","instalment","dunning"]},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"bookedAt":{"type":["string","null"],"format":"date-time"},"syncedAt":{"type":["string","null"],"format":"date-time"},"syncMessage":{"type":["string","null"]},"syncStatus":{"type":["string","null"],"enum":["OK","FAILED","INCORRECT_STATE","GENERAL_ERROR","CONNECTION_ERROR","BLOCKED_PREVIOUS_NOT_SYNCED"]},"cashDiscounts":{"type":"array","items":{"properties":{"days":{"type":"number","format":"int64"},"percentage":{"type":"number","format":"float"}},"type":"object"},"maxItems":3,"minItems":0},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"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":{"allOf":[{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]}],"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Iban Resource","description":"Payment instructions using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]},"reference":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction QrIban Resource","description":"Payment instructions using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"},"reference":{"type":["string","null"]}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"paymentTerms":{"type":["integer","null"],"deprecated":true},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"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":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Credit Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"creditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"creditNoteNumber":{"type":"string"},"openAmount":{"type":"number","format":"float"},"abanetSendAt":{"type":["string","null"],"format":"date-time"},"abanetConfirmedAt":{"type":["string","null"],"format":"date-time"},"type":{"type":"string","enum":["credit_note"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Quote 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"quoteDate":{"type":["string","null"],"format":"date"},"validUntilDate":{"type":["string","null"],"format":"date"},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"quoteNumber":{"type":"string"},"type":{"type":"string","enum":["quote"]},"signaturePage":{"type":"boolean"},"deepSignSignatureMode":{"type":["string","null"],"enum":["timestamp","advanced","qualified"]},"signees":{"type":["array","null"],"items":{"title":"Signee Resource","properties":{"uuid":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["receiver","sender"]},"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"userUuid":{"type":["string","null"],"format":"uuid"},"signOrder":{"type":"number","format":"int64"},"companyName":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"email":{"type":["string","null"],"format":"email"},"completedAt":{"type":["string","null"],"format":"date-time"},"signStatus":{"type":"string","enum":["pending","signed","rejected"]},"comment":{"type":["string","null"]}},"type":"object"}},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Delivery Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"deliveryNoteDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"deliveryNoteNumber":{"type":"string"},"type":{"type":"string","enum":["delivery_note"]},"documentDiscount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Contract Note 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":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"contractNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"deliveryDate":{"type":["string","null"],"format":"date"},"paymentInstructions":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"title":"Payment Instruction Bank Account Iban Resource","description":"Payment instructions bank account using a common IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"iban":{"type":"string"},"bic":{"type":["string","null"]}},"type":"object"},{"title":"Payment Instruction Bank Account QrIban Resource","description":"Payment instructions bank account using a QR IBAN","properties":{"bankAccountUuid":{"type":"string","format":"uuid"},"qrIban":{"type":"string"}},"type":"object"}]},"pricesIncludeVat":{"type":"boolean"},"documentTotal":{"type":"number","format":"float"},"positions":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Divider Position Resource","description":"used to add a horizontal divider between the items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["divider"]}},"type":"object"},{"title":"Group Position Resource","description":"used to group product items","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["group"]},"title":{"type":"string"},"showCollapsed":{"type":"boolean"},"productGroupUuid":{"type":["string","null"],"format":"uuid"},"items":{"type":"array","items":{"oneOf":[{"title":"Delivery Note Product Position Resource","description":"A position belonging to a product or service for a delivery note","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":{"description":"Price, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"positionTotal":{"description":"Total amount, which will be used when converting the delivery note to another document like an invoice","type":"number","format":"float"},"discount":{"description":"Discount, which will be used when converting the delivery note to another document like an invoice","oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"description":"UUID of the VAT linked. Used only when converting the delivery note to another document like an invoice.","type":["string","null"],"format":"uuid"},"vat":{"description":"Used VAT. Used only when converting the delivery note to another document like an invoice.","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"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"}]}}},"type":"object"},{"title":"Page Break Position Resource","description":"used to start a new page","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["page_break"]}},"type":"object"},{"title":"Product Position Resource","description":"A position belonging to a product or service for a invoice","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"},"quantity":{"type":["number","null"],"format":"float"},"unitCode":{"type":"string"},"unitUuid":{"type":["string","null"],"format":"uuid"},"singlePrice":{"type":"number","format":"float"},"positionTotal":{"type":"number","format":"float"},"discount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]},"vatUuid":{"type":["string","null"],"format":"uuid"},"vat":{"properties":{"percentage":{"type":"number","format":"float"},"amount":{"type":["number","null"],"format":"float"}},"type":"object"},"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"]}},"type":"object"},{"title":"Section Total Position Resource","description":"used to display the total for the section","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["section_total"]},"title":{"type":"string"}},"type":"object"},{"title":"Sub Title Position Resource","description":"used to display sub-titles in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["subtitle"]},"title":{"type":"string"}},"type":"object"},{"title":"Text Position Resource","description":"used to display text in the invoice","properties":{"uuid":{"type":"string","format":"uuid"},"positionNumber":{"type":"number","format":"int64"},"kind":{"type":"string","enum":["text"]},"text":{"type":"string"}},"type":"object"}]}},"isTemplate":{"type":"boolean"},"contractNoteNumber":{"type":"string"},"type":{"type":"string","enum":["invoice"]},"documentDiscount":{"oneOf":[{"properties":{"amount":{"type":"number","format":"float"}},"type":"object"},{"properties":{"percentage":{"type":"number","format":"float"}},"type":"object"}]}},"type":"object"},{"title":"Supplier Credit Note 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},"receiver":{"oneOf":[{"title":"Receiver Company Resource","description":"Receiver resource for a company","properties":{"addressUuid":{"type":"string","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"}},"type":"object"},{"title":"Receiver Person Resource","description":"Receiver resource for a person","properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"personUuid":{"type":["string","null"],"format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"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"}},"type":"object"}]},"supplierCreditNoteNumber":{"type":"string"},"supplierCreditNoteDate":{"type":["string","null"],"format":"date"},"dueDate":{"type":["string","null"],"format":"date"},"documentTotal":{"type":"number","format":"float"},"taxPositions":{"type":"array","items":{"title":"Receipt Tax Position Resource","properties":{"id":{"type":"integer","format":"int64"},"accountNumber":{"type":"integer","format":"int64"},"isTaxIncluded":{"type":"boolean"},"amount":{"type":"number","format":"float"},"taxRate":{"type":"number","format":"float"},"taxRateUuid":{"type":["string","null"],"format":"uuid"}},"type":"object"}},"isTemplate":{"type":"boolean"},"openAmount":{"type":"number","format":"float"},"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"]},"type":{"type":"string","enum":["supplier_credit_note"]},"wasTaxIncluded":{"type":"boolean"},"wasRecognitionLimitReached":{"type":"boolean"}},"type":"object"},{"type":"null"}]}},"type":"object"}}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad Request, for instance when queue is already done","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers","https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"40da8d8e8ec62c60a0121acaeed189b2","x-required-scopes":["customers","suppliers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/calculate":{"post":{"tags":["document-quotes"],"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_10","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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"20b55f67e404cd85a0374fcccc508e62","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/comments":{"get":{"tags":["document-quotes"],"summary":"Get comment collection","description":"fetches comments of a document via pagination","operationId":"documents_list_comments_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}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"cfeee45601cf0c973e2e544db0cac940","x-required-scopes":["customers"]},"post":{"tags":["document-quotes"],"summary":"Create comment","description":"creates a new comment on a document either for internal or external use","operationId":"documents_create_comments_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"5393f05c0e9e865c66aadd280b69f8e4","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/files":{"get":{"tags":["document-quotes"],"summary":"Get Files","description":"Returns a list of files","operationId":"documents_list_files_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}},{"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fc5d3beeb7aad72dc70541e08a7d52fd","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{quoteUuid}/actions":{"get":{"tags":["document-quotes"],"summary":"Get actions","description":"Get quote actions","operationId":"documents_list_actions_5","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"quoteUuid","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"4a2325ee67a277dd71e3ac2aa4dc5fa0","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/bulk-actions/archive":{"patch":{"tags":["document-quotes"],"summary":"Execute archive bulk action","description":"Marks the document as archived","operationId":"documents_bulk_archive_quotes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"03a08dc65c5f005e8f10fe4f20ff6207","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/bulk-actions/collectInvoice":{"patch":{"tags":["document-quotes"],"summary":"Execute collectInvoice bulk action","description":"Creates a collective invoice out of the selected items","operationId":"documents_bulk_collect_invoice_quotes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"b867147f00e36791587324bba4f3748c","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/bulk-actions/markSent":{"patch":{"tags":["document-quotes"],"summary":"Execute markSent bulk action","description":"Triggers the mark sent action for each document","operationId":"documents_bulk_mark_sent_quotes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d1346280988e3a025672c36d03e3e30f","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/bulk-actions/massDownloadZip":{"patch":{"tags":["document-quotes"],"summary":"Execute massDownloadZip bulk action","description":"Zips and downloads each document. The result is sent to the inbox","operationId":"documents_bulk_mass_download_zip_quotes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"string"}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"f37992f149b84bc30ad2a6125832f61a","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/bulk-actions/massPrint":{"patch":{"tags":["document-quotes"],"summary":"Execute massPrint bulk action","description":"Triggers the print action for each document","operationId":"documents_bulk_mass_print_quotes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"oneOf":[{"type":"array","items":{},"maxItems":0},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"}]}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9c01da3a853c0e61d0a79dd0fa078195","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/bulk-actions/massSent":{"patch":{"tags":["document-quotes"],"summary":"Execute massSent bulk action","description":"Triggers the send action for each document","operationId":"documents_bulk_mass_sent_quotes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"f4bf0433a511d42c7adfcbe6b81862cb","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/bulk-actions/plannedMail":{"patch":{"tags":["document-quotes"],"summary":"Execute plannedMail bulk action","description":"Triggers the plan mail action for each document","operationId":"documents_bulk_planned_mail_quotes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"5ac657e33dd9c94deb040e857a8ea086","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/settings/auto-conversion":{"get":{"tags":["document-quote-settings"],"summary":"Get quote auto-conversion setting","description":"Get quote auto-conversion setting","operationId":"documents_list_auto_conversion","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Auto-conversion setting resource","properties":{"autoConversion":{"type":"string","enum":["NO_CONVERSION","INVOICE","CONTRACT_NOTE"]}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"23d017865d47f912af02c53749d64432","x-required-scopes":["settings"]},"patch":{"tags":["document-quote-settings"],"summary":"Update quote auto-conversion setting","description":"Update quote auto-conversion setting","operationId":"documents_update_auto_conversion","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"auto-conversion settings","required":true,"content":{"application/json":{"schema":{"title":"Update auto-conversion request","required":["autoConversion"],"properties":{"autoConversion":{"type":"string","enum":["NO_CONVERSION","INVOICE","CONTRACT_NOTE"]}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Auto-conversion setting resource","properties":{"autoConversion":{"type":"string","enum":["NO_CONVERSION","INVOICE","CONTRACT_NOTE"]}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"a9b1254a071534efba8a04ef18b4f6df","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/quotes/settings/default-conditions":{"get":{"tags":["document-quote-settings"],"summary":"Get quote default-condition settings","description":"Get quote default-condition settings","operationId":"documents_list_default_conditions_4","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Document default-conditions settings resource","properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"53b5db087b8c37cb8c0f5b5140883eb9","x-required-scopes":["settings"]},"patch":{"tags":["document-quote-settings"],"summary":"Update quote default-condition settings","description":"Update quote default-condition settings","operationId":"documents_update_default_conditions_4","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"default-condition settings","required":true,"content":{"application/json":{"schema":{"title":"Update default-condition settings request","required":[],"properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Document default-conditions settings resource","properties":{"de":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"en":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"fr":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"},"it":{"properties":{"defaultConditions":{"type":["string","null"]}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"3233748c693c80f4f9eb3a62514ff7d1","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/quotes/settings/signature-page":{"get":{"tags":["document-quote-settings"],"summary":"Get quote signature page settings","description":"Get quote signature page settings","operationId":"documents_list_signature_page","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Signature page setting resource","properties":{"isSignaturePageActive":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"423cddafd08bc46ba8787c33d3ed8ac7","x-required-scopes":["settings"]},"patch":{"tags":["document-quote-settings"],"summary":"Update quote signature page settings","description":"Update quote signature page settings","operationId":"documents_update_signature_page","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"signature page settings","required":true,"content":{"application/json":{"schema":{"title":"Update Signature Page Request","required":["isSignaturePageActive"],"properties":{"isSignaturePageActive":{"type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Signature page setting resource","properties":{"isSignaturePageActive":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"49b597a94ccde72c3a607db336b95a14","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/comments":{"get":{"tags":["document-receipts"],"summary":"Get comment collection","description":"fetches comments of a document via pagination","operationId":"documents_list_comments_7","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"71ffcf413f348957f3f056af5b0a0c17","x-required-scopes":["suppliers"]},"post":{"tags":["document-receipts"],"summary":"Create comment","description":"creates a new comment on a document either for internal or external use","operationId":"documents_create_comments_7","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"228804ef7851f039dfb0c2a51c80aa86","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/files":{"get":{"tags":["document-receipts"],"summary":"Get Files","description":"Returns a list of files","operationId":"documents_list_files_7","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"54b308940ec87e9108c4d3025b4fea8c","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{receiptUuid}/actions":{"get":{"tags":["document-receipts"],"summary":"Get actions","description":"Get receipt actions","operationId":"documents_list_actions_6","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"receiptUuid","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"4cb5d3790b087611a957b0e16220164b","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/bulk-actions/archive":{"patch":{"tags":["document-receipts"],"summary":"Execute archive bulk action","description":"Marks the document as archived","operationId":"documents_bulk_archive_receipts","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"ddcf484a77361e7d4ef775d486d02675","x-required-scopes":["suppliers"]}},"/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"}},"oneOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"subtitle"},"title":{"type":"string","maximum":255}},"required":["kind","title"]},{"type":"object","properties":{"kind":{"const":"text"},"text":{"type":"string","maximum":255}},"required":["kind","text"]},{"type":"object","properties":{"kind":{"const":"section_total"},"title":{"type":"string","maximum":255}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"divider"}},"required":["kind"]},{"type":"object","properties":{"kind":{"const":"group"},"title":{"type":"string","maximum":255},"items":{"type":"array","items":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","items"]},{"type":"object","properties":{"kind":{"const":"page_break"}},"required":["kind"]}],"$defs":{"productPosition":{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]},"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":{"allOf":[{"type":"object","oneOf":[{"properties":{"productUuid":{"type":"string","format":"uuid","description":"The product to use. Will use productNumber and unit of the given product. Takes precedence \"unitUuid\" and \"unitCode\""},"productNumber":false,"productDescription":{"type":["null","string"]}},"required":["productUuid"]},{"properties":{"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":["singlePrice","productDescription"]}],"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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"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"]}},"required":["kind"]}],"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"}}},"minItems":1,"description":"Only Items with the same VAT rate are allowed in a group"},"showCollapsed":{"type":"boolean","default":true}},"required":["kind","title","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","oneOf":[{"title":"Percentage discount","description":"The discount is a percentage of the total value","type":"object","properties":{"percentage":{"type":"number","minimum":0}},"required":["percentage"]},{"title":"Numeric discount","description":"A discount of a specific number","type":"object","properties":{"amount":{"type":"number","minimum":0}},"required":["amount"]},{"type":"null"}]},"invoiceDate":{"type":["string","null"],"format":"date"}},"required":["positions","currencyCode"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e804352cea922c679e758b6ebd5c3eb4","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/comments":{"get":{"tags":["document-supplier-credit-notes"],"summary":"Get comment collection","description":"fetches comments of a document via pagination","operationId":"documents_list_comments_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"a3329fc80844a21df6bdf9c1b7edb0ad","x-required-scopes":["suppliers"]},"post":{"tags":["document-supplier-credit-notes"],"summary":"Create comment","description":"creates a new comment on a document either for internal or external use","operationId":"documents_create_comments_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":201}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"ad1731875ea3f42f165d14bdd9ee5f45","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/files":{"get":{"tags":["document-supplier-credit-notes"],"summary":"Get Files","description":"Returns a list of files","operationId":"documents_list_files_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"}},"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"}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"17f6c2db6b91aee06242f738668afbb3","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{supplierCreditNoteUuid}/actions":{"get":{"tags":["document-supplier-credit-notes"],"summary":"Get actions","description":"Get supplier credit note actions","operationId":"documents_list_actions_8","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"supplierCreditNoteUuid","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"]}},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"df66c280b0cf204eb815db25a74609f4","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/bulk-actions/archive":{"patch":{"tags":["document-supplier-credit-notes"],"summary":"Execute archive bulk action","description":"Marks the document as archived","operationId":"documents_bulk_archive_supplier_credit_notes","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"a7d77acb376d713d2fe4fdc5a608e95b","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/archive":{"patch":{"tags":["document-contract-notes"],"summary":"Execute archive action","description":"Archives the document","operationId":"documents_update_archive","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"0eb9ca76c4484ed1808e4a72a654a189","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/cancel":{"patch":{"tags":["document-contract-notes"],"summary":"Execute cancel action","description":"Cancels and moves the document back to draft","operationId":"documents_update_cancel","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"84c4a5560b34964ef4f283ab5e6cfdcc","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/cancelPermanently":{"patch":{"tags":["document-contract-notes"],"summary":"Execute cancelPermanently action","description":"Cancels the document permanently. It cannot be edited afterwards","operationId":"documents_update_cancelPermanently","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c2610d329641dc51888400bf05e806d6","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/clone":{"patch":{"tags":["document-contract-notes"],"summary":"Execute clone action","description":"Creates a copy of the document","operationId":"documents_update_clone","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"2cddc3df9c7e77631d5c748417ec096d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/convertCNDN":{"patch":{"tags":["document-contract-notes"],"summary":"Execute convertCNDN action","description":"Creates a delivery note out of a contract note","operationId":"documents_update_convertCNDN","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8b573cdfa7e966a5344f02b1b347832f","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/convertCNI":{"patch":{"tags":["document-contract-notes"],"summary":"Execute convertCNI action","description":"Creates an invoice out of a contract note","operationId":"documents_update_convertCNI","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"bcbb9442eee895202c09f0b8724f7ead","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/convertTemplateToContractNote":{"patch":{"tags":["document-contract-notes"],"summary":"Execute convertTemplateToContractNote action","description":"Creates a contract note out of a template","operationId":"documents_update_convertTemplateToContractNote","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"1793c378362888fae08cbf480ee1efe7","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/convertToTemplate":{"patch":{"tags":["document-contract-notes"],"summary":"Execute convertToTemplate action","description":"Creates a template out of a document","operationId":"documents_update_convertToTemplate","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"1ad83574394c4b9c516a395bee0da885","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/createFinal":{"patch":{"tags":["document-contract-notes"],"summary":"Execute createFinal action","description":"Creates a final invoice for a contract note","operationId":"documents_update_createFinal","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Create Final Invoice Action Request","required":["relatedInvoiceDate","relatedDueDate"],"properties":{"relatedInvoiceDate":{"type":"string","format":"date"},"relatedDueDate":{"type":"string","format":"date"}},"type":"object"}}}},"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"printUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"31b6060aceacc5e52f8d6418812c40b0","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/createPartial":{"patch":{"tags":["document-contract-notes"],"summary":"Execute createPartial action","description":"Create a partial invoice for a contract note","operationId":"documents_update_createPartial","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Create Partial Invoice Action Request","required":["relatedInvoiceDate","relatedDueDate"],"properties":{"invoiceItemUuids":{"type":"array","items":{"type":"string","format":"uuid"}},"relatedInvoiceDate":{"type":"string","format":"date"},"relatedDueDate":{"type":"string","format":"date"}},"type":"object"}}}},"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"printUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d49b0a8be28cca18297f7cd187ba0e7e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/delete":{"patch":{"tags":["document-contract-notes"],"summary":"Execute delete action","description":"Deletes a document","operationId":"documents_update_delete","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"282d2e59f3d157f18bec421ffab2e758","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/downloadPdf":{"patch":{"tags":["document-contract-notes"],"summary":"Execute downloadPdf action","description":"Gets the download uri for the document's pdf","operationId":"documents_update_downloadPdf","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"downloadUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"87e57abc12c12e1de1aff47e48c84679","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/email":{"patch":{"tags":["document-contract-notes"],"summary":"Execute email action","description":"Sends the document via email","operationId":"documents_update_email","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9bf378f2f88f2189b8b9be80ad24a9a6","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/markSent":{"patch":{"tags":["document-contract-notes"],"summary":"Execute markSent action","description":"Marks the invoice as sent","operationId":"documents_update_markSent","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ab4a32cc0aa5af7f6e3c4847bd34aa5b","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/plannedMail":{"patch":{"tags":["document-contract-notes"],"summary":"Execute plannedMail action","description":"Schedules the email for sending the document","operationId":"documents_update_plannedMail","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"eaf94f3236dcb490db90f7b152c070bb","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/print":{"patch":{"tags":["document-contract-notes"],"summary":"Execute print action","description":"Creates the PDF for printing","operationId":"documents_update_print","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c2d71ec24d0a7d2c5939b2780e441d89","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions/restore":{"patch":{"tags":["document-contract-notes"],"summary":"Execute restore action","description":"Restores an archived document","operationId":"documents_update_restore","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"48853704acf74e6d79d5661691fb7736","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/comments/{commentUuid}":{"get":{"tags":["document-credit-notes"],"summary":"Get comment","description":"fetches a single comment of a document","operationId":"documents_get_comments","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"db057e816e35fe030daeb2fb402f40b1","x-required-scopes":["customers"]},"delete":{"tags":["document-credit-notes"],"summary":"Delete comment","description":"deletes a comment of a document, which cannot be restored anymore afterwards.","operationId":"documents_delete_comments","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":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ce39fa51ac98063284e9a308eee0442d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/files/{fileUuid}":{"get":{"tags":["document-credit-notes"],"summary":"Get File","description":"Returns a file","operationId":"documents_get_files","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d2da2ff7af91df5ac2c3aed92ec47812","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/settings/number-ranges/contract-notes":{"get":{"tags":["document-contract-note-settings"],"summary":"Get contract-note number range settings","description":"Get contract-note number range settings","operationId":"documents_list_contract_notes_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"5ef222a9ae8562a7609350bacf6f16bf","x-required-scopes":["settings"]},"patch":{"tags":["document-contract-note-settings"],"summary":"Update contract-note number range settings","description":"Update contract-note number range settings","operationId":"documents_update_contract_notes_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"6ad4e3301064d03212571b9de0225ce0","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/contract-notes/settings/number-ranges/templates":{"get":{"tags":["document-contract-note-settings"],"summary":"Get contract-note template number range settings","description":"Get contract-note template number range settings","operationId":"documents_list_templates","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"4bc1a25c0d58796d821cbaadff284b89","x-required-scopes":["settings"]},"patch":{"tags":["document-contract-note-settings"],"summary":"Update contract-note template number range settings","description":"Update contract-note template number range settings","operationId":"documents_update_templates","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"c5820e339514f1d956d8efc15e341743","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/archive":{"patch":{"tags":["document-credit-notes"],"summary":"Execute archive action","description":"Archives the document","operationId":"documents_update_archive_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9c29d3ec687c12e5594a8f5132714ef4","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/cancel":{"patch":{"tags":["document-credit-notes"],"summary":"Execute cancel action","description":"Cancels and moves the document back to draft","operationId":"documents_update_cancel_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"745d2554fcd01041f0569ba0e9b999e6","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/cancelPermanently":{"patch":{"tags":["document-credit-notes"],"summary":"Execute cancelPermanently action","description":"Cancels the document permanently. It cannot be edited afterwards","operationId":"documents_update_cancelPermanently_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"356a0c2bc49f35aeeaae7b31f6f6c039","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/clone":{"patch":{"tags":["document-credit-notes"],"summary":"Execute clone action","description":"Creates a copy of the document","operationId":"documents_update_clone_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ed358e5d1ed717b97a2f8f2c0f6338ab","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/convertTemplateToCreditNote":{"patch":{"tags":["document-credit-notes"],"summary":"Execute convertTemplateToCreditNote action","description":"Creates a credit note out of a template","operationId":"documents_update_convertTemplateToCreditNote","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e0f3dd0dae90fe91e4cd9c1bc491b1b5","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/convertToTemplate":{"patch":{"tags":["document-credit-notes"],"summary":"Execute convertToTemplate action","description":"Creates a template out of a document","operationId":"documents_update_convertToTemplate_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fffe1558d66524f62ac62366e545448d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/delete":{"patch":{"tags":["document-credit-notes"],"summary":"Execute delete action","description":"Deletes a document","operationId":"documents_update_delete_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"dbe2043a22182066b14cd2cd734766e5","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/downloadPdf":{"patch":{"tags":["document-credit-notes"],"summary":"Execute downloadPdf action","description":"Gets the download uri for the document's pdf","operationId":"documents_update_downloadPdf_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"downloadUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"2003fad7d935be263eacfc80459ba596","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/email":{"patch":{"tags":["document-credit-notes"],"summary":"Execute email action","description":"Sends the document via email","operationId":"documents_update_email_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"f577eabc3e631061064b610d1f8b1f62","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/markSent":{"patch":{"tags":["document-credit-notes"],"summary":"Execute markSent action","description":"Marks the invoice as sent","operationId":"documents_update_markSent_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"5bd1014b8da59d5f8d5c1b93766f80b9","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/plannedMail":{"patch":{"tags":["document-credit-notes"],"summary":"Execute plannedMail action","description":"Schedules the email for sending the document","operationId":"documents_update_plannedMail_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"3d0f557e559803c829b786ee937fbb4a","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/print":{"patch":{"tags":["document-credit-notes"],"summary":"Execute print action","description":"Creates the PDF for printing","operationId":"documents_update_print_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"f275cb53ca4503b1a5f77297ed9151b9","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/regeneratePdf":{"patch":{"tags":["document-credit-notes"],"summary":"Execute regeneratePdf action","description":"Regenerates the documents PDF","operationId":"documents_update_regeneratePdf","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Regenerate PDF Action Resource","type":"object","allOf":[{"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"},{"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"]},"fileUrl":{"type":["string","null"],"format":"uri"}},"type":"object"}]},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ae2d89127f6c8aaabaf47cc747a9192d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/restore":{"patch":{"tags":["document-credit-notes"],"summary":"Execute restore action","description":"Restores an archived document","operationId":"documents_update_restore_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c1b6bfecd85342060993400213df873e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/resync":{"patch":{"tags":["document-credit-notes"],"summary":"Execute resync action","description":"Resyncs the document to Abacus","operationId":"documents_update_resync","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e38ca9b6a93c32946877508b710b9acb","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/actions/sync":{"patch":{"tags":["document-credit-notes"],"summary":"Execute sync action","description":"Syncs the document to Abacus","operationId":"documents_update_sync","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"095683c92aad4c8be306ec144853f6c0","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/comments/{commentUuid}":{"get":{"tags":["document-credit-notes"],"summary":"Get comment","description":"fetches a single comment of a document","operationId":"documents_get_comments_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"78655290141161f26936bf449c5737ff","x-required-scopes":["customers"]},"delete":{"tags":["document-credit-notes"],"summary":"Delete comment","description":"deletes a comment of a document, which cannot be restored anymore afterwards.","operationId":"documents_delete_comments_2","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":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"d4071e58e1532e1cce86b47f56100c98","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid}/files/{fileUuid}":{"get":{"tags":["document-credit-notes"],"summary":"Get File","description":"Returns a file","operationId":"documents_get_files_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"395b1365065a89ec03368ef2d2d96b32","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/settings/number-ranges/credit-notes":{"get":{"tags":["document-credit-note-settings"],"summary":"Get credit-note number range settings","description":"Get credit-note number range settings","operationId":"documents_list_credit_notes_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"70da8bad0e6870c73a9a09650b36484d","x-required-scopes":["settings"]},"patch":{"tags":["document-credit-note-settings"],"summary":"Update credit-note number range settings","description":"Update credit-note number range settings","operationId":"documents_update_credit_notes_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"4e0909e094c30540d071b237b2b4c3ff","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/credit-notes/settings/number-ranges/templates":{"get":{"tags":["document-credit-note-settings"],"summary":"Get credit-note template number range settings","description":"Get credit-note template number range settings","operationId":"documents_list_templates_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"46e5eb40ea25a5763cc4ef4818fb15ed","x-required-scopes":["settings"]},"patch":{"tags":["document-credit-note-settings"],"summary":"Update credit-note template number range settings","description":"Update credit-note template number range settings","operationId":"documents_update_templates_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"7951d17c35d1d9182a219f59fd133f21","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/archive":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute archive action","description":"Archives the document","operationId":"documents_update_archive_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9604886119348d47c793d6029645fb01","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/cancel":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute cancel action","description":"Cancels and moves the document back to draft","operationId":"documents_update_cancel_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"9eec65fb9fe532a4a7ffa65f0ac4b8a8","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/cancelPermanently":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute cancelPermanently action","description":"Cancels the document permanently. It cannot be edited afterwards","operationId":"documents_update_cancelPermanently_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"3df47a0b38185ee313f68832abf1741b","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/clone":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute clone action","description":"Creates a copy of the document","operationId":"documents_update_clone_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"41f1d9a3775fa02854fa295820ed0c1d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/convertDNI":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute convertDNI action","description":"Creates an invoice out of a delivery note","operationId":"documents_update_convertDNI","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"4e5cde5d3aa689cb108ad8acbe4724ec","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/convertTemplateToDeliveryNote":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute convertTemplateToDeliveryNote action","description":"Creates a delivery note out of a template","operationId":"documents_update_convertTemplateToDeliveryNote","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"acffe954fa67286b531e276cf6c53c93","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/convertToTemplate":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute convertToTemplate action","description":"Creates a template out of a document","operationId":"documents_update_convertToTemplate_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"458d90ab2109753eab99a6883653e939","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/delete":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute delete action","description":"Deletes a document","operationId":"documents_update_delete_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"f005b7623c57aca143ffd16c5bdd771d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/downloadPdf":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute downloadPdf action","description":"Gets the download uri for the document's pdf","operationId":"documents_update_downloadPdf_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"downloadUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"a9f8fb8f7d5bea9a5a21e3c795f1bf5f","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/email":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute email action","description":"Sends the document via email","operationId":"documents_update_email_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8dc0252cbc9be58162bcad2bad5501f2","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/markSent":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute markSent action","description":"Marks the invoice as sent","operationId":"documents_update_markSent_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"ef4434d1b13fd6d879428f73438af260","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/plannedMail":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute plannedMail action","description":"Schedules the email for sending the document","operationId":"documents_update_plannedMail_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"24daa376f8dc897e0d587f634cdbc54f","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/print":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute print action","description":"Creates the PDF for printing","operationId":"documents_update_print_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"b3277a46262e46006829fb60ccf2595b","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/actions/restore":{"patch":{"tags":["document-delivery-notes"],"summary":"Execute restore action","description":"Restores an archived document","operationId":"documents_update_restore_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"99634e4d2866f5fcb86b61feb56bfddf","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/comments/{commentUuid}":{"get":{"tags":["document-delivery-notes"],"summary":"Get comment","description":"fetches a single comment of a document","operationId":"documents_get_comments_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"5b9b9676dd4983dc2e3d77809c396dd5","x-required-scopes":["customers"]},"delete":{"tags":["document-delivery-notes"],"summary":"Delete comment","description":"deletes a comment of a document, which cannot be restored anymore afterwards.","operationId":"documents_delete_comments_3","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":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"1d7bb970ded9f45618099a9620eeecf1","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/{documentUuid}/files/{fileUuid}":{"get":{"tags":["document-delivery-notes"],"summary":"Get File","description":"Returns a file","operationId":"documents_get_files_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"48aa66d129666da319e5e38be5b87436","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/settings/number-ranges/delivery-notes":{"get":{"tags":["document-delivery-note-settings"],"summary":"Get delivery-note number range settings","description":"Get delivery-note number range settings","operationId":"documents_list_delivery_notes_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"3cfd127993df6bb4473f01f8dea3efe9","x-required-scopes":["settings"]},"patch":{"tags":["document-delivery-note-settings"],"summary":"Update delivery-note number range settings","description":"Update delivery-note number range settings","operationId":"documents_update_delivery_notes_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"6f4b947ea2c2687f9fffee32c48753ae","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/delivery-notes/settings/number-ranges/templates":{"get":{"tags":["document-delivery-note-settings"],"summary":"Get delivery-note template number range settings","description":"Get delivery-note template number range settings","operationId":"documents_list_templates_3","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"dd874820340f2c04f504c78a20c65969","x-required-scopes":["settings"]},"patch":{"tags":["document-delivery-note-settings"],"summary":"Update delivery-note template number range settings","description":"Update delivery-note template number range settings","operationId":"documents_update_templates_3","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"bd823d7f15f52bc17bf675b6f0ef41c8","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/archive":{"patch":{"tags":["document-invoices"],"summary":"Execute archive action","description":"Archives the document","operationId":"documents_update_archive_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"663588a0e9b605f975f7c06fad85c1e3","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/cancel":{"patch":{"tags":["document-invoices"],"summary":"Execute cancel action","description":"Cancels and moves the document back to draft","operationId":"documents_update_cancel_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"3486047b02134ea6de9eb49efd267467","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/cancelPermanently":{"patch":{"tags":["document-invoices"],"summary":"Execute cancelPermanently action","description":"Cancels the document permanently. It cannot be edited afterwards","operationId":"documents_update_cancelPermanently_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"870aae031c0f44f6ff30520f17cefb35","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/clone":{"patch":{"tags":["document-invoices"],"summary":"Execute clone action","description":"Creates a copy of the document","operationId":"documents_update_clone_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c3ab8cdce79d8bfe4f3711eaf9a036ef","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertDN":{"patch":{"tags":["document-invoices"],"summary":"Execute convertDN action","description":"Creates a delivery note out of an invoice","operationId":"documents_update_convertDN","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"f8364a3288eccd05a3079a7374ec92f8","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertIC":{"patch":{"tags":["document-invoices"],"summary":"Execute convertIC action","description":"Creates a credit note out of an invoice","operationId":"documents_update_convertIC","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"6184deef3d65f64c4877902b020c39f8","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertT":{"patch":{"tags":["document-invoices"],"summary":"Execute convertT action","description":"Creates a template out of an invoice","operationId":"documents_update_convertT","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"807340c402941fd2e8eab88016ee2d21","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertTI":{"patch":{"tags":["document-invoices"],"summary":"Execute convertTI action","description":"Creates an invoice out of a template","operationId":"documents_update_convertTI","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"438f824700679f2190a1497578824c03","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/convertToTemplate":{"patch":{"tags":["document-invoices"],"summary":"Execute convertToTemplate action","description":"Creates a template out of a document","operationId":"documents_update_convertToTemplate_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"87cfcf25b8b562d95104ee0cb4c97a58","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/customerPortalUrl":{"patch":{"tags":["document-invoices"],"summary":"Execute customerPortalUrl action","description":"Gets the customer portal link","operationId":"documents_update_customerPortalUrl","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"customerPortalUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"0f3ce353b7da6688991bdc2f9959e4f9","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/delete":{"patch":{"tags":["document-invoices"],"summary":"Execute delete action","description":"Deletes a document","operationId":"documents_update_delete_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"38d676479c7a9dde054de80be270bf04","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/downloadPaymentConfirmation":{"patch":{"tags":["document-invoices"],"summary":"Execute downloadPaymentConfirmation action","description":"Gets the download uri for the document's payment confirmation","operationId":"documents_update_downloadPaymentConfirmation","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"downloadUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"0e00c0dfdd2e82285544004c5c9e9ded","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/downloadPdf":{"patch":{"tags":["document-invoices"],"summary":"Execute downloadPdf action","description":"Gets the download uri for the document's pdf","operationId":"documents_update_downloadPdf_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"downloadUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"56bc5f6af6a1ad379454dbf0df77b73d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/dunningDate":{"patch":{"tags":["document-invoices"],"summary":"Execute dunningDate action","description":"Sets the custom dunning date","operationId":"documents_update_dunningDate","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Set Custom Dunning Date Request","required":["customDunningDate"],"properties":{"customDunningDate":{"type":["string","null"],"format":"date"}},"type":"object"}}}},"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"b99d8d59092591b74e513d413d39afeb","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/dunningPrint":{"patch":{"tags":["document-invoices"],"summary":"Execute dunningPrint action","description":"Prints the dunning letter for the invoice","operationId":"documents_update_dunningPrint","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"printUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e04aa1c7102efedf8d34dba5793f83c4","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/dunningSent":{"patch":{"tags":["document-invoices"],"summary":"Execute dunningSent action","description":"Sends the dunning letter for the invoice","operationId":"documents_update_dunningSent","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"92878dde0284b794a1dc05cbc98b47c8","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/email":{"patch":{"tags":["document-invoices"],"summary":"Execute email action","description":"Sends the document via email","operationId":"documents_update_email_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"2433fb158d93b4c498bab24301e4c888","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/markSent":{"patch":{"tags":["document-invoices"],"summary":"Execute markSent action","description":"Marks the invoice as sent","operationId":"documents_update_markSent_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"04a12d2b30be9421a7f60307fd7e4488","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/plannedMail":{"patch":{"tags":["document-invoices"],"summary":"Execute plannedMail action","description":"Schedules the email for sending the document","operationId":"documents_update_plannedMail_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"36e82e2d01cadc3a8bccfafcdf48ddbd","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/print":{"patch":{"tags":["document-invoices"],"summary":"Execute print action","description":"Creates the PDF for printing","operationId":"documents_update_print_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"1d407671477d931cd02bee780eb74755","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/regeneratePdf":{"patch":{"tags":["document-invoices"],"summary":"Execute regeneratePdf action","description":"Regenerates the documents PDF","operationId":"documents_update_regeneratePdf_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Regenerate PDF Action Resource","type":"object","allOf":[{"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"},{"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"]},"fileUrl":{"type":["string","null"],"format":"uri"}},"type":"object"}]},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"67cd13b5f58df1ddacaf34fb5c991cc1","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/restore":{"patch":{"tags":["document-invoices"],"summary":"Execute restore action","description":"Restores an archived document","operationId":"documents_update_restore_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"a5f6683fb32ed87ad5b647e25945c95f","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/resync":{"patch":{"tags":["document-invoices"],"summary":"Execute resync action","description":"Resyncs the document to Abacus","operationId":"documents_update_resync_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"4bf66bb1ea29aff18c739b17e67bc75d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/sendAbaNet":{"patch":{"tags":["document-invoices"],"summary":"Execute sendAbaNet action","description":"Sends the invoice via AbaNet","operationId":"documents_update_sendAbaNet","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"4cccc2f37b8bd1c44fa40d9bda226328","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/sendPaymentConfirmation":{"patch":{"tags":["document-invoices"],"summary":"Execute sendPaymentConfirmation action","description":"Sends the payment confirmation","operationId":"documents_update_sendPaymentConfirmation","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"1d6f0597684a337ea861bf349627f8e4","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/setDunningAmounts":{"patch":{"tags":["document-invoices"],"summary":"Execute setDunningAmounts action","description":"Sets the dunning amounts for the invoice","operationId":"documents_update_setDunningAmounts","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Set Dunning Amounts Request","required":[],"properties":{"customDunningAmount1":{"description":"Amount for first reminder. Must be omitted if reminder was already sent. If null the account settings will be used.","type":["number","null"],"minimum":0},"customDunningAmount2":{"description":"Amount for second reminder. Must be greater or equal than the first reminder amount. Must be omitted if reminder was already sent. If null the account settings will be used.","type":["number","null"],"minimum":0},"customDunningAmount3":{"description":"Amount for third reminder. Must be greater or equal than the second reminder amount. If null the account settings will be used.","type":["number","null"],"minimum":0}},"type":"object"}}}},"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request due to decreasing amounts or attempt to set an amount for a level already sent","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"63f8e6ff979662f86f5532432314afd5","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/actions/sync":{"patch":{"tags":["document-invoices"],"summary":"Execute sync action","description":"Syncs the document to Abacus","operationId":"documents_update_sync_2","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"861d0384badcbc91775cd25a8b7a7076","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/comments/{commentUuid}":{"get":{"tags":["document-invoices"],"summary":"Get comment","description":"fetches a single comment of a document","operationId":"documents_get_comments_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"60ff2b8a2b7765a049d9abe35b28a96f","x-required-scopes":["customers"]},"delete":{"tags":["document-invoices"],"summary":"Delete comment","description":"deletes a comment of a document, which cannot be restored anymore afterwards.","operationId":"documents_delete_comments_4","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":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"8ffac14216176568f6e2bb1b4bef3360","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/{documentUuid}/files/{fileUuid}":{"get":{"tags":["document-invoices"],"summary":"Get File","description":"Returns a file","operationId":"documents_get_files_4","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"7d437f6465c7b2a47debc52a72a5d6d0","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/dunnings/dunning-level-1":{"get":{"tags":["document-invoice-settings"],"summary":"Get First Dunning Settings","description":"Returns the first dunning settings","operationId":"documents_list_dunning_level_1","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"347bda51ae111ece19d9bcb24659782c","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update First Dunning Settings","description":"Updates the first dunning settings","operationId":"documents_update_dunning_level_1","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update the first dunning settings","required":true,"content":{"application/json":{"schema":{"title":"Update Dunning Level Settings Request","required":[],"properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"b41ac4707113a29e73eb055544d935b8","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/dunnings/dunning-level-2":{"get":{"tags":["document-invoice-settings"],"summary":"Get Second Dunning Settings","description":"Returns the second dunning settings","operationId":"documents_list_dunning_level_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"f481b328066b1aa826c617ad26f5d0a5","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update Second Dunning Settings","description":"Updates the second dunning settings","operationId":"documents_update_dunning_level_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update the second dunning settings","required":true,"content":{"application/json":{"schema":{"title":"Update Dunning Level Settings Request","required":[],"properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"450e540997d6a676f7472b27b246ca14","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/dunnings/dunning-level-3":{"get":{"tags":["document-invoice-settings"],"summary":"Get Third Dunning Settings","description":"Returns the third dunning settings","operationId":"documents_list_dunning_level_3","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"8b617449fb12b84607f63848ce5b9986","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update Third Dunning Settings","description":"Updates the third dunning settings","operationId":"documents_update_dunning_level_3","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"Update the third dunning settings","required":true,"content":{"application/json":{"schema":{"title":"Update Dunning Level Settings Request","required":[],"properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string","maxLength":100}},"type":"object"}},"type":"object"}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"DunningLevelSettingsResource","properties":{"isEnabled":{"type":"boolean"},"numberOfDays":{"type":"integer"},"direction":{"type":"integer","enum":[1,2]},"field":{"type":"integer","enum":[1,2]},"dunningAmount":{"description":"Amount for the dunning level. If null the previous level's amount will be used if set.","type":["number","null"],"minimum":0},"isPrintActive":{"type":"boolean"},"translations":{"properties":{"de":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"en":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"fr":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"},"it":{"properties":{"emailSubject":{"type":"string"},"emailTemplate":{"type":"string"},"dunningLetter":{"type":"string"},"dunningAmountLabel":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"f5008337d8130712c6148e41ebf50f9f","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/number-ranges/invoices":{"get":{"tags":["document-invoice-settings"],"summary":"Get invoice number range settings","description":"Get invoice number range settings","operationId":"documents_list_invoices_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"5e3028dccba6c7dea3f810f6c2845b8e","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update invoice number range settings","description":"Update invoice number range settings","operationId":"documents_update_invoices_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"5875e014a17ff7183c38c756a4f07fe1","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/number-ranges/recurring-invoices":{"get":{"tags":["document-invoice-settings"],"summary":"Get recurring invoice number range settings","description":"Get recurring invoice number range settings","operationId":"documents_list_recurring_invoices","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"44233205ce2171d6b0cacb3d030ad35b","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update recurring invoice number range settings","description":"Update recurring invoice number range settings","operationId":"documents_update_recurring_invoices","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"3a1dda1d06a69c7a32411e507604ae0b","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/invoices/settings/number-ranges/templates":{"get":{"tags":["document-invoice-settings"],"summary":"Get invoice template number range settings","description":"Get invoice template number range settings","operationId":"documents_list_templates_4","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"4bb5fe2732bcedd1a6a1e8e66178c7c9","x-required-scopes":["settings"]},"patch":{"tags":["document-invoice-settings"],"summary":"Update invoice template number range settings","description":"Update invoice template number range settings","operationId":"documents_update_templates_4","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"b5ac5e274c519cf752ec249f766bdf09","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/archive":{"patch":{"tags":["document-quotes"],"summary":"Execute archive action","description":"Archives the document","operationId":"documents_update_archive_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"b482c3bf0379d400cc6f2b50fd9feb26","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/cancel":{"patch":{"tags":["document-quotes"],"summary":"Execute cancel action","description":"Cancels and moves the document back to draft","operationId":"documents_update_cancel_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c1a9ffa395662f9cc8f32646407ed97a","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/cancelPermanently":{"patch":{"tags":["document-quotes"],"summary":"Execute cancelPermanently action","description":"Cancels the document permanently. It cannot be edited afterwards","operationId":"documents_update_cancelPermanently_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"efc593d83a1cf2081d60a8ce367e4d7b","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/clone":{"patch":{"tags":["document-quotes"],"summary":"Execute clone action","description":"Creates a copy of the document","operationId":"documents_update_clone_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"2d730ba1bfb547af30d47fa8e694347e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/convert":{"patch":{"tags":["document-quotes"],"summary":"Execute convert action","description":"Creates an invoice out of a quote","operationId":"documents_update_convert","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"6fed8cf5c26254e11f801d0b1491b811","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/convertCN":{"patch":{"tags":["document-quotes"],"summary":"Execute convertCN action","description":"Creates a contract note out of a quote","operationId":"documents_update_convertCN","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"e6fcaba3655787901814435e690b91c8","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/convertTemplateToQuote":{"patch":{"tags":["document-quotes"],"summary":"Execute convertTemplateToQuote action","description":"Creates a quote out of a template","operationId":"documents_update_convertTemplateToQuote","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"80d18c066436d7d7cfaad14ba8977962","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/convertToTemplate":{"patch":{"tags":["document-quotes"],"summary":"Execute convertToTemplate action","description":"Creates a template out of a document","operationId":"documents_update_convertToTemplate_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fb67e7db3ca2de6774b9da626f60257e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/delete":{"patch":{"tags":["document-quotes"],"summary":"Execute delete action","description":"Deletes a document","operationId":"documents_update_delete_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"731e33ab0f59280d0844299128478342","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/downloadPdf":{"patch":{"tags":["document-quotes"],"summary":"Execute downloadPdf action","description":"Gets the download uri for the document's pdf","operationId":"documents_update_downloadPdf_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"downloadUrl":{"type":"string","format":"uri"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"afb1ce91d84f775c6ae9bdbefcf19b41","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/email":{"patch":{"tags":["document-quotes"],"summary":"Execute email action","description":"Sends the document via email","operationId":"documents_update_email_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"dcd92cf95daf28c56a025d29463e4832","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/markApproved":{"patch":{"tags":["document-quotes"],"summary":"Execute markApproved action","description":"Marks the quote as approved","operationId":"documents_update_markApproved","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"defa7e5e54ea7daf0712a2a545bfce3d","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/markDeclined":{"patch":{"tags":["document-quotes"],"summary":"Execute markDeclined action","description":"Marks the quote as declined","operationId":"documents_update_markDeclined","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"50ee1822d3ec42aa8b0875c9db4989e9","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/markSent":{"patch":{"tags":["document-quotes"],"summary":"Execute markSent action","description":"Marks the invoice as sent","operationId":"documents_update_markSent_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"09c2fa33c3e845c1ab6d78f4214657d7","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/plannedMail":{"patch":{"tags":["document-quotes"],"summary":"Execute plannedMail action","description":"Schedules the email for sending the document","operationId":"documents_update_plannedMail_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"318d2e1e159dacadd2b602f141bb71ab","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/print":{"patch":{"tags":["document-quotes"],"summary":"Execute print action","description":"Creates the PDF for printing","operationId":"documents_update_print_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"printUrl":{"type":"string","format":"uri"},"document":{"properties":{"url":{"type":"string","format":"uri"},"preview_url":{"type":"string","format":"uri"}},"type":"object"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"fe9d0c87aeaed21fdaf2266f4fecf3fd","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions/restore":{"patch":{"tags":["document-quotes"],"summary":"Execute restore action","description":"Restores an archived document","operationId":"documents_update_restore_5","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"68412d1763b2e56ba5cba8869f0a929c","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/comments/{commentUuid}":{"get":{"tags":["document-quotes"],"summary":"Get comment","description":"fetches a single comment of a document","operationId":"documents_get_comments_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":"commentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"90612a596911ddaf3b1035d3f0ad9dff","x-required-scopes":["customers"]},"delete":{"tags":["document-quotes"],"summary":"Delete comment","description":"deletes a comment of a document, which cannot be restored anymore afterwards.","operationId":"documents_delete_comments_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":"commentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"Successful response"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c85c8b4ff9a794c86c15806fee93c61c","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/files/{fileUuid}":{"get":{"tags":["document-quotes"],"summary":"Get File","description":"Returns a file","operationId":"documents_get_files_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":"fileUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"70005b91514661ef6028347bbbe94b46","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/quotes/settings/number-ranges/quotes":{"get":{"tags":["document-quote-settings"],"summary":"Get quote number range settings","description":"Get quote number range settings","operationId":"documents_list_quotes_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"4ca6f2a50597cab7b78aa347a1a8cdb8","x-required-scopes":["settings"]},"patch":{"tags":["document-quote-settings"],"summary":"Update quote number range settings","description":"Update quote number range settings","operationId":"documents_update_quotes_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"f823b6a4f730600a9cb74a9082a0eb45","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/quotes/settings/number-ranges/templates":{"get":{"tags":["document-quote-settings"],"summary":"Get quote template number range settings","description":"Get quote template number range settings","operationId":"documents_list_templates_5","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"19b986f2e1c56e400f0ed76748829d68","x-required-scopes":["settings"]},"patch":{"tags":["document-quote-settings"],"summary":"Update quote template number range settings","description":"Update quote template number range settings","operationId":"documents_update_templates_5","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"39c1288cd84c405b76f34701fcebd085","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/actions/archive":{"patch":{"tags":["document-receipts"],"summary":"Execute archive action","description":"Archives the document","operationId":"documents_update_archive_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"74804b7052f3f1e20c3c6f9f1159483d","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/actions/cancel":{"patch":{"tags":["document-receipts"],"summary":"Execute cancel action","description":"Cancels and moves the document back to draft","operationId":"documents_update_cancel_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"3e3abdcd0882610cbb23fda6a427a492","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/actions/cancelPermanently":{"patch":{"tags":["document-receipts"],"summary":"Execute cancelPermanently action","description":"Cancels the document permanently. It cannot be edited afterwards","operationId":"documents_update_cancelPermanently_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"de5497d70febdf69b862799566af102a","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/actions/delete":{"patch":{"tags":["document-receipts"],"summary":"Execute delete action","description":"Deletes a document","operationId":"documents_update_delete_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"f825877211b5995991958200320b566e","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/actions/offsetSupplierCreditNotes":{"patch":{"tags":["document-receipts"],"summary":"Execute offsetSupplierCreditNotes action","description":"Offsets supplier credit notes to the receipt","operationId":"documents_update_offsetSupplierCreditNotes","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Offset Supplier Credit Notes Action Request","required":["supplierCreditNoteUuids"],"properties":{"supplierCreditNoteUuids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"valutaDate":{"type":["string","null"],"format":"date"}},"type":"object"}}}},"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"counter":{"type":"integer"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"25dfd6aad7f73e210b6754c110fd9085","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/actions/regeneratePdf":{"patch":{"tags":["document-receipts"],"summary":"Execute regeneratePdf action","description":"Regenerates the documents PDF","operationId":"documents_update_regeneratePdf_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Regenerate PDF Action Resource","type":"object","allOf":[{"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"},{"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"]},"fileUrl":{"type":["string","null"],"format":"uri"}},"type":"object"}]},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"25e204ff4e09579d5dd4bfa54a42f19d","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/actions/restore":{"patch":{"tags":["document-receipts"],"summary":"Execute restore action","description":"Restores an archived document","operationId":"documents_update_restore_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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"7fe2661f7244e881191cd63f57b814eb","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/actions/resync":{"patch":{"tags":["document-receipts"],"summary":"Execute resync action","description":"Resyncs the document to Abacus","operationId":"documents_update_resync_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"673f3a908b0038f428e0c49ff0d0c65d","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/actions/sync":{"patch":{"tags":["document-receipts"],"summary":"Execute sync action","description":"Syncs the document to Abacus","operationId":"documents_update_sync_3","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"86c6c5bf8e669d1826d881edc0c46d37","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/comments/{commentUuid}":{"get":{"tags":["document-receipts"],"summary":"Get comment","description":"fetches a single comment of a document","operationId":"documents_get_comments_7","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"89969bba0821407998910f1a724f91ed","x-required-scopes":["suppliers"]},"delete":{"tags":["document-receipts"],"summary":"Delete comment","description":"deletes a comment of a document, which cannot be restored anymore afterwards.","operationId":"documents_delete_comments_7","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":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"035ae904f7f1f5fde8d5bad70ca800af","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/{documentUuid}/files/{fileUuid}":{"get":{"tags":["document-receipts"],"summary":"Get File","description":"Returns a file","operationId":"documents_get_files_7","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"f863a51d5a343ee563004b237539e5ed","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/receipts/settings/auto-processing/abaclik":{"get":{"tags":["document-receipt-settings"],"summary":"Get AbaClik auto-processing settings","description":"Get AbaClik auto-processing settings","operationId":"documents_list_abaclik","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Auto-processing setting resource","properties":{"limit":{"type":"number","format":"float","minimum":1},"isActive":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"7199f6a4aa05dc3d64176f89a56dfef6","x-required-scopes":["settings"]},"patch":{"tags":["document-receipt-settings"],"summary":"Update AbaClik auto-processing settings","description":"Update AbaClik auto-processing settings","operationId":"documents_update_abaclik","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"auto-processing settings","required":true,"content":{"application/json":{"schema":{"title":"Update auto-processing setting request","required":[],"properties":{"limit":{"type":"number","format":"float","minimum":1},"isActive":{"type":"boolean"},"isAutoImportActive":{"description":"Skip Editor in AbaNinja","type":"boolean","default":false}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Auto-processing setting resource","properties":{"limit":{"type":"number","format":"float","minimum":1},"isActive":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"fe5c852e9b01a3461d646193d3445a59","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/receipts/settings/auto-processing/deepcloud":{"get":{"tags":["document-receipt-settings"],"summary":"Get DeepCloud auto-processing settings","description":"Get DeepCloud auto-processing settings","operationId":"documents_list_deepcloud","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Auto-processing setting resource","properties":{"limit":{"type":"number","format":"float","minimum":1},"isActive":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"5917d27f2775bb6afc69292a21db9496","x-required-scopes":["settings"]},"patch":{"tags":["document-receipt-settings"],"summary":"Update DeepCloud auto-processing settings","description":"Update DeepCloud auto-processing settings","operationId":"documents_update_deepcloud","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"auto-processing settings","required":true,"content":{"application/json":{"schema":{"title":"Update auto-processing setting request","required":[],"properties":{"limit":{"type":"number","format":"float","minimum":1},"isActive":{"type":"boolean"},"isAutoImportActive":{"description":"Skip Editor in AbaNinja","type":"boolean","default":false}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Auto-processing setting resource","properties":{"limit":{"type":"number","format":"float","minimum":1},"isActive":{"type":"boolean"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"6c21038abc011ec09de077a66c519dfb","x-required-scopes":["settings"]}},"/accounts/{accountUuid}/documents/v2/receipts/settings/number-ranges/receipts":{"get":{"tags":["document-receipt-settings"],"summary":"Get receipt number range settings","description":"Get receipt number range settings","operationId":"documents_list_receipts_2","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"40c1d49ec0a2c741a318dac41b0afc0f","x-required-scopes":["settings"]},"patch":{"tags":["document-receipt-settings"],"summary":"Update receipt number range settings","description":"Update receipt number range settings","operationId":"documents_update_receipts","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"description":"number range settings","required":true,"content":{"application/json":{"schema":{"title":"Update number range request","required":[],"properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"title":"Number range settings resource","properties":{"counter":{"type":"number","format":"int64","minimum":1},"pattern":{"type":"string"},"padding":{"type":"number","format":"int64","maximum":8,"minimum":1}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/settings"]}],"x-legacy-operation-id":"679c075a20c73f0c30945fe5328408b6","x-required-scopes":["settings"]}},"/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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/customers"]}],"x-legacy-operation-id":"c0e4f093ef0d3d51a091ac1561f4ef3e","x-required-scopes":["customers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/actions/archive":{"patch":{"tags":["document-supplier-credit-notes"],"summary":"Execute archive action","description":"Archives the document","operationId":"documents_update_archive_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"d2f3fdc080ba0c56f7d64ba6e4c5ceb3","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/actions/cancel":{"patch":{"tags":["document-supplier-credit-notes"],"summary":"Execute cancel action","description":"Cancels and moves the document back to draft","operationId":"documents_update_cancel_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"feeff3afc04fa21efca52ff4c72f4115","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/actions/cancelPermanently":{"patch":{"tags":["document-supplier-credit-notes"],"summary":"Execute cancelPermanently action","description":"Cancels the document permanently. It cannot be edited afterwards","operationId":"documents_update_cancelPermanently_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"5587ade0f7025e5a09e607cb19db7891","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/actions/delete":{"patch":{"tags":["document-supplier-credit-notes"],"summary":"Execute delete action","description":"Deletes a document","operationId":"documents_update_delete_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"00742682c635331975f11d6834ec45cd","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/actions/offsetReceipts":{"patch":{"tags":["document-supplier-credit-notes"],"summary":"Execute offsetReceipts action","description":"Offsets the supplier credit note to receipts","operationId":"documents_update_offsetReceipts","parameters":[{"name":"accountUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"documentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Offset Receipts Action Request","required":["receiptUuids"],"properties":{"receiptUuids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1},"valutaDate":{"type":["string","null"],"format":"date"}},"type":"object"}}}},"responses":{"200":{"description":"Successfully executed action","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{"properties":{"counter":{"type":"integer"}},"type":"object"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"0e78cc7af4a2419bcff378c31ea979ca","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/actions/restore":{"patch":{"tags":["document-supplier-credit-notes"],"summary":"Execute restore action","description":"Restores an archived document","operationId":"documents_update_restore_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"cac5b7b7cc41abe603bdd862f8ec033a","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/actions/signSupplierCreditNote":{"patch":{"tags":["document-supplier-credit-notes"],"summary":"Execute signSupplierCreditNote action","description":"Signs the supplier credit note","operationId":"documents_update_signSupplierCreditNote","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"properties":{"data":{},"status":{"example":200}},"type":"object"}]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"6ae3a62019b66946e55b9347e945482b","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/comments/{commentUuid}":{"get":{"tags":["document-supplier-credit-notes"],"summary":"Get comment","description":"fetches a single comment of a document","operationId":"documents_get_comments_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"a0bc2e74696ac3195c714e15198868d8","x-required-scopes":["suppliers"]},"delete":{"tags":["document-supplier-credit-notes"],"summary":"Delete comment","description":"deletes a comment of a document, which cannot be restored anymore afterwards.","operationId":"documents_delete_comments_8","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":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"f95cd544b46a9f4fb33dc21969a99ee0","x-required-scopes":["suppliers"]}},"/accounts/{accountUuid}/documents/v2/supplier-credit-notes/{documentUuid}/files/{fileUuid}":{"get":{"tags":["document-supplier-credit-notes"],"summary":"Get File","description":"Returns a file","operationId":"documents_get_files_8","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":{"allOf":[{"description":"The response format of most endpoints for successful requests","required":["data","message","status"],"properties":{"data":{"title":"data"},"message":{"title":"message","type":"string"},"status":{"title":"status","description":"HTTP status code","type":"integer"},"meta":{"title":"meta","type":["object","null"]}},"type":"object"},{"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"},"status":{"example":200}},"type":"object"}]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"allOf":[{"description":"The response format of most endpoints for erronous requests","required":["detail","type","message","status"],"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"}},"type":"object"},{"properties":{}}]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"074f9f42a959c5fc5b68d0e4cfa7afdf","x-required-scopes":["suppliers"]}}},"components":{"securitySchemes":{"ApiToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Create tokens in Settings > API Token."}}}}