API

Description

This is the API of 1159 Finance. It can be used to get information about debtors, cases and payments and to submit new claims or payments.

Authentication

The authentication is done by your client id and your secret API key. Please contact apisupport@1159finance.com if you don't have a client id or secret API key, yet.

Authentication by header

The client id and API key are sent as HTTP headers inside each request. The client id is sent via the X-Auth-Id header, the API key via X-Auth-Key header, i. e. (curl example):

curl -H "X-Auth-Id: {client_id}" -H "X-Auth-Key: {api_key}" \ 
https://develop.1159finance.com/api/v1/payments

API endpoints

The base URI for the 1159 Finance API are:

Sandbox: https://develop.1159finance.com/api/v1

Live system: https://partner.1159finance.com/api/v1

You can see the full URI to use for the different API methods below.

Please contact apisupport@1159finance.com if you need a testing account on the sandbox. Please also make sure that you tested your API calls in the sandbox before you switch to the live system.

Request format

There are different types of parameters to send to the API: json parameters and query parameters. Which parameters can be used is stated at the corresponding API section below.

Response format

The API either only returns a HTTP status code or a status code and json object in the response body. The json object (if existent) always contains an 'error' attribute.

{
  "error": true,
  "message": "TYPE_OF_ERROR",
  "information": "Further information",
  "dataset": 123,
  ...
}

The attribute 'error' is set to true if something was wrong with your call. Please be aware that the API also uses HTTP error status codes, so you will have to evaluate the json response on '400', '403' and '404' status codes, too.

If the 'error' attribute is true, you will get one or more further attributes:

General error typesshow

  • string

    Here you get the type of error that occured. Specific error types for the different API methods are explained below. These are the general error codes:

  • MISSING_HTTP_METHOD

    Our server could not read the HTTP method (GET, POST, PUT, DELETE) that you sent.

  • INVALID_HTTP_METHOD

    You did not send a valid HTTP method (GET, POST, PUT, DELETE).

  • UNSUPPORTED_METHOD

    The HTTP method you used is not supported by this endpoint.

  • MISSING_REQUEST_URI

    The API URI that you called is not valid.

  • INVALID_API_VERSION

    The API version you set is unsupported.

  • MISSING_API_METHOD

    The API URI you called did not contain any valid endpoint.

  • UNKNOWN_API_METHOD

    The API URI you called contains an endpoint that is not known to the system.

  • MISSING_OBJECT_ID

    Some methods require an object id, e. g. getting debtor or payment details or reporting a new debtor address.

  • NO_OBJECT_ID_ALLOWED

    Some methods do not allow an object id to be passed over.

  • MISSING_CLIENT_ID

    You did not provide your client id in the API request.

  • MISSING_API_KEY

    You did not provide your API auth key in the request.

  • CLIENT_NOT_ACTIVE

    The client account you used is not existing or not yet active. Please contact your sales manager.

  • CLIENT_API_NOT_ACTIVE

    Your account has not yet been enabled for API calls.

  • INVALID_AUTH_KEY

    The API key that you used is not valid.

  • MISSING_JSON_DATA

    The method you called require a JSON object in the request body, but it was missing.

  • INVALID_JSON_DATA

    The JSON data in your request body could not be decoded.

  • INVALID_REQUEST

    The request you sent could not be understand.

  • API_CALL_FAILED

    The API call failed for an unknown reason. If this persists please contact the support.

  • string

    If there are further information regarding the error, these are conained in this attribute. For example this can be the value you submitted causing the error.

  • int

    If you submitted multiple claims or debtors at once, this field contains the dataset number that triggered the error.

General arguments

These JSON paramters are used on all search endpoints.

  • int [1 - 1000]

    You can limit the amount of results you are returned by the API to 1000 at max and 1 at min.

  • int [0 - ...]

    To get further results beyond your set limit you can provide the offset parameter.

Claim typesshow

Some API methods that return claims will list a 'type' attribute of each claim. This type can be one of the following:

  • CLAIM

    Main Claim sent by you.

  • COLLECTION_FEE

    Collection fee of 1159 Finance added to the case.

  • DUNNING_FEE

    Dunning fee added to the case if defined in your client account settings.

  • INTEREST

    Interest added to the main claim.

  • INSTALLMENT_FEE

    Fee added to the case for an installment plan.

  • ADDRESS_RESEARCH_FEE

    Fee added to the case for general address research actions.

  • POSTAL_ADDRESS_RESEARCH

    Fee for enquiries sent to postal service to get current address of debtor.

  • SCHUFA_REQUEST

    Fee for enquiries sent to Schufa to get current address of debtor.

  • EXECUTION_FEE

    Fee because of execution.

  • COURT_FEE

    Fee billed by the court.

  • REGISTRATION_OFFICE_ENQUIRY

    Cost that arose due to enquiry at a registration office to get a current address of a debtor.

  • OTHER

    Other cost added to the case.

Projects

Description

This is the projects API endpoint. You can use projects to organize your cases into different categories. Each project will get a separate clearing document each clearing period.

GET /projects{?filter=filtervalue}

Search for projects in the 1159 Finance system.

Example URI

GET /api/v1/projects?name=Sample*

Valid Parameters

  • string (optional)

    Only list projects with given project name. You can use wildcards here (* = any amount of chars, ? = single char).

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "offset": 0,
  "limit": 100,
  "projects": [
    {
      "id": 12,
      "name": "Sample Project",
      "description": "",
      "default": true,
      "cases": 152
    },
    {
      "id": 32,
      "name": "Sample Project 2",
      "description": "Debtors for project X",
      "default": false,
      "cases": 0
    }
  ]
}

Response on error

