{"openapi":"3.1.0","info":{"title":"Facturify API","description":"XRechnung/ZUGFeRD eInvoice generation API","contact":{"email":"support@facturify.io"},"version":"1.0"},"servers":[{"url":"https://facturify.de","description":"Generated server url"}],"security":[{"bearerAuth":[]}],"paths":{"/v1/validate":{"post":{"tags":["validate-controller"],"operationId":"validate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateRequestBody"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ValidationReportDto"}}}}}}}},"/v1/invoices":{"post":{"tags":["invoices-controller"],"operationId":"createSingleInvoice","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/JobCreatedResponse"}}}}}}},"/v1/invoice-batches":{"post":{"tags":["invoice-batches-controller"],"operationId":"createBatch","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceRequestDto"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/JobCreatedResponse"}}}}}}},"/v1/usage":{"get":{"tags":["usage-controller"],"operationId":"getUsage","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}}}}},"/v1/templates/xlsx":{"get":{"tags":["templates-controller"],"operationId":"xlsxTemplate","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/templates/csv":{"get":{"tags":["templates-controller"],"operationId":"csvTemplate","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/schema/invoice.json":{"get":{"tags":["schema-controller"],"operationId":"invoiceSchema","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/quota":{"get":{"tags":["usage-controller"],"operationId":"checkQuota","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/QuotaResponse"}}}}}}},"/v1/jobs":{"get":{"tags":["jobs-controller"],"operationId":"listJobs","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"type","in":"query","required":false,"schema":{"type":"string"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":20}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobResponse"}}}}}}}},"/v1/jobs/{jobId}/artifacts/{artifactId}":{"get":{"tags":["artifacts-controller"],"operationId":"download","parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"artifactId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/v1/jobs/{id}":{"get":{"tags":["jobs-controller"],"operationId":"getJob","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/JobResponse"}}}}}}}},"components":{"schemas":{"AddressDto":{"type":"object","properties":{"line1":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"}}},"BuyerDto":{"type":"object","properties":{"name":{"type":"string"},"vatId":{"type":"string"},"taxNumber":{"type":"string"},"leitwegId":{"type":"string"},"electronicAddress":{"type":"string"},"address":{"$ref":"#/components/schemas/AddressDto"}}},"InvoiceDataDto":{"type":"object","properties":{"invoiceNumber":{"type":"string"},"typeCode":{"type":"string"},"issueDate":{"type":"string"},"dueDate":{"type":"string"},"deliveryDate":{"type":"string"},"currency":{"type":"string"},"seller":{"$ref":"#/components/schemas/SellerOverrideDtoWrapper"},"buyer":{"$ref":"#/components/schemas/BuyerDto"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineDto"}},"paymentMeans":{"$ref":"#/components/schemas/PaymentMeansDto"},"buyerReference":{"type":"string"},"orderReference":{"type":"string"},"contractReference":{"type":"string"},"note":{"type":"string"}}},"LineDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"number"},"unit":{"type":"string"},"unitPrice":{"type":"number"},"taxCategory":{"type":"string"},"taxRate":{"type":"number"},"description":{"type":"string"}}},"PaymentMeansDto":{"type":"object","properties":{"iban":{"type":"string"},"bic":{"type":"string"},"paymentReference":{"type":"string"}}},"SellerOverrideDtoWrapper":{"type":"object","properties":{"name":{"type":"string"},"vatId":{"type":"string"},"taxNumber":{"type":"string"},"leitwegId":{"type":"string"},"iban":{"type":"string"},"bic":{"type":"string"},"email":{"type":"string"},"electronicAddress":{"type":"string"},"phone":{"type":"string"},"address":{"$ref":"#/components/schemas/AddressDto"}}},"ValidateRequestBody":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/InvoiceDataDto"},"syntaxes":{"type":"array","items":{"type":"string"}}}},"ValidationFindingDto":{"type":"object","properties":{"code":{"type":"string"},"brRule":{"type":"string"},"severity":{"type":"string"},"fieldPath":{"type":"string"},"messageDe":{"type":"string"},"messageEn":{"type":"string"},"location":{"type":"string"}}},"ValidationReportDto":{"type":"object","properties":{"syntax":{"type":"string"},"valid":{"type":"boolean"},"findings":{"type":"array","items":{"$ref":"#/components/schemas/ValidationFindingDto"}}}},"InvoiceRequestDto":{"type":"object","properties":{"outputs":{"type":"array","items":{"type":"string"}},"invoice":{"$ref":"#/components/schemas/InvoiceDataDto"}}},"JobCreatedResponse":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"status":{"type":"string"},"mode":{"type":"string"},"itemCount":{"type":"integer","format":"int32"}}},"UsageResponse":{"type":"object","properties":{"freeAllowanceTotal":{"type":"integer","format":"int32"},"freeAllowanceUsed":{"type":"integer","format":"int32"},"freeAllowanceRemaining":{"type":"integer","format":"int32"},"periodStart":{"type":"string"},"periodEnd":{"type":"string"},"overageCount":{"type":"integer","format":"int32"},"accountStatus":{"type":"string"},"stripeCustomerExists":{"type":"boolean"}}},"QuotaResponse":{"type":"object","properties":{"quotaExceeded":{"type":"boolean"}}},"ArtifactResponse":{"type":"object","properties":{"artifactId":{"type":"string","format":"uuid"},"format":{"type":"string"},"sizeBytes":{"type":"integer","format":"int64"},"expiresAt":{"type":"string","format":"date-time"}}},"JobItemResponse":{"type":"object","properties":{"itemId":{"type":"string","format":"uuid"},"index":{"type":"integer","format":"int32"},"status":{"type":"string"},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorResponse"}}}},"JobResponse":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"type":{"type":"string"},"status":{"type":"string"},"mode":{"type":"string"},"sourceFormat":{"type":"string"},"itemCount":{"type":"integer","format":"int32"},"succeededCount":{"type":"integer","format":"int32"},"failedCount":{"type":"integer","format":"int32"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"finishedAt":{"type":"string","format":"date-time"},"items":{"type":"array","items":{"$ref":"#/components/schemas/JobItemResponse"}},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactResponse"}}}},"ValidationErrorResponse":{"type":"object","properties":{"ruleId":{"type":"string"},"severity":{"type":"string"},"message":{"type":"string"}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key"}}}}