# ruian_fetch_address

Name ruian_fetch_address
Type callback
Version 1.0
Since 2020-01-01

# Prologue

Tries to fetch address details by RUIAN code from API and adds those address fields to defined variable.

  • If config.code variable is of type JSON AND config.output is not specified, address field will be written to this config.code variable.
  • If config.output is specified, address field will be written to this variable.
  • If config.code variable is scalar, config.output must be set.

When RUIAN code is not found neither in scalar or json variable callback will not be executed.

# Configuration

events:

	# Event's name
	on_step_start:

		# Callback's name
		ruian_fetch_address:
			config:

				# Required
				# LPL support
				# Variable containing API connection with user credentials as DSN string
				# For example: https://user:pass@ruian.ispalliance.cz/api/
				connection: "'https://username:password@host'"

				# Required
				# may be scalar or JSON variable, but must be JSON if config.variable is not set
				# if scalar variable, it should contain directly the RUIAN code
				# if JSON variable, it should contain the RUIAN code in "code" field (as used in Address panel)
				code: ruian

				# Optional
				# Must be JSON variable
				# If specified, address fields including the RUIAN code will be written to this variable
				output: address

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