See general error types.

Get single entry

GET /projects/{project_id}

Show details of a single project.

Example URI

GET /api/v1/projects/32

Valid Parameters

  • int

    The Id of the project you want to get the details of.

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "project": {
      "id": 32,
      "name": "Sample Project 2",
      "description": "Debtors for project X",
      "default": false,
      "cases": 0
  }
}

Response on error

  • INVALID_ID

    You provided an invalid project id (not numeric, <= 0, ...)

  • ID_NOT_FOUND

    The project id you provided was not found.

Add a new project

POST /projects

Create a new project in the 1159 Finance system.

Example URI

POST /api/v1/projects

Excample request body show

{
  "name": "Sample Project 3",
  "description": "Debtors outside of germany",
  "default": false
}

Valid JSON Parametersshow

  • string

    Name for the new project.

  • string (optional)

    Description for the new project.

  • boolean (optional)

    If set to true this new project will be set as your default project.

  • int (optional)

    If set, the project is added to a subclient instead of the main client.

Response on success

HTTP-Code 201

Headers

Content-Type: application/json

Body

{
  "error": false,
  "project_id": 54
}

Response on errorshow

  • MISSING_NAME

    You did not provide a name for the project.

  • INVALID_NAME

    The name you provided for the project is invalid.

  • PROJECT_NAME_EXISTS

    A project with this name is already present in your account. You cannot have two projects with the same name.

  • CREATE_FAILED

    The project could not be created.

  • UNKNOWN_CLIENT

    The client provided for the project was not found in the system.

Change project

PUT /projects/{project_id}

Change the project details.

Example URI

PUT /api/v1/projects/54

Valid Parameters

  • int

    The Id of the project you want to change.

Excample request body show

{
  "name": "Sample Project 3 corrected",
  "default": true
}

Valid JSON Parametersshow

  • string (optional)

    Name for the new project.

  • string (optional)

    Description for the new project.

  • boolean (optional)

    If set to true this new project will be set as your default project.

Response on success

HTTP-Code 202

Headers

none

Body

none

Response on errorshow

  • MISSING_PROJECT_ID

    You did not provide an id of the project to change.

  • PROJECT_NOT_FOUND

    The project id you want to change was not found.

  • INVALID_NAME

    The name you provided for the project is invalid.

  • PROJECT_NAME_EXISTS

    A project with this name is already present in your account. You cannot have two projects with the same name.

  • NO_CHANGES

    You did not provide any changes.

Delete

DELETE /projects/{project_id}

Important! Projects can only be deleted if they have no cases assigned.

Example URI

DELETE /api/v1/projects/54

Valid Parameters

  • int

    The Id of the project you want to delete.

Response on success

HTTP-Code 204

Headers

none

Body

none

Response on error

  • MISSING_PROJECT_ID

    You did not provide a project id that you want to delete.

  • PROJECT_NOT_FOUND

    The project id you provided was not found.

  • PROJECT_HAS_CASES

    The project you want to delete has cases assigned. Please contact your sales manager.

  • DELETE_FAILED

    The project could not be deleted for an unknown reason.

Projects

Description

This is the subclients API endpoint. You can use subclients for separating your projects further. Each subclient will have a separate clearing document each clearing period.

GET /clients{?filter=filtervalue}

Search for clients in the 1159 Finance system.

Example URI

GET /api/v1/clients?name=Sample*

Valid Parameters

  • string (optional)

    Only list clients with given company name. You can use wildcards here (* = any amount of chars, ? = single char).

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "offset": 0,
  "limit": 100,
  "clients": [
    {
      "id": 12,
      "name": "Sample Company",
      "cases": 152
    },
    {
      "id": 32,
      "name": "Sample Company 2",
      "cases": 0
    }
  ]
}

Response on error

See general error types.

Get single entry

GET /clients/{client_id}

Show details of a single client.

Example URI

GET /api/v1/clients/32

Valid Parameters

  • int

    The Id of the client you want to get the details of.

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "project": {
      "id": 32,
      "name": "Sample Client 2",
      "cases": 0
  }
}

Response on error

  • INVALID_ID

    You provided an invalid client id (not numeric, <= 0, ...)

  • ID_NOT_FOUND

    The client id you provided was not found.

Add a new subclient

POST /clients

Create a new client in the 1159 Finance system.

Example URI

POST /api/v1/clients

Excample request body show

{
  "name": "Sample Client 3",
  "street": "Address of company 123",
  "postcode": "12345",
  "city": "Location name",
  "country": "at",
  "default": false
}

Valid JSON Parametersshow

  • string

    Name for the new client.

  • string

    Street address of the new client.

  • string

    Postal code of the address.

  • string

    City of the address.

  • string

    ISO two-letter code of the client's country.

Response on success

HTTP-Code 201

Headers

Content-Type: application/json

Body

{
  "error": false,
  "client_id": 54
}

Response on errorshow

  • MISSING_NAME

    You did not provide a name for the client.

  • INVALID_NAME

    The name you provided for the client is invalid.

  • CLIENT_NAME_EXISTS

    A client with this name is already present in your account. You cannot have two clients with the same name.

  • INVALID_COUNTRY

    The country code you provided is not known to the system.

  • INVALID_ADDRESS

    The address you provided could not be verified by the system.

  • CREATE_FAILED

    The client could not be created.

Change client

PUT /clients/{client_id}

Change the client details.

Example URI

PUT /api/v1/clients/54

Valid Parameters

  • int

    The Id of the client you want to change.

Excample request body show

{
  "name": "Sample Client 3 corrected",
  "postcode": "12344",
  "default": true
}

