├── .github └── workflows │ └── test.yml ├── .gitignore ├── .ruby-version ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── Rakefile ├── bin ├── bundle └── rake ├── build ├── accounts-statement-schema.json ├── alternate-registration-schema.json ├── alternative-name-schema.json ├── company-schema.json ├── control-statement-schema.json ├── filing-schema.json ├── financial-payment-schema.json ├── gazette-notice-schema.json ├── licence-schema.json ├── primary-data-schema.json ├── register-entry-schema.json ├── sanctioned-entity-schema.json ├── share-parcel-schema.json ├── simple-financial-payment-schema.json ├── simple-licence-schema.json ├── simple-subsidiary-schema.json ├── subsequent-registration-schema.json ├── subsidiary-relationship-schema.json ├── supplier-relationship-schema.json └── trademark-registration-schema.json ├── openc-schema.gemspec ├── schemas ├── accounts-statement-schema.json ├── alternate-registration-schema.json ├── alternative-name-schema.json ├── company-schema.json ├── control-statement-schema.json ├── filing-schema.json ├── financial-payment-schema.json ├── gazette-notice-schema.json ├── includes │ ├── accounts-element.json │ ├── address-with-type.json │ ├── address.json │ ├── alternative-name.json │ ├── base-statement.json │ ├── classification.json │ ├── company-for-nesting.json │ ├── company.json │ ├── date.json │ ├── entity.json │ ├── filing-document.json │ ├── filing.json │ ├── financial-payment-data-object.json │ ├── identifier.json │ ├── industry-code.json │ ├── legislation.json │ ├── licence-data-object.json │ ├── officer.json │ ├── organisation.json │ ├── permission.json │ ├── person-name.json │ ├── person.json │ ├── previous-name.json │ ├── range.json │ ├── sanction.json │ ├── share-parcel-data.json │ ├── share-parcel.json │ ├── subsidiary-relationship-data.json │ ├── total-shares.json │ └── unknown-entity-type.json ├── licence-schema.json ├── primary-data-schema.json ├── register-entry-schema.json ├── sanctioned-entity-schema.json ├── share-parcel-schema.json ├── simple-financial-payment-schema.json ├── simple-licence-schema.json ├── simple-subsidiary-schema.json ├── subsequent-registration-schema.json ├── subsidiary-relationship-schema.json ├── supplier-relationship-schema.json └── trademark-registration-schema.json └── spec ├── additional-sample-data └── valid │ ├── gazette-notice_fr-bodacc-bilan-01.json │ ├── gazette-notice_fr-bodacc-div-01.json │ ├── gazette-notice_fr-bodacc-pcl-01.json │ ├── gazette-notice_fr-bodacc-rcs-a-01.json │ ├── gazette-notice_fr-bodacc-rcs-a-02.json │ ├── gazette-notice_fr-bodacc-rcs-a-03.json │ ├── gazette-notice_fr-bodacc-rcs-a-04.json │ ├── gazette-notice_fr-bodacc-rcs-b-01.json │ └── gazette-notice_fr-bodacc-rcs-b-02.json ├── sample-data ├── invalid │ ├── accounts-statement │ │ ├── any_of_no_matches-filing_subject.entity_properties.json │ │ └── missing-profit.0.value.json │ ├── alternate-registration │ │ ├── additional-foo.json │ │ └── any_of_no_matches-.json │ ├── company │ │ ├── additional-all_attributes.merged_into.name.json │ │ ├── additional-alternative_names.0.con_date.json │ │ ├── additional-foo.json │ │ ├── additional-officers.0.dob.json │ │ ├── additional-officers.0.type.json │ │ ├── any_of_no_matches-all_attributes.merged_into.surviving_company.json │ │ ├── any_of_no_matches-all_attributes.number_of_employees.json │ │ ├── any_of_no_matches-filings.0.json │ │ ├── enum_mismatch-alternative_names.0.type.json │ │ ├── enum_mismatch-branch.json │ │ ├── enum_mismatch-officers.0.other_attributes.type.json │ │ ├── format_mismatch-filings.0.date.json │ │ ├── missing-alternative_names.0.type.json │ │ ├── missing-company_number.json │ │ ├── missing-filings.0.date.json │ │ ├── missing-industry_codes.0.code.json │ │ ├── missing-industry_codes.0.code_scheme_id.json │ │ ├── missing-officers.0.name.json │ │ ├── missing-previous_names.0.company_name.json │ │ ├── missing-total_shares.number.json │ │ ├── one_of_no_matches-headquarters_address.json │ │ ├── one_of_no_matches-mailing_address.json │ │ ├── one_of_no_matches-registered_address.json │ │ ├── too_long-alternative_names.0.language.json │ │ ├── too_long-jurisdiction_code.json │ │ ├── too_short-all_attributes.home_company_number.json │ │ ├── too_short-all_attributes.home_legal_name.json │ │ ├── too_short-all_attributes.jurisdiction_of_origin.json │ │ ├── too_short-all_attributes.registered_agent_address.json │ │ ├── too_short-all_attributes.registered_agent_name.json │ │ ├── too_short-alternative_names.0.company_name.json │ │ ├── too_short-company_number.json │ │ ├── too_short-fax_number.json │ │ ├── too_short-jurisdiction_code.json │ │ ├── too_short-name.json │ │ ├── too_short-officers.0.name.json │ │ ├── too_short-previous_names.0.company_name.json │ │ ├── too_short-telephone_number.json │ │ ├── too_short-total_shares.share_class.json │ │ ├── too_short-website.json │ │ ├── type_mismatch-all_attributes.home_company_number.json │ │ ├── type_mismatch-all_attributes.home_legal_name.json │ │ ├── type_mismatch-all_attributes.jurisdiction_of_origin.json │ │ ├── type_mismatch-all_attributes.merged_into.json │ │ ├── type_mismatch-all_attributes.registered_agent_address.json │ │ ├── type_mismatch-all_attributes.registered_agent_name.json │ │ ├── type_mismatch-alternative_names.0.json │ │ ├── type_mismatch-alternative_names.json │ │ ├── type_mismatch-filings.0.json │ │ ├── type_mismatch-filings.json │ │ ├── type_mismatch-industry_codes.0.json │ │ ├── type_mismatch-industry_codes.json │ │ ├── type_mismatch-officers.0.json │ │ ├── type_mismatch-officers.0.other_attributes.json │ │ ├── type_mismatch-officers.json │ │ ├── type_mismatch-previous_names.0.json │ │ ├── type_mismatch-previous_names.json │ │ ├── type_mismatch-share_parcels.0.json │ │ ├── type_mismatch-share_parcels.0.percentage_of_shares.json │ │ ├── type_mismatch-share_parcels.json │ │ ├── type_mismatch-total_shares.json │ │ └── unknown-officers.0.name.json │ ├── filing │ │ ├── missing-filing_date.json │ │ └── missing-filing_subject.json │ ├── financial-payment │ │ └── missing-data.0.properties.value.json │ ├── includes │ │ ├── address-with-type │ │ │ ├── enum_mismatch-type.json │ │ │ ├── missing-address.json │ │ │ └── missing-type.json │ │ ├── address │ │ │ ├── any_of_no_matches-.json │ │ │ └── type_mismatch-street_address.json │ │ ├── alternative-name │ │ │ ├── enum_mismatch-type.json │ │ │ └── missing-type.json │ │ ├── date │ │ │ ├── any_of_no_matches-.json │ │ │ └── type_mismatch-month.json │ │ ├── entity │ │ │ ├── one_of_no_matches-.json │ │ │ └── too_short-entity_properties.name.json │ │ ├── identifier │ │ │ ├── missing-identifier_system_code.json │ │ │ ├── missing-uid.json │ │ │ └── too_short-uid.json │ │ ├── officer │ │ │ ├── enum_mismatch-other_attributes.type.json │ │ │ ├── format_mismatch-other_attributes.date_of_birth.json │ │ │ ├── missing-name.json │ │ │ └── unknown-name.json │ │ ├── organisation │ │ │ ├── any_of_no_matches-headquarters_address.json │ │ │ ├── missing-name.json │ │ │ └── type_mismatch-addresses.json │ │ ├── permission │ │ │ ├── enum_mismatch-permission_type.json │ │ │ ├── missing-activity_name.json │ │ │ └── type_mismatch-restrictions.json │ │ ├── person-name │ │ │ └── format_mismatch-given_name.json │ │ ├── person │ │ │ ├── missing-name.json │ │ │ └── type_mismatch-addresses.json │ │ ├── previous-name │ │ │ ├── format_mismatch-con_date.json │ │ │ └── missing-company_name.json │ │ ├── total-shares │ │ │ └── additional-foo.json │ │ └── unknown-entity-type │ │ │ └── missing-name.json │ ├── licence │ │ ├── any_of_no_matches-licence_holder.entity_properties.company.json │ │ ├── any_of_no_matches-licence_holder.entity_properties.json │ │ ├── missing-licence_holder.entity_properties.json │ │ ├── missing-licence_holder.entity_type.json │ │ ├── too_short-licence_holder.entity_properties.fax_number.json │ │ ├── too_short-licence_holder.entity_properties.name.json │ │ └── type_mismatch-permissions.json │ ├── primary-data │ │ ├── missing-sample_date.json │ │ └── missing-source_url.json │ ├── simple-licence │ │ ├── missing-company_name.json │ │ ├── too_short-company_jurisdiction.json │ │ └── too_short-company_name.json │ ├── simple-subsidiary │ │ └── unknown-percentage_controlled.json │ └── subsequent-registration │ │ ├── additional-foo.json │ │ └── any_of_no_matches-.json └── valid │ ├── accounts-statement-01.json │ ├── accounts-statement-02.json │ ├── accounts-statement-03.json │ ├── accounts-statement-04.json │ ├── alternate-registration-01.json │ ├── company-01.json │ ├── company-02.json │ ├── company-03.json │ ├── company-04.json │ ├── company-05.json │ ├── company-06.json │ ├── company-07.json │ ├── company-08.json │ ├── company-09.json │ ├── company-10.json │ ├── company-11.json │ ├── company-12.json │ ├── company-13.json │ ├── company-14.json │ ├── company-15.json │ ├── company-16.json │ ├── company-17.json │ ├── company-18.json │ ├── company-19.json │ ├── company-20.json │ ├── company-21.json │ ├── company-22.json │ ├── company-23.json │ ├── company-24.json │ ├── company-25.json │ ├── company-26.json │ ├── company-27.json │ ├── company-28.json │ ├── company-29.json │ ├── company-30.json │ ├── company-31.json │ ├── company-32.json │ ├── company-33.json │ ├── company-34.json │ ├── company-35.json │ ├── company-36.json │ ├── company-37.json │ ├── company-38.json │ ├── company-39.json │ ├── company-40.json │ ├── company-41.json │ ├── company-42.json │ ├── company-43.json │ ├── company-44.json │ ├── company-45.json │ ├── company-46.json │ ├── company-47.json │ ├── company-48.json │ ├── company-49.json │ ├── company-50.json │ ├── company-51.json │ ├── company-52.json │ ├── company-53.json │ ├── company-54.json │ ├── company-55.json │ ├── company-56.json │ ├── company-57.json │ ├── company-58.json │ ├── control-statement-01.json │ ├── control-statement-02.json │ ├── control-statement-03.json │ ├── filing-01.json │ ├── filing-02.json │ ├── filing-03.json │ ├── financial-payment-01.json │ ├── financial-payment-02.json │ ├── gazette-notice-01.json │ ├── includes │ ├── address-01.json │ ├── address-02.json │ ├── address-with-type-01.json │ ├── address-with-type-02.json │ ├── alternative-name-01.json │ ├── company-for-nesting-01.json │ ├── identifier-01.json │ ├── legislation-01.json │ ├── officer-01.json │ ├── officer-02.json │ ├── organisation-01.json │ ├── organisation-02.json │ ├── organisation-03.json │ ├── permission-01.json │ ├── person-01.json │ ├── person-02.json │ ├── person-03.json │ ├── person-04.json │ ├── person-05.json │ ├── person-06.json │ ├── person-name-01.json │ ├── previous-name-01.json │ ├── share-parcel-01.json │ ├── share-parcel-02.json │ ├── share-parcel-03.json │ ├── share-parcel-04.json │ ├── share-parcel-05.json │ ├── share-parcel-06.json │ ├── share-parcel-07.json │ ├── total-shares-01.json │ └── unknown-entity-type-01.json │ ├── licence-01.json │ ├── licence-02.json │ ├── licence-03.json │ ├── licence-04.json │ ├── primary-data-01.json │ ├── primary-data-02.json │ ├── register-entry-01.json │ ├── register-entry-02.json │ ├── sanctioned-entity-01.json │ ├── sanctioned-entity-02.json │ ├── sanctioned-entity-03.json │ ├── simple-licence-01.json │ ├── simple-licence-02.json │ ├── simple-licence-03.json │ ├── simple-subsidiary-01.json │ ├── simple-subsidiary-02.json │ ├── simple-subsidiary-03.json │ ├── simple-subsidiary-04.json │ ├── subsequent-registration-01.json │ ├── subsidiary-relationship-01.json │ ├── supplier-relationship-01.json │ ├── trademark-registration-01.json │ └── trademark-registration-02.json ├── spec_helper.rb └── validation_spec.rb /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Test 3 | 4 | on: [pull_request] 5 | 6 | jobs: 7 | test: 8 | runs-on: ubuntu-latest 9 | strategy: 10 | matrix: 11 | ruby: 12 | # - "2.0" 13 | # - "2.1" 14 | # - "2.2" 15 | # - "2.3" 16 | # - "2.4" 17 | # - "2.5" 18 | # - "2.6.3" 19 | # - "2.6.7" 20 | - "2.7.8" 21 | env: 22 | TEST_ALL: 1 23 | steps: 24 | - uses: actions/checkout@v2 25 | - uses: ruby/setup-ruby@v1 26 | with: 27 | ruby-version: ${{ matrix.ruby }} 28 | # - run: gem install rubygems-update -v '<= 2.7.8' 29 | # if: ${{ matrix.ruby == '2.0' || matrix.ruby == '2.1' || matrix.ruby == '2.2' }} 30 | # - run: gem update --system 2.7.8 31 | # if: ${{ matrix.ruby == '2.0' || matrix.ruby == '2.1' || matrix.ruby == '2.2' }} 32 | # - run: gem install rubygems-update -v '<= ${{matrix.ruby}}' 33 | # if: ${{ matrix.ruby != '2.0' && matrix.ruby != '2.1' && matrix.ruby != '2.2' }} 34 | # - run: gem update --system 35 | # if: ${{ matrix.ruby != '2.0' && matrix.ruby != '2.1' && matrix.ruby != '2.2' }} 36 | - run: gem install bundler -v 1.17.3 37 | - run: bundle install 38 | - run: bin/rake build format_json && git status -s && [[ -z $(git status -s) ]] 39 | - run: bundle exec rspec 40 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.bundle 2 | /.rvmrc 3 | /.idea 4 | /coverage 5 | /pkg 6 | /rdoc 7 | /tags 8 | /vendor 9 | /.rbenv-version 10 | .rspec 11 | .DS_Store 12 | *~ 13 | .#* 14 | #*# 15 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.6.7 2 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | group :development, :test do 4 | gem "rake", "~> 10.3" 5 | gem "rspec", "~> 3" 6 | end 7 | 8 | gemspec 9 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | PATH 2 | remote: . 3 | specs: 4 | openc-schema (1.1.0) 5 | json_validation (= 0.1.0) 6 | openc-json_schema (= 0.0.14) 7 | openc_json_schema_formats (= 0.1.3) 8 | 9 | GEM 10 | remote: https://rubygems.org/ 11 | specs: 12 | addressable (2.3.8) 13 | diff-lcs (1.3) 14 | json-pointer (0.0.1) 15 | json-schema (2.6.2) 16 | addressable (~> 2.3.8) 17 | json_validation (0.1.0) 18 | addressable 19 | openc-json_schema (0.0.14) 20 | json-pointer 21 | json-schema (~> 2.6.0) 22 | openc_json_schema_formats (0.1.3) 23 | json_validation 24 | rake (10.3.2) 25 | rspec (3.7.0) 26 | rspec-core (~> 3.7.0) 27 | rspec-expectations (~> 3.7.0) 28 | rspec-mocks (~> 3.7.0) 29 | rspec-core (3.7.1) 30 | rspec-support (~> 3.7.0) 31 | rspec-expectations (3.7.0) 32 | diff-lcs (>= 1.2.0, < 2.0) 33 | rspec-support (~> 3.7.0) 34 | rspec-mocks (3.7.0) 35 | diff-lcs (>= 1.2.0, < 2.0) 36 | rspec-support (~> 3.7.0) 37 | rspec-support (3.7.1) 38 | 39 | PLATFORMS 40 | ruby 41 | 42 | DEPENDENCIES 43 | openc-schema! 44 | rake (~> 10.3) 45 | rspec (~> 3) 46 | 47 | BUNDLED WITH 48 | 1.17.2 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Chrinon Ltd 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # openc-schema 2 | 3 | JSON Schema to validate data before sending it to be **ingested into** OpenCorporates. 4 | 5 | Originally these files were designed for use by external developers, along with the [openc_bot gem](https://github.com/openc/openc_bot), with OpenCorporates encouraging anyone to join in with writing bots for data gathering and ingestion. Lately we have moved away from that approach, and all meaningful use of these schema files is confined to bots living in our own private repos. 6 | 7 | Looking for a schema description of the OpenCorporates API? We're working on something, so let us know you're interested (But this repo is not it!) 8 | 9 | ## Usage 10 | 11 | Include it in your Gemfile: 12 | 13 | ``` 14 | gem "openc-schema", git: "https://github.com/openc/openc-schema", tag: "vx.y.z" 15 | ``` 16 | 17 | Then get the path to the schema files: 18 | 19 | ``` 20 | File.join(Gem.loaded_specs['openc-schema'].full_gem_path, "schemas/company-schema.json") 21 | ``` 22 | 23 | If you are using a library that uses this gem, you must include this gem along with the library in your Gemfile. 24 | This will be required until this gem is hosted in a proper gem registry. 25 | 26 | ## Tasks 27 | 28 | Rewrite JSON files with consistent formatting: 29 | 30 | rake format_json 31 | 32 | Write schema files with embedded references (for Docson): 33 | 34 | rake build 35 | 36 | ## Test 37 | 38 | Run tests: 39 | 40 | rake 41 | 42 | Run tests against JSON files under both `sample-data` and `additional-sample-data`: 43 | 44 | TEST_ALL=1 rake 45 | 46 | ## Releasing a new version 47 | 48 | See the [wiki](https://wiki.opencorporates.com/dev/updating_openc-schema) (requires login). 49 | 50 | Copyright (c) 2015 Chrinon Ltd, released under the MIT license 51 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | # 5 | # This file was generated by Bundler. 6 | # 7 | # The application 'rake' is installed as part of a gem, and 8 | # this file is here to facilitate running it. 9 | # 10 | 11 | require "pathname" 12 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", 13 | Pathname.new(__FILE__).realpath) 14 | 15 | bundle_binstub = File.expand_path("../bundle", __FILE__) 16 | 17 | if File.file?(bundle_binstub) 18 | if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/ 19 | load(bundle_binstub) 20 | else 21 | abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. 22 | Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") 23 | end 24 | end 25 | 26 | require "rubygems" 27 | require "bundler/setup" 28 | 29 | load Gem.bin_path("rake", "rake") 30 | -------------------------------------------------------------------------------- /build/alternative-name-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "Doing Business As, also known as fictitious name or trade name", 4 | "type": "object", 5 | "properties": { 6 | "name": { 7 | "description": "The name registered", 8 | "type": "string" 9 | }, 10 | "type": { 11 | "description": "Type of alternative name", 12 | "type": "string", 13 | "enum": [ 14 | "Assumed Name", 15 | "Trade Name", 16 | "DBA / doing business as", 17 | "Fictitious Name", 18 | "Other" 19 | ] 20 | }, 21 | "registered_address": { 22 | "description": "The address filing was registered to", 23 | "type": "object" 24 | }, 25 | "start_date": { 26 | "type": "string", 27 | "format": "date" 28 | }, 29 | "end_date": { 30 | "type": "string", 31 | "format": "date" 32 | }, 33 | "filing_number": { 34 | "description": "The registers unique id for this record", 35 | "type": "string" 36 | }, 37 | "source_jurisdiction": { 38 | "type": "string", 39 | "minLength": 1 40 | }, 41 | "source_url": { 42 | "description": "Place where this fact can be verified", 43 | "type": "string", 44 | "minLength": 1 45 | }, 46 | "confidence": { 47 | "description": "Confidence in accuracy of data", 48 | "type": "string", 49 | "enum": [ 50 | "HIGH", 51 | "MEDIUM", 52 | "LOW" 53 | ] 54 | }, 55 | "sample_date": { 56 | "description": "Date on which we know this to be true (usually date this information was retrieved from the source)", 57 | "type": "string", 58 | "format": "date" 59 | }, 60 | "retrieved_at": { 61 | "description": "The time or date at which the source URL was requested", 62 | "type": "string", 63 | "format": "date-time" 64 | }, 65 | "owner_entities": { 66 | "description": "Lists of owner companies, and persons should this data be available", 67 | "type": "object" 68 | }, 69 | "other_attributes": { 70 | "description": "Dump of all other relevant data for which we don't yet have curated schema attributes", 71 | "type": "object" 72 | } 73 | }, 74 | "required": [ 75 | "name", 76 | "type", 77 | "owner_entities", 78 | "retrieved_at", 79 | "sample_date", 80 | "source_url", 81 | "source_jurisdiction" 82 | ], 83 | "definitions": { 84 | } 85 | } -------------------------------------------------------------------------------- /build/primary-data-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "source_url": { 6 | "description": "Place where this fact can be verified", 7 | "type": "string" 8 | }, 9 | "sample_date": { 10 | "description": "Date on which this fact was known to be true", 11 | "type": "string", 12 | "format": "date" 13 | } 14 | }, 15 | "required": [ 16 | "source_url", 17 | "sample_date" 18 | ], 19 | "additionalProperties": true, 20 | "definitions": { 21 | } 22 | } -------------------------------------------------------------------------------- /build/simple-licence-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "source_url": { 6 | "description": "Place where this fact can be verified", 7 | "type": "string", 8 | "minLength": 1 9 | }, 10 | "sample_date": { 11 | "description": "Date on which this fact was known to be true", 12 | "type": "string", 13 | "format": "date" 14 | }, 15 | "start_date": { 16 | "type": "string", 17 | "format": "date" 18 | }, 19 | "end_date": { 20 | "type": "string", 21 | "format": "date" 22 | }, 23 | "confidence": { 24 | "description": "Confidence in accuracy of data", 25 | "type": "string", 26 | "enum": [ 27 | "HIGH", 28 | "MEDIUM", 29 | "LOW" 30 | ] 31 | }, 32 | "company_name": { 33 | "description": "Name of the company holding the licence", 34 | "type": "string", 35 | "minLength": 1 36 | }, 37 | "company_jurisdiction": { 38 | "description": "Jurisdiction where company is based", 39 | "type": "string", 40 | "minLength": 1 41 | }, 42 | "licence_number": { 43 | "description": "Licence number or code", 44 | "type": "string" 45 | }, 46 | "jurisdiction_classification": { 47 | "description": "Description of how regulator classifies licence", 48 | "type": [ 49 | "string", 50 | "array" 51 | ] 52 | }, 53 | "regulator": { 54 | "description": "The regulating body that issued the licence", 55 | "type": "string" 56 | }, 57 | "licence_jurisdiction": { 58 | "description": "Jurisdiction for which licence is issued", 59 | "type": "string", 60 | "minLength": 1 61 | }, 62 | "status": { 63 | "description": "Status of the licence", 64 | "type": "string" 65 | }, 66 | "retrieved_at": { 67 | "type": "string", 68 | "format": "date" 69 | }, 70 | "category": { 71 | "description": "Category of licence", 72 | "type": "string", 73 | "enum": [ 74 | "Financial", 75 | "Business" 76 | ] 77 | } 78 | }, 79 | "additionalProperties": false, 80 | "required": [ 81 | "source_url", 82 | "sample_date", 83 | "company_name", 84 | "company_jurisdiction" 85 | ], 86 | "definitions": { 87 | } 88 | } -------------------------------------------------------------------------------- /build/simple-subsidiary-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "source_url": { 6 | "description": "Place where this fact can be verified", 7 | "type": "string", 8 | "minLength": 1 9 | }, 10 | "sample_date": { 11 | "description": "Date on which this fact was known to be true", 12 | "type": "string", 13 | "format": "date" 14 | }, 15 | "start_date": { 16 | "description": "Earliest known date this was known to be a subsidiary", 17 | "type": "string", 18 | "format": "date" 19 | }, 20 | "end_date": { 21 | "description": "Latest known date this was known to be a subsidiary", 22 | "type": "string", 23 | "format": "date" 24 | }, 25 | "confidence": { 26 | "description": "Confidence in accuracy of data", 27 | "type": "string", 28 | "enum": [ 29 | "HIGH", 30 | "MEDIUM", 31 | "LOW" 32 | ] 33 | }, 34 | "retrieved_at": { 35 | "type": "string", 36 | "format": "date" 37 | }, 38 | "parent_name": { 39 | "description": "Name of the controlling company", 40 | "type": "string", 41 | "minLength": 1 42 | }, 43 | "parent_jurisdiction": { 44 | "description": "Jurisdiction where controlling company is based", 45 | "type": "string", 46 | "minLength": 1 47 | }, 48 | "parent_identifier": { 49 | "description": "Any unique ID for the controlling company", 50 | "type": "string" 51 | }, 52 | "direct": { 53 | "description": "Is the control relationship direct or indirect (if unknown, leave blank)?", 54 | "type": "boolean" 55 | }, 56 | "percentage_controlled": { 57 | "description": "Percentage of the subsidiary that is controlled (if known), either directly or indirectly", 58 | "type": "string", 59 | "pattern": "^[0-9]{1,2}0?[.]?[0-9]{0,2}$" 60 | }, 61 | "subsidiary_name": { 62 | "description": "The name of the subsidiary", 63 | "type": "string", 64 | "minLength": 1 65 | }, 66 | "subsidiary_jurisdiction": { 67 | "description": "Jurisdiction of the subsidiary", 68 | "type": "string", 69 | "minLength": 1 70 | }, 71 | "subsidiary_identifier": { 72 | "description": "Any unique id for the subsidiary that might be provided in the source", 73 | "type": "string" 74 | } 75 | }, 76 | "other_attributes": { 77 | "description": "Use for other attributes for which we don't yet have curated schema attributes", 78 | "type": "object" 79 | }, 80 | "additionalProperties": false, 81 | "required": [ 82 | "source_url", 83 | "sample_date", 84 | "parent_name", 85 | "parent_jurisdiction", 86 | "subsidiary_name", 87 | "subsidiary_jurisdiction" 88 | ], 89 | "definitions": { 90 | } 91 | } -------------------------------------------------------------------------------- /openc-schema.gemspec: -------------------------------------------------------------------------------- 1 | lib = File.expand_path("../lib", __FILE__) 2 | $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 3 | 4 | Gem::Specification.new do |spec| 5 | spec.name = "openc-schema" 6 | spec.version = "1.1.0" 7 | spec.authors = ["OpenCorporates dev team"] 8 | 9 | spec.summary = %q{JSON Schema to validate data before sending to OpenCorporates.} 10 | spec.homepage = "https://github.com/openc/openc-schema" 11 | 12 | # Specify which files should be added to the gem when it is released. 13 | # The `git ls-files -z` loads the files in the RubyGem that have been added into git. 14 | spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do 15 | `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)|\.ruby-version/}) } 16 | end 17 | spec.bindir = "exe" 18 | spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } 19 | 20 | spec.add_runtime_dependency "openc-json_schema", "= 0.0.14" 21 | spec.add_runtime_dependency "json_validation", "= 0.1.0" 22 | spec.add_runtime_dependency "openc_json_schema_formats", "= 0.1.3" 23 | end 24 | -------------------------------------------------------------------------------- /schemas/alternate-registration-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "A representation of multiple registrations for the same entity", 4 | "type": "object", 5 | "properties": { 6 | "data_type": { 7 | "enum": [ 8 | "alternate-registration" 9 | ] 10 | }, 11 | "alternate_entities": { 12 | "description": "array of entities that are linked via alternate registrations", 13 | "type": "array", 14 | "items": { 15 | "$ref": "includes/entity.json", 16 | "minLength": 2 17 | } 18 | }, 19 | "alternate_registration_start_date": { 20 | "description": "date when alternate registration started", 21 | "type": "string", 22 | "format": "date" 23 | }, 24 | "alternate_registration_end_date": { 25 | "description": "date when alternate registration ended", 26 | "type": "string", 27 | "format": "date" 28 | }, 29 | "publication_date": { 30 | "description": "the publication date of the filing/notice that gives details of the alternate registration", 31 | "type": "string", 32 | "format": "date" 33 | }, 34 | "start_date": { 35 | "description": "date when alternate registration was valid from", 36 | "type": "string", 37 | "format": "date" 38 | }, 39 | "start_date_type": { 40 | "enum": [ 41 | "at", 42 | "before", 43 | "after" 44 | ] 45 | }, 46 | "sample_date": { 47 | "description": "date when alternate registration was sampled", 48 | "type": "string", 49 | "format": "date" 50 | }, 51 | "retrieved_at": { 52 | "description": "date when alternate registration was retrieved", 53 | "type": "string", 54 | "format": "date" 55 | }, 56 | "source_url": { 57 | "description": "URL of the source of the data (e.g. download URL), or if there is not persistent URL the page from which it can be found (e.g. search page)", 58 | "type": "string" 59 | }, 60 | "confidence": { 61 | "description": "Confidence in accuracy of data", 62 | "enum": [ 63 | "HIGH", 64 | "MEDIUM", 65 | "LOW" 66 | ] 67 | } 68 | }, 69 | "additionalProperties": false, 70 | "required": [ 71 | "data_type", 72 | "alternate_entities", 73 | "retrieved_at", 74 | "confidence" 75 | ], 76 | "anyOf": [ 77 | { 78 | "required": [ 79 | "start_date" 80 | ] 81 | }, 82 | { 83 | "required": [ 84 | "sample_date" 85 | ] 86 | } 87 | ] 88 | } 89 | -------------------------------------------------------------------------------- /schemas/alternative-name-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "Doing Business As, also known as fictitious name or trade name", 4 | "type": "object", 5 | "properties": { 6 | "name": { 7 | "description": "The name registered", 8 | "type": "string" 9 | }, 10 | "type": { 11 | "description": "Type of alternative name", 12 | "type": "string", 13 | "enum": [ 14 | "Assumed Name", 15 | "Trade Name", 16 | "DBA / doing business as", 17 | "Fictitious Name", 18 | "Other" 19 | ] 20 | }, 21 | "registered_address": { 22 | "description": "The address filing was registered to", 23 | "type": "object" 24 | }, 25 | "start_date": { 26 | "type": "string", 27 | "format": "date" 28 | }, 29 | "end_date": { 30 | "type": "string", 31 | "format": "date" 32 | }, 33 | "filing_number": { 34 | "description": "The registers unique id for this record", 35 | "type": "string" 36 | }, 37 | "source_jurisdiction": { 38 | "type": "string", 39 | "minLength": 1 40 | }, 41 | "source_url": { 42 | "description": "Place where this fact can be verified", 43 | "type": "string", 44 | "minLength": 1 45 | }, 46 | "confidence": { 47 | "description": "Confidence in accuracy of data", 48 | "type": "string", 49 | "enum": [ 50 | "HIGH", 51 | "MEDIUM", 52 | "LOW" 53 | ] 54 | }, 55 | "sample_date": { 56 | "description": "Date on which we know this to be true (usually date this information was retrieved from the source)", 57 | "type": "string", 58 | "format": "date" 59 | }, 60 | "retrieved_at": { 61 | "description": "The time or date at which the source URL was requested", 62 | "type": "string", 63 | "format": "date-time" 64 | }, 65 | "owner_entities": { 66 | "description": "Lists of owner companies, and persons should this data be available", 67 | "type": "object" 68 | }, 69 | "other_attributes": { 70 | "description": "Dump of all other relevant data for which we don't yet have curated schema attributes", 71 | "type": "object" 72 | } 73 | }, 74 | "required": [ 75 | "name", 76 | "type", 77 | "owner_entities", 78 | "retrieved_at", 79 | "sample_date", 80 | "source_url", 81 | "source_jurisdiction" 82 | ] 83 | } 84 | -------------------------------------------------------------------------------- /schemas/financial-payment-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "A Financial-Payment is a payment from government to a recipient", 4 | "type": "object", 5 | "properties": { 6 | "sample_date": { 7 | "type": "string", 8 | "format": "date" 9 | }, 10 | "source_jurisdiction": { 11 | "description": "Jurisdiction of the source of the data", 12 | "type": "string" 13 | }, 14 | "company": { 15 | "$ref": "includes/company.json" 16 | }, 17 | "data": { 18 | "type": "array", 19 | "description": "This is an array of data objects, that is the objects which actually contain the data about the datum. Generally there will only be one element in this, although in for some types of data_types there may naturally be several releated to the same company, e.g. shareholders", 20 | "items": { 21 | "$ref": "includes/financial-payment-data-object.json" 22 | }, 23 | "additionalItems": false 24 | }, 25 | "retrieved_at": { 26 | "type": "string", 27 | "format": "date" 28 | } 29 | }, 30 | "additionalProperties": false, 31 | "required": [ 32 | "company", 33 | "data", 34 | "sample_date" 35 | ] 36 | } 37 | -------------------------------------------------------------------------------- /schemas/includes/accounts-element.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "A representation of one particular element of an accounts statement (e.g. profit or assets). This should consist of at least a value and end_date", 4 | "type": "object", 5 | "properties": { 6 | "value": { 7 | "type": "string", 8 | "minLength": 1 9 | }, 10 | "date": { 11 | "description": "If this element is an instant element, i.e. relates to a specific point in time (such as balance sheet item), then give the date this relates to, otherwise use start/end dates for element that occured over a period (e.g. Profit/Loss)", 12 | "type": "string", 13 | "format": "date" 14 | }, 15 | "start_date": { 16 | "type": "string", 17 | "format": "date" 18 | }, 19 | "end_date": { 20 | "type": "string", 21 | "format": "date" 22 | }, 23 | "currency": { 24 | "description": "ISO 4217 code for the currency", 25 | "type": "string", 26 | "minLength": 3, 27 | "maxLength": 3 28 | } 29 | }, 30 | "required": [ 31 | "value" 32 | ], 33 | "anyOf": [ 34 | { 35 | "required": [ 36 | "date" 37 | ] 38 | }, 39 | { 40 | "required": [ 41 | "end_date" 42 | ] 43 | } 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /schemas/includes/address-with-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "An address with a type", 4 | "type": "object", 5 | "properties": { 6 | "address": { 7 | "$ref": "address.json" 8 | }, 9 | "type": { 10 | "enum": [ 11 | "registered", 12 | "headquarters", 13 | "mailing", 14 | "trading", 15 | "unknown" 16 | ] 17 | } 18 | }, 19 | "additionalProperties": false, 20 | "required": [ 21 | "address", 22 | "type" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /schemas/includes/address.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "oneOf": [ 4 | { 5 | "type": [ 6 | "string", 7 | "null" 8 | ], 9 | "minLength": 2 10 | }, 11 | { 12 | "name": "Address", 13 | "description": "An address object", 14 | "type": "object", 15 | "properties": { 16 | "street_address": { 17 | "type": "string" 18 | }, 19 | "locality": { 20 | "type": "string" 21 | }, 22 | "region": { 23 | "type": "string" 24 | }, 25 | "postal_code": { 26 | "type": "string" 27 | }, 28 | "country": { 29 | "type": "string" 30 | }, 31 | "country_code": { 32 | "description": "ISO 3166-2 code for country", 33 | "type": "string" 34 | } 35 | }, 36 | "anyOf": [ 37 | { 38 | "required": [ 39 | "street_address" 40 | ] 41 | }, 42 | { 43 | "required": [ 44 | "postal_code" 45 | ] 46 | }, 47 | { 48 | "required": [ 49 | "locality", 50 | "country" 51 | ] 52 | } 53 | ] 54 | } 55 | ] 56 | } 57 | -------------------------------------------------------------------------------- /schemas/includes/alternative-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "An alternative name of a company, e.g. abbreviation, trading (including dba or doing business as), legal. As well as trading names etc, it can be used for storing alternative language representations of the legal name, in which case the language should be represented as two-letter ISO-639 code", 4 | "type": "object", 5 | "properties": { 6 | "company_name": { 7 | "type": "string", 8 | "minLength": 1 9 | }, 10 | "start_date": { 11 | "type": "string", 12 | "format": "date" 13 | }, 14 | "end_date": { 15 | "type": "string", 16 | "format": "date" 17 | }, 18 | "language": { 19 | "type": "string", 20 | "minLength": 2, 21 | "maxLength": 2 22 | }, 23 | "type": { 24 | "type": "string", 25 | "enum": [ 26 | "trading", 27 | "abbreviation", 28 | "legal", 29 | "unknown", 30 | "alias" 31 | ] 32 | } 33 | }, 34 | "additionalProperties": false, 35 | "required": [ 36 | "company_name", 37 | "type" 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /schemas/includes/base-statement.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "source_jurisdiction": { 6 | "description": "Jurisdiction of the source of the data", 7 | "type": "string" 8 | }, 9 | "company": { 10 | "$ref": "company.json" 11 | }, 12 | "data": { 13 | "type": "array", 14 | "description": "This is an array of data objects, that is the objects which actually contain the data about the datum. Generally there will only be one element in this, although in for some types of data_types there may naturally be several releated to the same company, e.g. shareholders", 15 | "items": { 16 | "$ref": "financial-payment-data-object.json" 17 | }, 18 | "additionalItems": false 19 | } 20 | }, 21 | "required": [ 22 | "company", 23 | "data" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /schemas/includes/classification.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "title": "Classification", 4 | "description": "A classification from a code list", 5 | "type": "object", 6 | "properties": { 7 | "code_scheme_id": { 8 | "description": "The scheme of the classification", 9 | "type": "string" 10 | }, 11 | "code": { 12 | "description": "The classification", 13 | "type": "string" 14 | }, 15 | "name": { 16 | "description": "A title or description of the classification, especially if the value is a code", 17 | "type": "string" 18 | } 19 | }, 20 | "additionalProperties": false, 21 | "anyOf": [ 22 | { 23 | "required": [ 24 | "name" 25 | ] 26 | }, 27 | { 28 | "required": [ 29 | "code", 30 | "code_scheme_id" 31 | ] 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /schemas/includes/company.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "A company which is the subject of a statement", 4 | "type": "object", 5 | "properties": { 6 | "name": { 7 | "type": "string" 8 | }, 9 | "jurisdiction": { 10 | "type": "string" 11 | }, 12 | "company_number": { 13 | "type": "string" 14 | }, 15 | "identifier": { 16 | "type": "string", 17 | "description": "An official identifier paired with a code for the issuer of the identifier, e.g sec/12345", 18 | "pattern": "^[^/]+/[^/]+$" 19 | } 20 | }, 21 | "required": [ 22 | "name", 23 | "jurisdiction" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /schemas/includes/date.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "A parsed date object. This allows us to represent not just normal dates, but also partial dates too", 4 | "type": "object", 5 | "properties": { 6 | "year": { 7 | "type": "number", 8 | "description": "year part as YYYY" 9 | }, 10 | "month": { 11 | "type": "number", 12 | "description": "month part of date in numbers e.g. 11 for November, 4 for April" 13 | }, 14 | "day": { 15 | "type": [ 16 | "number", 17 | "null" 18 | ], 19 | "description": "day part of date in numbers" 20 | } 21 | }, 22 | "additionalProperties": false, 23 | "anyOf": [ 24 | { 25 | "required": [ 26 | "year", 27 | "month" 28 | ] 29 | }, 30 | { 31 | "required": [ 32 | "month", 33 | "day" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /schemas/includes/entity.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "required": [ 5 | "entity_type", 6 | "entity_properties" 7 | ], 8 | "oneOf": [ 9 | { 10 | "properties": { 11 | "entity_type": { 12 | "enum": [ 13 | "company" 14 | ] 15 | }, 16 | "entity_properties": { 17 | "$ref": "company-for-nesting.json" 18 | } 19 | } 20 | }, 21 | { 22 | "properties": { 23 | "entity_type": { 24 | "enum": [ 25 | "person" 26 | ] 27 | }, 28 | "entity_properties": { 29 | "$ref": "person.json" 30 | } 31 | } 32 | }, 33 | { 34 | "properties": { 35 | "entity_type": { 36 | "enum": [ 37 | "organisation" 38 | ] 39 | }, 40 | "entity_properties": { 41 | "$ref": "organisation.json" 42 | } 43 | } 44 | }, 45 | { 46 | "properties": { 47 | "entity_type": { 48 | "enum": [ 49 | "unknown" 50 | ] 51 | }, 52 | "entity_properties": { 53 | "$ref": "unknown-entity-type.json" 54 | } 55 | } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /schemas/includes/filing-document.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "A document of some sort (PDF, TIFF, HTML) associated with a filing", 4 | "type": "object", 5 | "properties": { 6 | "uid": { 7 | "description": "Unique id/reference for the filing if it has one", 8 | "type": "string" 9 | }, 10 | "file_format": { 11 | "description": "Format of the document, if known", 12 | "enum": [ 13 | "xml", 14 | "pdf", 15 | "html", 16 | "doc", 17 | null 18 | ] 19 | }, 20 | "original_source_url": { 21 | "description": "Persistent URL for the document, if there is one", 22 | "type": "string" 23 | }, 24 | "source_url": { 25 | "description": "Source url of the web page for the filing or if there is not persistent URL the page from which it can be found (e.g. search page)", 26 | "type": "string", 27 | "minLength": 11 28 | }, 29 | "source_location": { 30 | "type": "string", 31 | "description": "If the accounts filing has been put on sources.opencorporates.com the path to the filing" 32 | }, 33 | "language": { 34 | "description": "Should be represented as two-letter ISO-639 code", 35 | "type": "string", 36 | "minLength": 2, 37 | "maxLength": 2 38 | }, 39 | "classification": { 40 | "description": "type of document (at the moment only XBRL is the only option here)", 41 | "type": "string", 42 | "enum": [ 43 | "xbrl", 44 | null 45 | ] 46 | }, 47 | "pages": { 48 | "description": "Number of pages, if known", 49 | "type": "integer" 50 | } 51 | }, 52 | "additionalProperties": false, 53 | "anyOf": [ 54 | { 55 | "required": [ 56 | "source_location" 57 | ] 58 | }, 59 | { 60 | "required": [ 61 | "source_url" 62 | ] 63 | } 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /schemas/includes/filing.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "A statutory filing", 4 | "type": "object", 5 | "properties": { 6 | "title": { 7 | "type": "string" 8 | }, 9 | "date": { 10 | "type": "string", 11 | "format": "date", 12 | "minLength": 1 13 | }, 14 | "description": { 15 | "type": "string" 16 | }, 17 | "uid": { 18 | "type": "string" 19 | }, 20 | "url": { 21 | "type": "string" 22 | }, 23 | "filing_type_code": { 24 | "type": "string" 25 | }, 26 | "filing_type_name": { 27 | "type": "string" 28 | }, 29 | "other_attributes": { 30 | "type": "object" 31 | } 32 | }, 33 | "required": [ 34 | "date" 35 | ], 36 | "anyOf": [ 37 | { 38 | "required": [ 39 | "title" 40 | ] 41 | }, 42 | { 43 | "required": [ 44 | "description" 45 | ] 46 | }, 47 | { 48 | "required": [ 49 | "filing_type_name" 50 | ] 51 | } 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /schemas/includes/identifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "An identifier for an entity (possibly other things, e.g. securities in the future). Examples are tax IDs, non-profit IDs, SEC CIK numbers, Federal Reserve RSSD id. The main requirements for an identifier is that they should be well-defined, and issued by a government or have statutory standing", 4 | "type": "object", 5 | "properties": { 6 | "uid": { 7 | "type": "string", 8 | "description": "The unique identifier given by the identifier system – it should be unique in the context of the identifier_system", 9 | "minLength": 1, 10 | "not": { 11 | "pattern": "\\A[[:space:]]*\\z" 12 | } 13 | }, 14 | "identifier_system_code": { 15 | "type": "string", 16 | "description": "An identifier representing the identifier scheme. Some examples of this are us_fein (US Federal tax number), us_sec_cik (US Securities and Exchange Commission CIK), uk_ew_cc (Charity Commission of England & Wales), lei (Global Legal Entity Identifier System)", 17 | "not": { 18 | "pattern": "\\A[[:space:]]*\\z" 19 | } 20 | } 21 | }, 22 | "required": [ 23 | "uid", 24 | "identifier_system_code" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /schemas/includes/industry-code.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "An industry code from a standard code list (e.g. NAICS 2007 or NACE 2). This schema is a sub-schema of Classification.", 4 | "type": "object", 5 | "properties": { 6 | "name": { 7 | "type": "string" 8 | }, 9 | "code": { 10 | "type": "string", 11 | "minLength": 1, 12 | "pattern": "[a-zA-Z0-9]" 13 | }, 14 | "code_scheme_id": { 15 | "type": "string", 16 | "description": "An identifier representing industry code scheme. At the moment these are eu_nace_2, uk_sic_2003, uk_sic_2007, us_naics_2002, us_naics_2007, be_nace_2008, dk_db_2007, nz_bic_2006, no_sic_2007, anz_sic_2006, nz_bic_2006, in_nic_2004_mca, ca_qc_cae, lu_nace_2. For other code schemes, or details of these, contact info@opencorporates.com" 17 | }, 18 | "start_date": { 19 | "type": "string", 20 | "format": "date" 21 | }, 22 | "end_date": { 23 | "type": "string", 24 | "format": "date" 25 | } 26 | }, 27 | "required": [ 28 | "code", 29 | "code_scheme_id" 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /schemas/includes/legislation.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "oneOf": [ 4 | { 5 | "type": [ 6 | "string", 7 | "null" 8 | ], 9 | "format": "non-blank" 10 | }, 11 | { 12 | "description": "A piece of legislation. NB we expect to add additional properties to this over time", 13 | "type": "object", 14 | "properties": { 15 | "name": { 16 | "type": "string", 17 | "format": "non-blank", 18 | "description": "name of the the legislation" 19 | }, 20 | "url": { 21 | "type": "string", 22 | "format": "non-blank" 23 | } 24 | } 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /schemas/includes/licence-data-object.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "data_type": { 6 | "enum": [ 7 | "licence" 8 | ] 9 | }, 10 | "source_url": { 11 | "type": "string" 12 | }, 13 | "confidence": { 14 | "type": "string" 15 | }, 16 | "properties": { 17 | "type": "object", 18 | "properties": { 19 | "regulator": { 20 | "description": "The regulating body that issued the licence", 21 | "type": "string" 22 | }, 23 | "category": { 24 | "description": "The category of licence. Current possible values are: 'Financial','Business'", 25 | "enum": [ 26 | "Financial", 27 | "Business" 28 | ] 29 | }, 30 | "jurisdiction_code": { 31 | "description": "The jurisdiction for which licence was issued", 32 | "type": "string" 33 | }, 34 | "licence_number": { 35 | "description": "Licence number or code (can be null)", 36 | "type": [ 37 | "string", 38 | "null" 39 | ] 40 | }, 41 | "jurisdiction_classification": { 42 | "type": "array", 43 | "description": "The local classification given by the regulator", 44 | "minItems": 1 45 | }, 46 | "oc_classification": { 47 | "type": "array" 48 | } 49 | }, 50 | "required": [ 51 | "jurisdiction_code", 52 | "jurisdiction_classification", 53 | "category" 54 | ] 55 | } 56 | }, 57 | "required": [ 58 | "data_type", 59 | "properties", 60 | "source_url", 61 | "confidence" 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /schemas/includes/officer.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "An officer (director, senior executive) of a company", 4 | "type": "object", 5 | "properties": { 6 | "name": { 7 | "type": "string", 8 | "minLength": 1, 9 | "pattern": "[[:alnum:]]" 10 | }, 11 | "start_date": { 12 | "anyOf": [ 13 | { 14 | "type": "string", 15 | "format": "date" 16 | }, 17 | { 18 | "type": "null" 19 | } 20 | ] 21 | }, 22 | "end_date": { 23 | "anyOf": [ 24 | { 25 | "type": "string", 26 | "format": "date" 27 | }, 28 | { 29 | "type": "null" 30 | } 31 | ] 32 | }, 33 | "position": { 34 | "type": "string" 35 | }, 36 | "uid": { 37 | "type": "string", 38 | "description": "a unique identifier given to the officership" 39 | }, 40 | "other_attributes": { 41 | "type": "object", 42 | "properties": { 43 | "date_of_birth": { 44 | "type": "string", 45 | "format": "date" 46 | }, 47 | "nationality": { 48 | "type": "string" 49 | }, 50 | "person_uid": { 51 | "type": "string", 52 | "description": "a unique identifier given to the individual (as opposed to the officership)" 53 | }, 54 | "address": { 55 | "$ref": "address.json" 56 | }, 57 | "type": { 58 | "type": "string", 59 | "enum": [ 60 | "Person", 61 | "Company" 62 | ], 63 | "description": "The type of entity that is the officer (either 'Person' or 'Company')" 64 | } 65 | } 66 | } 67 | }, 68 | "additionalProperties": false, 69 | "required": [ 70 | "name" 71 | ] 72 | } 73 | -------------------------------------------------------------------------------- /schemas/includes/organisation.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "An entity which is a distinct organisation, but is not a company nor an individual. Examples include governments and governmental entities (e.g. Multilateral Development Banks, Government Departments, municipalities, etc), and also membership organisations", 4 | "type": "object", 5 | "additionalProperties": false, 6 | "properties": { 7 | "name": { 8 | "type": "string", 9 | "description": "Name of the entity", 10 | "minLength": 1 11 | }, 12 | "jurisdiction": { 13 | "type": "string", 14 | "description": "Name of the jurisdiction in which the entity is incorporated/domiciled (use global for global entities, e.g. UN)" 15 | }, 16 | "legal_form": { 17 | "type": "string", 18 | "description": "legal form of organisation, e.g. municipality, government department, trust, etc" 19 | }, 20 | "website": { 21 | "oneOf": [ 22 | { 23 | "type": "string", 24 | "minLength": 5 25 | }, 26 | { 27 | "type": [ 28 | "array", 29 | "null" 30 | ], 31 | "items": { 32 | "type": "string", 33 | "minLength": 5 34 | } 35 | } 36 | ] 37 | }, 38 | "telephone_number": { 39 | "type": "string", 40 | "minLength": 4 41 | }, 42 | "fax_number": { 43 | "type": "string", 44 | "minLength": 4 45 | }, 46 | "identifiers": { 47 | "type": [ 48 | "array", 49 | "null" 50 | ], 51 | "items": { 52 | "$ref": "identifier.json" 53 | } 54 | }, 55 | "registered_address": { 56 | "$ref": "address.json" 57 | }, 58 | "headquarters_address": { 59 | "$ref": "address.json" 60 | }, 61 | "mailing_address": { 62 | "$ref": "address.json" 63 | }, 64 | "addresses": { 65 | "type": "array", 66 | "items": { 67 | "$ref": "address-with-type.json" 68 | } 69 | }, 70 | "industry_codes": { 71 | "type": "array", 72 | "items": { 73 | "$ref": "industry-code.json" 74 | } 75 | }, 76 | "previous_names": { 77 | "type": "array", 78 | "items": { 79 | "$ref": "previous-name.json" 80 | } 81 | }, 82 | "alternative_names": { 83 | "type": "array", 84 | "items": { 85 | "$ref": "alternative-name.json" 86 | } 87 | }, 88 | "other_attributes": { 89 | "description": "Use for other attributes for which we don't yet have curated schema attributes", 90 | "type": "object" 91 | } 92 | }, 93 | "required": [ 94 | "name" 95 | ] 96 | } 97 | -------------------------------------------------------------------------------- /schemas/includes/permission.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "oneOf": [ 4 | { 5 | "type": [ 6 | "string", 7 | "null" 8 | ], 9 | "minLength": 2 10 | }, 11 | { 12 | "name": "Permission", 13 | "description": "A permission issued by a government or regulatory body to an entity to do something. This may be fine grained,e.g. to sell liquor, to accept customer deposits, or broader, e.g to operate as a bank, a restaurant. It may also be permission to do something physical, such as explore for oil in a given area, or mine for iron ore", 14 | "type": "object", 15 | "properties": { 16 | "activity_name": { 17 | "type": "string" 18 | }, 19 | "activity_id": { 20 | "type": "string" 21 | }, 22 | "permission_type": { 23 | "enum": [ 24 | "operating", 25 | "exploration", 26 | "exploitation" 27 | ], 28 | "description": "types of permission, such as 'operating', 'exploration', 'exploitation'" 29 | }, 30 | "restrictions": { 31 | "type": "array", 32 | "description": "conditions or restrictions on the permissions", 33 | "items": { 34 | "type": "string" 35 | } 36 | }, 37 | "other_attributes": { 38 | "type": "object" 39 | } 40 | }, 41 | "required": [ 42 | "activity_name" 43 | ] 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /schemas/includes/person-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "oneOf": [ 4 | { 5 | "type": [ 6 | "string", 7 | "null" 8 | ], 9 | "format": "non-blank" 10 | }, 11 | { 12 | "description": "The name of a person as an object", 13 | "type": "object", 14 | "properties": { 15 | "given_name": { 16 | "type": [ 17 | "string", 18 | "null" 19 | ], 20 | "format": "non-blank", 21 | "description": "The given name(s) (often first name) of a person, as opposed to their family name. Following FOAF practice, this is preferred to first_name" 22 | }, 23 | "family_name": { 24 | "type": [ 25 | "string", 26 | "null" 27 | ], 28 | "format": "non-blank", 29 | "description": "The family name (often last name) of a person, as opposed to their family name. Following FOAF practice, this is preferred to last_name" 30 | }, 31 | "first_name": { 32 | "type": [ 33 | "string", 34 | "null" 35 | ], 36 | "format": "non-blank" 37 | }, 38 | "middle_name": { 39 | "type": [ 40 | "string", 41 | "null" 42 | ], 43 | "format": "non-blank" 44 | }, 45 | "last_name": { 46 | "type": [ 47 | "string", 48 | "null" 49 | ], 50 | "format": "non-blank" 51 | }, 52 | "title": { 53 | "type": [ 54 | "string", 55 | "null" 56 | ], 57 | "format": "non-blank", 58 | "description": "Title such as Mr, Ms, Dr etc" 59 | }, 60 | "suffixes": { 61 | "type": [ 62 | "string", 63 | "null" 64 | ], 65 | "format": "non-blank", 66 | "description": "Any suffixes, including degrees, honours (OBE), ordinals (John Smith Jr, Bill Jones II) etc" 67 | } 68 | } 69 | } 70 | ] 71 | } 72 | -------------------------------------------------------------------------------- /schemas/includes/previous-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "name": "PreviousName", 4 | "description": "A previous name of a company", 5 | "type": "object", 6 | "properties": { 7 | "company_name": { 8 | "type": "string", 9 | "minLength": 1 10 | }, 11 | "con_date": { 12 | "type": "string", 13 | "format": "date", 14 | "description": "The end (conversion) date of the name" 15 | }, 16 | "start_date": { 17 | "type": "string", 18 | "format": "date" 19 | } 20 | }, 21 | "required": [ 22 | "company_name" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /schemas/includes/range.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "This represents a range of numeric values, particularly useful for where it is not clear of the exact numeric value, only that it is between two bounds, e.g. a shareholding percentage is greater than 50 but less than or equal to 75", 4 | "type": "object", 5 | "properties": { 6 | "minimum": { 7 | "type": "number", 8 | "description": "The minimum value" 9 | }, 10 | "maximum": { 11 | "type": "number", 12 | "description": "The maximum value" 13 | }, 14 | "exclusive_minimum": { 15 | "type": "boolean", 16 | "description": "True if the the minimum value is not included in the range, i.e. x > minumum (not x >= minumum)" 17 | }, 18 | "exclusive_maximum": { 19 | "type": "boolean", 20 | "description": "True if the the maximum value is not included in the range, i.e. x < maximum (not x <= maximum)" 21 | } 22 | }, 23 | "additionalProperties": false 24 | } 25 | -------------------------------------------------------------------------------- /schemas/includes/sanction.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "oneOf": [ 4 | { 5 | "type": [ 6 | "string", 7 | "null" 8 | ], 9 | "minLength": 2 10 | }, 11 | { 12 | "name": "sanction", 13 | "description": "A sanction issued by a government or regulatory body to an entity to prevent it operating (e.g. disqualified director) or ban others from dealing with it (e.g. a OFAC sanctioned entity).", 14 | "type": "object", 15 | "properties": { 16 | "sanction_type": { 17 | "enum": [ 18 | "disqualification", 19 | "sanctions_listing", 20 | "debarment" 21 | ], 22 | "description": "types of sanction - one of 'disqualification', 'sanctions_list', 'debarment'" 23 | }, 24 | "restrictions": { 25 | "type": "array", 26 | "description": "conditions or restrictions on the sanctions", 27 | "items": { 28 | "type": "string" 29 | } 30 | }, 31 | "cause": { 32 | "type": "array", 33 | "description": "reasons for the sanction being applied", 34 | "items": { 35 | "type": "string" 36 | } 37 | }, 38 | "legal_basis": { 39 | "type": [ 40 | "array", 41 | "null" 42 | ], 43 | "items": { 44 | "$ref": "legislation.json" 45 | } 46 | }, 47 | "sanction_jurisdictions": { 48 | "description": "list of jurisdictions that this sanction applies to", 49 | "type": "array", 50 | "items": { 51 | "type": "string" 52 | } 53 | }, 54 | "sanction_issuer": { 55 | "oneOf": [ 56 | { 57 | "type": [ 58 | "string", 59 | "null" 60 | ], 61 | "minLength": 2 62 | }, 63 | { 64 | "$ref": "organisation.json" 65 | } 66 | ] 67 | }, 68 | "notes": { 69 | "type": "string" 70 | }, 71 | "other_attributes": { 72 | "type": "object" 73 | } 74 | }, 75 | "required": [ 76 | "sanction_type" 77 | ] 78 | } 79 | ] 80 | } 81 | -------------------------------------------------------------------------------- /schemas/includes/share-parcel-data.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "data_type": { 6 | "enum": [ 7 | "share_parcel" 8 | ] 9 | }, 10 | "properties": { 11 | "type": "object", 12 | "required": [ 13 | "shareholders" 14 | ], 15 | "properties": { 16 | "number_of_shares": { 17 | "description": "Number of shares, if known", 18 | "type": "integer" 19 | }, 20 | "percentage_of_shares": { 21 | "description": "Percentage of shares, if known", 22 | "type": "number", 23 | "maximum": 100, 24 | "minimum": 0 25 | }, 26 | "shareholders": { 27 | "description": "Legal persons who own this share parcel", 28 | "type": "array", 29 | "minItems": 1, 30 | "items": { 31 | "anyOf": [ 32 | { 33 | "type": "object", 34 | "name": "person", 35 | "required": [ 36 | "name" 37 | ], 38 | "properties": { 39 | "name": { 40 | "description": "Name of natural person or company", 41 | "type": "string" 42 | }, 43 | "jurisdiction": { 44 | "description": "Jurisdiction of registration, if company", 45 | "type": "string" 46 | }, 47 | "company_number": { 48 | "description": "Company number, if company and known", 49 | "type": "string" 50 | }, 51 | "identifier": { 52 | "description": "Unique identifier of person", 53 | "type": "string" 54 | }, 55 | "type": { 56 | "description": "Type of person if known (company or natural person)", 57 | "enum": [ 58 | "Company", 59 | "Person" 60 | ] 61 | }, 62 | "address": { 63 | "description": "Address given for owner of parcel", 64 | "type": "string" 65 | }, 66 | "address_country": { 67 | "description": "Country part of owner's address", 68 | "type": "string" 69 | } 70 | } 71 | } 72 | ] 73 | } 74 | } 75 | } 76 | } 77 | }, 78 | "required": [ 79 | "data_type", 80 | "properties" 81 | ] 82 | } 83 | -------------------------------------------------------------------------------- /schemas/includes/subsidiary-relationship-data.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "data_type": { 6 | "enum": [ 7 | "subsidiary_relationship" 8 | ] 9 | }, 10 | "properties": { 11 | "type": "object", 12 | "required": [ 13 | "subsidiary" 14 | ], 15 | "additionalProperties": false, 16 | "properties": { 17 | "direct": { 18 | "description": "If the control is direct (if via an intermediary, this value should be false; if unknown, left blank)", 19 | "type": "boolean" 20 | }, 21 | "percentage_controlled": { 22 | "description": "Percentage controlled, either directly or indirectly", 23 | "type": "string" 24 | }, 25 | "significant": { 26 | "description": "Does the source define the control as somehow significant?", 27 | "type": "boolean" 28 | }, 29 | "subsidiary": { 30 | "description": "Company that is controlled", 31 | "type": "object", 32 | "required": [ 33 | "name" 34 | ], 35 | "additionalProperties": false, 36 | "properties": { 37 | "name": { 38 | "description": "Name of company", 39 | "type": "string" 40 | }, 41 | "jurisdiction": { 42 | "description": "Jurisdiction of registration", 43 | "type": "string" 44 | }, 45 | "company_number": { 46 | "description": "Company number, if company and known", 47 | "type": "string" 48 | }, 49 | "identifier": { 50 | "description": "Unique identifier of company", 51 | "type": "string" 52 | } 53 | } 54 | } 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /schemas/includes/total-shares.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "The total number of shares a company has issued", 4 | "type": "object", 5 | "properties": { 6 | "number": { 7 | "type": "integer" 8 | }, 9 | "share_class": { 10 | "type": "string", 11 | "minLength": 1 12 | } 13 | }, 14 | "additionalProperties": false, 15 | "required": [ 16 | "number" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /schemas/includes/unknown-entity-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "An entity of unknown type - potentially a company, a person, government entity, or some unincorporated organisation", 4 | "additionalProperties": false, 5 | "type": "object", 6 | "properties": { 7 | "name": { 8 | "type": "string", 9 | "description": "Name of the entity", 10 | "minLength": 1 11 | }, 12 | "jurisdiction": { 13 | "type": "string", 14 | "description": "Name of the jurisdiction in which the entity is incorporated/domiciled" 15 | }, 16 | "uid": { 17 | "description": "Unique id for the entity if it has one", 18 | "type": "string" 19 | }, 20 | "website": { 21 | "oneOf": [ 22 | { 23 | "type": "string", 24 | "minLength": 5 25 | }, 26 | { 27 | "type": [ 28 | "array", 29 | "null" 30 | ], 31 | "items": { 32 | "type": "string", 33 | "minLength": 5 34 | } 35 | } 36 | ] 37 | }, 38 | "telephone_number": { 39 | "type": "string", 40 | "minLength": 4 41 | }, 42 | "fax_number": { 43 | "type": "string", 44 | "minLength": 4 45 | }, 46 | "registered_address": { 47 | "$ref": "address.json" 48 | }, 49 | "headquarters_address": { 50 | "$ref": "address.json" 51 | }, 52 | "mailing_address": { 53 | "$ref": "address.json" 54 | }, 55 | "addresses": { 56 | "type": "array", 57 | "items": { 58 | "$ref": "address-with-type.json" 59 | } 60 | }, 61 | "identifiers": { 62 | "type": [ 63 | "array", 64 | "null" 65 | ], 66 | "items": { 67 | "$ref": "identifier.json" 68 | } 69 | }, 70 | "industry_codes": { 71 | "type": "array", 72 | "items": { 73 | "$ref": "industry-code.json" 74 | } 75 | }, 76 | "previous_names": { 77 | "type": "array", 78 | "items": { 79 | "$ref": "previous-name.json" 80 | } 81 | }, 82 | "alternative_names": { 83 | "type": "array", 84 | "items": { 85 | "$ref": "alternative-name.json" 86 | } 87 | }, 88 | "other_attributes": { 89 | "description": "Use for other attributes for which we don't yet have curated schema attributes", 90 | "type": "object" 91 | } 92 | }, 93 | "required": [ 94 | "name" 95 | ] 96 | } 97 | -------------------------------------------------------------------------------- /schemas/primary-data-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "source_url": { 6 | "description": "Place where this fact can be verified", 7 | "type": "string" 8 | }, 9 | "sample_date": { 10 | "description": "Date on which this fact was known to be true", 11 | "type": "string", 12 | "format": "date" 13 | } 14 | }, 15 | "required": [ 16 | "source_url", 17 | "sample_date" 18 | ], 19 | "additionalProperties": true 20 | } 21 | -------------------------------------------------------------------------------- /schemas/share-parcel-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "allOf": [ 5 | { 6 | "$ref": "includes/base-statement.json" 7 | }, 8 | { 9 | "properties": { 10 | "data": { 11 | "items": { 12 | "allOf": [ 13 | { 14 | "$ref": "includes/share-parcel-data.json" 15 | } 16 | ] 17 | } 18 | } 19 | } 20 | } 21 | ] 22 | } 23 | -------------------------------------------------------------------------------- /schemas/simple-licence-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "source_url": { 6 | "description": "Place where this fact can be verified", 7 | "type": "string", 8 | "minLength": 1 9 | }, 10 | "sample_date": { 11 | "description": "Date on which this fact was known to be true", 12 | "type": "string", 13 | "format": "date" 14 | }, 15 | "start_date": { 16 | "type": "string", 17 | "format": "date" 18 | }, 19 | "end_date": { 20 | "type": "string", 21 | "format": "date" 22 | }, 23 | "confidence": { 24 | "description": "Confidence in accuracy of data", 25 | "type": "string", 26 | "enum": [ 27 | "HIGH", 28 | "MEDIUM", 29 | "LOW" 30 | ] 31 | }, 32 | "company_name": { 33 | "description": "Name of the company holding the licence", 34 | "type": "string", 35 | "minLength": 1 36 | }, 37 | "company_jurisdiction": { 38 | "description": "Jurisdiction where company is based", 39 | "type": "string", 40 | "minLength": 1 41 | }, 42 | "licence_number": { 43 | "description": "Licence number or code", 44 | "type": "string" 45 | }, 46 | "jurisdiction_classification": { 47 | "description": "Description of how regulator classifies licence", 48 | "type": [ 49 | "string", 50 | "array" 51 | ] 52 | }, 53 | "regulator": { 54 | "description": "The regulating body that issued the licence", 55 | "type": "string" 56 | }, 57 | "licence_jurisdiction": { 58 | "description": "Jurisdiction for which licence is issued", 59 | "type": "string", 60 | "minLength": 1 61 | }, 62 | "status": { 63 | "description": "Status of the licence", 64 | "type": "string" 65 | }, 66 | "retrieved_at": { 67 | "type": "string", 68 | "format": "date" 69 | }, 70 | "category": { 71 | "description": "Category of licence", 72 | "type": "string", 73 | "enum": [ 74 | "Financial", 75 | "Business" 76 | ] 77 | } 78 | }, 79 | "additionalProperties": false, 80 | "required": [ 81 | "source_url", 82 | "sample_date", 83 | "company_name", 84 | "company_jurisdiction" 85 | ] 86 | } 87 | -------------------------------------------------------------------------------- /schemas/simple-subsidiary-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "source_url": { 6 | "description": "Place where this fact can be verified", 7 | "type": "string", 8 | "minLength": 1 9 | }, 10 | "sample_date": { 11 | "description": "Date on which this fact was known to be true", 12 | "type": "string", 13 | "format": "date" 14 | }, 15 | "start_date": { 16 | "description": "Earliest known date this was known to be a subsidiary", 17 | "type": "string", 18 | "format": "date" 19 | }, 20 | "end_date": { 21 | "description": "Latest known date this was known to be a subsidiary", 22 | "type": "string", 23 | "format": "date" 24 | }, 25 | "confidence": { 26 | "description": "Confidence in accuracy of data", 27 | "type": "string", 28 | "enum": [ 29 | "HIGH", 30 | "MEDIUM", 31 | "LOW" 32 | ] 33 | }, 34 | "retrieved_at": { 35 | "type": "string", 36 | "format": "date" 37 | }, 38 | "parent_name": { 39 | "description": "Name of the controlling company", 40 | "type": "string", 41 | "minLength": 1 42 | }, 43 | "parent_jurisdiction": { 44 | "description": "Jurisdiction where controlling company is based", 45 | "type": "string", 46 | "minLength": 1 47 | }, 48 | "parent_identifier": { 49 | "description": "Any unique ID for the controlling company", 50 | "type": "string" 51 | }, 52 | "direct": { 53 | "description": "Is the control relationship direct or indirect (if unknown, leave blank)?", 54 | "type": "boolean" 55 | }, 56 | "percentage_controlled": { 57 | "description": "Percentage of the subsidiary that is controlled (if known), either directly or indirectly", 58 | "type": "string", 59 | "pattern": "^[0-9]{1,2}0?[.]?[0-9]{0,2}$" 60 | }, 61 | "subsidiary_name": { 62 | "description": "The name of the subsidiary", 63 | "type": "string", 64 | "minLength": 1 65 | }, 66 | "subsidiary_jurisdiction": { 67 | "description": "Jurisdiction of the subsidiary", 68 | "type": "string", 69 | "minLength": 1 70 | }, 71 | "subsidiary_identifier": { 72 | "description": "Any unique id for the subsidiary that might be provided in the source", 73 | "type": "string" 74 | } 75 | }, 76 | "other_attributes": { 77 | "description": "Use for other attributes for which we don't yet have curated schema attributes", 78 | "type": "object" 79 | }, 80 | "additionalProperties": false, 81 | "required": [ 82 | "source_url", 83 | "sample_date", 84 | "parent_name", 85 | "parent_jurisdiction", 86 | "subsidiary_name", 87 | "subsidiary_jurisdiction" 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /schemas/subsequent-registration-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "A representation of entity registration changing over time", 4 | "type": "object", 5 | "properties": { 6 | "data_type": { 7 | "enum": [ 8 | "subsequent-registration" 9 | ] 10 | }, 11 | "previous_entity": { 12 | "description": "the previous entity", 13 | "$ref": "includes/entity.json" 14 | }, 15 | "subsequent_entity": { 16 | "description": "the subsequent entity", 17 | "$ref": "includes/entity.json" 18 | }, 19 | "subsequent_registration_start_date": { 20 | "description": "date when subsequent registration started", 21 | "type": "string", 22 | "format": "date" 23 | }, 24 | "previous_registration_end_date": { 25 | "description": "date when previous registration ended", 26 | "type": "string", 27 | "format": "date" 28 | }, 29 | "publication_date": { 30 | "description": "the publication date of the filing/notice that gives details of the alternate registration", 31 | "type": "string", 32 | "format": "date" 33 | }, 34 | "start_date": { 35 | "description": "date when subsequent registration was valid from", 36 | "type": "string", 37 | "format": "date" 38 | }, 39 | "start_date_type": { 40 | "enum": [ 41 | "at", 42 | "before", 43 | "after" 44 | ] 45 | }, 46 | "sample_date": { 47 | "description": "date when subsequent registration was sampled", 48 | "type": "string", 49 | "format": "date" 50 | }, 51 | "retrieved_at": { 52 | "description": "date when subsequent registration was retrieved", 53 | "type": "string", 54 | "format": "date" 55 | }, 56 | "source_url": { 57 | "description": "URL of the source of the data (e.g. download URL), or if there is not persistent URL the page from which it can be found (e.g. search page)", 58 | "type": "string" 59 | }, 60 | "confidence": { 61 | "description": "Confidence in accuracy of data", 62 | "enum": [ 63 | "HIGH", 64 | "MEDIUM", 65 | "LOW" 66 | ] 67 | } 68 | }, 69 | "additionalProperties": false, 70 | "required": [ 71 | "data_type", 72 | "previous_entity", 73 | "subsequent_entity", 74 | "retrieved_at", 75 | "confidence" 76 | ], 77 | "anyOf": [ 78 | { 79 | "required": [ 80 | "start_date" 81 | ] 82 | }, 83 | { 84 | "required": [ 85 | "sample_date" 86 | ] 87 | } 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /schemas/subsidiary-relationship-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "description": "A relationship of control between two companies", 4 | "type": "object", 5 | "properties": { 6 | "sample_date": { 7 | "type": "string", 8 | "format": "date" 9 | }, 10 | "start_date": { 11 | "type": "string", 12 | "format": "date" 13 | }, 14 | "start_date_type": { 15 | "type": "string" 16 | }, 17 | "end_date": { 18 | "type": "string", 19 | "format": "date" 20 | }, 21 | "end_date_type": { 22 | "type": "string" 23 | }, 24 | "retrieved_at": { 25 | "type": "string", 26 | "format": "date" 27 | }, 28 | "source_jurisdiction": { 29 | "description": "Jurisdiction of the source of the data", 30 | "type": "string" 31 | }, 32 | "company": { 33 | "$ref": "includes/company.json" 34 | }, 35 | "data": { 36 | "type": "array", 37 | "description": "This is an array of data objects, that is the objects which actually contain the data about the datum. Generally there will only be one element in this, although in for some types of data_types there may naturally be several releated to the same company, e.g. shareholders", 38 | "items": { 39 | "$ref": "includes/subsidiary-relationship-data.json" 40 | }, 41 | "additionalItems": false 42 | } 43 | }, 44 | "additionalProperties": false, 45 | "required": [ 46 | "company", 47 | "data", 48 | "sample_date" 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /schemas/supplier-relationship-schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "type": "object", 4 | "properties": { 5 | "data_type": { 6 | "enum": [ 7 | "supplier-relationship" 8 | ] 9 | }, 10 | "customer": { 11 | "$ref": "includes/entity.json" 12 | }, 13 | "supplier": { 14 | "$ref": "includes/entity.json" 15 | }, 16 | "start_date": { 17 | "type": "string", 18 | "format": "date" 19 | }, 20 | "start_date_type": { 21 | "enum": [ 22 | "at", 23 | "before", 24 | "after" 25 | ] 26 | }, 27 | "end_date": { 28 | "type": "string", 29 | "format": "date" 30 | }, 31 | "end_date_type": { 32 | "enum": [ 33 | "at", 34 | "before", 35 | "after" 36 | ] 37 | }, 38 | "sample_date": { 39 | "type": "string", 40 | "format": "date" 41 | }, 42 | "retrieved_at": { 43 | "type": "string", 44 | "format": "date" 45 | }, 46 | "source_url": { 47 | "type": "string" 48 | }, 49 | "confidence": { 50 | "enum": [ 51 | "HIGH", 52 | "MEDIUM", 53 | "LOW" 54 | ] 55 | } 56 | }, 57 | "additionalProperties": false, 58 | "required": [ 59 | "data_type", 60 | "supplier", 61 | "customer", 62 | "retrieved_at", 63 | "confidence" 64 | ], 65 | "anyOf": [ 66 | { 67 | "required": [ 68 | "start_date" 69 | ] 70 | }, 71 | { 72 | "required": [ 73 | "sample_date" 74 | ] 75 | }, 76 | { 77 | "required": [ 78 | "end_date" 79 | ] 80 | } 81 | ] 82 | } 83 | -------------------------------------------------------------------------------- /spec/additional-sample-data/valid/gazette-notice_fr-bodacc-bilan-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "date_published": "2015-01-05", 3 | "issue": { 4 | "publication": { 5 | "publisher": { 6 | "name": "Direction de l'information légale et administrative", 7 | "url": "http://www.dila.premier-ministre.gouv.fr/", 8 | "media_type": "text/html" 9 | }, 10 | "jurisdiction_code": "fr", 11 | "title": "Bulletin officiel des annonces civiles et commerciales", 12 | "url": "http://www.bodacc.fr/", 13 | "media_type": "text/html" 14 | }, 15 | "identifier": "20150001", 16 | "edition_id": "C" 17 | }, 18 | "source_url": "ftp://echanges.dila.gouv.fr/BODACC/BODACC_2015.tar", 19 | "sample_date": "2016-01-21T19:41:22Z", 20 | "retrieved_at": "2016-01-21T19:41:22Z", 21 | "confidence": "HIGH", 22 | "other_attributes": { 23 | "format": "BILAN" 24 | }, 25 | "publisher": { 26 | "name": "GREFFE DU TRIBUNAL D'INSTANCE DE SARREGUEMINES", 27 | "identifier": "57" 28 | }, 29 | "identifier": 32, 30 | "uid": "BDC15000100148X", 31 | "url": "http://www.bodacc.fr/annonce/detail/BDC15000100148X", 32 | "media_type": "text/html", 33 | "subjects": [ 34 | { 35 | "entity_type": "company", 36 | "entity_properties": { 37 | "jurisdiction_code": "fr", 38 | "company_number": "383 031 705", 39 | "name": "SAMH 57", 40 | "company_type": "S.A.R.L.", 41 | "registered_address": { 42 | "street_address": "1, rue de la Forêt", 43 | "locality": "Forbach", 44 | "postal_code": "57600", 45 | "country": "France", 46 | "country_code": "FR" 47 | } 48 | } 49 | } 50 | ], 51 | "about": { 52 | "type": "filing", 53 | "classification": [ 54 | { 55 | "code_scheme_id": "fr_bodacc_typeDepot", 56 | "code": "Comptes annuels et rapports" 57 | } 58 | ], 59 | "closing_date": "2013-12-31", 60 | "body": { 61 | "value": "Les comptes annuels sont accompagnés d'une déclaration de confidentialité en application du premier alinéa de l'article L. 232-25.", 62 | "media_type": "text/plain" 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /spec/additional-sample-data/valid/gazette-notice_fr-bodacc-div-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "date_published": "2015-01-28", 3 | "issue": { 4 | "publication": { 5 | "publisher": { 6 | "name": "Direction de l'information légale et administrative", 7 | "url": "http://www.dila.premier-ministre.gouv.fr/", 8 | "media_type": "text/html" 9 | }, 10 | "jurisdiction_code": "fr", 11 | "title": "Bulletin officiel des annonces civiles et commerciales", 12 | "url": "http://www.bodacc.fr/", 13 | "media_type": "text/html" 14 | }, 15 | "identifier": "201501280019", 16 | "edition_id": "A" 17 | }, 18 | "source_url": "ftp://echanges.dila.gouv.fr/BODACC/BODACC_2015.tar", 19 | "sample_date": "2016-01-21T19:48:28Z", 20 | "retrieved_at": "2016-01-21T19:48:28Z", 21 | "confidence": "HIGH", 22 | "other_attributes": { 23 | "format": "DIV" 24 | }, 25 | "identifier": 1458, 26 | "uid": "BXA156666801008", 27 | "url": "http://www.bodacc.fr/annonce/detail/BXA156666801008", 28 | "media_type": "text/html", 29 | "about": { 30 | "type": "other", 31 | "body": { 32 | "value": "Le 13 novembre 2014, le Haut Conseil du commissariat aux comptes a prononcé à l'encontre de la société KAUFMANN & Associés, dont le siège est 8 avenue Bertie Albrecht à PARIS 75008, la sanction disciplinaire de l'interdiction d'exercer la profession de commissaire aux comptes pour une durée de SIX MOIS. ", 33 | "media_type": "text/plain" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /spec/additional-sample-data/valid/gazette-notice_fr-bodacc-pcl-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "date_published": "2015-01-02", 3 | "issue": { 4 | "publication": { 5 | "publisher": { 6 | "name": "Direction de l'information légale et administrative", 7 | "url": "http://www.dila.premier-ministre.gouv.fr/", 8 | "media_type": "text/html" 9 | }, 10 | "jurisdiction_code": "fr", 11 | "title": "Bulletin officiel des annonces civiles et commerciales", 12 | "url": "http://www.bodacc.fr/", 13 | "media_type": "text/html" 14 | }, 15 | "identifier": "20150001", 16 | "edition_id": "A" 17 | }, 18 | "source_url": "ftp://echanges.dila.gouv.fr/BODACC/BODACC_2015.tar", 19 | "sample_date": "2016-01-13T01:26:14Z", 20 | "retrieved_at": "2016-01-13T01:26:14Z", 21 | "confidence": "HIGH", 22 | "other_attributes": { 23 | "format": "PCL", 24 | "client_identifier": "0102224174" 25 | }, 26 | "publisher": { 27 | "name": "TRIBUNAL DE COMMERCE DE BOURG-EN-BRESSE", 28 | "identifier": "01" 29 | }, 30 | "identifier": 1396, 31 | "uid": "BXA14358000109S", 32 | "url": "http://www.bodacc.fr/annonce/detail/BXA14358000109S", 33 | "media_type": "text/html", 34 | "about": { 35 | "type": "judgment", 36 | "classification": [ 37 | { 38 | "code_scheme_id": "fr_bodacc_famille", 39 | "code": "Jugement d'ouverture" 40 | }, 41 | { 42 | "code_scheme_id": "fr_bodacc_nature", 43 | "code": "Jugement d'ouverture d'une procédure de redressement judiciaire" 44 | } 45 | ], 46 | "date": "2014-12-17", 47 | "body": { 48 | "value": "Jugement prononçant l'ouverture d'une procédure de redressement judiciaire, désignant mandataire judiciaire SELARL MJ SYNERGIE, représentée par Mes Belat et Desprat 22, rue du Cordier - BP 107 - 01003 Bourg-en-Bresse . Les déclarations des créances sont à déposer au mandataire judiciaire dans les deux mois à compter de la présente publication.", 49 | "media_type": "text/plain" 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /spec/additional-sample-data/valid/gazette-notice_fr-bodacc-rcs-a-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "date_published": "2015-01-02", 3 | "issue": { 4 | "publication": { 5 | "publisher": { 6 | "name": "Direction de l'information légale et administrative", 7 | "url": "http://www.dila.premier-ministre.gouv.fr/", 8 | "media_type": "text/html" 9 | }, 10 | "jurisdiction_code": "fr", 11 | "title": "Bulletin officiel des annonces civiles et commerciales", 12 | "url": "http://www.bodacc.fr/", 13 | "media_type": "text/html" 14 | }, 15 | "identifier": "20150001", 16 | "edition_id": "A" 17 | }, 18 | "source_url": "ftp://echanges.dila.gouv.fr/BODACC/BODACC_2015.tar", 19 | "sample_date": "2016-01-13T01:26:23Z", 20 | "retrieved_at": "2016-01-13T01:26:23Z", 21 | "confidence": "HIGH", 22 | "other_attributes": { 23 | "format": "RCS-A" 24 | }, 25 | "publisher": { 26 | "name": "GREFFE DU TRIBUNAL DE COMMERCE DE SAINT-QUENTIN", 27 | "identifier": "02" 28 | }, 29 | "identifier": 1, 30 | "uid": "BXA14358001500V", 31 | "url": "http://www.bodacc.fr/annonce/detail/BXA14358001500V", 32 | "media_type": "text/html", 33 | "subjects": [ 34 | { 35 | "entity_type": "company", 36 | "entity_properties": { 37 | "jurisdiction_code": "fr", 38 | "company_number": "808433569", 39 | "name": "DE LA PLACE D'ARDON", 40 | "company_type": "Société civile immobilière", 41 | "registered_address": { 42 | "street_address": "24 rue de Paris", 43 | "locality": "Etouvelles", 44 | "postal_code": "02000", 45 | "country": "France", 46 | "country_code": "FR" 47 | } 48 | } 49 | } 50 | ], 51 | "about": { 52 | "type": "creation of subjects", 53 | "registration_date": "2014-12-16", 54 | "activity_start_date": "2014-12-01", 55 | "classification": [ 56 | { 57 | "code_scheme_id": "fr_bodacc_categorie", 58 | "code": "Immatriculation d'une personne morale (B, C, D) suite à création d'un établissement principal" 59 | } 60 | ], 61 | "locations": [ 62 | { 63 | "activity": "Acquisition, administration et exploitation par bail, location, sous-location ou autrement de tous immeubles bâtis ou non bâtis, biens immobiliers ou droits immobiliers dont la société pourrait devenir propriétaire ; l'emprunt de tous fonds nécessaires à la réalisation de cet objet...", 64 | "address": { 65 | "street_address": "24 rue de Paris", 66 | "locality": "Etouvelles", 67 | "postal_code": "02000", 68 | "country": "France", 69 | "country_code": "FR" 70 | }, 71 | "origin": "Création", 72 | "type": "primary" 73 | } 74 | ] 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /spec/additional-sample-data/valid/gazette-notice_fr-bodacc-rcs-a-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "date_published": "2015-01-02", 3 | "issue": { 4 | "publication": { 5 | "publisher": { 6 | "name": "Direction de l'information légale et administrative", 7 | "url": "http://www.dila.premier-ministre.gouv.fr/", 8 | "media_type": "text/html" 9 | }, 10 | "jurisdiction_code": "fr", 11 | "title": "Bulletin officiel des annonces civiles et commerciales", 12 | "url": "http://www.bodacc.fr/", 13 | "media_type": "text/html" 14 | }, 15 | "identifier": "20150001", 16 | "edition_id": "A" 17 | }, 18 | "source_url": "ftp://echanges.dila.gouv.fr/BODACC/BODACC_2015.tar", 19 | "sample_date": "2016-01-13T01:26:23Z", 20 | "retrieved_at": "2016-01-13T01:26:23Z", 21 | "confidence": "HIGH", 22 | "other_attributes": { 23 | "format": "RCS-A" 24 | }, 25 | "publisher": { 26 | "name": "GREFFE DU TRIBUNAL DE COMMERCE DE SAINT-QUENTIN", 27 | "identifier": "02" 28 | }, 29 | "identifier": 2, 30 | "uid": "BXA14358001501X", 31 | "url": "http://www.bodacc.fr/annonce/detail/BXA14358001501X", 32 | "media_type": "text/html", 33 | "subjects": [ 34 | { 35 | "entity_type": "person", 36 | "entity_properties": { 37 | "name": { 38 | "family_name": "BRUGNON", 39 | "given_name": "Dimitri Gérard Bernard", 40 | "birth_name": "BRUGNON" 41 | } 42 | } 43 | } 44 | ], 45 | "about": { 46 | "type": "registration of locations", 47 | "registration_date": "2014-12-16", 48 | "activity_start_date": "2014-12-01", 49 | "effective_date": "2014-12-01", 50 | "classification": [ 51 | { 52 | "code_scheme_id": "fr_bodacc_categorie", 53 | "code": "\nImmatriculation d'une personne physique, établissement principal reçu en location-gérance" 54 | } 55 | ], 56 | "locations": [ 57 | { 58 | "activity": "Boulangerie, pâtisserie.", 59 | "address": { 60 | "street_address": "7 rue Jules Vercruysse", 61 | "locality": "Gauchy", 62 | "postal_code": "02430", 63 | "country": "France", 64 | "country_code": "FR" 65 | }, 66 | "origin": "Location-gérance", 67 | "type": "primary" 68 | } 69 | ], 70 | "previous_operators": [ 71 | { 72 | "entity_type": "company", 73 | "entity_properties": { 74 | "name": "AROMES & DELICES" 75 | } 76 | } 77 | ] 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /spec/additional-sample-data/valid/gazette-notice_fr-bodacc-rcs-a-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "date_published": "2015-01-02", 3 | "issue": { 4 | "publication": { 5 | "publisher": { 6 | "name": "Direction de l'information légale et administrative", 7 | "url": "http://www.dila.premier-ministre.gouv.fr/", 8 | "media_type": "text/html" 9 | }, 10 | "jurisdiction_code": "fr", 11 | "title": "Bulletin officiel des annonces civiles et commerciales", 12 | "url": "http://www.bodacc.fr/", 13 | "media_type": "text/html" 14 | }, 15 | "identifier": "20150001", 16 | "edition_id": "A" 17 | }, 18 | "source_url": "ftp://echanges.dila.gouv.fr/BODACC/BODACC_2015.tar", 19 | "sample_date": "2016-01-13T01:26:23Z", 20 | "retrieved_at": "2016-01-13T01:26:23Z", 21 | "confidence": "HIGH", 22 | "other_attributes": { 23 | "format": "RCS-A" 24 | }, 25 | "publisher": { 26 | "name": "GREFFE DU TRIBUNAL DE COMMERCE DE MANOSQUE", 27 | "identifier": "04" 28 | }, 29 | "identifier": 3, 30 | "uid": "BXA143580002620", 31 | "url": "http://www.bodacc.fr/annonce/detail/BXA143580002620", 32 | "media_type": "text/html", 33 | "subjects": [ 34 | { 35 | "entity_type": "person", 36 | "entity_properties": { 37 | "name": { 38 | "family_name": "PHAN", 39 | "given_name": "Van, Buu", 40 | "birth_name": "PHAN" 41 | }, 42 | "alternative_names": [ 43 | { 44 | "company_name": "DRAGON D'OR WOK", 45 | "type": "trading" 46 | } 47 | ] 48 | } 49 | }, 50 | { 51 | "entity_type": "person", 52 | "entity_properties": { 53 | "name": { 54 | "family_name": "PHAN", 55 | "given_name": "Thi, Phuong", 56 | "birth_name": "TRAN" 57 | } 58 | } 59 | } 60 | ], 61 | "about": { 62 | "type": "sale of locations", 63 | "activity_start_date": "2014-12-15", 64 | "classification": [ 65 | { 66 | "code_scheme_id": "fr_bodacc_categorie", 67 | "code": "Achat d'un fonds par une personne physique (insertion provisoire)" 68 | } 69 | ], 70 | "publication": { 71 | "title": "Haute Provence Info", 72 | "date_published": "2014-12-26" 73 | }, 74 | "opposition": "Me MÖLLER Stéphane -23, place du Terreau - 04100 Manosque", 75 | "locations": [ 76 | { 77 | "activity": "Restaurant de type traditionnel, asiatique, plats à emporter", 78 | "address": { 79 | "street_address": "quartier St Christophe rue Gutenberg", 80 | "locality": "Digne-les-Bains", 81 | "postal_code": "04000", 82 | "country": "France", 83 | "country_code": "FR" 84 | }, 85 | "origin": "Fonds acquis par achat au prix stipulé de 40000 Euros.", 86 | "type": "primary" 87 | } 88 | ], 89 | "previous_owners": [ 90 | { 91 | "entity_type": "company", 92 | "entity_properties": { 93 | "jurisdiction_code": "fr", 94 | "company_number": "799282744", 95 | "name": "DRAGON D'OR WOK" 96 | } 97 | } 98 | ] 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /spec/additional-sample-data/valid/gazette-notice_fr-bodacc-rcs-b-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "date_published": "2015-01-02", 3 | "issue": { 4 | "publication": { 5 | "publisher": { 6 | "name": "Direction de l'information légale et administrative", 7 | "url": "http://www.dila.premier-ministre.gouv.fr/", 8 | "media_type": "text/html" 9 | }, 10 | "jurisdiction_code": "fr", 11 | "title": "Bulletin officiel des annonces civiles et commerciales", 12 | "url": "http://www.bodacc.fr/", 13 | "media_type": "text/html" 14 | }, 15 | "identifier": "20150001", 16 | "edition_id": "B" 17 | }, 18 | "source_url": "ftp://echanges.dila.gouv.fr/BODACC/BODACC_2015.tar", 19 | "sample_date": "2016-01-12T21:52:11Z", 20 | "retrieved_at": "2016-01-12T21:52:11Z", 21 | "confidence": "HIGH", 22 | "other_attributes": { 23 | "format": "RCS-B" 24 | }, 25 | "publisher": { 26 | "name": "GREFFE DU TRIBUNAL DE COMMERCE DE PARIS", 27 | "identifier": "75" 28 | }, 29 | "identifier": 1924, 30 | "uid": "BXB143580021356", 31 | "url": "http://www.bodacc.fr/annonce/detail/BXB143580021356", 32 | "media_type": "text/html", 33 | "subjects": [ 34 | { 35 | "entity_type": "company", 36 | "entity_properties": { 37 | "jurisdiction_code": "fr", 38 | "company_number": "528687114", 39 | "name": "LE BRAZZA 17EME", 40 | "company_type": "Société en nom collectif", 41 | "headquarters_address": { 42 | "street_address": "53 rue de Tocqueville", 43 | "locality": "Paris", 44 | "postal_code": "75017", 45 | "country": "France", 46 | "country_code": "FR" 47 | }, 48 | "mailing_address": { 49 | "street_address": "53 rue de Tocqueville", 50 | "locality": "Paris", 51 | "postal_code": "75017", 52 | "country": "France", 53 | "country_code": "FR" 54 | } 55 | } 56 | } 57 | ], 58 | "about": { 59 | "type": "modification of subjects", 60 | "body": { 61 | "value": "Cessation d'activité et dissolution de la société", 62 | "media_type": "text/plain" 63 | }, 64 | "activity_start_date": "2011-01-01", 65 | "effective_date": "2014-12-01" 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /spec/additional-sample-data/valid/gazette-notice_fr-bodacc-rcs-b-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "date_published": "2015-02-05", 3 | "issue": { 4 | "publication": { 5 | "publisher": { 6 | "name": "Direction de l'information légale et administrative", 7 | "url": "http://www.dila.premier-ministre.gouv.fr/", 8 | "media_type": "text/html" 9 | }, 10 | "jurisdiction_code": "fr", 11 | "title": "Bulletin officiel des annonces civiles et commerciales", 12 | "url": "http://www.bodacc.fr/", 13 | "media_type": "text/html" 14 | }, 15 | "identifier": "20150025", 16 | "edition_id": "B" 17 | }, 18 | "source_url": "ftp://echanges.dila.gouv.fr/BODACC/BODACC_2015.tar", 19 | "sample_date": "2016-01-12T21:52:11Z", 20 | "retrieved_at": "2016-01-12T21:52:11Z", 21 | "confidence": "HIGH", 22 | "other_attributes": { 23 | "format": "RCS-B" 24 | }, 25 | "publisher": { 26 | "name": "GREFFE DU TRIBUNAL D'INSTANCE DE THIONVILLE", 27 | "identifier": "57" 28 | }, 29 | "identifier": 660, 30 | "uid": "BXB15033000184A", 31 | "url": "http://www.bodacc.fr/annonce/detail/BXB15033000184A", 32 | "media_type": "text/html", 33 | "subjects": [ 34 | { 35 | "entity_type": "person", 36 | "entity_properties": { 37 | "name": { 38 | "family_name": "BEGEL", 39 | "given_name": "David, Jean, Marie, André", 40 | "birth_name": "BEGEL" 41 | }, 42 | "registered_address": { 43 | "street_address": "Zac Bellevue 4", 44 | "locality": "Guénange", 45 | "postal_code": "57310", 46 | "country": "France", 47 | "country_code": "FR" 48 | } 49 | } 50 | } 51 | ], 52 | "about": { 53 | "type": "striking off of subjects", 54 | "activity_end_date": "2014-10-31", 55 | "body": { 56 | "value": "cessation d'activité - vente du fonds de commerce", 57 | "media_type": "text/plain" 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/accounts-statement/any_of_no_matches-filing_subject.entity_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "accounts_date": "2011-03-31", 3 | "accounts_type": null, 4 | "filing_date": "2011-03-31", 5 | "filing_subject": { 6 | "entity_properties": { 7 | "jurisdiction": "gb" 8 | }, 9 | "entity_type": "company" 10 | }, 11 | "confidence": "HIGH", 12 | "current_assets": [ 13 | { 14 | "date": "2011-06-30", 15 | "value": "879765" 16 | }, 17 | { 18 | "date": "2010-06-30", 19 | "value": "889364" 20 | } 21 | ], 22 | "current_liabilities": [ 23 | { 24 | "date": "2011-06-30", 25 | "value": "69241.23" 26 | }, 27 | { 28 | "date": "2010-06-30", 29 | "value": "107064" 30 | } 31 | ], 32 | "fixed_assets": [ 33 | { 34 | "date": "2011-06-30", 35 | "value": "4427" 36 | }, 37 | { 38 | "date": "2010-06-30", 39 | "value": "5208" 40 | } 41 | ], 42 | "profit": [ 43 | { 44 | "end_date": "2013-12-31", 45 | "start_date": "2013-01-01", 46 | "value": "141975000" 47 | } 48 | ], 49 | "revenue": [ 50 | { 51 | "date": "2011-03-31", 52 | "value": "596101" 53 | }, 54 | { 55 | "date": "2010-03-31", 56 | "value": "532936" 57 | } 58 | ], 59 | "sample_date": "2011-03-31", 60 | "source_location": "data/ixbrl/accounts_ixbrl/00355927_30-06-11_TOTAL_EXEMPTION_SMALL.html", 61 | "source_url": "http://www.companieshouse.gov.uk/" 62 | } 63 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/accounts-statement/missing-profit.0.value.json: -------------------------------------------------------------------------------- 1 | { 2 | "accounts_date": "2011-03-31", 3 | "accounts_type": null, 4 | "filing_date": "2011-03-31", 5 | "filing_subject": { 6 | "entity_properties": { 7 | "company_number": "01234567", 8 | "jurisdiction": "gb", 9 | "name": "GLB DESIGN GROUP LTD" 10 | }, 11 | "entity_type": "company" 12 | }, 13 | "confidence": "HIGH", 14 | "current_assets": [ 15 | { 16 | "date": "2011-06-30", 17 | "value": "879765" 18 | }, 19 | { 20 | "date": "2010-06-30", 21 | "value": "889364" 22 | } 23 | ], 24 | "current_liabilities": [ 25 | { 26 | "date": "2011-06-30", 27 | "value": "69241.23" 28 | }, 29 | { 30 | "date": "2010-06-30", 31 | "value": "107064" 32 | } 33 | ], 34 | "fixed_assets": [ 35 | { 36 | "date": "2011-06-30", 37 | "value": "4427" 38 | }, 39 | { 40 | "date": "2010-06-30", 41 | "value": "5208" 42 | } 43 | ], 44 | "profit": [ 45 | { 46 | "end_date": "2013-12-31", 47 | "start_date": "2013-01-01" 48 | } 49 | ], 50 | "revenue": [ 51 | { 52 | "date": "2011-03-31", 53 | "value": "596101" 54 | }, 55 | { 56 | "date": "2010-03-31", 57 | "value": "532936" 58 | } 59 | ], 60 | "sample_date": "2011-03-31", 61 | "source_location": "data/ixbrl/accounts_ixbrl/00355927_30-06-11_TOTAL_EXEMPTION_SMALL.html", 62 | "source_url": "http://www.companieshouse.gov.uk/" 63 | } 64 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/alternate-registration/additional-foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "data_type": "alternate-registration", 3 | "alternate_entities": [ 4 | { 5 | "entity_properties": { 6 | "name": "Vorsprung", 7 | "company_number": "R111_HRB123", 8 | "jurisdiction_code": "de" 9 | }, 10 | "entity_type": "company" 11 | }, 12 | { 13 | "entity_properties": { 14 | "name": "Teknik", 15 | "company_number": "R222_HRB999", 16 | "jurisdiction_code": "de" 17 | }, 18 | "entity_type": "company" 19 | } 20 | ], 21 | "source_url": "https://www.foo.com?bar=123", 22 | "retrieved_at": "2018-11-08T12:34:56Z", 23 | "confidence": "HIGH", 24 | "foo": "bar" 25 | } 26 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/alternate-registration/any_of_no_matches-.json: -------------------------------------------------------------------------------- 1 | { 2 | "data_type": "alternate-registration", 3 | "alternate_entities": [ 4 | { 5 | "entity_properties": { 6 | "name": "Vorsprung", 7 | "company_number": "R111_HRB123", 8 | "jurisdiction_code": "de" 9 | }, 10 | "entity_type": "company" 11 | }, 12 | { 13 | "entity_properties": { 14 | "name": "Teknik", 15 | "company_number": "R222_HRB999", 16 | "jurisdiction_code": "de" 17 | }, 18 | "entity_type": "company" 19 | } 20 | ], 21 | "retrieved_at": "2018-11-08T12:34:56Z", 22 | "confidence": "HIGH" 23 | } 24 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/additional-all_attributes.merged_into.name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "merged_into": { 7 | "name": "Foo Inc" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/additional-alternative_names.0.con_date.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc Alternative", 3 | "jurisdiction_code": "us_de", 4 | "company_number": "12345", 5 | "alternative_names": [ 6 | { 7 | "company_name": "Foobar Inc", 8 | "type": "trading", 9 | "con_date": "2020-03-04" 10 | } 11 | ], 12 | "retrieved_at": "2018-03-09T12:34:56Z" 13 | } 14 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/additional-foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "jurisdiction_code": "us_de", 4 | "company_number": "12345", 5 | "foo": "bar" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/additional-officers.0.dob.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | { 7 | "name": "Fred", 8 | "dob": "1980-02-16" 9 | } 10 | ], 11 | "retrieved_at": "2018-03-09T12:34:56Z" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/additional-officers.0.type.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | { 7 | "name": "Fred", 8 | "type": "Company" 9 | } 10 | ], 11 | "retrieved_at": "2018-03-09T12:34:56Z" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/any_of_no_matches-all_attributes.merged_into.surviving_company.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "merged_into": { 7 | "surviving_company": { 8 | "jurisdiction": "Michigan" 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/any_of_no_matches-all_attributes.number_of_employees.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "number_of_employees": "" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/any_of_no_matches-filings.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | { 7 | "uid": "12345", 8 | "date": "2010-11-22" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/enum_mismatch-alternative_names.0.type.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "alternative_names": [ 6 | { 7 | "company_name": "Foobar Inc", 8 | "type": "foobar" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/enum_mismatch-branch.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "branch": "X" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/enum_mismatch-officers.0.other_attributes.type.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | { 7 | "name": "Fred", 8 | "other_attributes": { 9 | "type": "Alien" 10 | } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/format_mismatch-filings.0.date.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | { 7 | "filing_type_name": "Some type", 8 | "date": "Jan 14, 1981 12:00 AM" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/missing-alternative_names.0.type.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "alternative_names": [ 6 | { 7 | "company_name": "Foobar Inc" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/missing-company_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "jurisdiction_code": "ie" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/missing-filings.0.date.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | { 7 | "filing_type_name": "Some type" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/missing-industry_codes.0.code.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "industry_codes": [ 6 | { 7 | "code_scheme_id": "1234" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/missing-industry_codes.0.code_scheme_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "industry_codes": [ 6 | { 7 | "code": "1234" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/missing-officers.0.name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | { 7 | "position": "Director" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/missing-previous_names.0.company_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "previous_names": [ 6 | { 7 | "name": "Baz Inc" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/missing-total_shares.number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "total_shares": { 6 | "share_class": "Ordinary" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/one_of_no_matches-headquarters_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "headquarters_address": "" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/one_of_no_matches-mailing_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "mailing_address": "" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/one_of_no_matches-registered_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "registered_address": [ 6 | 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_long-alternative_names.0.language.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "alternative_names": [ 6 | { 7 | "company_name": "Foobar Inc", 8 | "language": "French" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_long-jurisdiction_code.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "jurisdiction_code": "usa_de", 4 | "company_number": "12345" 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-all_attributes.home_company_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "home_company_number": "" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-all_attributes.home_legal_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "home_legal_name": "" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-all_attributes.jurisdiction_of_origin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "jurisdiction_of_origin": "" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-all_attributes.registered_agent_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "registered_agent_address": "" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-all_attributes.registered_agent_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "registered_agent_name": "" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-alternative_names.0.company_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "alternative_names": [ 6 | { 7 | "company_name": "", 8 | "type": "legal", 9 | "language": "fr" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-company_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Bar", 3 | "jurisdiction_code": "us_de", 4 | "company_number": "" 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-fax_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "fax_number": "0" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-jurisdiction_code.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "jurisdiction_code": "a", 4 | "company_number": "12345" 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "", 3 | "jurisdiction_code": "us_de", 4 | "company_number": "12345" 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-officers.0.name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | { 7 | "name": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-previous_names.0.company_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "previous_names": [ 6 | { 7 | "company_name": "" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-telephone_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "telephone_number": "0" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-total_shares.share_class.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "total_shares": { 6 | "number": 123, 7 | "share_class": "" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/too_short-website.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "website": "" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-all_attributes.home_company_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "home_company_number": 42 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-all_attributes.home_legal_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "home_legal_name": 42 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-all_attributes.jurisdiction_of_origin.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "jurisdiction_of_origin": 43 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-all_attributes.merged_into.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "merged_into": "" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-all_attributes.registered_agent_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "registered_agent_address": 42 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-all_attributes.registered_agent_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "registered_agent_name": 42 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-alternative_names.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "alternative_names": [ 6 | "foo name" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-alternative_names.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "alternative_names": "foo name" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-filings.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | "foo filing" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-filings.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": "foo filing" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-industry_codes.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "industry_codes": [ 6 | "foo filing" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-industry_codes.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "industry_codes": "foo code" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-officers.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | "some body" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-officers.0.other_attributes.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | { 7 | "name": "Fred", 8 | "other_attributes": "non object" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-officers.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": "some body" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-previous_names.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "previous_names": [ 6 | "some name" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-previous_names.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "previous_names": "some name" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-share_parcels.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "share_parcels": [ 6 | "foo filing" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-share_parcels.0.percentage_of_shares.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "share_parcels": [ 6 | { 7 | "percentage_of_shares": "23.5", 8 | "shareholders": [ 9 | { 10 | "name": "" 11 | } 12 | ] 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-share_parcels.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "share_parcels": "foo filing" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/type_mismatch-total_shares.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "total_shares": "foo filing" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/company/unknown-officers.0.name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | { 7 | "name": "..." 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/filing/missing-filing_date.json: -------------------------------------------------------------------------------- 1 | { 2 | "filing_subject": { 3 | "entity_properties": { 4 | "company_number": "01234567", 5 | "jurisdiction": "gb", 6 | "name": "GLB DESIGN GROUP LTD" 7 | }, 8 | "entity_type": "company" 9 | }, 10 | "title": "Annual Report", 11 | "confidence": "HIGH", 12 | "sample_date": "2011-03-31", 13 | "source_url": "http://www.companieshouse.gov.uk/" 14 | } 15 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/filing/missing-filing_subject.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Annual Report", 3 | "confidence": "HIGH", 4 | "filing_date": "2011-03-31", 5 | "sample_date": "2011-03-31", 6 | "source_url": "http://www.companieshouse.gov.uk/" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/financial-payment/missing-data.0.properties.value.json: -------------------------------------------------------------------------------- 1 | { 2 | "company": { 3 | "name": "Some suppplier", 4 | "jurisdiction": "France" 5 | }, 6 | "data": [ 7 | { 8 | "data_type": "financial_payment", 9 | "properties": { 10 | "currency": "GBP", 11 | "transaction_number": "ABC1224", 12 | "reporting_date": "2014-06-01", 13 | "jurisdiction": "gb", 14 | "more_details_url": "http://spendnetwork.com/trans_id/12345", 15 | "description": "some big project", 16 | "payee_name": "Govt Jobs R Us Inc", 17 | "entity_name": "Efficiency Agency", 18 | "department_name": "Department Of Everything", 19 | "date": "2012-10-22" 20 | }, 21 | "source_url": "http://example.com/abc123", 22 | "confidence": "67" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/address-with-type/enum_mismatch-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "foobar", 3 | "address": { 4 | "street_address": "123 Foo Street" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/address-with-type/missing-address.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "unknown" 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/address-with-type/missing-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "address": { 3 | "street_address": "123 Foo Street" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/address/any_of_no_matches-.json: -------------------------------------------------------------------------------- 1 | { 2 | "country": "France" 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/address/type_mismatch-street_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "street_address": [ 3 | "1 Balloon Street", 4 | "Manchester" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/alternative-name/enum_mismatch-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "Foo LTD", 3 | "type": "pseudonum" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/alternative-name/missing-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "Foo LTD" 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/date/any_of_no_matches-.json: -------------------------------------------------------------------------------- 1 | { 2 | "month": 11 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/date/type_mismatch-month.json: -------------------------------------------------------------------------------- 1 | { 2 | "year": 1922, 3 | "month": "February" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/entity/one_of_no_matches-.json: -------------------------------------------------------------------------------- 1 | { 2 | "entity_type": "unknown_entity_type", 3 | "entity_properties": { 4 | "name": "?" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/entity/too_short-entity_properties.name.json: -------------------------------------------------------------------------------- 1 | { 2 | "entity_type": "unknown", 3 | "entity_properties": { 4 | "name": "" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/identifier/missing-identifier_system_code.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid": "549300MWY6KYIGQQH329" 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/identifier/missing-uid.json: -------------------------------------------------------------------------------- 1 | { 2 | "identifier_system_code": "lei" 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/identifier/too_short-uid.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid": "", 3 | "identifier_system_code": "lei" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/officer/enum_mismatch-other_attributes.type.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Fred", 3 | "other_attributes": { 4 | "type": "Alien" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/officer/format_mismatch-other_attributes.date_of_birth.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "John Smith", 3 | "position": "Chairman", 4 | "other_attributes": { 5 | "type": "Person", 6 | "date_of_birth": "03/08/60", 7 | "nationality": "British" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/officer/missing-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "position": "Chairman", 3 | "other_attributes": { 4 | "type": "Person", 5 | "date_of_birth": "1960-08-03", 6 | "nationality": "British" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/officer/unknown-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "position": "Chairman", 3 | "name": "..**..{}.. ..-\\...", 4 | "other_attributes": { 5 | "type": "Person", 6 | "date_of_birth": "1960-08-03", 7 | "nationality": "British" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/organisation/any_of_no_matches-headquarters_address.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "World Bank", 3 | "jurisdiction": "global", 4 | "website": "http://www.worldbank.org", 5 | "headquarters_address": { 6 | "locality": "Washington, DC" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/organisation/missing-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "jurisdiction": "global", 3 | "website": "http://www.worldbank.org", 4 | "headquarters_address": { 5 | "street_address": "1818 H Street, NW", 6 | "locality": "Washington, DC", 7 | "postal_code": "DC 20433" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/organisation/type_mismatch-addresses.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Alex Smith", 3 | "addresses": "123 Foo Street" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/permission/enum_mismatch-permission_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "activity_name": "Fly fishing in the Tiber", 3 | "permission_type": "fishing" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/permission/missing-activity_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "activity_id": "ABC123" 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/permission/type_mismatch-restrictions.json: -------------------------------------------------------------------------------- 1 | { 2 | "activity_name": "Fly fishing in the Tiber", 3 | "restrictions": "Not on Tuesdays" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/person-name/format_mismatch-given_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "given_name": " " 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/person/missing-name.json: -------------------------------------------------------------------------------- 1 | { 2 | } 3 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/person/type_mismatch-addresses.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Alex Smith", 3 | "addresses": "123 Foo Street" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/previous-name/format_mismatch-con_date.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "Foo", 3 | "con_date": "asdfasdfasdf" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/previous-name/missing-company_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo" 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/total-shares/additional-foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "number": 100, 3 | "share_class": "A", 4 | "foo": "bar" 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/includes/unknown-entity-type/missing-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "jurisdiction": "Bermuda", 3 | "website": "www.foo.com", 4 | "telephone_number": "123456", 5 | "fax_number": "234567", 6 | "registered_address": "The Triangle, Bermuda" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/licence/any_of_no_matches-licence_holder.entity_properties.company.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "licence_holder": { 4 | "entity_type": "person", 5 | "entity_properties": { 6 | "name": "John Smith", 7 | "company": { 8 | "jurisdiction_code": "gb" 9 | } 10 | } 11 | }, 12 | "licence_issuer": { 13 | "jurisdiction": "New York City", 14 | "name": "New York City Department of Consumer Affairs" 15 | }, 16 | "jurisdiction_of_licence": "New York City", 17 | "licence_number": "1141789", 18 | "other_attributes": { 19 | "address_location": "1 FL", 20 | "borough": "Bronx" 21 | }, 22 | "permissions": [ 23 | { 24 | "activity_name": "Amusement Arcade", 25 | "permission_type": "operating" 26 | } 27 | ], 28 | "sample_date": "2014-12-09", 29 | "source_url": "https://data.cityofnewyork.us/Business/DCA-Current-Licensees/spgx-ssye" 30 | } 31 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/licence/any_of_no_matches-licence_holder.entity_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "licence_holder": { 4 | "entity_type": "company", 5 | "entity_properties": { 6 | "alternative_names": [ 7 | { 8 | "company_name": "CHUCK E. CHEESE'S", 9 | "type": "trading" 10 | } 11 | ], 12 | "jurisdiction_code": "us_ny", 13 | "telephone_number": "(972) 258-5807" 14 | } 15 | }, 16 | "licence_issuer": { 17 | "jurisdiction": "New York City", 18 | "name": "New York City Department of Consumer Affairs" 19 | }, 20 | "jurisdiction_of_licence": "New York City", 21 | "licence_number": "1141789", 22 | "other_attributes": { 23 | "address_location": "1 FL", 24 | "borough": "Bronx" 25 | }, 26 | "permissions": [ 27 | { 28 | "activity_name": "Amusement Arcade", 29 | "permission_type": "operating" 30 | } 31 | ], 32 | "sample_date": "2014-12-09", 33 | "source_url": "https://data.cityofnewyork.us/Business/DCA-Current-Licensees/spgx-ssye" 34 | } 35 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/licence/missing-licence_holder.entity_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "licence_holder": { 4 | "entity_type": "company" 5 | }, 6 | "licence_issuer": { 7 | "jurisdiction": "us_ca", 8 | "name": "California Alcoholic Beverage Control" 9 | }, 10 | "licence_number": "00100196", 11 | "other_attributes": { 12 | "district_office_code": "08", 13 | "duplicate_counts": "", 14 | "fee_codes": "P40", 15 | "geo_code": "3309", 16 | "master_indicator": "Y", 17 | "premise_census_tract": "0455.02", 18 | "premise_county": "RIVERSIDE", 19 | "term_in_months": "12" 20 | }, 21 | "jurisdiction_of_licence": "us_ca", 22 | "permissions": [ 23 | { 24 | "activity_name": "Off-Sale Beer and Wine", 25 | "permission_type": "operating" 26 | } 27 | ], 28 | "sample_date": "2015-01-05", 29 | "source_url": "http://www.abc.ca.gov/datport/DataExport.html", 30 | "start_date": "1981-01-21", 31 | "end_date": "2015-06-30", 32 | "status": "ACTIVE" 33 | } 34 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/licence/missing-licence_holder.entity_type.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "licence_holder": { 4 | "entity_properties": { 5 | "name": "MEZA ALFREDO T", 6 | "company_number": "ZZZ95", 7 | "jurisdiction_code": "us_ca" 8 | } 9 | }, 10 | "licence_issuer": { 11 | "jurisdiction": "us_ca", 12 | "name": "California Alcoholic Beverage Control" 13 | }, 14 | "licence_number": "00100196", 15 | "other_attributes": { 16 | "district_office_code": "08", 17 | "duplicate_counts": "", 18 | "fee_codes": "P40", 19 | "geo_code": "3309", 20 | "master_indicator": "Y", 21 | "premise_census_tract": "0455.02", 22 | "premise_county": "RIVERSIDE", 23 | "term_in_months": "12" 24 | }, 25 | "jurisdiction_of_licence": "us_ca", 26 | "permissions": [ 27 | { 28 | "activity_name": "Off-Sale Beer and Wine", 29 | "permission_type": "operating" 30 | } 31 | ], 32 | "sample_date": "2015-01-05", 33 | "source_url": "http://www.abc.ca.gov/datport/DataExport.html", 34 | "start_date": "1981-01-21", 35 | "end_date": "2015-06-30", 36 | "status": "ACTIVE" 37 | } 38 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/licence/too_short-licence_holder.entity_properties.fax_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "licence_holder": { 4 | "entity_type": "person", 5 | "entity_properties": { 6 | "name": "John Smith", 7 | "fax_number": "123" 8 | } 9 | }, 10 | "licence_issuer": { 11 | "jurisdiction": "New York City", 12 | "name": "New York City Department of Consumer Affairs" 13 | }, 14 | "jurisdiction_of_licence": "New York City", 15 | "licence_number": "1141789", 16 | "other_attributes": { 17 | "address_location": "1 FL", 18 | "borough": "Bronx" 19 | }, 20 | "permissions": [ 21 | { 22 | "activity_name": "Amusement Arcade", 23 | "permission_type": "operating" 24 | } 25 | ], 26 | "sample_date": "2014-12-09", 27 | "source_url": "https://data.cityofnewyork.us/Business/DCA-Current-Licensees/spgx-ssye" 28 | } 29 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/licence/too_short-licence_holder.entity_properties.name.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "licence_holder": { 4 | "entity_type": "organisation", 5 | "entity_properties": { 6 | "name": "" 7 | } 8 | }, 9 | "licence_issuer": { 10 | "jurisdiction": "New York City", 11 | "name": "New York City Department of Consumer Affairs" 12 | }, 13 | "jurisdiction_of_licence": "New York City", 14 | "licence_number": "1141789", 15 | "other_attributes": { 16 | "address_location": "1 FL", 17 | "borough": "Bronx" 18 | }, 19 | "permissions": [ 20 | { 21 | "activity_name": "Amusement Arcade", 22 | "permission_type": "operating" 23 | } 24 | ], 25 | "sample_date": "2014-12-09", 26 | "source_url": "https://data.cityofnewyork.us/Business/DCA-Current-Licensees/spgx-ssye" 27 | } 28 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/licence/type_mismatch-permissions.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "licence_holder": { 4 | "entity_type": "company", 5 | "entity_properties": { 6 | "alternative_names": [ 7 | { 8 | "company_name": "CHUCK E. CHEESE'S", 9 | "type": "trading" 10 | } 11 | ], 12 | "jurisdiction_code": "us_ny", 13 | "name": "CEC ENTERTAINMENT, INC.", 14 | "telephone_number": "(972) 258-5807" 15 | } 16 | }, 17 | "licence_issuer": { 18 | "jurisdiction": "New York City", 19 | "name": "New York City Department of Consumer Affairs" 20 | }, 21 | "jurisdiction_of_licence": "New York City", 22 | "licence_number": "1141789", 23 | "other_attributes": { 24 | "address_location": "1 FL", 25 | "borough": "Bronx" 26 | }, 27 | "permissions": "Operating an amusement arcade", 28 | "sample_date": "2014-12-09", 29 | "source_url": "https://data.cityofnewyork.us/Business/DCA-Current-Licensees/spgx-ssye" 30 | } 31 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/primary-data/missing-sample_date.json: -------------------------------------------------------------------------------- 1 | { 2 | "source_url": "http://example.com/123", 3 | "foo": "bar" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/primary-data/missing-source_url.json: -------------------------------------------------------------------------------- 1 | { 2 | "sample_date": "2014-05-29", 3 | "foo": "bar" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/simple-licence/missing-company_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_jurisdiction": "gb", 3 | "licence_number": "ABC123", 4 | "jurisdiction_classification": "Bank", 5 | "licence_jurisdiction": "fr", 6 | "source_url": "http://example.com/abc123", 7 | "sample_date": "2014-06-01", 8 | "confidence": "MEDIUM" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/simple-licence/too_short-company_jurisdiction.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "Foo", 3 | "company_jurisdiction": "", 4 | "licence_number": "ABC123", 5 | "jurisdiction_classification": "Bank", 6 | "licence_jurisdiction": "fr", 7 | "source_url": "http://example.com/abc123", 8 | "sample_date": "2014-06-01", 9 | "confidence": "MEDIUM" 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/simple-licence/too_short-company_name.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "", 3 | "company_jurisdiction": "gb", 4 | "licence_number": "ABC123", 5 | "jurisdiction_classification": "Bank", 6 | "licence_jurisdiction": "fr", 7 | "source_url": "http://example.com/abc123", 8 | "sample_date": "2014-06-01", 9 | "confidence": "MEDIUM" 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/simple-subsidiary/unknown-percentage_controlled.json: -------------------------------------------------------------------------------- 1 | { 2 | "source_url": "http://somewhere.com/a", 3 | "sample_date": "2014-02-01", 4 | "start_date": "2014-01-01", 5 | "end_date": "2015-02-01", 6 | "confidence": "HIGH", 7 | "parent_name": "Widgets R US", 8 | "parent_jurisdiction": "us_de", 9 | "direct": true, 10 | "percentage_controlled": "56.124", 11 | "subsidiary_name": "Little Widgets", 12 | "subsidiary_jurisdiction": "us_de" 13 | } 14 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/subsequent-registration/additional-foo.json: -------------------------------------------------------------------------------- 1 | { 2 | "data_type": "subsequent-registration", 3 | "previous_entity": { 4 | "entity_properties": { 5 | "name": "Vorsprung", 6 | "company_number": "R111_HRB123", 7 | "jurisdiction_code": "de" 8 | }, 9 | "entity_type": "company" 10 | }, 11 | "subsequent_entity": { 12 | "entity_properties": { 13 | "name": "Teknik", 14 | "company_number": "R222_HRB999", 15 | "jurisdiction_code": "de" 16 | }, 17 | "entity_type": "company" 18 | }, 19 | "source_url": "https://www.foo.com?bar=123", 20 | "retrieved_at": "2018-11-08T12:34:56Z", 21 | "confidence": "HIGH", 22 | "foo": "bar" 23 | } 24 | -------------------------------------------------------------------------------- /spec/sample-data/invalid/subsequent-registration/any_of_no_matches-.json: -------------------------------------------------------------------------------- 1 | { 2 | "data_type": "subsequent-registration", 3 | "previous_entity": { 4 | "entity_properties": { 5 | "name": "Vorsprung", 6 | "company_number": "R111_HRB123", 7 | "jurisdiction_code": "de" 8 | }, 9 | "entity_type": "company" 10 | }, 11 | "subsequent_entity": { 12 | "entity_properties": { 13 | "name": "Teknik", 14 | "company_number": "R222_HRB999", 15 | "jurisdiction_code": "de" 16 | }, 17 | "entity_type": "company" 18 | }, 19 | "retrieved_at": "2018-11-08T12:34:56Z", 20 | "confidence": "HIGH" 21 | } 22 | -------------------------------------------------------------------------------- /spec/sample-data/valid/accounts-statement-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "filing_date": "2011-03-31", 3 | "accounts_date": "2011-03-31", 4 | "accounts_type": "annual", 5 | "cash_at_bank": [ 6 | { 7 | "date": "2011-06-30", 8 | "value": "770217" 9 | }, 10 | { 11 | "date": "2010-06-30", 12 | "value": "763432" 13 | } 14 | ], 15 | "confidence": "HIGH", 16 | "current_assets": [ 17 | { 18 | "date": "2011-06-30", 19 | "value": "879765" 20 | }, 21 | { 22 | "date": "2010-06-30", 23 | "value": "889364" 24 | } 25 | ], 26 | "current_liabilities": [ 27 | { 28 | "date": "2011-06-30", 29 | "value": "69241" 30 | }, 31 | { 32 | "date": "2010-06-30", 33 | "value": "107064" 34 | } 35 | ], 36 | "filing_subject": { 37 | "entity_properties": { 38 | "company_number": "01234567", 39 | "jurisdiction": "gb", 40 | "name": "GLB DESIGN GROUP LTD" 41 | }, 42 | "entity_type": "company" 43 | }, 44 | "fixed_assets": [ 45 | { 46 | "date": "2011-06-30", 47 | "value": "4427" 48 | }, 49 | { 50 | "date": "2010-06-30", 51 | "value": "5208" 52 | } 53 | ], 54 | "profit": [ 55 | { 56 | "date": "2011-06-30", 57 | "value": "32710" 58 | }, 59 | { 60 | "date": "2010-06-30", 61 | "value": "33689" 62 | } 63 | ], 64 | "revenue": [ 65 | { 66 | "date": "2011-03-31", 67 | "value": "596101" 68 | }, 69 | { 70 | "date": "2010-03-31", 71 | "value": "532936" 72 | } 73 | ], 74 | "sample_date": "2011-03-31", 75 | "source_location": "data/ixbrl/accounts_ixbrl/00355927_30-06-11_TOTAL_EXEMPTION_SMALL.html", 76 | "source_url": "http://www.companieshouse.gov.uk/" 77 | } 78 | -------------------------------------------------------------------------------- /spec/sample-data/valid/accounts-statement-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "filing_date": "2011-03-31", 3 | "accounts_date": "2011-03-31", 4 | "accounts_type": null, 5 | "filing_subject": { 6 | "entity_properties": { 7 | "company_number": "01234567", 8 | "jurisdiction_code": "gb", 9 | "name": "GLB DESIGN GROUP LTD" 10 | }, 11 | "entity_type": "company" 12 | }, 13 | "confidence": "HIGH", 14 | "current_assets": [ 15 | { 16 | "date": "2011-06-30", 17 | "value": "879765" 18 | }, 19 | { 20 | "date": "2010-06-30", 21 | "value": "889364" 22 | } 23 | ], 24 | "current_liabilities": [ 25 | { 26 | "date": "2011-06-30", 27 | "value": "69241.23", 28 | "currency": "GBP" 29 | }, 30 | { 31 | "date": "2010-06-30", 32 | "value": "107064" 33 | } 34 | ], 35 | "fixed_assets": [ 36 | { 37 | "date": "2011-06-30", 38 | "value": "4427" 39 | }, 40 | { 41 | "date": "2010-06-30", 42 | "value": "5208" 43 | } 44 | ], 45 | "profit": [ 46 | { 47 | "end_date": "2013-12-31", 48 | "start_date": "2013-01-01", 49 | "value": "141975000" 50 | } 51 | ], 52 | "revenue": [ 53 | { 54 | "date": "2011-03-31", 55 | "value": "596101" 56 | }, 57 | { 58 | "date": "2010-03-31", 59 | "value": "532936" 60 | } 61 | ], 62 | "sample_date": "2011-03-31", 63 | "source_location": "data/ixbrl/accounts_ixbrl/00355927_30-06-11_TOTAL_EXEMPTION_SMALL.html", 64 | "source_url": "http://www.companieshouse.gov.uk/" 65 | } 66 | -------------------------------------------------------------------------------- /spec/sample-data/valid/accounts-statement-04.json: -------------------------------------------------------------------------------- 1 | { 2 | "accounts_date": "2013-12-31", 3 | "accounts_type": null, 4 | "confidence": "HIGH", 5 | "currency": "DKK", 6 | "current_assets": [ 7 | { 8 | "currency": "DKK", 9 | "date": "2012-12-31", 10 | "value": "1271501" 11 | }, 12 | { 13 | "currency": "DKK", 14 | "date": "2013-12-31", 15 | "value": "1952882" 16 | } 17 | ], 18 | "documents": [ 19 | { 20 | "classification": "xbrl", 21 | "file_format": "xml", 22 | "source_location": "data/sources/e/7/c/09432201_eGJybHN0b3JlOi8vWC00NjVBM0U5Qy0yMDE0MDUxNF8xNzQ4NTVfMjEzL3hicmw.xml", 23 | "source_url": "http://regnskaber.virk.dk/09432201/eGJybHN0b3JlOi8vWC00NjVBM0U5Qy0yMDE0MDUxNF8xNzQ4NTVfMjEzL3hicmw.xml" 24 | }, 25 | { 26 | "file_format": "pdf", 27 | "source_location": "data/sources/c/1/6/09432201_eGJybHN0b3JlOi8vWC00NjVBM0U5Qy0yMDE0MDUxNF8xNzQ4NTVfMjEzL3BkZg.pdf", 28 | "source_url": "http://regnskaber.virk.dk/09432201/eGJybHN0b3JlOi8vWC00NjVBM0U5Qy0yMDE0MDUxNF8xNzQ4NTVfMjEzL3BkZg.pdf" 29 | }, 30 | { 31 | "file_format": null, 32 | "source_location": "/bots/dk_xbrl_parser/2/f/e/61715367_ZG9rdW1lbnRsYWdlcjovLzAzL2U3L2E0LzBmLzc2LzhjNzgtNDhjMS05MjcwLTY4OTgzYmJmY2VkNA.zip", 33 | "source_url": "http://regnskaber.virk.dk/61715367/ZG9rdW1lbnRsYWdlcjovLzAzL2U3L2E0LzBmLzc2LzhjNzgtNDhjMS05MjcwLTY4OTgzYmJmY2VkNA.zip" 34 | } 35 | ], 36 | "filing_date": "2015-04-13T06:16:32.827Z", 37 | "filing_subject": { 38 | "entity_properties": { 39 | "company_number": "10223490", 40 | "jurisdiction_code": "dk", 41 | "name": "Dennis Meulengracht ApS" 42 | }, 43 | "entity_type": "company" 44 | }, 45 | "filing_type_name": "regnskab", 46 | "language": "dk", 47 | "profit": [ 48 | { 49 | "currency": "DKK", 50 | "end_date": "2012-12-31", 51 | "start_date": "2012-01-01", 52 | "value": "201407" 53 | }, 54 | { 55 | "currency": "DKK", 56 | "end_date": "2013-12-31", 57 | "start_date": "2013-01-01", 58 | "value": "397859" 59 | } 60 | ], 61 | "revenue": null, 62 | "sample_date": "2013-12-31", 63 | "source_url": "http://datahub.virk.dk/dataset/system-til-system-adgang-til-regnskabsdata", 64 | "total_assets": [ 65 | { 66 | "currency": "DKK", 67 | "date": "2012-12-31", 68 | "value": "1317280" 69 | }, 70 | { 71 | "currency": "DKK", 72 | "date": "2013-12-31", 73 | "value": "1982882" 74 | } 75 | ], 76 | "uid": "14-20.033" 77 | } 78 | -------------------------------------------------------------------------------- /spec/sample-data/valid/alternate-registration-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "data_type": "alternate-registration", 3 | "alternate_entities": [ 4 | { 5 | "entity_properties": { 6 | "name": "Vorsprung", 7 | "company_number": "R111_HRB123", 8 | "jurisdiction_code": "de" 9 | }, 10 | "entity_type": "company" 11 | }, 12 | { 13 | "entity_properties": { 14 | "name": "Teknik", 15 | "company_number": "R222_HRB999", 16 | "jurisdiction_code": "de" 17 | }, 18 | "entity_type": "company" 19 | } 20 | ], 21 | "source_url": "https://www.foo.com?bar=123", 22 | "start_date": "2012-01-22", 23 | "retrieved_at": "2018-11-08T12:34:56Z", 24 | "confidence": "HIGH" 25 | } 26 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "retrieved_at": "2018-03-09T12:34:56Z" 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "registered_address": "32 Foo St, Footown,", 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "incorporation_date": "2010-10-20", 6 | "dissolution_date": "2012-01-12", 7 | "retrieved_at": "2018-03-09T12:34:56Z" 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-04.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "registered_address": "32 Foo St, Footown,", 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-05.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "registered_address": null, 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-06.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "registered_address": { 6 | "street_address": "32 Foo St", 7 | "locality": "Footown", 8 | "region": "Fooshire", 9 | "postal_code": "FO1 2BA" 10 | }, 11 | "retrieved_at": "2018-03-09T12:34:56Z" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-07.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "registered_address": { 6 | "street_address": "32 Foo St" 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-08.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "registered_address": { 6 | "postal_code": "FO1 2BA" 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-09.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "previous_names": [ 6 | { 7 | "company_name": "FooBar Inc" 8 | }, 9 | { 10 | "company_name": "FooBaz", 11 | "con_date": "2012-07-22" 12 | }, 13 | { 14 | "company_name": "FooBaz", 15 | "con_date": "2012-07-22", 16 | "start_date": "2008-01-08" 17 | } 18 | ], 19 | "retrieved_at": "2018-03-09T12:34:56Z" 20 | } 21 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-10.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "previous_names": [ 6 | 7 | ], 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-11.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "branch": "F", 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-12.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "branch": "L", 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-13.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "branch": null, 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-14.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "foo": "bar", 7 | "some_number": 42, 8 | "an_array": [ 9 | 1, 10 | 2, 11 | 3 12 | ] 13 | }, 14 | "retrieved_at": "2018-03-09T12:34:56Z" 15 | } 16 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-15.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "all_attributes": { 6 | }, 7 | "retrieved_at": "2018-03-09T12:34:56Z" 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-16.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "jurisdiction_of_origin": "Some Country" 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-17.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "jurisdiction_of_origin": null 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-18.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "number_of_employees": 42 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-19.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | { 7 | "name": "Fred Flintstone" 8 | }, 9 | { 10 | "name": "Barney Rubble", 11 | "position": "Director" 12 | }, 13 | { 14 | "name": "Barney Rubble", 15 | "other_attributes": { 16 | "foo": "bar", 17 | "address": { 18 | "street_address": "1 Balloon Street", 19 | "locality": "Manchester", 20 | "country_code": "GB" 21 | } 22 | } 23 | }, 24 | { 25 | "name": "Wilman Rubble", 26 | "start_date": "2010-12-22", 27 | "end_date": "2011-01-03", 28 | "uid": "ABC1234", 29 | "other_attributes": { 30 | "address": "32 Rubble St, Bedrock", 31 | "nationality": "United States", 32 | "date_of_birth": "1970-04-22", 33 | "occupation": "Caveman", 34 | "type": "Person", 35 | "person_uid": "CD444" 36 | } 37 | } 38 | ], 39 | "retrieved_at": "2018-03-09T12:34:56Z" 40 | } 41 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-20.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "officers": [ 6 | 7 | ], 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-21.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | { 7 | "title": "Annual Report", 8 | "date": "2010-11-22" 9 | }, 10 | { 11 | "description": "Another type of filing", 12 | "date": "2010-11-22" 13 | }, 14 | { 15 | "title": "Annual Report", 16 | "description": "Another type of filing", 17 | "uid": "12345A321", 18 | "date": "2010-11-22" 19 | }, 20 | { 21 | "filing_type_name": "Some type", 22 | "date": "2010-11-22" 23 | } 24 | ], 25 | "retrieved_at": "2018-03-09T12:34:56Z" 26 | } 27 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-22.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | { 7 | "title": "Annual Report", 8 | "date": "2010-11-22", 9 | "other_attributes": { 10 | "foo": "bar" 11 | } 12 | }, 13 | { 14 | "filing_type_name": "Some type", 15 | "filing_type_code": "10-K", 16 | "date": "2010-11-22" 17 | } 18 | ], 19 | "retrieved_at": "2018-03-09T12:34:56Z" 20 | } 21 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-23.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | 7 | ], 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-24.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | { 7 | "filing_type_name": "Some type", 8 | "date": "2010-11-22" 9 | } 10 | ], 11 | "retrieved_at": "2018-03-09T12:34:56Z" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-25.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | { 7 | "description": "Some type", 8 | "date": "2010-11-22" 9 | } 10 | ], 11 | "retrieved_at": "2018-03-09T12:34:56Z" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-26.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "filings": [ 6 | { 7 | "title": "Some type", 8 | "date": "2010-11-22" 9 | } 10 | ], 11 | "retrieved_at": "2018-03-09T12:34:56Z" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-27.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "share_parcels": [ 6 | { 7 | "number_of_shares": 1234, 8 | "shareholders": [ 9 | { 10 | "name": "Fred Flintstone" 11 | } 12 | ], 13 | "confidence": 42 14 | }, 15 | { 16 | "percentage_of_shares": 23.5, 17 | "shareholders": [ 18 | { 19 | "name": "Barney Rubble" 20 | }, 21 | { 22 | "name": "Wilma Flintstone" 23 | } 24 | ] 25 | } 26 | ], 27 | "retrieved_at": "2018-03-09T12:34:56Z" 28 | } 29 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-28.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "share_parcels": [ 6 | 7 | ], 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-29.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "total_shares": { 6 | "number": 123, 7 | "share_class": "Ordinary" 8 | }, 9 | "retrieved_at": "2018-03-09T12:34:56Z" 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-30.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "total_shares": { 6 | "number": 123 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-31.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "alternative_names": [ 6 | { 7 | "company_name": "Foobar Inc", 8 | "type": "trading" 9 | }, 10 | { 11 | "company_name": "Foobar Inc", 12 | "type": "legal", 13 | "language": "fr" 14 | } 15 | ], 16 | "retrieved_at": "2018-03-09T12:34:56Z" 17 | } 18 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-32.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "alternative_names": [ 6 | 7 | ], 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-33.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "industry_codes": [ 6 | { 7 | "code": "1234", 8 | "code_scheme_id": "eu_nace_2", 9 | "name": "Some Industry" 10 | }, 11 | { 12 | "code": "1234", 13 | "code_scheme_id": "unknown_code_scheme", 14 | "name": "Some Industry" 15 | }, 16 | { 17 | "code": "22.11", 18 | "code_scheme_id": "uk_sic_2007" 19 | }, 20 | { 21 | "code": "43.21", 22 | "code_scheme_id": "us_naics_2007", 23 | "name": "Another Industry", 24 | "start_date": "2010-12-22", 25 | "end_date": "2011-01-03" 26 | } 27 | ], 28 | "retrieved_at": "2018-03-09T12:34:56Z" 29 | } 30 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-34.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "industry_codes": [ 6 | 7 | ], 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-35.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "home_company_number": "Some String" 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-36.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "home_company_number": null 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-37.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "home_legal_name": "Some String" 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-38.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "home_legal_name": null 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-39.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "registered_agent_name": "Some String" 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-40.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "registered_agent_name": null 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-41.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "registered_agent_address": "Some String" 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-42.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "registered_agent_address": null 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-43.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "telephone_number": "0123 456 789", 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-44.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "fax_number": "0123 456 789", 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-45.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "share_parcels": [ 6 | { 7 | "number_of_shares": 1234, 8 | "start_date": "2008-11-22", 9 | "start_date_type": "=", 10 | "shareholders": [ 11 | { 12 | "name": "Megacorp Inc", 13 | "type": "Company", 14 | "jurisdiction": "Bermuda", 15 | "company_number": "12345", 16 | "address": "1 Global Ave, Bermuda" 17 | } 18 | ], 19 | "confidence": 42 20 | } 21 | ], 22 | "retrieved_at": "2018-03-09T12:34:56Z" 23 | } 24 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-46.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "headquarters_address": "32 Foo St, Footown", 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-47.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "mailing_address": { 6 | "street_address": "32 Foo St", 7 | "locality": "Footown", 8 | "region": "Fooshire", 9 | "postal_code": "FO1 2BA" 10 | }, 11 | "retrieved_at": "2018-03-09T12:34:56Z" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-48.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "mailing_address": "32 Foo St, Footown", 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-49.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "merged_into": { 7 | "effective_date": "2010-10-22", 8 | "surviving_company": { 9 | "name": "Foo Inc" 10 | } 11 | } 12 | }, 13 | "retrieved_at": "2018-03-09T12:34:56Z" 14 | } 15 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-50.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "merged_into": { 7 | "surviving_company": { 8 | "jurisdiction": "us_mi", 9 | "name": "Foo Inc" 10 | } 11 | } 12 | }, 13 | "retrieved_at": "2018-03-09T12:34:56Z" 14 | } 15 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-51.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "merged_into": { 7 | "surviving_company": { 8 | "jurisdiction": "us_mi", 9 | "company_number": "12345" 10 | } 11 | } 12 | }, 13 | "retrieved_at": "2018-03-09T12:34:56Z" 14 | } 15 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-52.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "headquarters_address": { 6 | "street_address": "32 Foo St", 7 | "locality": "Footown", 8 | "region": "Fooshire", 9 | "postal_code": "FO1 2BA" 10 | }, 11 | "retrieved_at": "2018-03-09T12:34:56Z" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-53.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "all_attributes": { 6 | "number_of_employees": "35-42" 7 | }, 8 | "retrieved_at": "2018-03-09T12:34:56Z" 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-54.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "identifiers": [ 6 | { 7 | "uid": "549300MWY6KYIGQQH329", 8 | "identifier_system_code": "lei" 9 | } 10 | ], 11 | "retrieved_at": "2018-03-09T12:34:56Z" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-55.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "us_de", 5 | "registered_address": { 6 | "locality": "Footown", 7 | "country": "Foodonia" 8 | }, 9 | "retrieved_at": "2018-03-09T12:34:56Z" 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-56.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "current_status": null, 6 | "company_type": null, 7 | "retrieved_at": "2018-03-09T12:34:56Z" 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-57.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "identifiers": null, 6 | "retrieved_at": "2018-03-09T12:34:56Z" 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/company-58.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "website": [ 6 | "http://foo.com", 7 | "http://bar.com" 8 | ], 9 | "retrieved_at": "2018-03-09T12:34:56Z" 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/valid/control-statement-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "subject_entity": { 3 | "entity_properties": { 4 | "company_number": "09876543", 5 | "jurisdiction_code": "gb" 6 | }, 7 | "entity_type": "company" 8 | }, 9 | "sample_date": "2016-01-01", 10 | "source_url": "http://download.companieshouse.gov.uk/en_pscdata.html", 11 | "retrieved_at": "2015-08-11T23:00:08+01:00", 12 | "confidence": "HIGH", 13 | "control_level": "unknown", 14 | "control_mechanisms": [ 15 | { 16 | "mechanism_type": "share_ownership", 17 | "mechanism_properties": { 18 | "exercised_via": null, 19 | "percentage_of_shares": { 20 | "minimum": 25, 21 | "maximum": 50, 22 | "exclusive_minimum": true, 23 | "exclusive_maximum": false 24 | } 25 | }, 26 | "source_description": "The person holds, directly or indirectly, more than 25% but not more than 50% of the shares in the company." 27 | } 28 | ], 29 | "controlling_entities": [ 30 | { 31 | "entity_type": "person", 32 | "entity_properties": { 33 | "date_of_birth": { 34 | "year": 1988, 35 | "month": 4 36 | }, 37 | "nationality": "British", 38 | "country_of_residence": "Wales", 39 | "registered_address": { 40 | "postal_code": "CF14 3UZ", 41 | "locality": "Cardiff", 42 | "region": "South Glamorgan", 43 | "street_address": "Crown Way" 44 | }, 45 | "name": { 46 | "given_name": "James", 47 | "family_name": "Brian" 48 | } 49 | } 50 | } 51 | ], 52 | "ultimate_beneficial_owner": true 53 | } 54 | -------------------------------------------------------------------------------- /spec/sample-data/valid/control-statement-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "subject_entity": { 3 | "entity_properties": { 4 | "company_number": "09876543", 5 | "jurisdiction_code": "gb" 6 | }, 7 | "entity_type": "company" 8 | }, 9 | "sample_date": "2016-01-01", 10 | "source_url": "http://download.companieshouse.gov.uk/en_pscdata.html", 11 | "retrieved_at": "2015-08-11T23:00:08+01:00", 12 | "confidence": "HIGH", 13 | "control_level": "unknown", 14 | "control_mechanisms": [ 15 | { 16 | "mechanism_type": "share_ownership", 17 | "mechanism_properties": { 18 | "exercised_via": "firm", 19 | "percentage_of_shares": { 20 | "minimum": 50, 21 | "maximum": 75, 22 | "exclusive_minimum": true, 23 | "exclusive_maximum": false 24 | } 25 | }, 26 | "source_description": "The person has the right to exercise, or actually exercises, significant influence or control over the activities of a firm that, under the law by which it is governed is not a legal person; and the members of that firm (in their capacity as such) hold, directly or indirectly, more than 50% but not more than 75% of the shares in the company." 27 | }, 28 | { 29 | "mechanism_type": "voting_rights", 30 | "mechanism_properties": { 31 | "exercised_via": "trust", 32 | "voting_percentage": { 33 | "minimum": 50, 34 | "maximum": 75, 35 | "exclusive_minimum": true, 36 | "exclusive_maximum": false 37 | } 38 | }, 39 | "source_description": "The person has the right to exercise, or actually exercises, significant influence or control over the activities of a trust, and the trustees of that trust (in their capacity as such) hold, directly or indirectly, more than 50% but not more than 75% of the voting rights in the company." 40 | }, 41 | { 42 | "mechanism_type": "right_to_appoint_and_remove_directors", 43 | "mechanism_properties": { 44 | "exercised_via": null 45 | }, 46 | "source_description": "The person holds the right, directly or indirectly, to appoint or remove a majority of the board of directors of the company." 47 | } 48 | ], 49 | "controlling_entities": [ 50 | { 51 | "entity_type": "company", 52 | "entity_properties": { 53 | "jurisdiction": "England", 54 | "company_number": "01589850", 55 | "company_type": "limited by guarantee", 56 | "name": "A Company Ltd", 57 | "registered_address": { 58 | "region": "Mid Glamorgan", 59 | "postal_code": "CF42 6BG", 60 | "locality": "Treorchy", 61 | "premises": "46", 62 | "street_address": "Cardiff Street" 63 | } 64 | } 65 | } 66 | ] 67 | } 68 | -------------------------------------------------------------------------------- /spec/sample-data/valid/control-statement-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "subject_entity": { 3 | "entity_properties": { 4 | "company_number": "09876543", 5 | "jurisdiction_code": "gb" 6 | }, 7 | "entity_type": "company" 8 | }, 9 | "sample_date": "2016-01-01", 10 | "source_url": "http://download.companieshouse.gov.uk/en_pscdata.html", 11 | "retrieved_at": "2015-08-11T23:00:08+01:00", 12 | "confidence": "HIGH", 13 | "control_level": "unknown", 14 | "no_controlling_entities_reasons": [ 15 | "PSC Contacted But No Response: The company has given a notice under section 790D of the Act which has not been complied with" 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /spec/sample-data/valid/filing-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "filing_subject": { 3 | "entity_properties": { 4 | "company_number": "01234567", 5 | "jurisdiction": "gb", 6 | "name": "GLB DESIGN GROUP LTD" 7 | }, 8 | "entity_type": "company" 9 | }, 10 | "title": "Annual Report", 11 | "confidence": "HIGH", 12 | "filing_date": "2011-03-31", 13 | "sample_date": "2011-03-31", 14 | "source_url": "http://www.companieshouse.gov.uk/" 15 | } 16 | -------------------------------------------------------------------------------- /spec/sample-data/valid/filing-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "filing_subject": { 3 | "entity_properties": { 4 | "company_number": "01234567", 5 | "jurisdiction": "gb", 6 | "name": "GLB DESIGN GROUP LTD" 7 | }, 8 | "entity_type": "company" 9 | }, 10 | "title": "Annual Report", 11 | "documents": [ 12 | { 13 | "uid": "12345", 14 | "source_location": "/foo/bar.doc", 15 | "source_url": "http://foo.com/bar", 16 | "file_format": "xml", 17 | "language": "dk", 18 | "classification": "xbrl" 19 | } 20 | ], 21 | "confidence": "HIGH", 22 | "filing_date": "2011-03-31", 23 | "sample_date": "2011-03-31", 24 | "source_url": "http://www.companieshouse.gov.uk/" 25 | } 26 | -------------------------------------------------------------------------------- /spec/sample-data/valid/filing-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "filing_subject": { 3 | "entity_properties": { 4 | "company_number": "01234567", 5 | "jurisdiction": "gb", 6 | "name": "GLB DESIGN GROUP LTD" 7 | }, 8 | "entity_type": "company" 9 | }, 10 | "title": "Annual Report", 11 | "documents": [ 12 | { 13 | "uid": "12345", 14 | "source_location": "/foo/bar.doc", 15 | "source_url": "http://foo.com/bar", 16 | "file_format": "xml", 17 | "language": "dk", 18 | "classification": "xbrl" 19 | } 20 | ], 21 | "confidence": "HIGH", 22 | "filing_date": "2011-03-31", 23 | "sample_date": "2011-03-31", 24 | "source_url": "http://www.companieshouse.gov.uk/" 25 | } 26 | -------------------------------------------------------------------------------- /spec/sample-data/valid/financial-payment-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "company": { 3 | "name": "Some suppplier", 4 | "jurisdiction": "France" 5 | }, 6 | "sample_date": "2014-12-31", 7 | "data": [ 8 | { 9 | "data_type": "financial_payment", 10 | "properties": { 11 | "value": "32.45", 12 | "currency": "GBP", 13 | "transaction_number": "ABC1224", 14 | "reporting_date": "2014-06-01", 15 | "jurisdiction": "gb", 16 | "more_details_url": "http://spendnetwork.com/trans_id/12345", 17 | "description": "some big project", 18 | "payee_name": "Govt Jobs R Us Inc", 19 | "entity_name": "Efficiency Agency", 20 | "department_name": "Department Of Everything", 21 | "date": "2012-10-22" 22 | }, 23 | "source_url": "http://example.com/abc123", 24 | "confidence": "67" 25 | } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /spec/sample-data/valid/financial-payment-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "company": { 3 | "jurisdiction": "gb", 4 | "name": "LAFARGE AGGREGATES LTD" 5 | }, 6 | "sample_date": "2014-12-31", 7 | "data": [ 8 | { 9 | "confidence": "80", 10 | "data_type": "financial_payment", 11 | "properties": { 12 | "csv_line_number": "1921", 13 | "currency": "GBP", 14 | "date": "2012-09-01", 15 | "department_name": null, 16 | "description": null, 17 | "entity_name": "Norfolk County Council", 18 | "entity_uri": null, 19 | "expense_area": null, 20 | "jurisdiction": "gb", 21 | "more_details_url": "https://spendnetwork.com/transaction_detail/E2620_NCC_gov_2012_09_1921", 22 | "payee_name": "LAFARGE AGGREGATES LTD", 23 | "transaction_number": "E2620_NCC_gov_2012_09_1921", 24 | "uid": "4182095", 25 | "value": "491.54" 26 | }, 27 | "source_url": "https://spendnetwork.com/transaction_detail/E2620_NCC_gov_2012_09_1921" 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /spec/sample-data/valid/gazette-notice-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "date_published": "2015-01-02", 3 | "issue": { 4 | "publication": { 5 | "publisher": { 6 | "name": "Direction de l'information légale et administrative", 7 | "url": "http://www.dila.premier-ministre.gouv.fr/", 8 | "media_type": "text/html" 9 | }, 10 | "jurisdiction_code": "fr", 11 | "title": "Bulletin officiel des annonces civiles et commerciales", 12 | "url": "http://www.bodacc.fr/", 13 | "media_type": "text/html" 14 | }, 15 | "identifier": "20150001", 16 | "edition_id": "A" 17 | }, 18 | "source_url": "ftp://echanges.dila.gouv.fr/BODACC/BODACC_2015.tar", 19 | "sample_date": "2016-01-13T01:26:23Z", 20 | "retrieved_at": "2016-01-13T01:26:23Z", 21 | "confidence": "HIGH", 22 | "other_attributes": { 23 | "format": "RCS-A" 24 | }, 25 | "publisher": { 26 | "name": "GREFFE DU TRIBUNAL DE COMMERCE DE SAINT-QUENTIN", 27 | "identifier": "02" 28 | }, 29 | "identifier": 1, 30 | "uid": "BXA14358001500V", 31 | "url": "http://www.bodacc.fr/annonce/detail/BXA14358001500V", 32 | "media_type": "text/html", 33 | "subjects": [ 34 | { 35 | "entity_type": "company", 36 | "entity_properties": { 37 | "jurisdiction_code": "fr", 38 | "company_number": "808433569", 39 | "name": "DE LA PLACE D'ARDON", 40 | "company_type": "Société civile immobilière", 41 | "registered_address": { 42 | "street_address": "24 rue de Paris", 43 | "locality": "Etouvelles", 44 | "postal_code": "02000", 45 | "country": "France", 46 | "country_code": "FR" 47 | } 48 | } 49 | } 50 | ], 51 | "about": { 52 | "type": "creation of subjects", 53 | "registration_date": "2014-12-16", 54 | "activity_start_date": "2014-12-01", 55 | "classification": [ 56 | { 57 | "code_scheme_id": "fr_bodacc_categorie", 58 | "code": "Immatriculation d'une personne morale (B, C, D) suite à création d'un établissement principal" 59 | } 60 | ], 61 | "locations": [ 62 | { 63 | "activity": "Acquisition, administration et exploitation par bail, location, sous-location ou autrement de tous immeubles bâtis ou non bâtis, biens immobiliers ou droits immobiliers dont la société pourrait devenir propriétaire ; l'emprunt de tous fonds nécessaires à la réalisation de cet objet...", 64 | "address": { 65 | "street_address": "24 rue de Paris", 66 | "locality": "Etouvelles", 67 | "postal_code": "02000", 68 | "country": "France", 69 | "country_code": "FR" 70 | }, 71 | "origin": "Création", 72 | "type": "primary" 73 | } 74 | ] 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/address-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "street_address": "1 Balloon Street", 3 | "locality": "Manchester" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/address-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "street_address": "1 Balloon Street", 3 | "locality": "Manchester", 4 | "country_code": "GB" 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/address-with-type-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "mailing", 3 | "address": "123 Foo Street" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/address-with-type-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "unknown", 3 | "address": { 4 | "street_address": "123 Foo Street" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/alternative-name-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "Foo Holdings", 3 | "type": "trading" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/company-for-nesting-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Inc", 3 | "company_number": "12345", 4 | "jurisdiction_code": "ie", 5 | "identifiers": [ 6 | { 7 | "uid": "549300MWY6KYIGQQH329", 8 | "identifier_system_code": "lei" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/identifier-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid": "549300MWY6KYIGQQH329", 3 | "identifier_system_code": "lei" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/legislation-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Copyright, Designs And Patents Act 1988", 3 | "url": "www.legislation.gov.uk/ukpga/1988/48/section/47" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/officer-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "John Smith", 3 | "position": "Chairman", 4 | "other_attributes": { 5 | "type": "Person", 6 | "date_of_birth": "1960-08-03", 7 | "nationality": "British", 8 | "address": "34 Acacia Ave, Footown, UK" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/officer-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "John Smith", 3 | "position": "Chairman", 4 | "other_attributes": { 5 | "type": "Person", 6 | "date_of_birth": "1960-08-03", 7 | "nationality": "British", 8 | "address": { 9 | "street_address": "1 Balloon Street", 10 | "locality": "Manchester", 11 | "country_code": "GB" 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/organisation-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "World Bank", 3 | "jurisdiction": "global", 4 | "website": "http://www.worldbank.org", 5 | "headquarters_address": { 6 | "street_address": "1818 H Street, NW", 7 | "locality": "Washington, DC", 8 | "postal_code": "DC 20433" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/organisation-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "World Bank", 3 | "jurisdiction": "global", 4 | "website": "http://www.worldbank.org", 5 | "headquarters_address": { 6 | "street_address": "1818 H Street, NW", 7 | "locality": "Washington, DC", 8 | "postal_code": "DC 20433" 9 | }, 10 | "identifiers": [ 11 | { 12 | "uid": "202918", 13 | "identifier_system_code": "uk_ew_cc" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/organisation-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo International", 3 | "addresses": [ 4 | { 5 | "type": "unknown", 6 | "address": { 7 | "street_address": "123 Foo Street", 8 | "locality": "London" 9 | } 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/permission-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "activity_name": "Fly fishing in the Tiber", 3 | "activity_id": "ABC123", 4 | "permission_type": "exploitation", 5 | "restrictions": [ 6 | "Not on Thursday" 7 | ], 8 | "other_attributes": { 9 | "maximum_maggot_size": "50mm" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/person-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "John Smith" 3 | } 4 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/person-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": { 3 | "given_name": "John", 4 | "family_name": "Smith" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/person-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "John Smith", 3 | "company": { 4 | "name": "Foo Incorporated", 5 | "company_number": "12345" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/person-04.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "E", 3 | "country_of_residence": "E", 4 | "nationality": "E" 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/person-05.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "John Smith", 3 | "company": { 4 | "name": "Foo Incorporated", 5 | "company_number": "12345" 6 | }, 7 | "identifiers": [ 8 | { 9 | "uid": "202918", 10 | "identifier_system_code": "ab_cd" 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/person-06.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Alex Smith", 3 | "addresses": [ 4 | { 5 | "type": "unknown", 6 | "address": { 7 | "street_address": "123 Foo Street", 8 | "locality": "London" 9 | } 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/person-name-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": { 3 | "given_name": "John", 4 | "family_name": "Smith" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/previous-name-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "Foo Ltd", 3 | "start_date": "2010-01-10", 4 | "con_date": "2014-12-01" 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/share-parcel-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "number_of_shares": 42, 3 | "shareholders": [ 4 | { 5 | "name": "Joe Schmoe" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/share-parcel-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "percentage_of_shares": 64, 3 | "shareholders": [ 4 | { 5 | "name": "Joe Schmoe" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/share-parcel-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "percentage_of_shares_min": 50, 3 | "percentage_of_shares_max": 50, 4 | "voting_percentage_min": 30, 5 | "voting_percentage_max": 40, 6 | "shareholders": [ 7 | { 8 | "name": "Joe Schmoe" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/share-parcel-04.json: -------------------------------------------------------------------------------- 1 | { 2 | "percentage_of_shares_min": 50, 3 | "percentage_of_shares_max": null, 4 | "shareholders": [ 5 | { 6 | "name": "Joe Schmoe" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/share-parcel-05.json: -------------------------------------------------------------------------------- 1 | { 2 | "percentage_of_shares": 64, 3 | "shareholders": [ 4 | { 5 | "name": "Joe Schmoe", 6 | "address": "34 Acacia Ave, Footown, UK" 7 | } 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/share-parcel-06.json: -------------------------------------------------------------------------------- 1 | { 2 | "percentage_of_shares": 64, 3 | "shareholders": [ 4 | { 5 | "name": "Joe Schmoe", 6 | "address": { 7 | "street_address": "1 Balloon Street", 8 | "locality": "Manchester", 9 | "country_code": "GB" 10 | } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/share-parcel-07.json: -------------------------------------------------------------------------------- 1 | { 2 | "percentage_of_shares": 64, 3 | "share_class": "A", 4 | "shareholders": [ 5 | { 6 | "name": "Joe Schmoe", 7 | "address": { 8 | "street_address": "1 Balloon Street", 9 | "locality": "Manchester", 10 | "country_code": "GB" 11 | } 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/total-shares-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "number": 100, 3 | "share_class": "A" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/valid/includes/unknown-entity-type-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Foo Mysteries", 3 | "jurisdiction": "Bermuda", 4 | "website": "www.foo.com", 5 | "telephone_number": "123456", 6 | "fax_number": "234567", 7 | "registered_address": "The Triangle, Bermuda" 8 | } 9 | -------------------------------------------------------------------------------- /spec/sample-data/valid/licence-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "licence_holder": { 4 | "entity_type": "company", 5 | "entity_properties": { 6 | "alternative_names": [ 7 | { 8 | "company_name": "CHUCK E. CHEESE'S", 9 | "type": "trading" 10 | } 11 | ], 12 | "jurisdiction_code": "us_ny", 13 | "name": "CEC ENTERTAINMENT, INC.", 14 | "telephone_number": "(972) 258-5807", 15 | "website": "http://cecents.com" 16 | } 17 | }, 18 | "licence_issuer": { 19 | "jurisdiction": "New York City", 20 | "name": "New York City Department of Consumer Affairs" 21 | }, 22 | "jurisdiction_of_licence": "New York City", 23 | "licence_number": "1141789", 24 | "other_attributes": { 25 | "address_location": "1 FL", 26 | "borough": "Bronx" 27 | }, 28 | "permissions": [ 29 | { 30 | "activity_name": "Amusement Arcade", 31 | "permission_type": "operating" 32 | } 33 | ], 34 | "sample_date": "2014-12-09", 35 | "source_url": "https://data.cityofnewyork.us/Business/DCA-Current-Licensees/spgx-ssye", 36 | "retrieved_at": "2015-08-11" 37 | } 38 | -------------------------------------------------------------------------------- /spec/sample-data/valid/licence-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "licence_holder": { 4 | "entity_type": "company", 5 | "entity_properties": { 6 | "name": "MEZA ALFREDO T", 7 | "company_number": "ZZZ95", 8 | "jurisdiction_code": "us_ca", 9 | "website": [ 10 | "http://foo.com", 11 | "http://bar.com" 12 | ] 13 | } 14 | }, 15 | "licence_issuer": { 16 | "jurisdiction": "us_ca", 17 | "name": "California Alcoholic Beverage Control" 18 | }, 19 | "licence_number": "00100196", 20 | "other_attributes": { 21 | "district_office_code": "08", 22 | "duplicate_counts": "", 23 | "fee_codes": "P40", 24 | "geo_code": "3309", 25 | "master_indicator": "Y", 26 | "premise_census_tract": "0455.02", 27 | "premise_county": "RIVERSIDE", 28 | "term_in_months": "12" 29 | }, 30 | "jurisdiction_of_licence": "us_ca", 31 | "permissions": [ 32 | { 33 | "activity_name": "Off-Sale Beer and Wine", 34 | "permission_type": "operating" 35 | } 36 | ], 37 | "sample_date": "2015-01-05", 38 | "source_url": "http://www.abc.ca.gov/datport/DataExport.html", 39 | "start_date": "1981-01-21", 40 | "end_date": "2015-06-30", 41 | "status": "ACTIVE" 42 | } 43 | -------------------------------------------------------------------------------- /spec/sample-data/valid/licence-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "end_date": "2017-02-28", 4 | "licence_holder": { 5 | "entity_properties": { 6 | "jurisdiction": "FL", 7 | "name": "GLB DESIGN GROUP, LLC" 8 | }, 9 | "entity_type": "company" 10 | }, 11 | "licence_issuer": { 12 | "jurisdiction": "us_fl", 13 | "name": "Florida Architecture & Interior Design Board" 14 | }, 15 | "licence_number": "26001644", 16 | "other_attributes": { 17 | "Alternate Lic#": "IB26001644", 18 | "Blank": "", 19 | "County Code": "23", 20 | "Effective Date": "2014-12-22", 21 | "Primary Status": "C", 22 | "Renewal Period": "", 23 | "Secondary Status": "A" 24 | }, 25 | "permissions": [ 26 | { 27 | "activity_name": "Interior Design Business", 28 | "permission_type": "operating" 29 | } 30 | ], 31 | "sample_date": "2014-12-31 11:46:08 +0000", 32 | "source_url": "ftp://dbprftp.state.fl.us/pub/llweb/lic02ai.csv", 33 | "jurisdiction_of_licence": "us_fl", 34 | "start_date": "2014-12-22", 35 | "status": "Active (Current)" 36 | } 37 | -------------------------------------------------------------------------------- /spec/sample-data/valid/licence-04.json: -------------------------------------------------------------------------------- 1 | { 2 | "category": [ 3 | "Business" 4 | ], 5 | "confidence": "HIGH", 6 | "end_date": "2016-01-31", 7 | "licence_holder": { 8 | "entity_properties": { 9 | "industry_codes": [ 10 | { 11 | "code": "4421", 12 | "code_scheme_id": "us_naics_2007", 13 | "description": "FURNITURE STORES" 14 | } 15 | ], 16 | "name": "$99 FURNITURE OUTLET LLC" 17 | }, 18 | "entity_type": "unknown" 19 | }, 20 | "licence_issuer": { 21 | "jurisdiction": "Salt Lake City", 22 | "name": "Salt Lake City Corp" 23 | }, 24 | "licence_number": "LIC2008-00197", 25 | "licence_url": "https://aca.slcgov.com/Citizen/Cap/CapDetail.aspx?Module=BusLic&TabName=BusLic&capID1=08BCA&capID2=00000&capID3=18145&agencyCode=SLCREF&IsToShowInspection=yes", 26 | "jurisdiction_of_licence": "Salt Lake City", 27 | "licenced_location": { 28 | "locality": "Salt Lake City", 29 | "postal_code": "84101-2604", 30 | "region": "UT", 31 | "street_address": "711 S 300 W" 32 | }, 33 | "permissions": [ 34 | { 35 | "activity_name": "Commercial", 36 | "permission_type": "operating" 37 | } 38 | ], 39 | "sample_date": "2015-08-11", 40 | "source_url": "https://opendata.utah.gov/api/views/kzrq-v59u/rows.json?accessType=DOWNLOAD", 41 | "status": "Active" 42 | } 43 | -------------------------------------------------------------------------------- /spec/sample-data/valid/primary-data-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "source_url": "http://example.com/123", 3 | "sample_date": "2014-05-29" 4 | } 5 | -------------------------------------------------------------------------------- /spec/sample-data/valid/primary-data-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "source_url": "http://example.com/123", 3 | "sample_date": "2014-05-29", 4 | "foo": "bar" 5 | } 6 | -------------------------------------------------------------------------------- /spec/sample-data/valid/register-entry-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "subject_entity": { 4 | "entity_type": "company", 5 | "entity_properties": { 6 | "alternative_names": [ 7 | { 8 | "company_name": "OXFAM GB", 9 | "type": "trading" 10 | } 11 | ], 12 | "jurisdiction_code": "gb", 13 | "company_number": "612172", 14 | "name": "OXFAM", 15 | "telephone_number": "0870 333 2444", 16 | "registered_address": { 17 | "street_address": "OXFAM GB, OXFAM, 2700 JOHN SMITH DRIVE, OXFORD BUSINESS PARK SOUTH", 18 | "locality": "OXFORD", 19 | "postal_code": "OX4 2JY" 20 | } 21 | } 22 | }, 23 | "register": { 24 | "jurisdiction": "England & Wales", 25 | "title": "Charity Register for England & Wales", 26 | "url": "http://beta.charitycommission.gov.uk", 27 | "registrar": { 28 | "name": "The Charity Commission for England and Wales", 29 | "jurisdiction": "England & Wales", 30 | "website": "https://www.gov.uk/government/organisations/charity-commission" 31 | } 32 | }, 33 | "identifier": "202918", 34 | "category": "Charity-NonProfit", 35 | "other_attributes": { 36 | "objectives": "OXFAM'S OBJECTS ARE TO PREVENT AND RELIEVE POVERTY AND PROTECT THE VULNERABLE ANYWHERE IN THE WORLD. OXFAM FURTHERS ITS OBJECTS THROUGH INTERLINKED ACTIVITIES OF HUMANITARIAN RELIEF, DEVELOPMENT WORK AND ADVOCACY AND CAMPAIGNING. OXFAM IS AN AFFILIATE MEMBER OF OXFAM INTERNATIONAL. DETAILS OF OXFAM'S MISSION AND WAYS OF WORKING CAN BE FOUND AT WWW.OXFAM.ORG.UK", 37 | "contact_name": "MR JOSS SAUNDERS", 38 | "volunteers": 22000 39 | }, 40 | "start_date": "1965-09-07", 41 | "sample_date": "2014-12-09", 42 | "source_url": "http://data.charitycommission.gov.uk/", 43 | "register_url": "http://beta.charitycommission.gov.uk/charity-details/?regid=202918&subid=0", 44 | "retrieved_at": "2015-08-11" 45 | } 46 | -------------------------------------------------------------------------------- /spec/sample-data/valid/register-entry-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "subject_entity": { 4 | "entity_type": "unknown", 5 | "entity_properties": { 6 | "jurisdiction": "gb", 7 | "name": "SOME CHARITY", 8 | "telephone_number": "0870 333 2444", 9 | "identifiers": [ 10 | { 11 | "uid": "202918", 12 | "identifier_system_code": "uk_ew_cc" 13 | } 14 | ], 15 | "registered_address": { 16 | "street_address": "OXFAM GB, OXFAM, 2700 JOHN SMITH DRIVE, OXFORD BUSINESS PARK SOUTH", 17 | "locality": "OXFORD", 18 | "postal_code": "OX4 2JY" 19 | } 20 | } 21 | }, 22 | "register": { 23 | "jurisdiction": "England & Wales", 24 | "title": "Charity Register for England & Wales", 25 | "url": "http://beta.charitycommission.gov.uk", 26 | "registrar": { 27 | "name": "The Charity Commission for England and Wales", 28 | "jurisdiction": "England & Wales", 29 | "website": "https://www.gov.uk/government/organisations/charity-commission" 30 | } 31 | }, 32 | "identifier": "202918", 33 | "identifier_system_code": "uk_ew_cc", 34 | "category": "Charity-NonProfit", 35 | "other_attributes": { 36 | "objectives": "OXFAM'S OBJECTS ARE TO PREVENT AND RELIEVE POVERTY AND PROTECT THE VULNERABLE ANYWHERE IN THE WORLD. OXFAM FURTHERS ITS OBJECTS THROUGH INTERLINKED ACTIVITIES OF HUMANITARIAN RELIEF, DEVELOPMENT WORK AND ADVOCACY AND CAMPAIGNING. OXFAM IS AN AFFILIATE MEMBER OF OXFAM INTERNATIONAL. DETAILS OF OXFAM'S MISSION AND WAYS OF WORKING CAN BE FOUND AT WWW.OXFAM.ORG.UK", 37 | "contact_name": "MR JOSS SAUNDERS", 38 | "volunteers": 22000 39 | }, 40 | "start_date": "1965-09-07", 41 | "sample_date": "2014-12-09", 42 | "source_url": "http://data.charitycommission.gov.uk/", 43 | "register_url": "http://beta.charitycommission.gov.uk/charity-details/?regid=202918&subid=0", 44 | "retrieved_at": "2015-08-11" 45 | } 46 | -------------------------------------------------------------------------------- /spec/sample-data/valid/sanctioned-entity-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "subject_entity": { 4 | "entity_properties": { 5 | "name": { 6 | "given_name": "SANDRA", 7 | "family_name": "YOUNG" 8 | }, 9 | "registered_address": { 10 | "street_address": "93 FORFAR ROAD", 11 | "locality": "DUNDEE", 12 | "region": "ANGUS", 13 | "postal_code": "DD4 9BS" 14 | }, 15 | "company": { 16 | "name": "DOUGLAS STREET TRANSPORT LTD.", 17 | "jurisdiction_code": "gb" 18 | }, 19 | "date_of_birth": "1953-07-20", 20 | "nationality": "BRITISH", 21 | "uid": "000468370002" 22 | }, 23 | "entity_type": "person" 24 | }, 25 | "sanctions_list": { 26 | "title": "UK Disqualified Directors Register", 27 | "url": "https://www.gov.uk/search-the-register-of-disqualified-company-directors", 28 | "publisher": { 29 | "name": "Companies House UK", 30 | "jurisdiction": "gb", 31 | "website": "https://www.gov.uk/government/organisations/companies-house" 32 | } 33 | }, 34 | "sanctions": [ 35 | { 36 | "sanction_issuer": "UNDERTAKING", 37 | "sanction_type": "disqualification", 38 | "sanction_jurisdictions": [ 39 | "gb" 40 | ], 41 | "legal_basis": [ 42 | "CDDA 1986 S7" 43 | ] 44 | } 45 | ], 46 | "category": "DisqualifiedDirector", 47 | "retrieved_at": "2015-08-11T23:00:08+01:00", 48 | "sample_date": "2015-08-11", 49 | "start_date": "2013-05-16", 50 | "end_date": "2016-11-15", 51 | "source_url": "https://opendata.utah.gov/api/views/kzrq-v59u/rows.json?accessType=DOWNLOAD" 52 | } 53 | -------------------------------------------------------------------------------- /spec/sample-data/valid/sanctioned-entity-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "subject_entity": { 4 | "entity_properties": { 5 | "name": { 6 | "given_name": "Gaffar Mohammed", 7 | "family_name": "ELHASSAN", 8 | "title": "Major General" 9 | }, 10 | "uid": "8838" 11 | }, 12 | "entity_type": "person" 13 | }, 14 | "sanctions_list": { 15 | "title": "UK Treasury Consolidated list of sanctions targets", 16 | "url": "https://www.gov.uk/government/publications/financial-sanctions-consolidated-list-of-targets/consolidated-list-of-targets", 17 | "publisher": { 18 | "name": "Office of Financial Sanctions Implementation", 19 | "jurisdiction": "gb", 20 | "website": "https://www.gov.uk/government/organisations/office-of-financial-sanctions-implementation" 21 | } 22 | }, 23 | "sanctions": [ 24 | { 25 | "sanction_type": "sanctions_listing", 26 | "sanction_jurisdictions": [ 27 | "gb" 28 | ], 29 | "description": "Commander of the Western Military Region for the Sudanese Armed Forces, Sudan", 30 | "notes": "Remains listed as Gaffar Mohamed Elhassan by the EU", 31 | "cause": [ 32 | "UK Treasury Financial Sanctions Target" 33 | ] 34 | } 35 | ], 36 | "category": "ListedSanctionedEntity", 37 | "retrieved_at": "2015-08-11T23:00:08+01:00", 38 | "sample_date": "2015-08-11", 39 | "start_date": "2006-05-26", 40 | "source_url": "http://www.hm-treasury.gov.uk/d/sanctionsconlist.csv" 41 | } 42 | -------------------------------------------------------------------------------- /spec/sample-data/valid/sanctioned-entity-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "confidence": "HIGH", 3 | "subject_entity": { 4 | "entity_properties": { 5 | "name": "LARGO LEASING LTD.", 6 | "uid": "8743" 7 | }, 8 | "entity_type": "unknown" 9 | }, 10 | "sanctions_list": { 11 | "title": "Consolidated Sanctions List", 12 | "url": "https://www.treasury.gov/resource-center/sanctions/SDN-List/Pages/consolidated.aspx", 13 | "publisher": { 14 | "name": "US Office of Foreign Assets Control", 15 | "jurisdiction": "United States", 16 | "website": "https://www.treasury.gov/about/organizational-structure/offices/Pages/Office-of-Foreign-Assets-Control.aspx" 17 | } 18 | }, 19 | "sanctions": [ 20 | { 21 | "sanction_type": "sanctions_listing", 22 | "sanction_jurisdictions": [ 23 | "us" 24 | ], 25 | "legal_basis": [ 26 | { 27 | "name": "Narcotics Trafficking Sanctions Regulations, 31 C.F.R. part 536​", 28 | "url": "http://www.ecfr.gov/cgi-bin/text-idx?SID=5eae22affe2e3675b6deaa3fb796eb7a&tpl=/ecfrbrowse/Title31/31cfr536_main_02.tpl" 29 | } 30 | ] 31 | } 32 | ], 33 | "category": "ListedSanctionedEntity", 34 | "retrieved_at": "2015-08-11T23:00:08+01:00", 35 | "sample_date": "2015-08-11", 36 | "start_date": "2006-05-26", 37 | "source_url": "https://www.treasury.gov/resource-center/sanctions/Pages/default.aspx" 38 | } 39 | -------------------------------------------------------------------------------- /spec/sample-data/valid/simple-licence-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "Foo Corporation", 3 | "company_jurisdiction": "gb", 4 | "licence_number": "ABC123", 5 | "jurisdiction_classification": "Bank", 6 | "licence_jurisdiction": "fr", 7 | "source_url": "http://example.com/abc123", 8 | "sample_date": "2014-06-01", 9 | "start_date": "2014-01-01", 10 | "end_date": "2015-01-01", 11 | "confidence": "MEDIUM" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/simple-licence-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "Foo Corporation", 3 | "company_jurisdiction": "gb", 4 | "licence_number": "ABC123", 5 | "jurisdiction_classification": [ 6 | "Bank", 7 | "Robber" 8 | ], 9 | "licence_jurisdiction": "fr", 10 | "source_url": "http://example.com/abc123", 11 | "sample_date": "2014-06-01", 12 | "confidence": "MEDIUM" 13 | } 14 | -------------------------------------------------------------------------------- /spec/sample-data/valid/simple-licence-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "company_name": "Foo Corporation", 3 | "company_jurisdiction": "us_ny", 4 | "category": "Business", 5 | "licence_number": "ABC123", 6 | "jurisdiction_classification": "Funeral Parlour", 7 | "licence_jurisdiction": "New York City", 8 | "source_url": "http://example.com/abc123", 9 | "sample_date": "2014-06-01", 10 | "status": "Delinquent", 11 | "confidence": "MEDIUM" 12 | } 13 | -------------------------------------------------------------------------------- /spec/sample-data/valid/simple-subsidiary-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "source_url": "http://somewhere.com/a", 3 | "sample_date": "2014-02-01", 4 | "start_date": "2014-01-01", 5 | "end_date": "2015-02-01", 6 | "confidence": "HIGH", 7 | "parent_name": "Widgets R US", 8 | "parent_jurisdiction": "us_de", 9 | "direct": true, 10 | "percentage_controlled": "56.6", 11 | "subsidiary_name": "Little Widgets", 12 | "subsidiary_jurisdiction": "us_de" 13 | } 14 | -------------------------------------------------------------------------------- /spec/sample-data/valid/simple-subsidiary-02.json: -------------------------------------------------------------------------------- 1 | { 2 | "source_url": "http://somewhere.com/a", 3 | "sample_date": "2014-02-01", 4 | "start_date": "2014-01-01", 5 | "end_date": "2015-02-01", 6 | "confidence": "HIGH", 7 | "parent_name": "Widgets R US", 8 | "parent_jurisdiction": "us_de", 9 | "direct": true, 10 | "percentage_controlled": "56", 11 | "subsidiary_name": "Little Widgets", 12 | "subsidiary_jurisdiction": "us_de" 13 | } 14 | -------------------------------------------------------------------------------- /spec/sample-data/valid/simple-subsidiary-03.json: -------------------------------------------------------------------------------- 1 | { 2 | "source_url": "http://somewhere.com/a", 3 | "sample_date": "2014-02-01", 4 | "start_date": "2014-01-01", 5 | "end_date": "2015-02-01", 6 | "confidence": "HIGH", 7 | "parent_name": "Widgets R US", 8 | "parent_jurisdiction": "us_de", 9 | "direct": true, 10 | "percentage_controlled": "100.0", 11 | "subsidiary_name": "Little Widgets", 12 | "subsidiary_jurisdiction": "us_de" 13 | } 14 | -------------------------------------------------------------------------------- /spec/sample-data/valid/simple-subsidiary-04.json: -------------------------------------------------------------------------------- 1 | { 2 | "source_url": "http://somewhere.com/a", 3 | "sample_date": "2014-02-01", 4 | "start_date": "2014-01-01", 5 | "end_date": "2015-02-01", 6 | "confidence": "HIGH", 7 | "parent_name": "Widgets R US", 8 | "parent_jurisdiction": "us_de", 9 | "direct": true, 10 | "percentage_controlled": "100.0", 11 | "subsidiary_name": "Little Widgets", 12 | "subsidiary_jurisdiction": "us_de", 13 | "retrieved_at": "2015-10-02 10:15:56 +0000" 14 | } 15 | -------------------------------------------------------------------------------- /spec/sample-data/valid/subsequent-registration-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "data_type": "subsequent-registration", 3 | "previous_entity": { 4 | "entity_properties": { 5 | "name": "Vorsprung", 6 | "company_number": "R111_HRB123", 7 | "jurisdiction_code": "de" 8 | }, 9 | "entity_type": "company" 10 | }, 11 | "subsequent_entity": { 12 | "entity_properties": { 13 | "name": "Teknik", 14 | "company_number": "R222_HRB999", 15 | "jurisdiction_code": "de" 16 | }, 17 | "entity_type": "company" 18 | }, 19 | "source_url": "https://www.foo.com?bar=123", 20 | "start_date": "2018-05-01", 21 | "retrieved_at": "2018-11-08T12:34:56Z", 22 | "confidence": "HIGH" 23 | } 24 | -------------------------------------------------------------------------------- /spec/sample-data/valid/subsidiary-relationship-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "company": { 3 | "name": "BP Europa SE", 4 | "jurisdiction": "Spain" 5 | }, 6 | "sample_date": "2014-02-01", 7 | "start_date": "2013-07-06", 8 | "start_date_type": "before", 9 | "data": [ 10 | { 11 | "data_type": "subsidiary_relationship", 12 | "confidence": 80, 13 | "source_url": "https://docs.google.com/file/d/0B5ORBm2amqZSY2NvOFQwbTZvemM", 14 | "properties": { 15 | "direct": true, 16 | "percentage_controlled": "100", 17 | "subsidiary": { 18 | "name": "\"TSG Polska\" Spolka z ograniczona odpowiedzialnocia", 19 | "jurisdiction": "Poland" 20 | } 21 | } 22 | } 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /spec/sample-data/valid/supplier-relationship-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "data_type": "supplier-relationship", 3 | "customer": { 4 | "entity_type": "company", 5 | "entity_properties": { 6 | "name": "The Walt Disney Company", 7 | "jurisdiction_code": "us_ca", 8 | "company_number": "C1770422" 9 | } 10 | }, 11 | "supplier": { 12 | "entity_type": "company", 13 | "entity_properties": { 14 | "name": "Valcuvia Alba SHPK", 15 | "jurisdiction_code": "al" 16 | } 17 | }, 18 | "source_url": "https://example.com", 19 | "sample_date": "2016-09-09", 20 | "retrieved_at": "2018-11-08T12:34:56Z", 21 | "confidence": "HIGH" 22 | } 23 | -------------------------------------------------------------------------------- /spec/sample-data/valid/trademark-registration-01.json: -------------------------------------------------------------------------------- 1 | { 2 | "holders": [ 3 | { 4 | "entity_type": "person", 5 | "entity_properties": { 6 | "name": "Oster, Joachim", 7 | "registered_address": { 8 | "street_address": "PO Box 286", 9 | "locality": "Kealakekua", 10 | "region": "HI", 11 | "country": "US", 12 | "postal_code": "96750" 13 | }, 14 | "jurisdiction": "DE" 15 | } 16 | } 17 | ], 18 | "mark_details": { 19 | "mark_text": "ATHENA OF HAWAI'I", 20 | "mark_type": "Standard character mark", 21 | "mark_form": "text", 22 | "mark_image": { 23 | "path": "img/78527076/large" 24 | }, 25 | "classification": [ 26 | { 27 | "code_scheme_id": "wipo_nice", 28 | "code": "30" 29 | } 30 | ] 31 | }, 32 | "status": "SECTION 8 & 15-ACCEPTED AND ACKNOWLEDGED", 33 | "url": "http://tsdr.uspto.gov/#caseNumber=78527076&caseSearchType=US_APPLICATION&caseType=DEFAULT&searchType=statusSearch", 34 | "registration_date": "1987-09-27", 35 | "register": "wipo_madrid", 36 | "expiry_date": "2017-09-27", 37 | "sample_date": "2017-01-01", 38 | "retrieved_at": "2015-08-11T23:00:08+01:00", 39 | "source_url": "https://bulkdata.uspto.gov/data3/trademark/dailyxml/applications/apc170101.zip", 40 | "uid": "78527076", 41 | "confidence": "HIGH" 42 | } 43 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'json' 2 | require 'openc/json_schema' 3 | --------------------------------------------------------------------------------