{"$id":"https://app.stadtkatalog.org/opendata/v1.1/meta/schema","$schema":"http://json-schema.org/draft-07/schema#","description":"A schema to store local businesses and other yellow-pages like entries.","definitions":{"timeFrames":{"type":"array","items":{"type":"string","pattern":"^([0123][0-9]|4[0-7]):[0-5][0-9]$"},"minItems":0,"maxItems":48,"uniqueItems":true}},"dependencies":{"latitude":["longitude"],"longitude":["latitude"],"address":["city"],"city":["postalCode","countryCode"]},"type":"object","required":["name","description","keywords","label","insideOf","address","postalCode","city","countryCode","website","email","emailHidden","phone","twitter","facebook","instagram","foursquare","linkedin","youtube","uid","zvr","tags","hours","hoursRemark","promotions","latitude","longitude","adjustedCoordinates","validUntil"],"additionalProperties":false,"properties":{"name":{"type":"string","maxLength":255,"description":"The name of the entry."},"description":{"type":"string","maxLength":600,"description":"A description of the entry."},"keywords":{"type":"array","items":{"type":"string","maxLength":255},"maxItems":100,"description":"An array of keywords, synonym names and alternative spellings."},"label":{"type":"string","maxLength":20,"description":"A short label of the entry to be used as button text or other UI-like elements."},"insideOf":{"type":["string","null"],"maxLength":36,"description":"The unique ID of an existing entry where this one is contained in."},"address":{"type":"string","maxLength":1000,"description":"The address line typically including a street name and a house number or similar."},"postalCode":{"type":"string","maxLength":50,"description":"The postal code of the address."},"city":{"type":"string","maxLength":100,"description":"The city name part of the address."},"countryCode":{"type":"string","pattern":"^(AD|AE|AF|AG|AI|AL|AM|AO|AQ|AR|AS|AT|AU|AW|AX|AZ|BA|BB|BD|BE|BF|BG|BH|BI|BJ|BL|BM|BN|BO|BQ|BR|BS|BT|BV|BW|BY|BZ|CA|CC|CD|CF|CG|CH|CI|CK|CL|CM|CN|CO|CR|CU|CV|CW|CX|CY|CZ|DE|DJ|DK|DM|DO|DZ|EC|EE|EG|EH|ER|ES|ET|FI|FJ|FK|FM|FO|FR|GA|GB|GD|GE|GF|GG|GH|GI|GL|GM|GN|GP|GQ|GR|GS|GT|GU|GW|GY|HK|HM|HN|HR|HT|HU|ID|IE|IL|IM|IN|IO|IQ|IR|IS|IT|JE|JM|JO|JP|KE|KG|KH|KI|KM|KN|KP|KR|KW|KY|KZ|LA|LB|LC|LI|LK|LR|LS|LT|LU|LV|LY|MA|MC|MD|ME|MF|MG|MH|MK|ML|MM|MN|MO|MP|MQ|MR|MS|MT|MU|MV|MW|MX|MY|MZ|NA|NC|NE|NF|NG|NI|NL|NO|NP|NR|NU|NZ|OM|PA|PE|PF|PG|PH|PK|PL|PM|PN|PR|PS|PT|PW|PY|QA|RE|RO|RS|RU|RW|SA|SB|SC|SD|SE|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SR|SS|ST|SV|SX|SY|SZ|TC|TD|TF|TG|TH|TJ|TK|TL|TM|TN|TO|TR|TT|TV|TW|TZ|UA|UG|UM|US|UY|UZ|VA|VC|VE|VG|VI|VN|VU|WF|WS|YE|YT|ZA|ZM|ZW)?$","description":"The ISO 3166-1 alpha-2 code of the entry."},"website":{"description":"The full URL to the website.","anyOf":[{"type":"string","pattern":"^(https?)://[^\\s/$.?#].[^\\s]*$","maxLength":1000},{"type":"string","maxLength":0}]},"email":{"description":"A general e-mail contact.","anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$","maxLength":500},{"type":"string","maxLength":0}]},"emailHidden":{"type":"boolean","description":"If true, the provided e-mail should not be visible in exports."},"phone":{"description":"Phone number of the entry.","anyOf":[{"type":"string","pattern":"^(\\+\\d\\d|\\d)[\\d\\ ]+\\d$","maxLength":500},{"type":"string","maxLength":0}]},"twitter":{"description":"Twitter handle without the leading @.","anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9_]{1,15}$"},{"type":"string","maxLength":0}]},"facebook":{"description":"Facebook Page ID or name.","anyOf":[{"type":"string","pattern":"^[^\\?,;\\/\\ ]+$","maxLength":500},{"type":"string","maxLength":0}]},"instagram":{"description":"Instagram account name.","anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9._]+$","maxLength":500},{"type":"string","maxLength":0}]},"foursquare":{"description":"The venue id of the location on Foursquare / Swarm.","anyOf":[{"type":"string","pattern":"^[a-zA-Z0-9]+$","maxLength":500},{"type":"string","maxLength":0}]},"linkedin":{"description":"The full URL to a LinkedIn profile or page.","anyOf":[{"type":"string","pattern":"^https://www.linkedin.com/[^\\s]+$","maxLength":500},{"type":"string","maxLength":0}]},"youtube":{"description":"The full URL to the YouTube channel or profile.","anyOf":[{"type":"string","pattern":"^https://www.youtube.com/[^\\s]+$","maxLength":500},{"type":"string","maxLength":0}]},"uid":{"anyOf":[{"type":"string","pattern":"^((AT)?U[0-9]{8}|(BE)?0?[0-9]{9}|(BG)?[0-9]{9,10}|(CY)[0-9]{8}[A-Z]|(CZ)?[0-9]{8,10}|(DE)?[0-9]{9}|(DK)?[0-9]{8}|(EE)?[0-9]{9}|(EL|GR)?[0-9]{9}|(ES)?[0-9A-Z][0-9]{7}[0-9A-Z]|(FI)?[0-9]{8}|(FR)?[0-9A-Z]{2}[0-9]{9}|(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})|(HU)?[0-9]{8}|(IE)?[0-9][0-9A-Z][0-9]{5}[A-Z]|(IT)?[0-9]{11}|(LT)?([0-9]{9}|[0-9]{12})|(LU)?[0-9]{8}|(LV)?[0-9]{11}|(MT)?[0-9]{8}|(NL)?[0-9]{9}B[0-9]{2}|(PL)?[0-9]{10}|(PT)?[0-9]{9}|(RO)?[0-9]{2,10}|(SE)?[0-9]{12}|(SI)?[0-9]{8}|(SK)?[0-9]{10})$"},{"type":"string","maxLength":0}]},"zvr":{"anyOf":[{"type":"string","pattern":"^[0-9]{9,20}$"},{"type":"string","maxLength":0}]},"licensingInformation":{"anyOf":[{"type":"string","maxLength":500,"description":"Additional licensing information."},{"type":"string","maxLength":0}]},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100,"uniqueItems":true},"hours":{"type":"object","patternProperties":{"^(mon|tue|wed|thu|fri|sat|sun|hol|(2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1|2][0-9]|3[0|1])))$":{"$ref":"#/definitions/timeFrames"}},"maxProperties":108,"additionalProperties":false},"hoursRemark":{"anyOf":[{"type":"string","maxLength":1000},{"type":"string","maxLength":0}]},"promotions":{"type":"array","maxItems":50,"description":"DEPRECATED – An array of promotion deals for the given entry. This feature has been deprecated with the 2022-R2 release.","items":{"type":"object","required":["start","end","title","text","href"],"properties":{"start":{"type":["string"],"description":"A ISO 8601 compliant date or date time string in UTC. Format must be: YYYY-MM-DDTHH:mm:ss.sssZ","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])\\.[0-9]{3}[\\+\\-](2[0-3]|[01][0-9])([0-5][0-9])$"},"end":{"type":["string"],"description":"A ISO 8601 compliant date or date time string in UTC. Format must be: YYYY-MM-DDTHH:mm:ss.sssZ","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])\\.[0-9]{3}[\\+\\-](2[0-3]|[01][0-9])([0-5][0-9])$"},"title":{"type":"string","maxLength":200},"text":{"type":"string","maxLength":1000},"href":{"description":"An additional URL which has more details for the promotion.","anyOf":[{"type":"string","pattern":"^(https?)://[^\\s/$.?#].[^\\s]*$","maxLength":1000},{"type":"string","maxLength":0}]}},"additionalProperties":false}},"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"adjustedCoordinates":{"type":"boolean","description":"If true, the latitude and/or longitude have been adjusted to a more precise location and should not be updated automatically."},"validUntil":{"type":["string","null"],"description":"A ISO 8601 compliant date or date time string in UTC. Format must be: YYYY-MM-DDTHH:mm:ss.sssZ","pattern":"^[0-9]{4}-(0[1-9]|1[0-2])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])\\.[0-9]{3}[\\+\\-](2[0-3]|[01][0-9])([0-5][0-9])$"}}}