Valid JSON Parametersshow

  • string (optional)

    New name for the client.

  • string

    Street address of the new client.

  • string

    Postal code of the address.

  • string

    City of the address.

  • string

    ISO two-letter code of the client's country.

Response on success

HTTP-Code 202

Headers

none

Body

none

Response on errorshow

  • MISSING_CLIENT_ID

    You did not provide an id of the client to change.

  • CLIENT_NOT_FOUND

    The client id you want to change was not found.

  • INVALID_NAME

    The name you provided for the client is invalid.

  • CLIENT_NAME_EXISTS

    A client with this name is already present in your account. You cannot have two clients with the same name.

  • INVALID_COUNTRY

    The country code you provided is not known to the system.

  • INVALID_ADDRESS

    The address you provided could not be verified by the system.

  • CREATE_FAILED

    The client could not be created.

  • NO_CHANGES

    You did not provide any changes.

Delete

DELETE /clients/{client_id}

Important! Clients can only be deleted if they have no cases assigned.

Example URI

DELETE /api/v1/clients/54

Valid Parameters

  • int

    The Id of the client you want to delete.

Response on success

HTTP-Code 204

Headers

none

Body

none

Response on error

  • MISSING_CLIENT_ID

    You did not provide a client id that you want to delete.

  • CLIENT_NOT_FOUND

    The client id you provided was not found.

  • CLIENT_HAS_CASES

    The client you want to delete has cases assigned. Please contact your sales manager.

  • DELETE_FAILED

    The client could not be deleted for an unknown reason.

Debtors

Description

This is the debtors API endpoint.

GET /debtors{?filter=filtervalue&filter2=filtervalue2...}

Search for debtors in the 1159 Finance system.

Example URI

GET /api/v1/debtors?status=open&lastname=Smith

Valid Parameters

  • string ['open', 'closed'] (optional)

    Only list debtors having claims with status open or closed.

  • string (optional)

    Only list debtors with given first name.

  • string (optional)

    Only list debtors with given last name.

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "offset": 0,
  "limit": 100,
  "debtors": [
    {
      "id": 12345,
      "firstname": "Michael",
      "lastname": "Smith",
      "gender": "m",
      "title": "Dr.",
      "birthdate": "1964-07-21",
      "birth_name": "",
      "address": {
        "street": "John Smith Lane 12",
        "postcode": "12345",
        "city": "Berlin",
        "country": "de",
        "invalid": false
      },
      "cases": [
        {
          "case_id": 54321,
          "case_name": "YO/SM-00054321-01",
          "completed": false
        }
      ]
    }
  ]
}

Response on error

See general error types.

Get details

GET /debtors/{debtor_id}

Show details of a single debtor in the 1159 Finance system.

Example URI

GET /api/v1/debtors/12345

Valid Parameters

  • int

    The Id of the debtor you want to get the details of.

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "debtor": {
    "id": 12345,
    "firstname": "Michael",
    "lastname": "Smith",
    "gender": "m",
    "title": "Dr.",
    "birthdate": "1964-07-21",
    "birth_name": "",
    "address": {
      "street": "John Smith Lane 12",
      "postcode": "12345",
      "city": "Berlin",
      "country": "de"
    },
    "cases": [
      {
        "case_id": 54321,
        "case_name": "YO/SM-00054321-01",
        "completed": false
      },
      {
        "case_id": 55443,
        "case_name": "YO/SM-00055443-02",
        "completed": true
      }
    ]
  }
}

Response on error

  • INVALID_ID

    You provided an invalid case id (not numeric, <= 0, ...)

  • ID_NOT_FOUND

    The case id you provided was not found.

Submit debtor

Debtors are created when submitting a new claim. Please see submitting cases.

Submit address change

PUT /debtors/{debtor_id}

Search for debtors in the 1159 Finance system.

Example URI

PUT /api/v1/debtors/12345

Valid Parameters

  • int

    The Id of the debtor you want to set a new address for.

Excample request body show

{
  "firstname": "John",
  "lastname": "Smith",
  "street": "Smith Lane 123",
  "street_add": "Apt. 23b",
  "postcode": "12345",
  "city": "Berlin",
  "country": "de",
  "phone": "+49123456789",
  "email": "johnsmith@mail.com"
}

Valid JSON Parametersshow

  • string

    First name of the debtor to update.

  • string

    Last name of the debtor to update.

  • string

    Street and house number of home address.

  • string (optional)

    Additional address information, e. g. c/o address.

  • string

    Postal code of home address.

  • string

    City matching the postal code and street.

  • string

    Two letter ISO code of the country.

  • string (optional)

    Phone number (mobile or wired), preferable in international form.

  • string (optional)

    Email address.

Response on success

HTTP-Code 202

Headers

none

Body

none

Response on errorshow

  • DEBTOR_NOT_FOUND

    The debtor id you provided was not found.

  • INVALID_FIELD_CONTENT

    You have provided an invalid value for one of the debtor's attributes (e. g. gender, name etc.). See 'information' attribute of response for details.

  • MISSING_DEBTOR_NAME

    You have to provide the debtor's first and last name to make sure you sent the correct debtor id and do not accidently update a wrong debtor.

  • DEBTOR_NAME_ID_MISMATCH

    The debtor's name and the id you sent do not match.

  • DEBTOR_ADDRESS_ERROR

    There was an error in the address you sent. See 'information' attribute for details.

  • DEBTOR_ADDRESS_EXISTS

    The address you sent already exists in our system.

Delete

Debtors cannot be deleted. They are deleted automatically when you delete a case and the debtor has no further remaining case.

Cases / Claims

Description

This is the cases API endpoint.

GET /cases{?filter=filtervalue&filter2=filtervalue2...}

