Decision Maker Module

The API provides the ability to communicate with the decision maker module in our DirectDevice application.

An order has a status field to indicate whether the order is approved or not. See the table below for the available status values.

pending

order is not ready yet

canceled

order is canceled

review

order needs a review in DirectDevice application

rejected

order is rejected

approved

order is approved

Create an order

To create an order, make a POST request to the https://inquiry.creditandcollection.nl/api/dmm/orders endpoint.

HTTP Request

POST https://inquiry.creditandcollection.nl/api/dmm/orders

Request Body

A description of the available attributes.

reference

type:

string

required:

no

reg_number

type:

string

required:

yes

Must be a valid kvk-number (8 or 12 digits).

amount

type:

integer

required:

depends

min:

0

max:

100000000

Usually this field is required, but some environments with custom configurations do not use it. We will communicate this with you if this is the case.

language

type:

enum

required:

no

options:

NL, EN, DE

default:

NL

ruleset_id

type:

integer

required:

yes

Note

Some environments with custom configurations require additional fields. We will communicate this with you if this is the case.

Example

curl \
--user username:password \
--request POST \
--header 'Content-Type: application/json' \
--data '{"reg_number":"28092355","amount":10000,"language":"NL","ruleset_id":1}' \
'https://inquiry.creditandcollection.nl/api/dmm/orders'

Response

See OrderItemResponse schema for more information about the response format.

{
  "item": {
    "id": 1,
    "name": "CreditDevice B.V.",
    "reference": "test",
    "reg_number": "28092355",
    "address": "Rudolf Tappenbeckweg 4",
    "zipcode": "2202CD",
    "city": "Noordwijk",
    "country": "NL",
    "amount": 10000,
    "status": "approved",
    "created_at": "2020-03-01T12:00:00Z",
    "refs": {
      "self": "\/api\/dmm\/orders\/1",
      "report": "\/api\/dmm\/orders\/1\/report"
    }
  }
}

Fetch an order

To fetch an order, make a GET request to the https://inquiry.creditandcollection.nl/api/dmm/orders/:order_id endpoint.

HTTP Request

GET https://inquiry.creditandcollection.nl/api/dmm/orders/:order_id

Example

curl \
--user username:password \
'https://inquiry.creditandcollection.nl/api/dmm/orders/1'

Response

See OrderItemResponse schema for more information about the response format.

{
  "item": {
    "id": 1,
    "name": "CreditDevice B.V.",
    "reference": "test",
    "reg_number": "28092355",
    "address": "Rudolf Tappenbeckweg 4",
    "zipcode": "2202CD",
    "city": "Noordwijk",
    "country": "NL",
    "amount": 10000,
    "status": "approved",
    "created_at": "2020-03-01T12:00:00Z",
    "refs": {
      "self": "\/api\/dmm\/orders\/1",
      "report": "\/api\/dmm\/orders\/1\/report"
    }
  }
}

Fetch a report

To fetch a report, make a GET request to the https://inquiry.creditandcollection.nl/api/dmm/orders/:order_id/report endpoint.

Note

Not available if order status is pending or canceled.

HTTP Request

GET https://inquiry.creditandcollection.nl/api/dmm/orders/:order_id/report

Example

curl \
--user username:password \
'https://inquiry.creditandcollection.nl/api/dmm/orders/1/report'

Response

Contains a json report. See Content for more information about the contents of this report type.

Browse orders

To browse orders, make a GET request to the https://inquiry.creditandcollection.nl/api/dmm/orders endpoint.

HTTP Request

GET https://inquiry.creditandcollection.nl/api/dmm/orders

Query Parameters

Parameter

Default

page

1

The items are sorted by created_at in descending order.

Example

curl \
--user username:password \
'https://inquiry.creditandcollection.nl/api/dmm/orders'

Response

See OrderListResponse schema for more information about the response format.

{
  "list": [
    {
      "id": 1,
      "name": "CreditDevice B.V.",
      "reference": "test",
      "reg_number": "28092355",
      "address": "Rudolf Tappenbeckweg 4",
      "zipcode": "2202CD",
      "city": "Noordwijk",
      "country": "NL",
      "amount": 10000,
      "status": "approved",
      "created_at": "2020-03-01T12:00:00Z",
      "refs": {
        "self": "\/api\/dmm\/orders\/1",
        "report": "\/api\/dmm\/orders\/1\/report"
      }
    }
  ],
  "meta": {
    "items": 1,
    "current_page": 1,
    "more_items": false
  }
}

Fetch rulesets

To fetch all rulesets, make a GET request to the https://inquiry.creditandcollection.nl/api/dmm/rulesets endpoint.

HTTP Request

GET https://inquiry.creditandcollection.nl/api/dmm/rulesets

Example

curl \
--user username:password \
'https://inquiry.creditandcollection.nl/api/dmm/rulesets'

Response

See RulesetListResponse schema for more information about the response format.

{
  "list": [
    {
      "id": 1,
      "name": "Ruleset nr. 1"
    }
  ]
}

Content

Beneath a list of the available attributes. See ReportResponse for more information.

▸ review
▸ limit_advice
▸ risk
▸ specifiction
▸ contact_info
▸ name
▸ address_office
▸ address_postal
▸ tel_number
▸ fax_number
▸ mob_number
▸ mail
▸ website
▸ registration
▸ reg_type
▸ reg_number
▸ branch_number
▸ legal_current
▸ active
▸ creditdevice_id
▸ activities
▸ sbi

Note

All attributes are optional.

Schemas

The following schemas represent the formats of the HTTP responses, returned by the API, which are described on this page.

Order

▸ id (integer)
order ID
▸ name (string)
Company name
▸ reference (string)
Custom reference for order
▸ reg_number (string)
Registration number
▸ address (string)
Address
▸ zipcode (string)
Zipcode
▸ city (string)
City
▸ country (enum)
Country code
See ISO 3166-1 alpha-2
▸ amount (integer)
Amount
▸ status (enum)
Status code
Options:
- pending
- canceled
- review
- rejected
- approved
▸ created_at (string)
Entity created at
▸ refs (object)
▸ self (string)
URI to itself

OrderItemResponse

▸ item (Order)

OrderListResponse

▸ list (Order[])
▸ meta (object)
▸ items (integer)
Number of items in list
▸ current_page (integer)
Current page
▸ more_items (boolean)
More items available

Ruleset

▸ id (integer)
ruleset ID
▸ name (string)
Name of the ruleset

RulesetListResponse

▸ list (Ruleset[])