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.

  • boolean (optional)

    If set to true the request is rejected with an error as soon as the address of a debtor is invalid or the debtor is locked. If false (default) such debtors are counted as errors and the request continues.

  • 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.

  • int (optional)

    The id of one of your subclients that the claims of this debtor should be assigned to. This is only possible if your account has been enabled for it. If ommitted the claims are assigned to your own account.

  • 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.

  • UNAUTHORIZED_USE_OF_SUBCLIENT

    You provided a 'client_id' for a debtor, but your account has not been enabled for submitting claims for subclients.

  • UNKNOWN_CLIENT

    The 'client_id' you provided for a debtor is neither your own account nor one of your subclients.

  • INVALID_STREET_DATA

    Only with 'stop_on_error': the street of the debtor is invalid.

  • INVALID_ADDRESS_DATA

    Only with 'stop_on_error': the address of the debtor is invalid.

  • POSSIBLY_INVALID_ADDRESS_DATA

    Only with 'stop_on_error': the address of the debtor is probably invalid.

  • 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.

  • CURRENCY_MISMATCH

    The currency of the new claims differs from the currency of the case.

  • MIXED_CURRENCIES_IN_PROJECT

    The project of the case already contains cases in another currency. All cases in a project must have the same currency.

  • 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.

  • CASE_HAS_BILLED_REGISTRATION

    The registration fee for this case has already been billed. Please contact your sales manager.

  • DELETE_FAILED

    The case could not be deleted for an unknown reason.

Close

PUT /cases/{case_id}/close

Close a case, e. g. because the debtor paid directly to you. A closed case is not processed any further.
Important: You can only close cases of the account you authenticate with, not cases of your subclients.

Example URI

PUT /api/v1/cases/12345/close

Valid Parameters

  • int

    The Id of the case you want to close.

Excample request body show

{
  "comment": "Paid directly on 2026-11-20"
}

Valid JSON Parameters

  • string (optional)

    The reason for closing the case. It is stored with the case. The request body can be ommitted completely.

Response on success

HTTP-Code 202

Response on error

  • MISSING_CASE_ID

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

  • CASE_NOT_FOUND

    The case id you provided was not found in your account.

  • CANNOT_STOP_CASE

    The case is already closed.

Pause

PUT /cases/{case_id}/pause

Pause a case. A paused case stays open, but it is not processed until it is continued by 1159 Finance.
Important: You can only pause cases of the account you authenticate with, not cases of your subclients. There is no API method to continue a paused case.

Example URI

PUT /api/v1/cases/12345/pause

Valid Parameters

  • int

    The Id of the case you want to pause.

Excample request body show

{
  "pause_reason": "CLAIM_SETTLED"
}

Valid JSON Parameters

  • string ['INVOICE_CANCELLED', 'CLAIM_SETTLED'] (optional)

    The reason for pausing the case. If ommitted the case is paused without a specific reason. The request body can be ommitted completely.

Response on success

HTTP-Code 202

Response on error

  • MISSING_CASE_ID

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

  • CASE_NOT_FOUND

    The case id you provided was not found in your account.

  • CASE_ALREADY_CLOSED

    The case is already closed. You cannot pause a closed case.

  • CASE_ALREADY_PAUSED

    The case is already paused and the pause reason you provided would not change this.

Reopen

PUT /cases/{case_id}/reopen

Reopen a closed case. The case is processed again afterwards.
Important: You can only reopen cases of the account you authenticate with, not cases of your subclients.

Example URI

PUT /api/v1/cases/12345/reopen

Valid Parameters

  • int

    The Id of the case you want to reopen.

Response on success

HTTP-Code 202

Response on error

  • MISSING_CASE_ID

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

  • CASE_NOT_FOUND

    The case id you provided was not found in your account.

  • CASE_NOT_CLOSED

    The case is not closed. You can only reopen a closed case.

  • ERROR_REOPENING_CASE

    The case could not be reopened. Please see 'information' attribute for details.

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.

  • NO_CASE_FOUND_ID

    We found a case for the criteria you provided, but it has no valid case id.

  • 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.