Search for cases in the 1159 Finance system.

Example URI

GET /api/v1/cases?status=open&voucher=INV-12*4

Valid Parameters

  • string (optional)

    Only list cases with given case name.

  • string ['open', 'closed'] (optional)

    Only list cases with status open or closed.

  • string (optional)

    Only list cases that contain the provided claim voucher. You can use wildcards here (* = any amount of chars, ? = single char).

  • string (optional)

    Only list cases that are of a given project. You can use wildcards here (* = any amount of chars, ? = single char).

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "offset": 0,
  "limit": 100,
  "cases": [
    {
      "id": 54321,
      "case_name": "YO/SM-00054321-01",
      "project_id": 123,
      "completed": true,
      "completed_at": "2017-10-30",
      "currency": "EUR",
      "debtor": {
        "id": 12345,
        "customer_debtor_id": 99887766
      },
      "vouchers": [
        {
          "voucher": "INV-1234",
          "description": "Invoice INV-1234 from 3rd of March 2015",
          "amount": 199.57
        }
      ]
    },
    {
      "id": 112233,
      "case_name": "YO/VU-00112233-02",
      "project_id": 212,
      "completed": false,
      "completed_at": null,
      "currency": "EUR",
      "debtor": {
        "id": 3333,
        "customer_debtor_id": null
      },
      "vouchers": [
        {
          "voucher": "INV-12674",
          "description": "Invoice INV-12674 from 6th of May 2016",
          "amount": 1311.99
        },
        {
          "voucher": "INV-12675",
          "description": "Invoice INV-12675 from 7th of May 2016",
          "amount": 54
        }
      ]
    }
  ]
}

Response on error

See general error types.

Get details

GET /cases/{case_id}

Show details of a single case.

Example URI

GET /api/v1/cases/54321

Valid Parameters

  • int

    The Id of the case you want to get the details of.

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "case": {
    "id": 54321,
    "case_name": "YO/SM-00054321-01",
    "project_id": 123,
    "completed": true,
    "completed_at": "2017-10-30",
    "currency": "EUR",
    "debtor": {
      "id": 12345,
      "customer_debtor_id": 99887766
    },
    "claims": [
      {
        "voucher": "INV-1234",
        "description": "Invoice INV-1234 from 3rd of March 2015",
        "subclaim": false,
        "type": "CLAIM",
        "amount": 199.57,
        "freetext_1": "mathew1234",
        "freetext_2": "Premium",
        "freetext_3": "",
        "freetext_4": "",
        "freetext_5": "",
        "freetext_6": "",
        "freetext_7": "",
        "freetext_8": "",
        "freetext_9": "",
        "freetext_10": ""
      },
      {
        "voucher": "",
        "type": "COLLECTION_FEE",
        "amount: "70.2"
      },
      {
        "voucher": "",
        "type": "INTEREST",
        "amount: "4.31"
      }
    ]
  }
}

Response on error

  • INVALID_ID

    You provided an invalid case id (not numeric, <= 0, ...)

  • ID_NOT_FOUND

    The case id you provided was not found.

Submit case / claims

POST /cases

Submit claims to the 1159 Finance system.

Example URI

POST /api/v1/cases

Excample request body show

{
  "literalVoucher": false,
  "debtors": [
    {
      "gender": "m",
      "title": "",
      "firstname": "John",
      "lastname": "Smith",
      "birth_name": "",
      "birthdate": "1964-10-22",
      "street": "Smith Lane 123",
      "street_add": "Apt. 23b",
      "postcode": "12345",
      "city": "Berlin",
      "country": "de",
      "phone": "+49123456789",
      "email": "johnsmith@mail.com"
      "customer_debtor_id": 99887766,
      "project": "myProject",
      "claims": [
        {
          "amount": 122.55,
          "date": "2015-09-21",
          "voucher": "INV-12345",
          "description": "Monthly Fee July 2017 for Service X",
          "currency": "EUR",
          "subclaim": false,
          "contract_ip": "124.123.122.12",
          "contract_subject": "99.00",
          "contract_time": "2014-02-15",
          "domain": "myservice.de",
          "username": "myusernameiscool",
          "freetext_1": "some information",
          "freetext_2": "2016-07-10",
          "freetext_3": "",
          "freetext_4": "",
          "freetext_5": "",
          "freetext_6": "",
          "freetext_7": "",
          "freetext_8": "",
          "freetext_9": "",
          "freetext_10": ""
        },
        {
          "amount": 5.0,
          "date": "2015-11-12",
          "voucher": "INV-12345",
          "description": "dunning fee",
          "currency": "EUR",
          "subclaim": true
        }
      ]
    }  
  ]
}

