Back to top

Public Pair Finance API

This document outlines the public Pair Finance API in version 1.0. It is available using HTTPS only at app.pairfinance.com/api/v1.

Last updated: October 21st, 2020.

Authentication

The Pair Finance API uses Basic Authorization. You use the API credentials assigned to you by Pair Finance to authenticate your requests.

Error States

The common HTTP Response Status Codes are used.

HTTPS

The API is only available over HTTPS.

Time zones / dates

All timestamps are formatted as ISO8601 with timezone information. For API calls that allow for a timestamp to be specified, we use that exact timestamp. These timestamps look something like 2016-05-02T12:58:54+00:00.

Testing

For testing before go-live please use the staging endpoint https://stage.pairfinance.com/api/v1/ instead of the production endpoint shown in the method descriptions below (production endpoint https://app.pairfinance.com/api/v1/).

Cases

This API allows customers of Pair Finance GmbH to hand in new case files for processing or to query the status of all or individual case files in our system.

Cases Collection

List All Cases
GET/cases?from={from}&amount={amount}&status={status}&merchant_id={merchant_id}

Lists all case files (“cases”) that are part of the scope of the current user (e.g. cases that belong to this creditor). The list can be filtered by the state of the case file and the page number of the returned list.

Example URI

GET https://app.pairfinance.com/api/v1/cases?from=0&amount=10&status=active&merchant_id=mymerchant
URI Parameters
HideShow
from
integer (optional) Default: 0 Example: 0

Starting number of the returned cases, defaults to 0.

amount
integer (optional) Default: 10 Example: 10

Amount of cases returned per case, defaults to 10.

status
string (optional) Example: active

Status of the cases to be returned, defaults to active, paused, stopped and excludes finished. It’s not possible to view multiple statuses at once, unless using the empty default.

merchant_id
string (optional) Example: mymerchant

For Partner companies, the ID of the merchant whose cases should be returned.

Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "meta": {
        "total_cases": 710,
        "first_case_number": 0,
        "last_case_number": 10,
        "cases_per_page": 10,
        "filter" {
            "status": "active"
        }
    },
    "cases": [
        {
            "id": "100039269541",
            "reference_id": "customers_crm_id_here",
            "created_at": "2016-05-02T12:58:54+00:00",
            "updated_at": "2016-05-02T12:58:54+00:00",
            "state": "active",
            "type": "private_person",
            "debt_total": "99.3",
            "total_debt_outstanding": "99.3",
            "currency": "EUR",
            "customer_number": "12345",
            "first_name": "John",
            "last_name": "Doe"
        }
    ]
}

Create a New Case
POST/cases

Creates a new case in our system that can be scheduled to run according to our system settings. This does not automatically start a strategy for this case file.

Below are allowed values for some fields that require specific inputs:

  • “primary_debtor_info”:

    • “type”:

      • “private_person”
      • “company”
    • “gender”:

      • “male”
      • “female”
      • “unknown”
  • “addresses”:

    • “type”:
      • “invoice” (= Rechnungsaddresse)
      • “shipping” (= Lieferaddresse)
      • “postal” (= Postanschrift)
      • “work” (= Arbeitsaddresse)
      • “previous” (= Voranschrift)
      • “other” (= Andere Addresse)
      • “actual” (= Aktuelle Address)
  • “creditor_fees”:

    • “type”:
      • “creditor_reminder_fee” (= Mahnspesen)
      • “creditor_chargeback_fee” (= Bankrücklastkosten)
      • “creditor_title_fee” (= Titulierungskosten)
      • “creditor_deferment_fee” (= Verzugsgebühren)
  • “contract_nature”:

    • “medical_service” (= Medical or dentist service)
    • “service_contract” (= Contract for services)
    • “loan_agreement” (= Loan repayment)
    • “craftsman_power” (= Craftsmen services)
    • “purchase_contract” (= Purchase Contract)
    • “lease” (= Leasing Contract/hire purchase)
    • “rental_contract” (= Rental contract)
    • “shipping_methods” (= Freightage)
    • “work_contract” (= Contract for work and services/contract for work and materials)
    • “advertisement_in_newspaper” (= Advertisement in newspaper or similar)
    • “fees_referring_to_private_nursing_care_insurance” (= fees referring to private nursing care insurance)
    • “guarantee_financial_security” (= guarantee/financial security)
    • “business_errand” (= business errand run by a self-employed person)
    • “home_accommodation” (= home accommodation)
    • “hotel_fees” (= hotel fees)
    • “nursery_or_kindergarden_fee” (= nursery or kindergarden fee)
    • “bill_of_current_account_cost” (= bill of current account cost)
    • “hospital_expenses” (= hospital expenses)
    • “cost_of_ambulance_service” (= cost of ambulance service)
    • “storage_cost” (= storage cost)
    • “cost_of_training_courses” (= cost of training courses)
    • “cost_of_renting_office_room” (= cost of renting office room incl. utilities )
    • “cost_of_renting_housing” (= cost of renting housing incl. utilities)
    • “ancillary_rental_costs” (= ancillary rental costs - also renovation costs)
    • “rent_other” (= rent (other))
    • “membership_fee” (= membership fee)
    • “pacht” (= lease)
    • “nursing_care_insurance” (= nursing care insurance)
    • "attorney_s_fee: “attorney)s fee”
    • “travel_contract” (= travel contract)
    • “annuity_in_arrears” (= annuity in arrears)
    • “repair_services” (= repair services)
    • “recourse_to_guarantee” (= recourse to guarantee/financial security)
    • “recourse_to_insurance_agreement” (= recourse to insurance agreement due to accident/incident)
    • “compensation_by_contract” (= compensation (for damages) by contract)
    • “compensation_by_accident_incident” (= compensation (for damages) by accident/incident)
    • “cheque_exchange” (= cheque/exchange)
    • “commission_for_cheque_exchange” (= commission for cheque/exchange)
    • “expenses_for_cheque_exchange” (= expenses for cheque/exchange)
    • “acknowledgement_of_debt” (= acknowledgement of debt)
    • “freight_cost” (= freight cost)
    • “telecommunication_services” (= telecommunication services)
    • “veterinary_service” (= veterinary service)
    • “amortization_rate_rate_of_interest” (= amortization rate/rate of interest)
    • "overdraw_one_s_bank_account: “overdraw one)s bank account”
    • “unjustified_enrichment” (= unjustified enrichment)
    • “being_behind_in_paying_aliments” (= being behind in paying aliments)
    • “out_of_court_settlement” (= out-of-court settlement)
    • “commission_for_real_estate” (= commission for real-estate agent/middleman)
    • “cost_of_food” (= cost of food)
    • “insurance_premium_fee” (= insurance premium/- fee)
    • “accommodation_service” (= accommodation service - energy, water, gas, heat)
    • “optional_benefits_services” (= optional benefits/services while being in stationary treatment)
    • “delivery_of_goods” (= delivery of goods)
    • “housing_benefit_for_owners_corporation” (= housing benefit for owners corporation)
    • “newspaper_subscription” (= newspaper subscription)
    • “overdue_interest_interest_for_delay” (= overdue interest/interest for delay)

Example URI

POST https://app.pairfinance.com/api/v1/cases
Request
HideShow

