The Fakturia API is an open interface using the REST standard.
It allows developers to directly interact with our application via HTTPS exchanging data in the JSON format.
Endpoint for all API calls:
Timestamps are handled in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ssXXX in Java) |
The API can only be accessed if the following conditions are true:
Include the following HTTP headers in every request to authorize against our service:
Header variable name | value |
---|---|
api-key | {your api key - see project settings in the backoffice} |
URL | GET | POST | PUT | PATCH | DELETE |
---|---|---|---|---|---|
/Customers | retrieve all customers Filter parameters:
Filter example: /Customers?email=info@customer.com | create a new customer | |||
/Customers/:CustomerNumber | retrieve one customer | update existing customer | |||
/Customers/:CustomerNumber/Contracts | retrieve all contracts for a customer | ||||
/Contracts | retrieve all contracts | create a new contract | |||
/Contracts/:ContractNumber | retrieve one contract | update existing contract | |||
/Contracts/:ContractNumber/Activities | retrieve all activities for a given contract | create a new activity record for a contract | |||
/Contracts/:ContractNumber/Subscription | retrieve the subscription for a contract | create a new subscription for a contract | |||
/Invoices | retrieve all invoices | ||||
/Invoices/:InvoiceNumber | retrieve a single invoice | ||||
/Invoices/:InvoiceNumber/Document | retrieve the invoice PDF document (Base64 encoded binary) | ||||
/InvoiceCorrections | retrieve all invoice corrections | ||||
/InvoiceCorrections/:InvoiceCorrectionNumber | retrieve a single invoice correction | ||||
/InvoiceCorrections/:InvoiceCorrectionNumber/Document | retrieve the invoice correction PDF document (Base64 encoded) | ||||
/Projects | retrieve all projects |
available
in development / planned
not available
The API returns standard HTTP status codes to indicate that something went wrong.
Status code | Possible reasons |
---|---|
400 Bad Request | You have sent an invalid JSON format or invalid data. Validation errors will be printed into the body of the response. |
404 Not Found | The request resource could not be found |
500 Internal Server Error | We got the correct data but the server got an unknown error while processing your request. You will find detailed information about the error in the body of the response. |
Example error result:
{"errorKey":"INCORRECT_INPUT_DATA","errorMessage":"invalid item number: xd004"} |
All possible values of our Enum types are described here.
Enum | Values | Usage example |
---|---|---|
TimeUnit | DAY | Due period for customer |
Salutation | MR MRS COMPANY | Salutation of customer |
PaymentMethod | BANKTRANSFER PAYPAL MONEYBOOKERS SOFORTUEBERWEISUNG SEPA_DEBIT CREDITCARD | Type of payment for customer or contract |
ItemUnit | PIECE DAY WEEK MONTH YEAR | unit of a item, e.g. fee per MONTH |
Create a new customer.
Example request:
{ "salutation": "MR", "firstName": "John", "lastName": "Doe", "companyName": "MegaCorp", "locale": "de_DE", "websiteUri": "", "phone1": "+49 89 224433", "phone2": "", "telefax": "", "mobile": "", "email": "info@megacorp.com", "birthdate": "1980-11-02", "euTaxId": "", "taxNumber": "", "noteText": null, "postalAddress": null, "billingAddress": { "addressLine1": "Arlington Road 1", "addressLine2": "", "addressLine3": "", "zipCode": "80333", "cityName": "Example Town", "state": "", "country": "DE" }, "paymentMethod": null, "emailInvoice": "", "taxRegion": "NATIONAL", "duePeriod": "0", "dueUnit": "DAY" } |
Create a new contract for a customer. Adding a subscription is optional.
accountNumber only required if multiple accounts for customer exist. |
Example request with subscription:
{ "accountNumber": 2, "customerNumber": "CUST1001", "projectName": "Projekt1", "subscription": { "termPeriod": 1, "termUnit": "MONTH", "noticePeriod": 4, "noticeUnit": "WEEK", "continuePeriod": 1, "continueUnit": "MONTH", "billedInAdvance": true, "subscriptionItems": [{ "quantity": 1, "extraDescription": "", "itemNumber": "item001" } ] }, "issueDate": "2016-11-14", "recur": 6, "recurUnit": "MONTH", "duePeriod": null, "dueUnit": null, "paymentMethod": null } |
Create a new activity entry for a given contract.
if you want to override the system price set a value for 'individualPrice' |
Example request:
{ "itemNumber": "item002", "quantity": 1, "individualPrice": null, "description": "additional information", "performanceDateStart": "2016-11-16T00:00:00Z", "performanceDateEnd": null } |
Create a new subscription for a existing contract without subscription.
Example request:
{ "termPeriod": 1, "termUnit": "MONTH", "noticePeriod": 4, "noticeUnit": "WEEK", "continuePeriod": 1, "continueUnit": "MONTH", "billedInAdvance": true, "subscriptionItems": [{ "quantity": 1, "extraDescription": "", "itemNumber": "item001" } ] } |