Application JSON
It is possible to supply a json file with full application data to ch:applications. This is the simplest approach if looking to automate application creation when in possession of all or most application data.
File data is not supported, so it needs to be added independently (see File handling for more about handling files).
See bellow for a full example and accompanying JSON Schema.
Application JSON example
{
"application": {
"signer": {
"name": "Mia M. Lassen",
"email": "MiaMLassen@example.com"
},
"business_model": {
"trading_name": "Acme Co.",
"description": "Prime non-generic products",
"recurring": true,
"physical_delivery": true,
"delivery_delay": "5to10days",
"drop_shipping": true,
"estimate_currency": "DKK",
"estimated_monthly_turnover": 300000,
"estimated_average_transaction_amount": 1000
},
"additional_information": "Hello"
},
"contact": {
"name": "Caroline S. Bech",
"email": "CarolineSBech@example.com",
"phone": "+45 41168678",
"skype": "caroline.bech"
},
"company": {
"registration_number": "33749996",
"name": "Acme Corporation",
"address_line_1": "Nørrebrovænget 64",
"zipcode": "1106",
"city": "København K",
"country": "DK",
"phone": "+45 23850071",
"email": "info@example.com",
"ownership_structure": "sole_director",
"ownership_structure_comment": "Structure comment."
},
"people": [
{
"name": "Emile T. Madsen",
"social_security_number": "191181-0820",
"date_of_birth": "1981-11-19",
"address_line_1": "Tårup Byvej 24",
"zipcode": "1265",
"city": "København K",
"country": "DK",
"role_director": true,
"role_owner": true
}
],
"websites": [
{ "url": "https://example.com", "comment": "Main website" },
{ "url": "https://example.org" }
],
"bank_account": {
"currency": "DKK",
"bank": "Acme Bank",
"swift_code": "DABADKKK",
"iban": "DK9230055205310542"
}
}
JSON Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"definitions": {
"person": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"social_security_number": {
"type": "string",
"pattern": "^[a-z0-9\\- ]+$"
},
"date_of_birth": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"zipcode": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
}
},
"additionalProperties": false
}
},
"properties": {
"application": {
"type": "object",
"properties": {
"signer": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
}
},
"additionalProperties": false
},
"business_model": {
"type": "object",
"oneOf": [
{
"properties": {
"physical_delivery": {
"enum": [
true
]
}
},
"required": [
"delivery_delay"
]
},
{
"properties": {
"physical_delivery": {
"enum": [
false
]
}
},
"not": {
"required": [
"delivery_delay"
]
}
}
],
"properties": {
"trading_name": {
"type": "string"
},
"description": {
"type": "string"
},
"recurring": {
"type": "boolean"
},
"physical_delivery": {
"type": "boolean"
},
"delivery_delay": {
"type": "string",
"enum": [
"less5days",
"5to10days",
"10to20days",
"more20days"
]
},
"drop_shipping": {
"type": "boolean"
},
"estimate_currency": {
"type": "string",
"enum": [
"DKK",
"EUR",
"GBP",
"NOK",
"SEK",
"USD"
]
},
"estimated_monthly_turnover": {
"type": "number"
},
"estimated_average_transaction_amount": {
"type": "number"
}
},
"additionalProperties": false
},
"additional_information": {
"type": "string"
}
},
"additionalProperties": false
},
"contact": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"phone": {
"type": "string"
},
"skype": {
"type": "string"
}
},
"additionalProperties": false
},
"company": {
"type": "object",
"properties": {
"registration_number": {
"type": "string"
},
"name": {
"type": "string"
},
"address_line_1": {
"type": "string"
},
"address_line_2": {
"type": "string"
},
"zipcode": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string",
"maxLength": 2,
"minLength": 2
},
"form": {
"type": "string"
},
"phone": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"ownership_structure": {
"type": "string"
},
"ownership_structure_comment": {
"type": "string"
}
},
"additionalProperties": false
},
"people": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/person"
}
},
"websites": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"comment": {
"type": "string"
}
}
},
"additionalProperties": false
},
"bank_account": {
"type": "object",
"properties": {
"currency": {
"type": "string",
"enum": [
"DKK",
"EUR",
"GBP",
"NOK",
"SEK",
"USD"
]
},
"bank": {
"type": "string"
},
"swift_code": {
"type": "string",
"pattern": "^([A-Z]{4})([A-Z]{2})([2-9A-Z][0-9A-NP-Z])(X{3}|[0-9A-WY-Z][0-9A-Z][0-9A-Z])?$"
},
"iban": {
"type": "string",
"pattern": "^[A-Z0-9]+$"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}