Invalid email address

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "reference_id": "your_crm_id_here",
  "merchant_id": "test-company",
  "expected_cut_off_date": "2030-01-21",
  "currency": "EUR",
  "suggested_phase": "pre_court",
  "bank_info": {
    "iban": "1234567890",
    "bic": "0987654321"
  },
  "debtor_info": {
    "primary_debtor_info": {
      "type": "private_person",
      "company_name": "cool company",
      "title": "",
      "first_name": "first_name",
      "last_name": "last_name",
      "gender": "male",
      "pass_iban": "1234554321",
      "pass_bic": "1122334455",
      "customer_number": "abc",
      "date_of_birth": "1970-01-31"
    },
    "addresses": [
      {
        "primary": true,
        "type": "invoice",
        "street": "...",
        "street_addon": "",
        "street_number": "22",
        "zip_code": "10178",
        "city": "Berlin",
        "country": "DE"
      },
      {
        "primary": false,
        "type": "invoice",
        "street": "...",
        "street_addon": "",
        "street_number": "33",
        "zip_code": "10128",
        "city": "Berlin",
        "country": "DE"
      }
    ],
    "emails": [
      {
        "email": "test1@mail.com",
        "primary": true
      },
      {
        "email": "wrong format",
        "primary": false
      }
    ],
    "phones": [
      {
        "number": "+49 151 1234567",
        "primary": true
      },
      {
        "number": "+49 151 1234333",
        "primary": false
      }
    ]
  },
  "claims": [
    {
      "debt_total": "99.1",
      "vat_total": "9.2",
      "loan_nominal_amount": "99.1",
      "loan_repayment_date": "2016-05-16",
      "invoice_number": "1234",
      "invoice_date": "2016-05-02",
      "due_date": "2016-05-16",
      "contract_number": "1234",
      "claim_owner": "shen",
      "shop_id": "1434",
      "tracking_information": "Tracking info",
      "contract_date": "2016-05-02",
      "contract_nature": "loan_agreement",
      "items": [
        {
          "name": "...",
          "delivery_cost": "2.2",
          "cost_per_unit": "11.2",
          "number_of_units": "2"
        },
        {
          "name": "... another",
          "delivery_cost": "2.3",
          "cost_per_unit": "33.6",
          "number_of_units": "1.5"
        }
      ],
      "creditor_fees": [
        {
          "type": "creditor_reminder_fee",
          "amount": "5.0",
          "date_incurred": "2016-05-20"
        }
      ]
    }
  ],
  "custom_data": [
    {
      "key": "value"
    },
    {
      "key2": "value2"
    }
  ]
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "new_participants.emails.email": [
      "ist nicht gültig"
    ]
  }
}
Request
HideShow

Invalid Request (post data is nil)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
nil
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "debtor_info": [
      "is missing"
    ],
    "debtor_info[primary_debtor_info]": [
      "is missing"
    ],
    "debtor_info[primary_debtor_info][type]": [
      "is missing"
    ],
    "debtor_info[addresses]": [
      "is missing"
    ],
    "debtor_info[emails]": [
      "is missing"
    ],
    "main_claims": [
      "is missing"
    ]
  }
}
Request
HideShow

Invalid Request (Wrong claim in the post data)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "reference_id": "your_crm_id_here",
  "merchant_id": "test-company",
  "currency": "EUR",
  "suggested_phase": "",
  "debtor_info": {
    "primary_debtor_info": {
      "type": "private_person",
      "company_name": "cool company",
      "title": "",
      "first_name": "first_name",
      "last_name": "last_name",
      "gender": "male",
      "customer_number": "abc",
      "date_of_birth": "1970-01-31"
    },
    "addresses": [
      {
        "primary": true,
        "type": "invoice",
        "street": "...",
        "street_addon": "",
        "street_number": "22",
        "zip_code": "10178",
        "city": "Berlin",
        "country": "DE"
      },
      {
        "primary": false,
        "type": "invoice",
        "street": "...",
        "street_addon": "",
        "street_number": "33",
        "zip_code": "10128",
        "city": "Berlin",
        "country": "DE"
      }
    ],
    "emails": [
      {
        "email": "test1@mail.com",
        "primary": true
      },
      {
        "email": "test2@mail.com",
        "primary": false
      }
    ],
    "phones": [
      {
        "number": "+49 151 1234567",
        "primary": true
      },
      {
        "number": "+49 151 1234333",
        "primary": false
      }
    ]
  },
  "claims": {
    "debt_total": "99.1",
    "vat_total": "9.2",
    "invoice_number": "1234",
    "invoice_date": "2016-05-02",
    "due_date": "2016-05-16",
    "contract_number": "1234",
    "contract_date": "2016-05-02",
    "contract_nature": "loan_agreement",
    "items": [
      {
        "name": "...",
        "delivery_cost": "2.2",
        "cost_per_unit": "11.2",
        "number_of_units": "2"
      },
      {
        "name": "... another",
        "delivery_cost": "2.3",
        "cost_per_unit": "33.6",
        "number_of_units": "1.5"
      }
    ],
    "creditor_fees": [
      {
        "type": "creditor_reminder_fee",
        "amount": "5.0",
        "date_incurred": "2016-05-20"
      }
    ]
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "main_claims": [
      "is invalid"
    ]
  }
}
Request
HideShow