Valid JSON Parametersshow

  • boolean (optional)

    If set to true the claim vouchers are compared as is. If false (default) INV-1234 will be treated the same as inv1234 when searching for duplicates.

  • array

    List of debtor objects to submit.

  • string ['m', 'f', 'male', 'female']

    Gender of the debtor.

  • string (optional)

    Title of the debtor, e. g. 'Dr.'

  • string

    First name of the case to update.

  • string

    Last name of the case to update.

  • string (optional)

    Maiden name of the debtor.

  • string [YYYY-MM-DD] (optional)

    Birth date of the debtor.

  • string

    Street and house number of home address.

  • string (optional)

    Additional address information, e. g. c/o address.

  • string

    Postal code of home address.

  • string

    City matching the postal code and street.

  • string

    Two letter ISO code of the country.

  • string (optional)

    Phone number (mobile or wired), preferable in international form.

  • string (optional)

    Email address.

  • int (optional)

    Your internal unique id for this debtor. You can search for this later to find your debtors in the 1159 Finance system.

  • string (optional)

    The project that your submitted claims should be assigned to. If provided this project has to be created in the 1159 Finance system previously. If ommitted the default project of your account will be used.

  • array

    The actual list of claims to submit for this debtor.

  • double

    The claim amount of this claim. Decimal sign is a dot, valid values are e.g. 12.50 or 12.5 or 23.

  • string [YYYY-MM-DD]

    The claim date of this claim. It is used to calculate interest, for example.

  • string

    The voucher for this claim. It has to be unique for all your debtors. If you mark this claim as 'subclaim: true' you have to provide the same voucher as you did for the related main claim.

  • string (optional)

    The description that will be shown on the dunning letters sent to the debtor. If you ommit this there will be a default description, e. g. 'Invoice {voucher} from {claim_date}'. If you provide a description you have to insert date and voucher yourself if needed, as it is not added to custom descriptions.

  • string ['EUR', 'CHF']

    The currency of this claim. You cannot mix currencies in the same project.

  • boolean (optional)

    If set to true this claim will be marked as subclaim, e. g. for dunning fee or chargeback cost.

  • string [YYYY-MM-DD]

    The date on which the contract on which the claim is based was concluded.

  • string [XX.YY]

    The 1159 Finance catalog number for the subject of your contract. E. g. for web hosting this is 05.01. Please consult your contact person if you do not know the appropriate catalog number for your claims.

  • string (optional)

    This is the ip address of your customer at the time of registration.

  • string (optional)

    This is the portal domain your customer has registered on.

  • string (optional)

    This is the username your customer used on registration.

  • string (optional)

    You can provide up to 20 freetext fields for your claims. These can contain further information, e. g. shipping id etc.
    Please always put the same information type into the fields for your claims to avoid confusion.

Response on success show

HTTP-Code 201

Headers

Content-Type: application/json

Body

{
  "error": false,
  "warnings": 1,
  "errors": 0,
  "debtors": [
    {
      "insert_status": {
        "inserted": true,
        "result": "WARNING",
        "debtor_id": 54321,
        "case_id": 145443
      },
      "gender": "m",
      "title": "",
      "firstname": "John",
      "lastname": "Smith",
      "birth_name": "",
      "birthdate": "1964-10-22",
      "street": "Smith Lane 123",
      "street_add": "Apt. 23b",
      "postcode": "12345",
      "city": "Berlin",
      "country": "de",
      "phone": "+49123456789",
      "email": "johnsmith@mail.com"
      "customer_debtor_id": 99887766,
      "project": "myProject",
      "claims": [
        {
          "amount": 122.55,
          "date": "2015-09-21",
          "voucher": "INV-12345",
          "description": "Monthly Fee July 2017 for Service X",
          "currency": "EUR",
          "subclaim": false,
          "contract_ip": "124.123.122.12",
          "contract_subject": "99.00",
          "contract_time": "2014-02-15",
          "domain": "myservice.de",
          "username": "myusernameiscool",
          "freetext_1": "some information",
          "freetext_2": "2016-07-10",
          "freetext_3": "",
          "freetext_4": "",
          "freetext_5": "",
          "freetext_6": "",
          "freetext_7": "",
          "freetext_8": "",
          "freetext_9": "",
          "freetext_10": ""
        },
        {
          "amount": 5.0,
          "date": "2015-11-12",
          "voucher": "INV-12345",
          "description": "dunning fee",
          "currency": "EUR",
          "subclaim": true
        }
      ]
    }  
  ]
}

Response on errorshow

  • MISSING_DEBTORS

    You did not provide a 'debtors' array in your JSON request.

  • INVALID_DEBTOR_DATA

    You provided invalid data in a debtor's attribute. See 'information' attribute for details.

  • MISSING_CLAIMS

    You did not provide a 'claims' array for all submitted debtors.

  • INVALID_CLAIM_DATA

    You provided invalid claim data. See 'information' attribute for details.

  • DEBTOR_NOT_ALLOWED

    This debtor has been locked for further submissions. If you need details about this, please contact your sales manager.

  • MISSING_SUBCLAIM_DESC

    Claims marked as 'subclaim': true must have a description (e. g. 'chargeback fee').

  • SUBCLAIM_MISSING_CLAIM

    Each claim marked as 'subclaim': true must have the same voucher as the corresponding main claim.

  • INVALID_VOUCHER

    You used an invalid voucher for your claim. Mostly this is because you tried to submit a claim twice.

  • LOW_CASE_AMOUNT

    This error indicates that you sent a claim (sum of all claims sent in one request) that is below the defined limit for your account. Please contact your sales manager for details.

Submit additional claims

PUT /cases/{case_id}

Add additional claims to an existing and not yet started case.

Example URI

PUT /api/v1/cases/12345

Valid Parameters

  • int

    The Id of the case you want to add claims to.

Excample request body show

