{"openapi":"3.1.0","info":{"title":"AbaNinja Documents API - Receipts","version":"3.0.0","x-domain-id":"documents"},"servers":[{"url":"https://api.abaninja.ch","description":"The AbaNinja API server"}],"tags":[{"name":"document-receipts","description":"Manage receipt documents","x-displayName":"Receipts"}],"security":[{"ApiToken":[]}],"paths":{"/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":{}},{"name":"limit","in":"query","description":"pagination limit","required":false,"schema":{"type":["number","null"],"maximum":400,"minimum":1}},{"name":"page","in":"query","description":"pagination page","required":false,"schema":{"type":["number","null"],"default":1,"minimum":1}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"properties":{"data":{"properties":{"documents":{"type":"array","items":{"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":{"properties":{"addressUuid":{"type":["string","null"],"format":"uuid"},"companyUuid":{"type":"string","format":"uuid"},"networkUuid":{"type":["string","null"],"format":"uuid"},"networkKey":{"type":["string","null"]},"networkName":{"type":["string","null"]},"deliveryAddressUuid":{"type":["string","null"],"format":"uuid"},"contactPersonUuid":{"type":["string","null"],"format":"uuid"},"additionalReceivers":{"type":"array","items":{"properties":{"personUuid":{"type":"string","format":"uuid"}},"type":"object"}},"receiverInformation":{"title":"Receiver Information Resource","description":"Receiver information resource","properties":{"customerNumber":{"type":["string","null"],"readOnly":true},"companyName":{"type":["string","null"],"readOnly":true},"name":{"type":["string","null"],"readOnly":true},"nameWithSalutation":{"type":["string","null"],"readOnly":true},"careOfAddress":{"type":["string","null"],"readOnly":true},"address":{"type":["string","null"],"readOnly":true},"extension":{"type":["string","null"],"readOnly":true},"houseNumber":{"type":["string","null"],"readOnly":true},"zipCode":{"type":["string","null"],"readOnly":true},"city":{"type":["string","null"],"readOnly":true},"countryCode":{"type":["string","null"],"readOnly":true},"email":{"type":["string","null"],"format":"email","readOnly":true},"language":{"type":["string","null"],"readOnly":true,"enum":["de","en","fr","it"]},"deliveryAddress":{"properties":{"companyName":{"type":["string","null"],"readOnly":true},"name":{"type":["string","null"],"readOnly":true},"nameWithSalutation":{"type":["string","null"],"readOnly":true},"careOfAddress":{"type":["string","null"],"readOnly":true},"address":{"type":["string","null"],"readOnly":true},"extension":{"type":["string","null"],"readOnly":true},"houseNumber":{"type":["string","null"],"readOnly":true},"zipCode":{"type":["string","null"],"readOnly":true},"city":{"type":["string","null"],"readOnly":true},"countryCode":{"type":["string","null"],"readOnly":true}},"type":"object","readOnly":true},"additionalReceivers":{"type":"array","items":{"properties":{"fullName":{"type":["string","null"],"readOnly":true},"email":{"type":["string","null"],"readOnly":true}},"type":"object"},"readOnly":true}},"type":"object"},"personUuid":{"type":["string","null"],"format":"uuid"}}},"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"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"167ed3bd2bcd729a3763b621ccd898b4","x-required-scopes":["suppliers"]}},"/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":{"properties":{"data":{"type":"object","example":{"archive":"Archive","cancel":"Cancel","delete":"Delete"},"additionalProperties":{"description":"description of the action","type":"string"},"propertyNames":{"enum":["paymentAdd","archive","cancel","cancelPermanently","clone","collectInvoice","convertCNDN","convertCNI","convertDNI","convertIC","convertDN","convertT","convertCN","convert","convertTemplateToContractNote","convertTemplateToCreditNote","convertTemplateToDeliveryNote","convertTI","convertTemplateToQuote","convertToTemplate","createFinal","createInstalments","createPartial","createOnAccount","customerPortalUrl","delete","dissolve","downloadPdf","downloadPaymentConfirmation","dunningPrint","dunningSent","dunningDate","setDunningAmounts","edit","activity","info","email","markApproved","markDeclined","markSent","massDownloadZip","massDunningPrint","massDunningSent","massPrint","massSent","offsetCreditNotes","offsetInvoices","offsetReceipts","offsetSupplierCreditNotes","plannedMail","print","regeneratePdf","resync","restore","save","sendPaymentConfirmation","sendAbaNet","sendDeepSign","sign","signSupplierCreditNote","sync"]}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"8b790c818770cc127fd555c004407a4b","x-required-scopes":["suppliers"]}},"/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":{"properties":{"data":{"type":"array","items":{"title":"Document Comment Resource","properties":{"uuid":{"type":"string","format":"uuid"},"authorUserUuid":{"type":["string","null"],"format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"userName":{"type":"string"},"comment":{"type":"string"},"type":{"description":"Defines if it is only for internal use or if customers can see the comments","type":"string","enum":["intern","extern"]},"isDeletable":{"description":"if the current user can delete the comment","type":"boolean"}},"type":"object"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"properties":{"pagination":{"properties":{"currentPage":{"type":"integer","minimum":1},"firstPageUrl":{"type":["string","null"],"format":"uri"},"from":{"type":["integer","null"],"example":1},"lastPage":{"type":"integer"},"lastPageUrl":{"type":"string","format":"uri"},"nextPageUrl":{"type":["string","null"],"format":"uri"},"perPage":{"type":"integer","example":50},"previousPageUrl":{"type":["string","null"],"format":"uri"},"to":{"type":["integer","null"],"example":50},"totalItems":{"type":"integer"}},"type":"object"}},"type":"object"}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{"title":"Document Comment Resource","properties":{"uuid":{"type":"string","format":"uuid"},"authorUserUuid":{"type":["string","null"],"format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"userName":{"type":"string"},"comment":{"type":"string"},"type":{"description":"Defines if it is only for internal use or if customers can see the comments","type":"string","enum":["intern","extern"]},"isDeletable":{"description":"if the current user can delete the comment","type":"boolean"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":201},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{"type":"array","items":{"title":"Document File Resource","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":["string","null"],"format":"date-time"},"archivedReason":{"type":["string","null"],"enum":["SENT_NEW_DOCUMENT","CANCELATION","DUNNING","PAYMENT_OFFSET","PAYMENT_CONFIRMED","PAYMENT_CANCELED","MANUAL_RECREATION"]},"fileSize":{"type":"integer","format":"int64"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["invoice","invoice_attachment","invoice_payments","imported_invoice"]}},"type":"object"}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"properties":{"pagination":{"properties":{"currentPage":{"type":"integer","minimum":1},"firstPageUrl":{"type":["string","null"],"format":"uri"},"from":{"type":["integer","null"],"example":1},"lastPage":{"type":"integer"},"lastPageUrl":{"type":"string","format":"uri"},"nextPageUrl":{"type":["string","null"],"format":"uri"},"perPage":{"type":"integer","example":50},"previousPageUrl":{"type":["string","null"],"format":"uri"},"to":{"type":["integer","null"],"example":50},"totalItems":{"type":"integer"}},"type":"object"}},"type":"object"}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{"type":"object","example":{"archive":"Archive","cancel":"Cancel","delete":"Delete"},"additionalProperties":{"description":"description of the action","type":"string"},"propertyNames":{"enum":["paymentAdd","archive","cancel","cancelPermanently","clone","collectInvoice","convertCNDN","convertCNI","convertDNI","convertIC","convertDN","convertT","convertCN","convert","convertTemplateToContractNote","convertTemplateToCreditNote","convertTemplateToDeliveryNote","convertTI","convertTemplateToQuote","convertToTemplate","createFinal","createInstalments","createPartial","createOnAccount","customerPortalUrl","delete","dissolve","downloadPdf","downloadPaymentConfirmation","dunningPrint","dunningSent","dunningDate","setDunningAmounts","edit","activity","info","email","markApproved","markDeclined","markSent","massDownloadZip","massDunningPrint","massDunningSent","massPrint","massSent","offsetCreditNotes","offsetInvoices","offsetReceipts","offsetSupplierCreditNotes","plannedMail","print","regeneratePdf","resync","restore","save","sendPaymentConfirmation","sendAbaNet","sendDeepSign","sign","signSupplierCreditNote","sync"]}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{"type":"object","additionalProperties":{"type":"array","items":{},"maxItems":0}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"ddcf484a77361e7d4ef775d486d02675","x-required-scopes":["suppliers"]}},"/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":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{"properties":{"counter":{"type":"integer"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{"title":"Regenerate PDF Action Resource","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"}}},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{"properties":{"type":{"type":"string","enum":["invoice","receipt","credit_note","recurring_invoice","quote","contract_note","delivery_note","supplier_credit_note"]},"id":{"type":"integer","deprecated":true},"uuid":{"type":"string","format":"uuid"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"400":{"description":"Bad request or validation error","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{"title":"Document Comment Resource","properties":{"uuid":{"type":"string","format":"uuid"},"authorUserUuid":{"type":["string","null"],"format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"userName":{"type":"string"},"comment":{"type":"string"},"type":{"description":"Defines if it is only for internal use or if customers can see the comments","type":"string","enum":["intern","extern"]},"isDeletable":{"description":"if the current user can delete the comment","type":"boolean"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/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":{"properties":{"data":{"title":"Document File Detail Resource","properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"archivedAt":{"type":["string","null"],"format":"date-time"},"archivedReason":{"type":["string","null"],"enum":["SENT_NEW_DOCUMENT","CANCELATION","DUNNING","PAYMENT_OFFSET","PAYMENT_CONFIRMED","PAYMENT_CANCELED","MANUAL_RECREATION"]},"fileSize":{"type":"integer","format":"int64"},"mimeType":{"type":"string"},"kind":{"type":"string","enum":["invoice","invoice_attachment","invoice_payments","imported_invoice"]},"fileUrl":{"type":["string","null"],"format":"uri"}},"type":"object"},"message":{"title":"message","type":"string"},"status":{"example":200},"meta":{"title":"meta","type":["object","null"]}},"required":["data","message","status"]}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"properties":{"detail":{"title":"details"},"type":{"title":"type","type":"string"},"requestUuid":{"title":"requestUuid","type":"string","format":"uuid"},"path":{"title":"path","type":"string"},"message":{"title":"message","type":["string","null"]},"status":{"title":"status","description":"HTTP status code","type":"integer"}},"required":["detail","type","message","status"]}}}}},"security":[{"ApiToken":["https://api.abaninja.ch/auth/suppliers"]}],"x-legacy-operation-id":"f863a51d5a343ee563004b237539e5ed","x-required-scopes":["suppliers"]}}},"components":{"securitySchemes":{"ApiToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Create tokens in Settings > API Token."}}}}