A valid claim Post request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "reference_id": "your_crm_id_here",
  "merchant_id": "test-company",
  "expected_cut_off_date": "2030-01-21",
  "currency": "EUR",
  "suggested_phase": "pre_court",
  "bank_info": {
    "iban": "1234567890",
    "bic": "0987654321"
  },
  "debtor_info": {
    "primary_debtor_info": {
      "type": "private_person",
      "company_name": "cool company",
      "title": "",
      "first_name": "first_name",
      "last_name": "last_name",
      "gender": "male",
      "pass_iban": "1234554321",
      "pass_bic": "1122334455",
      "customer_number": "abc",
      "date_of_birth": "1970-01-31"
    },
    "addresses": [
      {
        "primary": true,
        "type": "invoice",
        "street": "...",
        "street_addon": "",
        "street_number": "22",
        "zip_code": "10178",
        "city": "Berlin",
        "country": "DE"
      },
      {
        "primary": false,
        "type": "invoice",
        "street": "...",
        "street_addon": "",
        "street_number": "33",
        "zip_code": "10128",
        "city": "Berlin",
        "country": "DE"
      }
    ],
    "emails": [
      {
        "email": "test1@mail.com",
        "primary": true
      },
      {
        "email": "test2@mail.com",
        "primary": false
      }
    ],
    "phones": [
      {
        "number": "+49 151 1234567",
        "primary": true
      },
      {
        "number": "+49 151 1234333",
        "primary": false
      }
    ]
  },
  "claims": [
    {
      "debt_total": "99.1",
      "vat_total": "9.2",
      "loan_nominal_amount": "99.1",
      "loan_repayment_date": "2016-05-16",
      "invoice_number": "1234",
      "invoice_date": "2016-05-02",
      "due_date": "2016-05-16",
      "contract_number": "1234",
      "claim_owner": "shen",
      "shop_id": "1434",
      "tracking_information": "Tracking info",
      "contract_date": "2016-05-02",
      "contract_nature": "loan_agreement",
      "items": [
        {
          "name": "...",
          "delivery_cost": "2.2",
          "cost_per_unit": "11.2",
          "number_of_units": "2"
        },
        {
          "name": "... another",
          "delivery_cost": "2.3",
          "cost_per_unit": "33.6",
          "number_of_units": "1.5"
        }
      ],
      "creditor_fees": [
        {
          "type": "creditor_reminder_fee",
          "amount": "5.0",
          "date_incurred": "2016-05-20"
        }
      ]
    }
  ],
  "custom_data": [
    {
      "key": "value"
    },
    {
      "key2": "value2"
    }
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /cases/100039269541
X-Result-Message: Case file was successfully created.
Body
{
    "id": "100039269541",
    "reference_id": "your_crm_id_here",
    "merchant_id": "test-company",
    "created_at": "2020-10-16T15:57:34+02:00",
    "updated_at": "2020-10-16T15:57:34+02:00",
    "state": "inactive",
    "debt_total": "104.1",
    "total_debt_outstanding": "104.1",
    "currency": "EUR",
    "debtor_info": {
        "primary_debtor_info": {
            "type": "company",
            "title": "",
            "first_name": "First Name",
            "last_name": "Last Name",
            "gender": "male",
            "customer_number": "abc",
            "date_of_birth": "1970-01-31",
            "pass_iban": "1234554321",
            "pass_bic": "1122334455",
            "company_name": "cool company"
        },
        "addresses": [
            {
                "type": "invoice",
                "primary": true,
                "street": "...",
                "street_addon": "",
                "street_number": "22",
                "zip_code": "10178",
                "city": "Berlin",
                "country": "DE"
            },
            {
                "type": "invoice",
                "primary": false,
                "street": "...",
                "street_addon": "",
                "street_number": "33",
                "zip_code": "10128",
                "city": "Berlin",
                "country": "DE"
            }
        ],
        "emails": [
            {
                "primary": true,
                "email": "test1@mail.com"
            },
            {
                "primary": false,
                "email": "test2@mail.com"
            }
        ],
        "phones": [
            {
                "primary": true,
                "number": "491511234567"
            },
            {
                "primary": false,
                "number": "491511234333"
            }
        ]
    },
    "claims": [
        {
            "id": 28,
            "debt_total": "99,10",
            "vat_total": "9,20",
            "invoice_number": "1234",
            "invoice_date": "2016-05-02",
            "due_date": "2016-05-16",
            "contract_number": "1234",
            "loan_repayment_date": "2016-05-16",
            "loan_nominal_amount": "99,10",
            "contract_date": "2016-05-02",
            "contract_nature": "loan_agreement",
            "tracking_information": "Tracking info",
            "items": [
                {
                    "name": "...",
                    "delivery_cost": "2,20",
                    "cost_per_unit": "11,20",
                    "number_of_units": "2.0"
                },
                {
                    "name": "... another",
                    "delivery_cost": "2,30",
                    "cost_per_unit": "33,60",
                    "number_of_units": "1.5"
                }
            ],
            "creditor_fees": [
                {
                    "type": "creditor_reminder_fee",
                    "amount": "5,00",
                    "date_incurred": "2016-05-20"
                }
            ],
            "receipt_number": nil,
            "object_number": nil,
            "claim_owner": "shen",
            "shop_id": "1434",
            "default_date": nil,
            "original_amount": "0,00"
        }
    ],
    "events": [
        {
            "created_at": "2020-10-16T15:57:34+02:00",
            "name": "Akte erstellt",
            "status": nil,
            "direction": "",
            "channel": "",
            "details": {}
        }
    ],
    "bank_info": {
        "iban": "1234567890",
        "bic_swift": "0987654321"
    },
    "documents": [],
    "custom_data": []
}
Response  200
HideShow
Headers
Location: /cases/100039269541
X-Result-Message: Claim(s) was successfully added to already existing case file 100039269541'
Body
{
    "id": "100039269541",
    "reference_id": "your_crm_id_here",
    "merchant_id": "test-company",
    "created_at": "2020-10-16T15:57:34+02:00",
    "updated_at": "2020-10-16T15:57:34+02:00",
    "state": "inactive",
    "debt_total": "104.1",
    "total_debt_outstanding": "104.1",
    "currency": "EUR",
    "debtor_info": {
        "primary_debtor_info": {
            "type": "company",
            "title": "",
            "first_name": "First Name",
            "last_name": "Last Name",
            "gender": "male",
            "customer_number": "abc",
            "date_of_birth": "1970-01-31",
            "pass_iban": "1234554321",
            "pass_bic": "1122334455",
            "company_name": "cool company"
        },
        "addresses": [
            {
                "type": "invoice",
                "primary": true,
                "street": "...",
                "street_addon": "",
                "street_number": "22",
                "zip_code": "10178",
                "city": "Berlin",
                "country": "DE"
            },
            {
                "type": "invoice",
                "primary": false,
                "street": "...",
                "street_addon": "",
                "street_number": "33",
                "zip_code": "10128",
                "city": "Berlin",
                "country": "DE"
            }
        ],
        "emails": [
            {
                "primary": true,
                "email": "test1@mail.com"
            },
            {
                "primary": false,
                "email": "test2@mail.com"
            }
        ],
        "phones": [
            {
                "primary": true,
                "number": "491511234567"
            },
            {
                "primary": false,
                "number": "491511234333"
            }
        ]
    },
    "claims": [
        {
            "id": 28,
            "debt_total": "99,10",
            "vat_total": "9,20",
            "invoice_number": "1234",
            "invoice_date": "2016-05-02",
            "due_date": "2016-05-16",
            "contract_number": "1234",
            "loan_repayment_date": "2016-05-16",
            "loan_nominal_amount": "99,10",
            "contract_date": "2016-05-02",
            "contract_nature": "loan_agreement",
            "tracking_information": "Tracking info",
            "items": [
                {
                    "name": "...",
                    "delivery_cost": "2,20",
                    "cost_per_unit": "11,20",
                    "number_of_units": "2.0"
                },
                {
                    "name": "... another",
                    "delivery_cost": "2,30",
                    "cost_per_unit": "33,60",
                    "number_of_units": "1.5"
                }
            ],
            "creditor_fees": [
                {
                    "type": "creditor_reminder_fee",
                    "amount": "5,00",
                    "date_incurred": "2016-05-20"
                }
            ],
            "receipt_number": nil,
            "object_number": nil,
            "claim_owner": "shen",
            "shop_id": "1434",
            "default_date": nil,
            "original_amount": "0,00"
        }
    ],
    "events": [
        {
            "created_at": "2020-10-16T15:57:34+02:00",
            "name": "Akte erstellt",
            "status": nil,
            "direction": "",
            "channel": "",
            "details": {}
        }
    ],
    "bank_info": {
        "iban": "1234567890",
        "bic_swift": "0987654321"
    },
    "documents": [],
    "custom_data": []
}

View Case Details
GET/cases/{case_id}

Returns the detailed set of data about a given case file, including all claim (purchase) and item data but excluding historical data (what happened when with this case).

Example URI

GET https://app.pairfinance.com/api/v1/cases/100039269541
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

Request
HideShow

Invalid Request (invalid case Id)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Resource not found"
}
Request
HideShow

Valid request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "id": "100002304176",
    "reference_id": "1111",
    "merchant_id": nil,
    "created_at": "2020-10-16T17:01:14+02:00",
    "updated_at": "2020-10-16T17:01:16+02:00",
    "state": "unjustified",
    "debt_total": "150.0",
    "total_debt_outstanding": "150.0",
    "currency": "EUR",
    "debtor_info": {
        "primary_debtor_info": {
            "type": "private_person",
            "title": "Dr.",
            "first_name": "Test user firstname",
            "last_name": "Test user lastname",
            "gender": "male",
            "customer_number": "12345678",
            "date_of_birth": "1990-01-01",
            "pass_iban": nil,
            "pass_bic": nil
        },
        "addresses": [
            {
                "type": "work",
                "primary": true,
                "street": "Test Street",
                "street_addon": "Apt. 400",
                "street_number": "34a",
                "zip_code": "00001",
                "city": "Linnenbaumdorf",
                "country": "DE"
            }
        ],
        "emails": [
            {
                "primary": true,
                "email": "test1@mail.com"
            },
            {
                "primary": false,
                "email": "test2@mail.com"
            }
        ],
        "phones": [
            {
                "primary": true,
                "number": "490004567890"
            },
            {
                "primary": false,
                "number": "490001111111"
            }
        ]
    },
    "claims": [
        {
            "id": 17,
            "debt_total": "140,00",
            "vat_total": "0,00",
            "invoice_number": "6783704499",
            "invoice_date": "2016-05-02",
            "due_date": "2016-05-02",
            "contract_number": "3916192504",
            "loan_repayment_date": nil,
            "loan_nominal_amount": "",
            "contract_date": "2016-05-02",
            "contract_nature": "purchase_contract",
            "tracking_information": nil,
            "items": [
                {
                    "name": "Mittelmäßige Papier Schuhe",
                    "delivery_cost": "81,00",
                    "cost_per_unit": "94,00",
                    "number_of_units": "4.0"
                }
            ],
            "creditor_fees": [
                {
                    "type": "creditor_reminder_fee",
                    "amount": "10,00",
                    "date_incurred": "2016-05-02"
                }
            ],
            "receipt_number": nil,
            "object_number": nil,
            "claim_owner": nil,
            "shop_id": nil,
            "default_date": "2016-05-02",
            "original_amount": "200,00"
        }
    ],
    "events": [
        {
            "created_at": "2020-10-16T17:01:14+02:00",
            "name": "Strategie aktiviert",
            "status": nil,
            "direction": "",
            "channel": "",
            "details": {}
        },
        {
            "created_at": "2020-10-16T17:01:14+02:00",
            "name": "Akte erstellt",
            "status": nil,
            "direction": "",
            "channel": "",
            "details": {}
        },
        {
            "created_at": "2020-10-16T17:01:15+02:00",
            "name": "[23] Zahlung an Pair 9,00",
            "status": nil,
            "direction": "",
            "channel": "",
            "details": {}
        },
        {
            "created_at": "2020-10-16T17:01:15+02:00",
            "name": "[24] Zahlung an Mandanten 18,00",
            "status": nil,
            "direction": "",
            "channel": "",
            "details": {}
        },
        {
            "created_at": "2020-10-16T17:01:16+02:00",
            "name": "[25] Zahlung an Mandanten 27,00",
            "status": nil,
            "direction": "",
            "channel": "",
            "details": {}
        },
        {
            "created_at": "2020-10-16T17:01:14+02:00",
            "name": "Strategie gestoppt",
            "status": nil,
            "direction": "",
            "channel": "",
            "details": {}
        }
    ],
    "bank_info": {
        "iban": "DE95500105171694454431",
        "bic_swift": nil
    },
    "documents": [
        {
            "url": "/api/v1/cases/100002304176/documents/Q3LNo1gbP",
            "type": "Forderungskonto",
            "created_at": "2020-10-16T17:01:14+02:00",
            "description": "test",
            "content_type": "application/pdf"
        }
    ],
    "custom_data": []
}