{
  "literalVoucher": false,
  "claims": [
    {
      "amount": 122.55,
      "date": "2015-09-21",
      "voucher": "INV-12345",
      "description": "Monthly Fee July 2017 for Service X",
      "currency": "EUR",
      "subclaim": false,
      "contract_ip": "124.123.122.12",
      "contract_subject": "99.00",
      "contract_time": "2014-02-15",
      "domain": "myservice.de",
      "username": "myusernameiscool",
      "freetext_1": "some information",
      "freetext_2": "2016-07-10",
      "freetext_3": ""
    },
    {
      "amount": 5.0,
      "date": "2015-11-12",
      "voucher": "INV-12345",
      "description": "dunning fee",
      "currency": "EUR",
      "subclaim": true
    }
}

Valid JSON Parametersshow

  • boolean (optional)

    If set to true the claim vouchers are compared as is. If false (default) INV-1234 will be treated the same as inv1234 when searching for duplicates.

  • array

    The actual list of claims to submit for this debtor.

  • double

    The claim amount of this claim. Decimal sign is a dot, valid values are e.g. 12.50 or 12.5 or 23.

  • string [YYYY-MM-DD]

    The claim date of this claim. It is used to calculate interest, for example.

  • string

    The voucher for this claim. It has to be unique for all your debtors. If you mark this claim as 'subclaim: true' you have to provide the same voucher as you did for the related main claim.

  • string (optional)

    The description that will be shown on the dunning letters sent to the debtor. If you ommit this there will be a default description, e. g. 'Invoice {voucher} from {claim_date}'. If you provide a description you have to insert date and voucher yourself if needed, as it is not added to custom descriptions.

  • string ['EUR', 'CHF']

    The currency of this claim. You cannot mix currencies in the same project.

  • boolean (optional)

    If set to true this claim will be marked as subclaim, e. g. for dunning fee or chargeback cost.

  • string [YYYY-MM-DD]

    The date on which the contract on which the claim is based was concluded.

  • string [XX.YY]

    The 1159 Finance catalog number for the subject of your contract. E. g. for web hosting this is 05.01. Please consult your contact person if you do not know the appropriate catalog number for your claims.

  • string (optional)

    This is the ip address of your customer at the time of registration.

  • string (optional)

    This is the portal domain your customer has registered on.

  • string (optional)

    This is the username your customer used on registration.

  • string (optional)

    You can provide up to 20 freetext fields for your claims. These can contain further information, e. g. shipping id etc.
    Please always put the same information type into the fields for your claims to avoid confusion.

  • string (optional)

    You can provide up to 20 freetext fields for your claims. These can contain further information, e. g. username, registration date for digital service, ip address, shipping id etc.
    Please always put the same information type into the fields for your claims to avoid confusion.

Response on success

HTTP-Code 202

Headers

none

Body

none

Response on errorshow

  • MISSING_CASE_ID

    You did not provide a case id that this claim should be added to.

  • CASE_NOT_FOUND

    The case id you provided was not found.

  • CASE_ALREADY_STARTED

    The case you want to add a claim to was already processed. You cannot add claims to a processed case.

  • MISSING_CLAIMS

    You did not provide a 'claims' array.

  • INVALID_CLAIM_DATA

    You provided invalid claim data. See 'information' attribute for details.

  • MISSING_SUBCLAIM_DESC

    Claims marked as 'subclaim': true must have a description (e. g. 'chargeback fee').

  • SUBCLAIM_MISSING_CLAIM

    Each claim marked as 'subclaim': true must have the same voucher as the corresponding main claim.

  • INVALID_VOUCHER

    You used an invalid voucher for your claim. Mostly this is because you tried to submit a claim twice.

  • LOW_CASE_AMOUNT

    This error indicates that you sent a claim (sum of all claims sent in one request) that is below the defined limit for your account. Please contact your sales manager for details.

Delete

DELETE /cases/{case_id}

Important! Cases can only be deleted if they have not yet been started. Depending on the time you submit your claims this can be only a few minutes.

Example URI

DELETE /api/v1/cases/12345

Valid Parameters

  • int

    The Id of the case you want to delete.

Response on success

HTTP-Code 204

Headers

none

Body

none

Response on error

  • MISSING_CASE_ID

    You did not provide a case id that you want to delete.

  • CASE_NOT_FOUND

    The case id you provided was not found.

  • CASE_ALREADY_STARTED

    The case you want to delete was already processed. You cannot delete a processed case. Please contact your sales manager.

  • CASE_ALREADY_HAS_ACTIONS

    The case you want to delete cannot be deleted. Please contact your sales manager.

  • DELETE_FAILED

    The case could not be deleted for an unknown reason.

Files / Documents

Description

This is the case files API endpoint (invoices etc.)

GET /cases/{case_id}/files

Search for files in the 1159 Finance system.

Example URI

GET /api/v1/cases/54321/files

Valid Parameters

  • int

    The Id of the case you want to get the files of.

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "offset": 0,
  "limit": 100,
  "files": [
    {
      "id": 2,
      "case_id": 54321,
      "debtor_id": 12345,
      "filename": "c21_inv_1234.pdf",
      "upload_time": "2017-05-21",
      "comment": "",
      "filesize": 188680
    },
    {
      "id": 43,
      "case_id": 54321,
      "debtor_id": 12345,
      "filename": "shipping_voucher.pdf",
      "upload_time": "2017-07-11",
      "comment": "Shipped to customer on 10th July",
      "filesize": 423119
    }
  ]
}

Response on error

  • INVALID_ID

    You provided an invalid case id (not numeric, <= 0, ...)

  • CASE_NOT_FOUND

    The case id you provided was not found.

Download

GET /cases/{case_id}/files/{file_id}

Download file with id {file_id} from case with id {case_id}.

Example URI

GET /api/v1/cases/54321/files/4

Valid Parameters

  • int

    The Id of the case you want to get the file of.

  • int

    The Id of the file you want to download.

Response on success

HTTP-Code 200

Response on error

  • INVALID_ID

    You provided an invalid case id (not numeric, <= 0, ...)

  • CASE_NOT_FOUND

    The case id you provided was not found.

  • INVALID_FILE_ID

    You provided an invalid file id (not numeric, <= 0, ...)

  • ID_NOT_FOUND

    The file id you provided was not found or does not belong to this case.

Submit file

POST /cases/{case_id}/files{?parameter=value}