Clearing

Description

This is the clearing API endpoint. It lists the amounts that were settled with you in the clearing of one month, for your own account and all of your subclients.

Get period

GET /clearing/{period}

Show the cleared amounts of one clearing period.
Important: The clearing for a month takes place in the following month. The period 202610 therefore returns all amounts that were cleared during November 2026. The latest period you can request is the previous month. Its lists stay empty until the clearing has taken place.

Example URI

GET /api/v1/clearing/202610

Valid Parameters

  • string [YYYYMM]

    The month you want to get the clearing of, e. g. 202610 for October 2026.

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "payments": [
    {
      "payment_id": "778899",
      "case_id": "54321",
      "case_name": "YU/SM-00054321-01",
      "client_id": "1234",
      "amount": "120.50",
      "amount_foreign": "120.50",
      "clearing_time": "2026-11-05 07:12:44",
      "case_created": "2026-08-17 10:31:02",
      "case_completed": null
    }
  ],
  "cleared_amounts": [
    {
      "case_id": "54321",
      "client_id": "1234",
      "type": "payments",
      "amount": "120.50",
      "amount_foreign": "120.50",
      "clearing_time": "2026-11-05 07:12:44"
    },
    {
      "case_id": "54321",
      "client_id": "1234",
      "type": "collection",
      "amount": "39.00",
      "amount_foreign": "39.00",
      "clearing_time": "2026-11-05 07:12:44"
    }
  ]
}

All values are returned as strings. There is no limit or offset, the response always contains the whole period.

  • array

    The debtor payments that were settled in this clearing, one entry per case and clearing run.

  • int

    The unique id of the clearing entry. This is not the payment_id of the payments endpoint.

  • int

    The client the case belongs to. This is your own client id or the id of one of your subclients.

  • decimal

    The cleared amount in EUR.

  • decimal

    The cleared amount in the currency of the case. It only differs from 'amount' for cases in a foreign currency.

  • string [YYYY-MM-DD HH:MM:SS]

    The time the amount was cleared.

  • string [YYYY-MM-DD HH:MM:SS]

    The time the case was closed or null if the case is still open.

  • array

    All amounts of this clearing separated by type. The type 'payments' repeats the entries of the payments list, the other types are the amounts that were charged against these payments.

  • string

    One of 'payments' (debtor payments), 'collection' (collection fees), 'rate_fee' (installment fees) or 'interest' (interest).

Response on error

  • INVALID_PERIOD

    You provided an invalid period (missing, not numeric, not in the format YYYYMM, ...)

  • FUTURE_PERIOD

    The period you provided is the current month or lies in the future.

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.

Partner API

Description

The Partner API enables external partners to integrate with 1159 Finance for automated client onboarding and Single Sign-On (SSO) functionality. This RESTful API provides secure access to client creation and management features.

The base URI for the Partner API is:

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

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

Authentication

All Partner API requests require authentication using custom HTTP headers:

curl -H "X-Auth-ID: {partner_auth_id}" -H "X-Auth-Key: {partner_auth_key}" \
https://partner.1159finance.com/api/partner/v1/clients

Authentication headers

  • string

    Unique partner identifier provided during onboarding.

  • string

    Secret authentication key for the partner.

Authentication error codes

  • MISSING_AUTH_ID

    X-Auth-ID header not provided.

  • MISSING_API_KEY

    X-Auth-Key header not provided.

  • INVALID_AUTH_ID

    Partner with given auth_id not found.

  • INVALID_AUTH_KEY

    Auth key doesn't match partner record.

Clients

POST /clients

Create a new client with automatic user account generation and Yousign contract initiation. This endpoint handles the complete client onboarding process.

Example URI

POST /api/partner/v1/clients

Example request body show