Retrieve An Attachment (documents)
GET/cases/{case_id}/documents/{attachment_id}

Returns the Attachment of a specific case_id requested.

Example URI

GET https://app.pairfinance.com/api/v1/cases/100039269541/documents/1234
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

attachment_id
string (required) Example: 1234

ID of the attachment related to Case

Request
HideShow

Invalid Request (accessing a non visibile permission related resource)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  403
HideShow

When the requested case file visibility is only for ‘pair’.

Headers
Content-Type: application/json
Body
{
  "error": "403 Unauthorized"
}
Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  302
HideShow
Headers
Content-Type: application/json
Body
File contents

Retrieve An Attachment via Activity slug (messages)
GET/cases/{case_id}/messages/{activity_slug}

Returns the Attachment of a specific case_id requested.

Example URI

GET https://app.pairfinance.com/api/v1/cases/100039269541/messages/1234
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

activity_slug
string (required) Example: 1234

activity slug of the attachment related to Case

Request
HideShow

Invalid Request (when wrong activity slug is provided)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Resource not found"
}
Request
HideShow

Invalid Request (when activity slug of different activity is provided)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Resource not found"
}
Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  302
HideShow
Headers
Content-Type: application/json
Body
File contents

Create Multiple Attachments (documents)
POST/cases/{case_id}/documents/create_multiple

Creates Multiple attachments for a Specific Case.

Example URI

POST https://app.pairfinance.com/api/v1/cases/100039269541/documents/create_multiple
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

Request
HideShow

Invaid request (wrong type of file)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "documents": [
    {
      "file": "file",
      "source": "creditor",
      "visibility": "pair_creditor",
      "type_of_file": "invalid"
    }
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "logo.png": [
      {
        "type_of_file": [
          "ist kein gültiger Wert"
        ]
      }
    ]
  }
}
Request
HideShow

Valid request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "documents": [
        {
            "file": ""
            "source": "",
            "visibility": "",
            "type_of_file": ""
        }
    ]
  }
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "100000043818",
  "reference_id": null,
  "merchant_id": "company18",
  "created_at": "2020-10-15T11:49:18+02:00",
  "updated_at": "2020-10-15T11:49:18+02:00",
  "state": "inactive",
  "debt_total": "110.0",
  "total_debt_outstanding": "110.0",
  "currency": "EUR",
  "debtor_info": {
    "primary_debtor_info": {
      "type": "private_person",
      "title": "Dr.",
      "first_name": "Test User firstname",
      "last_name": "Test user lastname",
      "gender": "male",
      "customer_number": "12345678",
      "date_of_birth": "1990-01-01",
      "pass_iban": null,
      "pass_bic": null
    },
    "addresses": [
      {
        "type": "work",
        "primary": true,
        "street": "Test Street",
        "street_addon": "Apt. 400",
        "street_number": "34a",
        "zip_code": "00001",
        "city": "Linnenbaumdorf",
        "country": "DE"
      }
    ],
    "emails": [
      {
        "primary": true,
        "email": "test1@mail.com"
      },
      {
        "primary": false,
        "email": "test2@mail.com"
      }
    ],
    "phones": [
      {
        "primary": true,
        "number": "490004567890"
      },
      {
        "primary": false,
        "number": "490001111111"
      }
    ]
  },
  "claims": [
    {
      "id": 1,
      "debt_total": "100,00",
      "vat_total": "0,00",
      "invoice_number": "6783704499",
      "invoice_date": "2016-05-02",
      "due_date": "2016-05-02",
      "contract_number": "3916192504",
      "loan_repayment_date": null,
      "loan_nominal_amount": "",
      "contract_date": "2016-05-02",
      "contract_nature": "purchase_contract",
      "tracking_information": null,
      "items": [
        {
          "name": "Mittelmäßige Papier Schuhe",
          "delivery_cost": "81,00",
          "cost_per_unit": "94,00",
          "number_of_units": "4.0"
        }
      ],
      "creditor_fees": [
        {
          "type": "creditor_reminder_fee",
          "amount": "10,00",
          "date_incurred": "2016-05-02"
        }
      ],
      "receipt_number": null,
      "object_number": null,
      "claim_owner": null,
      "shop_id": null,
      "default_date": "2016-05-02",
      "original_amount": "200,00"
    }
  ],
  "events": [
    {
      "created_at": "2020-10-15T11:49:18+02:00",
      "name": "Akte erstellt",
      "status": null,
      "direction": "",
      "channel": "",
      "details": {}
    },
    {
      "created_at": "2020-10-15T11:49:18+02:00",
      "name": "Datei hochgeladen",
      "status": null,
      "direction": "",
      "channel": "",
      "details": {}
    }
  ],
  "bank_info": {
    "iban": "DE95500105171694454431",
    "bic_swift": null
  },
  "documents": [
    {
      "url": "/api/v1/cases/100000043818/documents/A1dzGO7xl",
      "type": "Forderungskonto",
      "created_at": "2020-10-15T11:49:18+02:00",
      "description": null,
      "content_type": "application/pdf"
    }
  ],
  "custom_data": []
}

Claims collection

Add a claim to a case file
POST/cases/{case_id}/claims

Allows adding claims to a case files. It is only possible to add new claims to a case file which is not activated yet to the one in dunning phase. JSON Body has the same format as in POST case file endpoint.

Example URI

POST https://app.pairfinance.com/api/v1/cases/100039269541/claims
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a

Request
HideShow

Invalid parameters (passing an invalid value to amount, etc)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "claims": [
        {
            "vat_total": "9.2",
            "debt_total": "99.1",
            "loan_nominal_amount": "99.1",
            "loan_repayment_date": "2016-05-16",
            "invoice_number": "1234",
            "invoice_date": "2016-05-02",
            "due_date": "2016-05-16",
            "contract_number": "1234",
            "tracking_information": "Tracking info",
            "contract_date": "2016-05-02",
            "contract_nature": "loan_agreement",
            "claim_owner": "shen",
            "shop_id": "4442d",
            "items": [
                {
                    "name": "...",
                    "delivery_cost": "2.2",
                    "cost_per_unit": "11.2",
                    "number_of_units": "2"
                }
            ],
            "creditor_fees": [
                {
                    "type": "creditor_reminder_fee",
                    "amount": "5.0",
                    "date_incurred": "2016-05-16"
                }
            ]
        },
        {
            "vat_total": "9.2",
            "amount": nil,
            "loan_nominal_amount": "12.1",
            "loan_repayment_date": "2016-03-11",
            "invoice_number": "1421",
            "invoice_date": "2016-05-02",
            "booking_date": "2016-05-16",
            "contract_number": "1534",
            "tracking_information": "Tracking info 2",
            "contract_date": "2016-05-02",
            "contract_nature": "loan_agreement",
            "claim_owner": "shen",
            "shop_id": "4442d",
            "items": [
                {
                    "name": "...1",
                    "cost": "22.2",
                    "price": "1.2",
                    "qty": "1"
                }
            ],
            "creditor_fees": [
                {
                    "type": "creditor_reminder_fee",
                    "amount": "10.0",
                    "booking_date": "2016-05-16"
                }
            ]
        }
    ]
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "main_claims": [
      {
        "1": {
          "amount": [
            "muss ausgefüllt werden",
            "ist keine Zahl"
          ],
          "case_file": []
        }
      }
    ]
  }
}
Request
HideShow
  1. Invalid request: Posting claim data request for wrong company case file)

  2. Invalid request: Posting claim data request for a case when it is in active state and wrong phase.

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "claims": [
    {
      "vat_total": "9.2",
      "debt_total": "99.1",
      "loan_nominal_amount": "99.1",
      "loan_repayment_date": "2016-05-16",
      "invoice_number": "1234",
      "invoice_date": "2016-05-02",
      "due_date": "2016-05-16",
      "contract_number": "1234",
      "tracking_information": "Tracking info",
      "contract_date": "2016-05-02",
      "contract_nature": "loan_agreement",
      "claim_owner": "shen",
      "shop_id": "4442d",
      "items": [
        {
          "name": "...",
          "delivery_cost": "2.2",
          "cost_per_unit": "11.2",
          "number_of_units": "2"
        }
      ],
      "creditor_fees": [
        {
          "type": "creditor_reminder_fee",
          "amount": "5.0",
          "date_incurred": "2016-05-16"
        }
      ]
    },
    {
      "vat_total": "9.2",
      "amount": "34.3",
      "loan_nominal_amount": "12.1",
      "loan_repayment_date": "2016-03-11",
      "invoice_number": "1421",
      "invoice_date": "2016-05-02",
      "booking_date": "2016-05-16",
      "contract_number": "1534",
      "tracking_information": "Tracking info 2",
      "contract_date": "2016-05-02",
      "contract_nature": "loan_agreement",
      "claim_owner": "shen",
      "shop_id": "4442d",
      "items": [
        {
          "name": "...1",
          "cost": "22.2",
          "price": "1.2",
          "qty": "1"
        }
      ],
      "creditor_fees": [
        {
          "type": "creditor_reminder_fee",
          "amount": "10.0",
          "booking_date": "2016-05-16"
        }
      ]
    }
  ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "403 Unauthorized"
}
Request
HideShow

