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: https://api.fakturia.de/v1/
Prerequisites
The API can only be accessed if the following conditions are true:
- Your Fakturia plan includes API access
- The API is activated in the backend for at least one project
- An API-Key has been generated in the backend
- The IP address of your client has been added to the IP whitelist for the project
Authorization
Include the following HTTP-Header variables in every request to authorize against our service:
Header variable name | value |
---|---|
api-key | {your api key - see project settings in the backoffice} |
Resources Overview
URL | GET | POST | PUT | PATCH | DELETE |
---|---|---|---|---|---|
/Customers | retrieve all customers | create a new customer | |||
/Customers/:CustomerNumber | retrieve one customer | udpate existing customer | |||
/Customers/:CustomerId/Contracts | get all contracts for a customer | ||||
/Contracts | get all contracts | create a new contract | |||
/Contracts/:ContractId/Transactions | get all transactions for a given contract | create a new transaction for a contract | |||
/Invoices | retrieve all invoices | ||||
Errors
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. 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. |
ENum Values
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 |
Resource Reference
POST /Customers
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" }