{
  "first_name": "John",
  "last_name": "Doe",
  "company_name": "ACME Corp",
  "street": "Musterstraße 1",
  "zip": "40217",
  "city": "Düsseldorf",
  "country": "de",
  "email": "john.doe@example.com",
  "phone": "+49 211 12345678",
  "iban": "DE89370400440532013000",
  "bic": "COBADEFFXXX",
  "intax_deduct": true
}

Valid JSON Parametersshow

  • string

    Contact person first name (max 100 chars).

  • string

    Contact person last name (max 100 chars).

  • string

    Street address (max 255 chars).

  • string

    Postal code (max 20 chars, alphanumeric with spaces/hyphens).

  • string

    City name (max 100 chars).

  • string

    Valid email address (max 255 chars).

  • string (optional)

    Company name (max 255 chars). Defaults to first + last name if not provided.

  • string (optional)

    ISO country code, lowercase. Defaults to "de".

  • string (optional)

    Phone number (max 50 chars). Digits, spaces, parentheses, +, - and dots allowed.

  • string (optional)

    International Bank Account Number. Automatically uppercased, spaces removed. Requires BIC if provided.

  • string (optional)

    Bank Identifier Code. Required if IBAN is provided.

  • boolean (optional)

    Tax deduction setting. Defaults to true.

Response on success show

HTTP-Code 201

Headers

Content-Type: application/json

Body (with return_credentials=true)

{
  "error": false,
  "client_id": 456,
  "api_key": "sha1-hash-of-client-id-and-secret",
  "username": "john.doe",
  "password": "auto-generated-15-char-password"
}

Body (with return_credentials=false)

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

Response on errorshow

  • API_READONLY

    API is in read-only mode, modifications not allowed.

  • CLIENT_MISSING_FIRST_NAME

    first_name field is required.

  • CLIENT_MISSING_LAST_NAME

    last_name field is required.

  • CLIENT_MISSING_STREET

    street field is required.

  • CLIENT_MISSING_ZIP

    zip field is required.

  • CLIENT_MISSING_CITY

    city field is required.

  • CLIENT_MISSING_EMAIL

    email field is required.

  • CLIENT_INVALID_EMAIL

    Email format is invalid.

  • CLIENT_INVALID_PHONE

    Phone number contains invalid characters.

  • CLIENT_INVALID_ZIP

    ZIP code format is invalid.

  • CLIENT_INVALID_COUNTRY

    Country ISO code not found in database.

  • CLIENT_CREATE_FAILED

    Database error during client creation.

  • CLIENT_BANK_ACCOUNT_CREATE_FAILED

    Failed to create bank account.

  • PROJECT_CREATE_FAILED

    Failed to create default project.

  • USER_CREATE_FAILED

    Failed to create user account.

  • CLIENT_YOUSIGN_FAILED

    Yousign contract initiation failed.

GET /clients[/{client_id}]

Retrieve client information for partners. Standard partners can only access clients associated with their partner_id. Global partners can access all clients.

Example URI

GET /api/partner/v1/clients

GET /api/partner/v1/clients?client_id=456

Valid Parameters

  • int (optional)

    Filter by specific client ID.

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

[
  {
    "client_id": 456,
    "company_name": "ACME Corp",
    "status": 2,
    "created": "2024-01-15 10:30:00",
    "notes": "Internal notes",
    "statement_notes": "Statement notes",
    "contact_person_1": "John Doe",
    "contact_phone_1": "+49 211 12345678",
    "contact_email_1": "john.doe@example.com"
  }
]

Client status values

  • 1 PRE_CONTRACT – Initial state after creation

  • 2 ACTIVE – Contract signed, fully operational

  • 3 SUSPENDED – Temporarily inactive

  • 4 TERMINATED – Contract ended

Response on error

  • CLIENT_NOT_FOUND

    No clients found matching criteria.

Projects