Valid Request (Claim with items)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "claims": [
    {
      "vat_total": "9.2",
      "debt_total": "99.1",
      "loan_nominal_amount": "99.1",
      "loan_repayment_date": "2016-05-16",
      "invoice_number": "1234",
      "invoice_date": "2016-05-02",
      "due_date": "2016-05-16",
      "contract_number": "1234",
      "tracking_information": "Tracking info",
      "contract_date": "2016-05-02",
      "contract_nature": "loan_agreement",
      "claim_owner": "shen",
      "shop_id": "4442d",
      "items": [
        {
          "name": "...",
          "delivery_cost": "2.2",
          "cost_per_unit": "11.2",
          "number_of_units": "2"
        }
      ],
      "creditor_fees": [
        {
          "type": "creditor_reminder_fee",
          "amount": "5.0",
          "date_incurred": "2016-05-16"
        }
      ]
    },
    {
      "vat_total": "9.2",
      "amount": "34.3",
      "loan_nominal_amount": "12.1",
      "loan_repayment_date": "2016-03-11",
      "invoice_number": "1421",
      "invoice_date": "2016-05-02",
      "booking_date": "2016-05-16",
      "contract_number": "1534",
      "tracking_information": "Tracking info 2",
      "contract_date": "2016-05-02",
      "contract_nature": "loan_agreement",
      "claim_owner": "shen",
      "shop_id": "4442d",
      "items": [
        {
          "name": "...1",
          "cost": "22.2",
          "price": "1.2",
          "qty": "1"
        }
      ],
      "creditor_fees": [
        {
          "type": "creditor_reminder_fee",
          "amount": "10.0",
          "booking_date": "2016-05-16"
        }
      ]
    }
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
[
    {
        "id": 3,
        "debt_total": "99,10",
        "vat_total": "9,20",
        "invoice_number": "1234",
        "invoice_date": "2016-05-02",
        "due_date": "2016-05-16",
        "contract_number": "1234",
        "loan_repayment_date": "2016-05-16",
        "loan_nominal_amount": "99,10",
        "contract_date": "2016-05-02",
        "contract_nature": "loan_agreement",
        "tracking_information": "Tracking info",
        "items": [
            {
                "name": "...",
                "delivery_cost": "2,20",
                "cost_per_unit": "11,20",
                "number_of_units": "2.0"
            }
        ],
        "creditor_fees": [
            {
                "type": "creditor_reminder_fee",
                "amount": "5,00",
                "date_incurred": "2016-05-16"
            }
        ],
        "receipt_number": nil,
        "object_number": nil,
        "claim_owner": "shen",
        "shop_id": "4442d",
        "default_date": nil,
        "original_amount": "0,00"
    },
    {
        "id": 5,
        "debt_total": "34,30",
        "vat_total": "9,20",
        "invoice_number": "1421",
        "invoice_date": "2016-05-02",
        "due_date": "2016-05-16",
        "contract_number": "1534",
        "loan_repayment_date": "2016-03-11",
        "loan_nominal_amount": "12,10",
        "contract_date": "2016-05-02",
        "contract_nature": "loan_agreement",
        "tracking_information": "Tracking info 2",
        "items": [
            {
                "name": "...1",
                "delivery_cost": "22,20",
                "cost_per_unit": "1,20",
                "number_of_units": "1.0"
            }
        ],
        "creditor_fees": [
            {
                "type": "creditor_reminder_fee",
                "amount": "10,00",
                "date_incurred": "2016-05-16"
            }
        ],
        "receipt_number": nil,
        "object_number": nil,
        "claim_owner": "shen",
        "shop_id": "4442d",
        "default_date": nil,
        "original_amount": "0,00"
    }
]
Request
HideShow

Valid Request (Claim without item)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "claims": [
    {
      "vat_total": "9.2",
      "debt_total": "99.1",
      "loan_nominal_amount": "99.1",
      "loan_repayment_date": "2016-05-16",
      "invoice_number": "1234",
      "invoice_date": "2016-05-02",
      "due_date": "2016-05-16",
      "contract_number": "1234",
      "tracking_information": "Tracking info",
      "contract_date": "2016-05-02",
      "contract_nature": "loan_agreement"
    }
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
[
    {
        "id": 9,
        "debt_total": "99,10",
        "vat_total": "9,20",
        "invoice_number": "1234",
        "invoice_date": "2016-05-02",
        "due_date": "2016-05-16",
        "contract_number": "1234",
        "loan_repayment_date": "2016-05-16",
        "loan_nominal_amount": "99,10",
        "contract_date": "2016-05-02",
        "contract_nature": "loan_agreement",
        "tracking_information": "Tracking info",
        "items": [
            {
                "name": "Ihre Bestellung bei Company 1 vom 02.05.2016",
                "delivery_cost": "0,00",
                "cost_per_unit": "99,10",
                "number_of_units": "1.0"
            }
        ],
        "creditor_fees": [],
        "receipt_number": nil,
        "object_number": nil,
        "claim_owner": nil,
        "shop_id": nil,
        "default_date": nil,
        "original_amount": "0,00"
    }
]
Request
HideShow

Valid Request (Adding Claim(s) when case file under consideration is active and in “dunning”)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "claims": [
    {
      "vat_total": "9.2",
      "debt_total": "99.1",
      "loan_nominal_amount": "99.1",
      "loan_repayment_date": "2016-05-16",
      "invoice_number": "1234",
      "invoice_date": "2016-05-02",
      "due_date": "2016-05-16",
      "contract_number": "1234",
      "tracking_information": "Tracking info",
      "contract_date": "2016-05-02",
      "contract_nature": "loan_agreement",
      "claim_owner": "shen",
      "shop_id": "4442d",
      "items": [
        {
          "name": "...",
          "delivery_cost": "2.2",
          "cost_per_unit": "11.2",
          "number_of_units": "2"
        }
      ],
      "creditor_fees": [
        {
          "type": "creditor_reminder_fee",
          "amount": "5.0",
          "date_incurred": "2016-05-16"
        }
      ]
    },
    {
      "vat_total": "9.2",
      "amount": "34.3",
      "loan_nominal_amount": "12.1",
      "loan_repayment_date": "2016-03-11",
      "invoice_number": "1421",
      "invoice_date": "2016-05-02",
      "booking_date": "2016-05-16",
      "contract_number": "1534",
      "tracking_information": "Tracking info 2",
      "contract_date": "2016-05-02",
      "contract_nature": "loan_agreement",
      "claim_owner": "shen",
      "shop_id": "4442d",
      "items": [
        {
          "name": "...1",
          "cost": "22.2",
          "price": "1.2",
          "qty": "1"
        }
      ],
      "creditor_fees": [
        {
          "type": "creditor_reminder_fee",
          "amount": "10.0",
          "booking_date": "2016-05-16"
        }
      ]
    }
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
[
    {
        "id": 12,
        "debt_total": "99,10",
        "vat_total": "9,20",
        "invoice_number": "1234",
        "invoice_date": "2016-05-02",
        "due_date": "2016-05-16",
        "contract_number": "1234",
        "loan_repayment_date": "2016-05-16",
        "loan_nominal_amount": "99,10",
        "contract_date": "2016-05-02",
        "contract_nature": "loan_agreement",
        "tracking_information": "Tracking info",
        "items": [
            {
                "name": "...",
                "delivery_cost": "2,20",
                "cost_per_unit": "11,20",
                "number_of_units": "2.0"
            }
        ],
        "creditor_fees": [
            {
                "type": "creditor_reminder_fee",
                "amount": "5,00",
                "date_incurred": "2016-05-16"
            }
        ],
        "receipt_number": nil,
        "object_number": nil,
        "claim_owner": "shen",
        "shop_id": "4442d",
        "default_date": nil,
        "original_amount": "0,00"
    },
    {
        "id": 14,
        "debt_total": "34,30",
        "vat_total": "9,20",
        "invoice_number": "1421",
        "invoice_date": "2016-05-02",
        "due_date": "2016-05-16",
        "contract_number": "1534",
        "loan_repayment_date": "2016-03-11",
        "loan_nominal_amount": "12,10",
        "contract_date": "2016-05-02",
        "contract_nature": "loan_agreement",
        "tracking_information": "Tracking info 2",
        "items": [
            {
                "name": "...1",
                "delivery_cost": "22,20",
                "cost_per_unit": "1,20",
                "number_of_units": "1.0"
            }
        ],
        "creditor_fees": [
            {
                "type": "creditor_reminder_fee",
                "amount": "10,00",
                "date_incurred": "2016-05-16"
            }
        ],
        "receipt_number": nil,
        "object_number": nil,
        "claim_owner": "shen",
        "shop_id": "4442d",
        "default_date": nil,
        "original_amount": "0,00"
    }
]

Return Or Discount to a claim of a case file
POST/cases/{case_id}/claims/{claim_id}/return_or_discount

Allows a return or discount to a claim of a specific case file.

Example URI

POST https://app.pairfinance.com/api/v1/cases/100039269541/claims/1234/return_or_discount
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

claim_id
string (required) Example: 1234

claim ID of the Case file in the form of a string

Request
HideShow

Invalid request (Amount is blank)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "description" : "Quis error pariatur quia ut laborum delectus amet.",
    "effective_date" : "2020-10-15",
    "amount" : nil
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "amount": [
      "muss ausgefüllt werden"
    ]
  }
}
Request
HideShow

Invalid request (effective_date/booking_date is blank)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "description" : "Quis error pariatur quia ut laborum delectus amet.",
    "effective_date" : nil,
    "amount" : 5.0
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "booking_date": [
      "muss ausgefüllt werden",
      "ist nicht gültig"
    ]
  }
}
Request
HideShow