Submit a new file to the case with id {case_id}.

Example URI

POST /api/v1/cases/54321/files?filename=invoice.pdf&comment=Invoice

Valid Parameters

  • int

    The Id of the case you want to add claims to.

  • string

    The filename of the PDF you want to upload.

  • string [0 - 255] (optional)

    A comment to assign to the uploaded file.

Request body

raw file contents

Response on success show

HTTP-Code 201

Headers

Content-Type: application/json

Body

{
  "error": false,
  "case_id": 54321,
  "file_id": 65,
  "filename": "invoice.pdf",
  "filesize": 541992,
  "comment": "Invoice for Smith"
}

Response on errorshow

  • MISSING_CASE_ID

    You did not provide a case id to upload the file into.

  • CASE_NOT_FOUND

    The case id you provided was not found.

  • UPLOAD_FAILED

    The upload failed (the server did not receive a valid file).

  • FILE_SIZE_TOO_BIG

    The file's size exceeds the set limit.

  • MISSING_FILE_NAME

    You did not provide a file name.

  • INVALID_FILE_NAME

    Your file name contains invalid characters, e. g. slashes and double dots are not allowed.

  • FILE_IS_NO_PDF

    Your uploaded file is no PDF. We can only accept PDF files for upload.

Delete

DELETE /cases/{case_id}/files/{file_id}

Delete a file from a specified case.

Example URI

DELETE /api/v1/cases/54321/files/25

Valid Parameters

  • int

    The Id of the case the file belongs to.

  • int

    The Id of the file you want to delete.

Response on success

HTTP-Code 204

Headers

none

Body

none

Response on error

  • MISSING_CASE_ID

    You did not provide a case id that you want to delete.

  • MISSING_FILE_ID

    You did not provide a file id that you want to delete.

  • CASE_NOT_FOUND

    The case id you provided was not found.

  • FILE_NOT_FOUND

    The file id you provided was not found.

  • DELETE_FAILED

    The file could not be deleted from the server.

Payments

Description

This is the payments API endpoint.

GET /payments{?filter=filtervalue&filter2=filtervalue2...}

Search for payments in the 1159 Finance system.

Example URI

GET /api/v1/payments?status=open&voucher=INV-12*4

Valid Parameters

  • int (optional)

    Only list payments for the debtor with your internal unique id.

  • string (optional)

    Only list payments for given case name.

  • int (optional)

    Only list payments for given case id.

  • string (optional)

    Only list payments for given project. You can provide multiple project names separated by comma.

  • string [YYYY-MM-DD] (optional)

    Only list payments that were processed at or after the specified date.
    Important: This is the date the payment was processed. If you set from_date=2017-11-01 and a payment occured on 2017-10-30 but was processed at 2017-11-01 it will be shown.

  • string [YYYY-MM-DD] (optional)

    Only list payments that were processed at or before the specified date.
    Important: This is the date the payment was processed. If you set to_date=2017-10-31 and a payment occured on 2017-10-30 but was processed at 2017-11-01 it will not be shown.

  • string (optional)

    Only list payments for cases that contain the provided claim voucher. You can use wildcards here (* = any amount of chars, ? = single char).

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "offset": 0,
  "limit": 100,
  "payments": [
    {
      "payment_id": 223344,
      "case_id": 54321,
      "case_name": "YU/SM-00054321-01",
      "payment": 120.5,
      "pay_date": "2017-10-30",
      "process_date": "2017-11-02",
      "paid_to_client": false,
      "vouchers": [
        {
          "voucher": "INV-1234"
        }
      ],
      "accounting": [
        {
          "cost_id": 226794,
          "type": "CLAIM",
          "voucher": "INV-1234",
          "amount": 80.01
        },
        {
          "cost_id": 226951,
          "type": "COLLECTION_FEE",
          "voucher": "",
          "amount": 39
        },
        {
          "cost_id": 226953,
          "type": "INTEREST",
          "voucher": "",
          "amount": 1.49
        }
      ]
    }
  ]
}

Response on error

See general error types.

Get details

GET /payments/{payment_id}

Show details of a single payment.

Example URI

GET /api/v1/payments/223344

Valid Parameters

  • int

    The Id of the payment you want to get the details of.

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "payment": {
    "payment_id": 223344,
    "case_id": 54321,
    "case_name": "YU/SM-00054321-01",
    "payment": 120.5,
    "pay_date": "2017-10-30",
    "process_date": "2017-11-02",
    "paid_to_client": false,
    "claims": [
      {
        "voucher": "INV-1234",
        "description": "",
        "subclaim": false,
        "type": "CLAIM",
        "amount": 254.12,
        "freetext_1": "mydomain.com",
        "freetext_2": "",
        "freetext_3": "",
        "freetext_4": "",
        "freetext_5": "",
        "freetext_6": "",
        "freetext_7": "",
        "freetext_8": "",
        "freetext_9": "",
        "freetext_10": ""
      },
      {
        "voucher": "",
        "type": "COLLECTION_FEE",
        "amount": 39
      },
      {
        "voucher": "",
        "type": "INTEREST",
        "amount": 1.49
      }
    ],
    "accounting": [
      {
        "cost_id": 226794,
        "type": "CLAIM",
        "voucher": "INV-1234",
        "amount": 80.01
      },
      {
        "cost_id": 226951,
        "type": "COLLECTION_FEE",
        "voucher": "",
        "amount": 39
      },
      {
        "cost_id": 226953,
        "type": "INTEREST",
        "voucher": "",
        "amount": 1.49
      }
    ]
  }
}

Response on error

  • INVALID_ID

    You provided an invalid payment id (not numeric, <= 0, ...)

  • ID_NOT_FOUND

    The payment id you provided was not found.

