# Callback (dbd_debt_check)

Load data by their ID from DBD

# Description

Fetches DBD result from remote API for given subject and saves it to result json variable.

Input subject variable may be of scalar or json type. If it is scalar, it should contain companyID or personalID. Callback determines itself if it is company or personal ID. If the subject variable is of type json it should contain id key for companyID or pin key for personalID. Or it can contain firstName, lastName and birthDate keys to identify person by these fields.

If neither company not person are identified in subject variable callback will not be called.

The result stored in result variable has following keys:

  • subject_type (person or company)
  • subject (subject data)
  • xml (raw api response)
  • date_performed (when the check was performed)

Variable content can be displayed e.g. using dbd_debt_result panel.

Client is charged for every request to the registries.

# Config

dbd_debt_check:

	config:

		# Required | Type: string | Default: null
		# DSN string with API URL and credentials
		#
		### Examples
		### - https://user:pass@nms.ispalliance.cz/api/
		connection: "https://username:password@host"

		# Company
		#
		### Note
		### Input company data (required if person is empty)
		company:

			# Required | Type: string | Default: null
			# ID
			id: 123456789

			# Optional | Type: string | Default: null
			# Name
			firmName: "Floweye"

		# Person
		#
		### Note
		### Input person data (required if company is empty)
		person:

			# Optional | Type: string | Default: null
			# Pin
			pin: 123456789

			# Optional | Type: string | Default: 
			# First name
			firstName: "Martin"

			# Optional | Type: string | Default: 
			# Last name
			lastName: "Šárfy"

			# Optional | Type: string | Default: null
			# Birthday
			birthDate: "1981-04-14"

		# Optional | Type: string | Default: null
		# Name of variable in which result from registries should be stored
		output: "myvar"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50