The Partner Projects endpoint allows partners to manage projects for their clients. This is useful for clients with PRE_CONTRACT status who cannot yet use the regular client API.

POST /projects

Create a new project for a client associated with the partner.

Example URI

POST /api/partner/v1/projects

Example request body show

{
  "client_id": 123,
  "project_name": "Collection Campaign 2025",
  "contract_subject": 1,
  "default": false
}

Valid JSON Parametersshow

  • int

    ID of the client. Must belong to this partner.

  • string

    Project name (max 255 chars). Alphanumeric and -_ /äöüÄÖÜß&+!.() allowed.

  • string (optional)

    Project description (max 1000 chars).

  • int (optional)

    Contract subject ID (must be >= 0).

  • boolean (optional)

    If true, this project becomes the default for the client.

Response on success

HTTP-Code 201

{
  "project_id": 789
}

Response on errorshow

  • API_READONLY

    API is in read-only mode.

  • PROJECT_MISSING_CLIENT_ID

    client_id field is required.

  • PROJECT_MISSING_NAME

    project_name field is required.

  • INVALID_CLIENT_ID

    Client ID is invalid or zero.

  • PROJECT_INVALID_NAME

    Project name contains invalid characters.

  • INVALID_CONTRACT_SUBJECT

    Contract subject ID is negative.

  • CLIENT_NOT_FOUND

    Client not found or access denied.

  • PROJECT_NAME_EXISTS

    A project with this name already exists for this client.

  • PROJECT_CREATE_FAILED

    Database error during project creation.

GET /projects[/{id}]

Retrieve projects for clients associated with the partner.

Example URI

GET /api/partner/v1/projects?client_id=123

Valid Parameters

  • int (optional)

    Filter by specific client ID.

  • string (optional)

    Filter by project name. Supports wildcard * for LIKE queries.

  • int (optional)

    Pagination offset (default: 0).

  • int (optional)

    Maximum results, 1-1000 (default: 100).

Response on success show

HTTP-Code 200

Headers

Content-Type: application/json

Body

{
  "error": false,
  "offset": 0,
  "limit": 100,
  "projects": [
    {
      "id": 789,
      "client_id": 123,
      "name": "Collection Campaign 2025",
      "description": "Q1 2025 debt collection campaign",
      "contract_subject": "Debt Collection Services",
      "default": true,
      "partner_id": 5,
      "company_name": "ACME Corp",
      "client_status": 2,
      "cases": 45
    }
  ]
}

Response on error

  • INVALID_CLIENT_ID

    Client ID parameter is invalid.

  • PROJECT_NOT_FOUND

    Project not found or access denied.

PUT /projects/{id}

Update an existing project. Only include fields you want to change.

Example URI

PUT /api/partner/v1/projects/789

Example request body show

{
  "project_name": "Updated Campaign Name",
  "default": true
}

Valid JSON Parametersshow

  • string (optional)

    New project name (max 255 chars).

  • string (optional)

    New description (max 1000 chars).

  • int (optional)

    Contract subject ID (must be >= 0).

  • boolean (optional)

    Set as default project for the client.

Response on success

HTTP-Code 200

{
  "error": false
}

Response on errorshow

  • API_READONLY

    API is in read-only mode.

  • MISSING_PROJECT_ID

    Project ID not provided in URL.

  • PROJECT_NOT_FOUND

    Project not found or access denied.

  • PROJECT_INVALID_NAME

    Project name contains invalid characters.

  • PROJECT_NAME_EXISTS

    Name conflicts with existing project.

  • NO_CHANGES

    No fields were modified.

  • PROJECT_UPDATE_FAILED

    Database error during update.

DELETE /projects/{id}

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

Example URI

DELETE /api/partner/v1/projects/789

Response on success

HTTP-Code 200

{
  "error": false
}