invalid case_file slug or slug belongs to another company

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "description" : "Quis error pariatur quia ut laborum delectus amet.",
    "effective_date" : nil,
    "amount" : 5.0
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "403 Unauthorized"
}
Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "description": "Quis error pariatur quia ut laborum delectus amet.",
  "effective_date": "2020-10-15",
  "amount": 5
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "lxLmbQgve",
  "case_file_id": "100000145050",
  "created_at": "2020-10-15T14:11:39.467+02:00",
  "state": "active",
  "data": {
    "amount": 5,
    "effective_date": "2020-10-15",
    "description": "Quis error pariatur quia ut laborum delectus amet."
  },
  "total_amount": "0,00",
  "total_open_amount": "0,00",
  "total_main_claim_amount": "0,00",
  "total_main_claim_open_amount": "0,00",
  "total_side_claim_amount": "0,00",
  "total_side_claim_open_amount": "0,00",
  "total_dca_fees_costs_amount": "0,00",
  "total_dca_fees_costs_open_amount": "0,00",
  "total_interest": "0,00",
  "total_open_interest": "0,00"
}
Request
HideShow

Valid Request (Requesting with the merchant token)

Headers
Content-Type: application/json
Authorization: Basic <token of the merchant>
Body
{
  "description": "Quis error pariatur quia ut laborum delectus amet.",
  "effective_date": "2020-10-15",
  "amount": 5
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "lxLmbQgve",
  "case_file_id": "100000145050",
  "created_at": "2020-10-15T14:11:39.467+02:00",
  "state": "active",
  "data": {
    "amount": 5,
    "effective_date": "2020-10-15",
    "description": "Quis error pariatur quia ut laborum delectus amet."
  },
  "total_amount": "0,00",
  "total_open_amount": "0,00",
  "total_main_claim_amount": "0,00",
  "total_main_claim_open_amount": "0,00",
  "total_side_claim_amount": "0,00",
  "total_side_claim_open_amount": "0,00",
  "total_dca_fees_costs_amount": "0,00",
  "total_dca_fees_costs_open_amount": "0,00",
  "total_interest": "0,00",
  "total_open_interest": "0,00"
}

Payments collection

Report a Payment
POST/cases/{case_id}/payments

Allows reporting payments received for case files. A full payment will automatically stop the process; a partial payment means the remaning amount will be pursued.

Example URI

POST https://app.pairfinance.com/api/v1/cases/100039269541/payments
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

Request
HideShow

Inalid Request (Amount is blank in request data)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "amount": nil,
    "description": "Excepturi cupiditate recusandae molestias quo animi.",
    "effective_date": "2020-10-16"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "amount": [
      "muss ausgefüllt werden"
    ]
  }
}
Request
HideShow

Inalid Request (effective/booking_date is blank in request data)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "amount": 10.0,
    "description": "Excepturi cupiditate recusandae molestias quo animi.",
    "effective_date": nil
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "booking_date": [
      "muss ausgefüllt werden",
      "ist nicht gültig"
    ]
  }
}
Request
HideShow

Inalid Request (case file slug belongs to another company)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "amount": 10,
  "description": "Excepturi cupiditate recusandae molestias quo animi.",
  "effective_date": "2020-10-16"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "403 Unauthorized"
}
Request
HideShow

Inalid Request (wrong case file slug)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "amount": 10,
  "description": "Excepturi cupiditate recusandae molestias quo animi.",
  "effective_date": "2020-10-16"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "ID of the Case file not found"
}
Request
HideShow

Valid request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "amount": "10.0",
  "description": "you can optionally add a reference here",
  "effective_date": "2017-07-20"
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /cases/100039269541/payments
Body
{
  "id": "m67GrydeB",
  "case_file_id": "100002333365",
  "created_at": "2020-10-16T17:22:02.949+02:00",
  "state": "active",
  "data": {
    "amount": 100,
    "effective_date": "2020-10-16",
    "description": "Quia maiores aut officia laboriosam sapiente laborum aut vitae."
  },
  "total_amount": "0,00",
  "total_open_amount": "0,00",
  "total_main_claim_amount": "0,00",
  "total_main_claim_open_amount": "0,00",
  "total_side_claim_amount": "0,00",
  "total_side_claim_open_amount": "0,00",
  "total_dca_fees_costs_amount": "0,00",
  "total_dca_fees_costs_open_amount": "0,00",
  "total_interest": "0,00",
  "total_open_interest": "0,00"
}

Returns collection

Report a Return
POST/cases/{case_id}/claims/{claim_id}/return

Allows reporting returns of a particular claims of the case files. If there is only one claim in the case file, reporting a return will automatically stop the debt collection process; if a case file contains other claims the remaning amount will be pursued.

Example URI

POST https://app.pairfinance.com/api/v1/cases/100039269541/claims/1234/return
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

claim_id
string (required) Example: 1234

ID of the Claim in the form of a string whicn is returned

Request
HideShow

Invalid Request (effective_date blank)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "id" : 10,
    "description" : "Tempora dolorem provident omnis et voluptatem ut.",
    "effective_date" : nil
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "booking_date": [
      "muss ausgefüllt werden",
      "ist nicht gültig"
    ]
  }
}
Request
HideShow

Invalid Request (case file belongs to another company)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "id" : 10,
    "description" : "Tempora dolorem provident omnis et voluptatem ut.",
    "effective_date" : nil
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "403 Unauthorized"
}
Request
HideShow

Valid request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "id" : 10,
    "description" : "Tempora dolorem provident omnis et voluptatem ut.",
    "effective_date" : nil
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /cases/100039269541/payments
Body
{
  "id": "O7poJ4Wdj",
  "case_file_id": "101268959604",
  "created_at": "2018-06-08T12:10:05.030+02:00",
  "state": "active",
  "data": {
    "amount": 867,
    "effective_date": "2018-06-08",
    "description": "Device returned to the store in Berlin"
  },
  "total_amount": "0,00",
  "total_open_amount": "0,00",
  "total_main_claim_amount": "0,00",
  "total_main_claim_open_amount": "0,00",
  "total_side_claim_amount": "0,00",
  "total_side_claim_open_amount": "0,00",
  "total_dca_fees_costs_amount": "0,00",
  "total_dca_fees_costs_open_amount": "0,00",
  "total_interest": "0,00",
  "total_open_interest": "0,00"
}