Submit payment

POST /payments

Submit a payment to the 1159 Finance system.

Example URI

POST /api/v1/payments

Excample request body show

{
  "debtor": {
    "firstname": "John",
    "lastname": "Smith",
    "customer_debtor_id": 9419419
  },
  "case_id": 54321,
  "case_name": "YU/SM-00054321-01",
  "voucher": "INV-1234",
  "payment": {
    "amount": 25.9,
    "date": "2017-10-30"
  }
}

Valid JSON Parametersshow

  • object (optional)

    If you need to search by one or more debtor attributes instead of customer_debtor_id or voucher you can use the debtor object.

  • string (optional)

    Search debtor by first name.

  • string (optional)

    Search debtor by last name.

  • string (optional)

    Search debtor by your internal unique debtor id.

  • int (optional)

    Case's id to book the payment to.

  • string (optional)

    Case's name to book the payment to.

  • string (optional)

    The voucher that was paid (mostly your invoice number).

  • object

    The actual payment that was made.

  • double

    The payment amount that was made.

  • string [YYYY-MM-DD] (optional)

    The date of the payment. If ommitted the current date is used.

Response on success show

HTTP-Code 201

Headers

Content-Type: application/json

Body

{
  "error": false,
  "payment": {
    "amount": 25.9,
    "date": "2017-10-30"
  },
  "case": {
    "case_id": 54321,
    "case_name": "YU/SM-00054321-01",
    "remaining": 48.2
  }
}

Response on errorshow

  • MISSING_DEBTOR_OR_CASE_DATA

    You did not provided any criteria to select the case you want to add a payment to.

  • INVALID_PAYMENT_DATE

    The payment date is invalid. Please use YYYY-MM-DD form.

  • MISSING_PAYMENT_AMOUNT

    You did not provide a payment amount.

  • INVALID_PAYMENT_AMOUNT

    The payment amount you provided is invalid.

  • NO_CASE_FOUND

    We could not find any case for the criteria you provided.

  • MULTIPLE_CASES_FOUND

    We found more than one case for the criteria you provided.

  • ERROR_PROCESSING_PAYMENT

    The payment could not be processed. Please see 'information' attribute for details.

Addresscheck

Description

This is the addresscheck API endpoint.

Check an address

POST /addresscheck

Submit an address to the address checking API.
Important: The address check currently only supports german addresses to the full amount. Other countries might give no or incomplete results.

Example URI

POST /api/v1/addresscheck

Excample request body show

{
  "gender": "f",
  "firstname": "John",
  "lastname": "Smith",
  "street": "Hauptstr. 12",
  "postcode": "12345",
  "city": "Berlin",
  "country": "de",
  "email": "asdf1234@yahoo.com"
}

Valid JSON Parametersshow

  • string ['m', 'f'] (optional)

    Gender to check.

  • string (optional)

    First name to check.

  • string (optional)

    Last name to check.

  • string (optional)

    Street to check.

  • string (optional)

    Postal code to check.

  • string (optional)

    City to check.

  • string (optional)

    Country to check - two letter ISO code, e. g. 'de', 'gb' etc. Defaults to 'de'.

  • string (optional)

    Email address to check.

Response on successshow

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "gender": {
    "value": "f",
    "passed": false,
    "error": "WRONG_GENDER",
    "proposal": "m"
  },
  "firstname": {
    "value": "John",
    "passed": true
  },
  "lastname": {
    "value": "Smith",
    "passed": true
  },
  "street": {
    "value": "Hauptstra\u00dfe 12",
    "passed": true
  },
  "postcode": {
    "value": "12345",
    "passed": true
  },
  "city": {
    "value": "Berlin",
    "passed": true
  },
  "email": {
    "value": "asdf1234@yahoo.com",
    "passed": false,
    "error": "POSSIBLY_INVALID",
    "proposal": "",
    "score": 25
   },
   "known": false,
   "outdated": false
}

Response error codesshow

Unlike the other API endpoints, the addresscheck does not return an error code in the global 'error' attribute. Instead, each checked address field gets a passed attribute that is set to false if the check failed. In this case an additional error attribute is returned that contains one of the codes below.

  • INVALID (email)

    Indicates that an email address is invalid, either as it is known to not exist or being fake or formal incorrect.

  • POSSIBLY_INVALID (email)

    Indicates that an email address might be invalid or fake.

  • SWITCHED (firstname, lastname)

    Indicates that you might have switched first and last name in your request.

  • WRONG_GENDER (gender)

    The gender that you submitted does not match the first name.

  • POSSIBLY_WRONG_GENDER (gender)

    The gender that you submitted might not match the first name. You should double-check it.

  • UNKNOWN_NAME (firstname)

    The first name that you submitted is not known to our database.

  • UNKNOWN_NAME_PART (firstname)

    You submitted multiple first names and at least one of them is not known to our database.

  • UNCHECKED (street)

    The street you submitted was not checked as the postal code and zip did not match or were not provided.

  • UNKNOWN_STREET (street)

    The street you submitted is not known or does not match the postal code and/or city.

  • UNKNOWN_ADDRESS (postcode, city)

    The address seems to be incorrect. We could not match postal code, city and street.

  • UNKNOWN_ADDRESS_05 (postcode, city)

    The address might be incorrect or contain some typos. You should double-check it.

  • UNKNOWN_ADDRESS_01 (postcode, city)

    The address might contain small typos. You should double-check it.

  • UNKNOWN_POSTCODE (postcode)

    The postal code was not found in our database.

  • UNKNOWN_CITY (city)

    The city was not found in our database.