Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Info

Endpoint for all API calls: https://api.fakturia.de/v1/

Timestamps are handled in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ssXXX in Java)

...

Include the following HTTP -Header variables headers in every request to authorize against our service:

Header variable namevalue
api-key{your api key - see project settings in the backoffice}

...

Resources Overview

URLGETPOSTPUTPATCHDELETE
/Customers

(tick) retrieve all customers

Filter parameters:

  • email
  • firstName
  • lastName
  • companyName

Filter example:

/Customers?email=info@customer.com

(tick) create a new customer
 
(minus)
 
(minus)
 
(minus)
/Customers/:CustomerNumber
retrieve
(tick) retrieve one customer
 
(minus)
udpate existing
(warning) update existing customer
(minus) 
 

(warning)
/Customers/:CustomerNumber/Contracts
get
(tick) retrieve all contracts for a customer
 
(minus)
 
(minus)
 
(minus)
 
(minus)
/Contracts
get
(tick) retrieve all contracts(tick) create a new contract
   



/Contracts/:ContractNumber(tick) retrieve one contract
 
(minus)(warning) update existing contract
(minus) 
 


/Contracts/:ContractNumber/Activities
get
(tick) retrieve all activities for a given contract(tick) create a new activity record for a contract
 
  



/Contracts/:ContractNumber/Subscription
get
(tick) retrieve the subscription for a contract(tick) create a new subscription for a contract
   



/Invoices
retrieve
(tick) retrieve all invoices
 
(minus)
 
(minus)
 
(minus)
 
(minus)
/Invoices/:InvoiceNumber
get
(tick) retrieve a single invoice
 
(minus)
 
(minus)
 
(minus)
 
(minus)
/Invoices/:InvoiceNumber/Document
get
(tick) retrieve the invoice PDF document (
Base 64
Base64 encoded binary)
 
(minus)
 
(minus)
 
(minus)
 
(minus)
/
Projects
InvoiceCorrections(tick) retrieve all
projects    
invoice corrections(minus)(minus)(minus)(minus)
/InvoiceCorrections/:InvoiceCorrectionNumber(tick) retrieve a single invoice correction(minus)(minus)(minus)(minus)
/InvoiceCorrections/:InvoiceCorrectionNumber/Document(tick) retrieve the invoice correction PDF document (Base64 encoded)(minus)(minus)(minus)(minus)
/Projects(tick) retrieve all projects



(tick) available
(warning) in development
(minus) not available(tick) ist verfügbar (minus) In Planung / Entwicklung

Errors

The API returns standard HTTP status codes to indicate that something went wrong.

Status codePossible reasons
400 Bad RequestYou have sent an invalid JSON format or invalid data. Validation errors will be printed into the body of the response.
404 Not FoundThe request resource could not be found
500 Internal Server ErrorWe 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:

Code Block
{"errorKey":"INCORRECT_INPUT_DATA","errorMessage":"invalid item number: xd004"}

 

...


Enum Values

All possible values of our Enum types are described here.

EnumValuesUsage example
TimeUnit

DAY
WEEK
MONTH
YEAR

Due period for customer
SalutationMR
MRS
COMPANY
Salutation of customer
PaymentMethodBANKTRANSFER
PAYPAL
MONEYBOOKERS
SOFORTUEBERWEISUNG
SEPA_DEBIT
Type of payment for customer or contract
ItemUnitPIECE
DAY
WEEK
MONTH
YEAR
unit of a item, e.g. fee per MONTH

Resource Reference

POST /Customers

...

Code Block
{
        "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"
    }

 


POST /Contracts

Create a new contract for a customer. Adding a subscription is optional.

Info

accountNumber only required if multiple accounts for customer exist.

 


Example request with subscription:

...

Info

if you want to override the system price set a value for 'individualPrice'

 


Example request:

Code Block
{
        "itemNumber": "item002",
        "quantity": 1,
        "individualPrice": null,
        "description": "additional information",
        "performanceDateStart": "2016-11-16T00:00:00Z",
        "performanceDateEnd": null
    }

...

Code Block
{           "termPeriod": 1,
            "termUnit": "MONTH",
            "noticePeriod": 4,
            "noticeUnit": "WEEK",
            "continuePeriod": 1,
            "continueUnit": "MONTH",
            "billedInAdvance": true,
            "subscriptionItems": [{
                    "quantity": 1,
                    "extraDescription": "",
                    "itemNumber": "item001"
                }
            ]
             
}

 

...