Merchants

This API allows Partners of Pair Finance GmbH to list all merchants, create a new merchant (creditor) or to get detailed information about given merchant in our system.

Merchants Collection

List All Merchants
GET/merchants?from={from}&amount={amount}

For Partner companies only. Fetches a list of all Merchants available for this partner.

Example URI

GET https://app.pairfinance.com/api/v1/merchants?from=0&amount=10
URI Parameters
HideShow
from
integer (optional) Default: 0 Example: 0

Starting number of the returned cases, defaults to 0.

amount
integer (optional) Default: 10 Example: 10

Amount of cases returned per case, defaults to 10.

Request
HideShow

Invalid request (wrong Authorization token)

Headers
Content-Type: application/json
Authorization: Basic wrong_authorization_or_token
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "401 Unauthenticated"
}
Request
HideShow

Invalid request (Invalid parameters for from and amount)

Headers
Content-Type: application/json
Authorization: Basic wrong_authorization_or_token
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "from": [
      "is invalid"
    ],
    "amount": [
      "is invalid"
    ]
  }
}
Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "meta": {
        "total_merchants": 2,
        "first_merchant_number": 0,
        "last_merchant_number": 2,
        "merchants_per_page": 10
    },
    "merchants": [
        {
            "id": "company2",
            "name": "Company 2",
            "legal_name": "Company 2",
            "merchant_logo": "testlogo.png",
            "address": {
                "type": "actual",
                "primary": false,
                "street": "Test Street",
                "street_addon": "Test Street Addon",
                "street_number": "4",
                "zip_code": "Test Zip Code",
                "city": "Test City",
                "country": "Test Country"
            },
            "account_details": {
                "iban": nil,
                "bic_swift": nil
            },
            "contact_persons": [
                {
                    "name": "Test User",
                    "email": "test1@mail.com",
                    "phone": "491571112233"
                }
            ],
            "tax_id_number": nil
        },
        {
            "id": "company7",
            "name": "Company 7",
            "legal_name": "Company 7",
            "merchant_logo": "testlogo",
            "address": {
                "type": "actual",
                "primary": false,
                "street": "Test Street",
                "street_addon": "Test Street addon",
                "street_number": "Test Street Number",
                "zip_code": "Test ZipCode",
                "city": "Test City",
                "country": "Test Country"
            },
            "account_details": {
                "iban": nil,
                "bic_swift": nil
            },
            "contact_persons": [
                {
                    "name": "Test User",
                    "email": "test1@mail.com",
                    "phone": "491571112233"
                }
            ],
            "tax_id_number": nil
        }
    ]
}

Create a New Merchant
POST/merchants

For Partner companies only. Creates a new merchant in our system that a Partner company can submit case files on behalf of.

Example URI

POST https://app.pairfinance.com/api/v1/merchants
Request
HideShow

Invalid request (name is nil in Request)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "name" : nil,
    "legal_name": "test merchant 123 GmbH & Co. KG",
    "merchant_logo" : "",
    "tax_status" : "1",
    "tax_id_number" : "12345Abc",
    "address" : {
        "street_name" : "Test Street Name",
        "street_number" : "25",
        "zip_code" : "Test Zip Code",
        "city" : "Test City",
        "phone" : "493000000000000",
        "country" : "Test Country"
    },
    "account_details" : {
        "iban" : "...",
        "bic_swift" : "..."
    },
    "contact_persons" : [
        {
            "name" : "Test User",
            "email" : "test1@mail.com",
            "phone" : "49311111111111"
        }
    ]
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "slug": [
      "muss ausgefüllt werden"
    ],
    "name": [
      "muss ausgefüllt werden"
    ]
  }
}
Request
HideShow

Invalid request (post data is nil in the request)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
nil
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "name": [
      "is missing"
    ],
    "legal_name": [
      "is missing"
    ],
    "merchant_logo": [
      "is missing"
    ],
    "tax_status": [
      "is missing"
    ],
    "address": [
      "is missing"
    ],
    "account_details": [
      "is missing"
    ],
    "contact_persons": [
      "is missing"
    ]
  }
}
Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "name": "test merchant 123",
  "legal_name": "test merchant 123 GmbH & Co. KG",
  "merchant_logo": "data:image/png;base64, ...",
  "tax_status": "1 - if entitled to deduct input tax (Vorsteuerabzugsberechtigt), 0 - if not",
  "tax_id_number": "99999999999 (optiona)",
  "address": {
    "street_name": "Musterstraße",
    "street_number": "25",
    "zip_code": "10178",
    "city": "Berlin",
    "country": "DE",
    "phone": "493000000000000 (optional)"
  },
  "account_details": {
    "iban": "DE123456789012345678",
    "bic_swift": "AAAABBCCDDD"
  },
  "contact_persons": [
    {
      "name": "Max Mustermann",
      "email": "test1@mail.com",
      "phone": "49311111111111"
    }
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /merchants/test_merchant_123
Body
{
  "id": 4,
  "slug": "test_merchant_123",
  "name": "test merchant 123",
  "kind": "merchant",
  "created_at": "2020-10-16T18:25:42.899+02:00",
  "updated_at": "2020-10-16T18:25:42.899+02:00",
  "data": {}
}

Merchant Details

View Merchant Details
GET/merchants/{id}

For Partner companies only. Returns the detailed set of data about a given merchant, including case files list.

Example URI

GET https://app.pairfinance.com/api/v1/merchants/test_merchant_123
URI Parameters
HideShow
id
string (required) Example: test_merchant_123

ID of the Merchant in the form of a string

Request
HideShow

Invalid request (Invalid merchant id)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "Resource not found"
}
Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "test_merchant_123",
  "name": "test merchant 123",
  "legal_name": "test merchant 123 GmbH & Co. KG",
  "total_cases": "3",
  "total_debt": "330.2",
  "total_recoveries": "200.00",
  "state": "active",
  "cases": [
    {
      "id": "100504961846",
      "reference_id": null,
      "created_at": "2018-01-10T13:29:01.876+01:00",
      "updated_at": "2018-01-26T08:22:34.608+01:00",
      "state": "inactive",
      "type": "private_person",
      "debt_total": "40.0",
      "currency": "EUR",
      "first_name": "Kongo",
      "last_name": "Alpha"
    },
    {
      "id": "100495146084",
      "reference_id": null,
      "created_at": "2017-11-27T11:00:49.669+01:00",
      "updated_at": "2018-01-26T08:22:34.493+01:00",
      "state": "active",
      "type": "private_person",
      "debt_total": "290.2",
      "currency": "EUR",
      "first_name": "Stoichkov",
      "last_name": "Borisbob"
    },
    {
      "id": "100417267661",
      "reference_id": null,
      "created_at": "2016-10-17T14:14:00.834+02:00",
      "updated_at": "2017-09-18T19:09:23.454+02:00",
      "state": "paid",
      "type": "company",
      "debt_total": "200.0",
      "currency": "EUR",
      "first_name": "Luigi",
      "last_name": "Pizza"
    }
  ],
  "documents": [
    {
      "id": 959,
      "file_file_name": "Handelsregister-Auszug.pdf",
      "file_content_type": "application/pdf",
      "file_file_size": 5322116,
      "file_updated_at": "2018-01-15T13:04:47.305+02:00",
      "entity_id": 84,
      "entity_type": "Company",
      "created_at": "2018-01-15T13:04:47.343+02:00",
      "updated_at": "2018-01-17T12:24:03.907+01:00",
      "data": {
        "date_received": "2018-01-15",
        "type_of_file": "HR-Auszug / Gewerbeanm.",
        "source": "creditor",
        "description": null,
        "visibility": "pair_creditor",
        "total_pages": null
      },
      "user_id": null,
      "activity_id": null,
      "deleted_at": null
    }
  ]
}

Merchant Documents

Upload Merchant's Documents
POST/merchants/{id}/documents

Аllows uploading documents. Main use case is uploading merchant’s KYC (Know Your Custormer) documents. In accordance to German law, every new customer should provide Pair Finance with proofs that the company is legit before initiating actual debt collection.

It is possible to upload docuements of two types:

  • ‘RegistrationDocumentAttachment’ Should be used for uploading “Handelsregister-Auszug” (commercial register abstract) for merchants that are registered in “commercial register” (German “Handelsregister”) such as GmbH, AG etc.

  • ‘CompanyAttachment’ - default option. Can be used for any other type of documents (eg, scan of ID, letter from the finance authority etc.)