Response on error

  • API_READONLY

    API is in read-only mode.

  • MISSING_PROJECT_ID

    Project ID not provided in URL.

  • PROJECT_NOT_FOUND

    Project not found or access denied.

  • PROJECT_HAS_CASES

    Cannot delete project with existing cases.

  • PROJECT_DELETE_FAILED

    Database error during deletion.

Single Sign-On (SSO)

POST /sso

Generate a single sign-on token for seamless user authentication. The returned login_url can be used to redirect users directly into the 1159 Finance portal without entering credentials.
Important: This method is only available if single sign-on has been enabled for your partner account. Please contact apisupport@1159finance.com if you need it.

Example URI

POST /api/partner/v1/sso

Example request body (with user_id) show

{
  "user_id": 123,
  "client_id": 456,
  "expires_in": 300
}

Example request body (with username) show

{
  "username": "john.doe",
  "client_id": 456,
  "expires_in": 300
}

Use username when you don't have the user_id, e.g. after creating a client via the Partner API.

Example request body (with case_id for deep-link) show

{
  "user_id": 123,
  "client_id": 456,
  "case_id": 789,
  "expires_in": 300
}

When case_id is provided, the user is redirected directly to the corresponding case after login.

Valid JSON Parametersshow

  • int (required*)

    1159 Finance user ID to authenticate. Either user_id or username must be provided. If both are given, user_id takes precedence.

  • string (required*)

    Username to authenticate. Alternative to user_id.

  • int (optional)

    Client ID for additional validation. Recommended for security.

  • int (optional)

    Case ID for deep-linking. When provided, the user is redirected directly to this case after login instead of the dashboard.

  • int (optional)

    Token lifetime in seconds. Range: 60–1800. Default: 300.

Response on success show

HTTP-Code 201

Headers

Content-Type: application/json

Body

{
  "error": false,
  "token": "a1b2c3d4e5f6789...64-character-hex-token",
  "user_id": 123,
  "expires_in": 300,
  "valid_until": "2025-10-07 14:35:00",
  "login_url": "https://partner.1159finance.com/?action=login&handler=hash_login&token=a1b2c3d4..."
}

Body (with case_id)

{
  "error": false,
  "token": "a1b2c3d4e5f6789...64-character-hex-token",
  "user_id": 123,
  "expires_in": 300,
  "valid_until": "2025-10-07 14:35:00",
  "login_url": "https://partner.1159finance.com/?action=login&handler=hash_login&token=a1b2c3d4...&case_id=789",
  "case_id": 789
}

Response fields

  • string

    64-character hexadecimal SSO token.

  • int

    Validated user ID.

  • int

    Token lifetime in seconds.

  • string

    ISO datetime when token expires.

  • string

    Complete URL for user redirect. Includes case_id parameter when provided.

  • int

    Only present if case_id was provided in the request.

Response on errorshow

  • API_READONLY

    System is in read-only maintenance mode.

  • SSO_NOT_ALLOWED

    Single sign-on has not been enabled for your partner account (HTTP code 403).

  • MISSING_JSON_DATA

    Request body is empty or invalid JSON.

  • SSO_MISSING_USER_IDENTIFIER

    Neither user_id nor username provided.

  • SSO_INVALID_USER_ID

    user_id is not a positive integer.

  • SSO_INVALID_USERNAME

    username is empty after trimming.

  • SSO_USER_NOT_FOUND

    User with given ID or username doesn't exist.

  • SSO_USER_NOT_ACTIVE

    User account is not active (status != 2).

  • SSO_CLIENT_MISMATCH

    User doesn't belong to specified client_id.

  • SSO_UNAUTHORIZED_CLIENT

    Client not associated with this partner.

  • SSO_TOKEN_CREATE_FAILED

    Internal error creating the token.

Best practices

  • Always use HTTPS – never call this endpoint over HTTP.
  • Server-side only – never call from client-side JavaScript (exposes credentials).
  • Generate token and redirect in the same request. Do not cache tokens.
  • Use short expiry (60–120s) if redirecting immediately.
  • Include client_id for an additional security layer.