Supported file types: ‘text/csv’, ‘text/plain’, ‘image/jpeg’, ‘image/jpg’, ‘image/png’, ‘image/gif’, ‘application/pdf’, ‘application/x-rar-compressed’, ‘application/octet-stream’, ‘application/zip’.

Request bodies for document uploads via the API may not be larger than 50MB.

Example URI

POST https://app.pairfinance.com/api/v1/merchants/test_merchant_123/documents
URI Parameters
HideShow
id
string (required) Example: test_merchant_123

ID of the Merchant in the form of a string

Request
HideShow

Invalid Request (Unauthorized uploading to a different merchant)

Headers
Content-Type: multipart/form-data
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "attachments": [
        {
            "file": file_object,
            "type": "CompanyAttachment",
            "description": "Document's description"
        }
    ]
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "403 Unauthorized"
}
Request
HideShow

Invalid Request (Invalid Attachment type)

Headers
Content-Type: multipart/form-data
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "attachments": [
    {
      "file": "content_type=text/csv",
      "type": "CaseFileAttachment",
      "description": "Repellendus quis quidem enim nulla assumenda."
    },
    {
      "file": "content_type=image/png",
      "type": "RegistrationDocumentAttachment",
      "description": "Cum in id incidunt quas explicabo ipsam tempora."
    }
  ]
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "attachments[0][type]": [
      "does not have a valid value"
    ]
  }
}
Request
HideShow

Invalid Request (Invalid File type)

Headers
Content-Type: multipart/form-data
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "attachments": [
    {
      "file": "content_type=application/json",
      "type": "CompanyAttachment",
      "description": "Ut excepturi nesciunt dolores est."
    },
    {
      "file": "content_type=image/png",
      "type": "RegistrationDocumentAttachment",
      "description": "Mollitia impedit excepturi vero rem quo."
    }
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "browsers.json": [
      {
        "file": [
          "ist nicht gültig"
        ]
      }
    ]
  }
}
Request
HideShow

Valid Request

Headers
Content-Type: multipart/form-data
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
    "attachments": [
        {
            "file": file_object,
            "type": "CompanyAttachment",
            "description": "Document's description"
        }
    ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
    "merchant_id": "test_merchant_123",
    "name": "test merchant 123",
    "legal_name": "test merchant 123 GmbH & Co. KG",
    "total_cases": "3",
    "total_debt": "330.2",
    "total_recoveries": "200.00",
    "cases": [
        {
            "id": "100504961846",
            "reference_id": null,
            "created_at": "2018-01-10T13:29:01.876+01:00",
            "updated_at": "2018-01-26T08:22:34.608+01:00",
            "state": "inactive",
            "type": "private_person",
            "debt_total": "40.0",
            "currency": "EUR",
            "first_name": "Kongo",
            "last_name": "Alpha"
        },
        {
            "id": "100495146084",
            "reference_id": null,
            "created_at": "2017-11-27T11:00:49.669+01:00",
            "updated_at": "2018-01-26T08:22:34.493+01:00",
            "state": "active",
            "type": "private_person",
            "debt_total": "290.2",
            "currency": "EUR",
            "first_name": "Stoichkov",
            "last_name": "Borisbob"
        },
        {
            "id": "100417267661",
            "reference_id": null,
            "created_at": "2016-10-17T14:14:00.834+02:00",
            "updated_at": "2017-09-18T19:09:23.454+02:00",
            "state": "paid",
            "type": "company",
            "debt_total": "200.0",
            "currency": "EUR",
            "first_name": "Luigi",
            "last_name": "Pizza"
        }
    ],
    "documents": [
        {
            "id": 17,
            "name": "test.csv",
            "content_type": "text/plain",
            "size": 181,
            "file_updated_at": "2020-10-16T19:06:17.365+02:00",
            "data":
                {
                    "date_received": "2020-10-16",
                    "description": "Explicabo magni maiores tempore.",
                    "total_pages": nil
                },
            "created_at": "2020-10-16T19:06:17.401+02:00",
            "updated_at": "2020-10-16T19:06:17.401+02:00"
        },
        {
            "id": 18,
            "name": "logo.png",
            "content_type": "image/png",
            "size": 12585,
            "file_updated_at": "2020-10-16T19:06:17.485+02:00",
            "data":
                {
                    "date_received": "2020-10-16",
                    "description": "Consequatur qui est commodi assumenda saepe est sunt.",
                    "total_pages": nil
                },
            "created_at": "2020-10-16T19:06:17.503+02:00",
            "updated_at": "2020-10-16T19:06:17.503+02:00"
        }
    ],
    "state" : "active"
}

Pause the case file in a dunning state
POST/cases/{case_id}/pause

Allows you to pause the case file in a dunning state.

Example URI

POST https://app.pairfinance.com/api/v1/cases/100039269541/pause
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

Request
HideShow

Invalid request (State is not a dunning)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "comment": "Comment in dunning state"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "base": [
      "Case file should be in dunning state"
    ]
  }
}
Request
HideShow

invalid case_file slug or slug belongs to another company

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "comment": "Comment in dunning state"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "403 Unauthorized"
}
Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "comment": "Comment in dunning state"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "6R76vpe7k",
  "case_file_id": "100000018109",
  "created_at": "2020-11-09T11:23:04.797+01:00",
  "state": "active",
  "data": null,
  "comment": "Comment in dunning state"
}
Request
HideShow

Valid Request (Requesting with the merchant token)

Headers
Content-Type: application/json
Authorization: Basic <token of the merchant>
Body
{
  "comment": "Comment in dunning state"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "6R76vpe7k",
  "case_file_id": "100000018109",
  "created_at": "2020-11-09T11:23:04.797+01:00",
  "state": "active",
  "data": null,
  "comment": "Comment in dunning state"
}

Resume the case file in a pause_dunning state
POST/cases/{case_id}/resume

Allows you to resume the case file in a pause_dunning state.

Example URI

POST https://app.pairfinance.com/api/v1/cases/100039269541/resume
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

Request
HideShow

Invalid request (State is not a pause_dunning)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "base": [
      "Case file should be in pause_dunning state"
    ]
  }
}
Request
HideShow

invalid case_file slug or slug belongs to another company

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "403 Unauthorized"
}
Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "xYL1epDLK",
  "case_file_id": "100000018109",
  "created_at": "2020-11-09T11:27:36.767+01:00",
  "state": "active",
  "data": null
}
Request
HideShow

Valid Request (Requesting with the merchant token)

Headers
Content-Type: application/json
Authorization: Basic <token of the merchant>
Body
{}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "xYL1epDLK",
  "case_file_id": "100000018109",
  "created_at": "2020-11-09T11:27:36.767+01:00",
  "state": "active",
  "data": null
}

Stop the case file in a dunning state
POST/cases/{case_id}/stop

Allows you to stop the case file in a dunning or a pause_dunning state.

Example URI

POST https://app.pairfinance.com/api/v1/cases/100039269541/stop
URI Parameters
HideShow
case_id
string (required) Example: 100039269541

ID of the Case file in the form of a string

Request
HideShow

Invalid request (State is not a dunning or a pause_dunning)

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "comment": "Stop dunning comment"
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "errors": {
    "base": [
      "Case file should be in dunning or pause_dunning state"
    ]
  }
}
Request
HideShow

invalid case_file slug or slug belongs to another company

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "comment": "Stop dunning comment"
}
Response  403
HideShow
Headers
Content-Type: application/json
Body
{
  "error": "403 Unauthorized"
}
Request
HideShow

Valid Request

Headers
Content-Type: application/json
Authorization: Basic acbd18db4cc2f85cedef654fccc4a4d8
Body
{
  "comment": "Stop dunning comment"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "xYL1epDLK",
  "case_file_id": "100000018109",
  "created_at": "2020-11-09T11:27:36.767+01:00",
  "state": "active",
  "data": null
  "comment": "Stop dunning comment"
}
Request
HideShow

Valid Request (Requesting with the merchant token)

Headers
Content-Type: application/json
Authorization: Basic <token of the merchant>
Body
{
  "comment": "Stop dunning comment"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "xYL1epDLK",
  "case_file_id": "100000018109",
  "created_at": "2020-11-09T11:27:36.767+01:00",
  "state": "active",
  "data": null
  "comment": "Stop dunning comment"
}

Generated by aglio on 25 May 2021