- Advisers
GET /adviser/
: The deprecatedfirst_name
,first_name__icontains
,last_name
,last_name__icontains
,email
andemail__icontains
query parameters were removed.
-
Companies A utility function
datahub.dnb_api.link_company.link_company_with_dnb
was added which provides a mechanism for linking a Data Hub company record with a D&B company record. The utility function saves the pertinent D&B data to the Data Hub record.This will allow us to firstly provide an admin mechanism for quickly linking companies, followed by an API endpoint.
-
Companies The following criteria were added to the
automatic-company-archive
Celery task:- Do not have any ongoing investment projects
- Do not have any investor profiles
- Advisers
GET /adviser/
: The deprecatedfirst_name
,first_name__icontains
,last_name
,last_name__icontains
,email
andemail__icontains
query parameters were removed. - Companies A new endpoint,
POST /v4/company-referral
, was added. This creates a new company referral. Refer to the API documentation for the schema.
-
Companies The
format_dnb_company
now includes a check forannual_sales_currency
.If
annual_sales_currency
is not US Dollars, we do not propagateannual_sales
oris_annual_sales_estimated
fields downstream.All D&B records that we have encountered until now have
annual_sales
in US dollars but we would like to monitor this behavior and not ingest bad data in case there is an exception. -
Companies Added a
datahub.dbmaintenance
commandget_dnb_one_list_tier_companies.py
which enables querying of DNB-matched One List Tier B companies. This was re-instated after removal in a previous commit to enable further rollout of DNB hierarchies to Data Hub company records.
-
Companies A new
company_referral_companyreferral
table was added to hold referrals of companies between DIT advisers.The table has the following columns:
"id" uuid NOT NULL PRIMARY KEY
"created_on" timestamp with time zone NULL
"modified_on" timestamp with time zone NULL
"status" varchar(255) NOT NULL
"completed_on" timestamp with time zone NULL
"subject" varchar(255) NOT NULL
"notes" text NOT NULL
"company_id" uuid NOT NULL
"completed_by_id" uuid NULL
"contact_id" uuid NULL
"created_by_id" uuid NULL
"modified_by_id" uuid NULL
"recipient_id" uuid NOT NULL
-
Companies The company list view in Django admin now has a filter for
dnb_modified_on
field.This allows us to e.g. filter companies that were updated during today.
-
Endpoints are now sorted by path in the API docs.
- Swagger UI, used in the API docs, was updated to version 3.25.0.
-
Companies
GET /v4/dataset/companies-dataset
: 2 new fields were added to the companies dataset response:global_headquarters_id
global_ultimate_duns_number
-
Companies
GET /v4/company/<pk>
: Expose export countries asexport_countries
from newCompanyExportCountry
model within company response. The field has following structure:{ "export_countries": [ { "country": { "name": ..., "id": ... }, "status": "currently_exporting" }, { "country": { "name": ..., "id": ... }, "status": "not_interested" }, { "country": { "name": ..., "id": ... }, "status": "future_interest" }, ] }
-
Interactions
GET /v4/dataset/interactions-dataset
: The fieldmodified_on
was added to the interactions dataset endpoint.
-
Companies A new Celery task called
automatic_company_archive
was added to Data Hub API.This task would run every Saturday at 8pm in simulation mode with an upper limit of a 1000 companies. In simulation mode, this task would log the IDs of the companies that would have been automatically archived using the following criteria:
- Do not have any OMIS orders
- Do not have any interactions during the last 8 years
- Not matched to any D&B records
- Not created or modified during the last 3 months
- The
delete_orphaned_versions
command was modified to select records to be deleted in a fashion that is more efficient in the environment it will run.
-
Companies
POST /v4/search/company
: The behaviour of theuk_postcode
filter was modified so that spaces are ignored only if a full postcode is searched for.This means that
AB11
andAB1 1
are now distinct searches (where the former would match e.g.AB11 1AA
and the latter would match e.g.AB1 1AA
). (Previously, both searches were equivalent and matched both postcodes.) -
Interactions Interactions API
/v3/interaction
,export_countries
tagged to an interaction are consolidated intoCompanyExportCountry
model, in order to maintain company export countries list. If a country added to an interaction doesn't already exist in company export countries, it will be added. If in case that country already exists, following business rules apply:Status
ofInteractionExportCountry
added to an interaction with current date overrides the entry withinCompanyExportCountry
with older date.- Whereas
Status
ofInteractionExportCountry
added to an interaction with past date can't override the entry withinCompanyExportCountry
with newer date. - An interaction added with future date, will be treated as current date and existing rules apply.
- Companies A new model
company_companyexportcountryhistory
was created to log all changes made tocompany_companyexportcountry
model. This will maintain all inserts, updates and deletions to that model with appropriatehistory_type
with valuesinsert
,update
anddelete
.
- The IP restriction functionality provided by
django-admin-ip-restrictor
was removed as it was not in use as we're using private networking and other mechanisms within GOV.UK PaaS instead.
- It is now possible to perform queries to search endpoints in the API browser.
- Investment The squashed
investor_profile
migration0001_squashed
was transitioned to a normal migration and the migrations it replaced were removed.
- Investment
GET /v4/dataset/investment-projects-dataset
: 5 comma joined string fields were changed to return arrays of strings:actual_uk_region_names
business_activity_names
delivery_partner_names
strategic_driver_names
uk_region_location_names
-
Elasticsearch
: The newpostcode_analyzer
andpostcode_search_analyzer
analyzers were added. Analyzers can be used to enable partial search for area, district, sub-district, sector and a whole postcode.The search is case insensitive and any spaces are filtered out before analysis.
-
Uses of the deprecated Django function aliases
force_text()
andurlquote()
were replaced withforce_str()
andurllib.parse.quote()
.
-
Companies
POST /v4/search/company
: Auk_postcode
filter was added for theaddress_postcode
andregistered_address_postcode
fields for UK based companies. The filter accepts a single or a partial postcode as well as an array of postcodes. Multiple postcodes are matched withor
query. -
Interactions
GET /v4/dataset/interactions-dataset
: 3 new fields were added to the interactions dataset response:policy_area_names
policy_feedback_notes
policy_issue_type_names
-
Interactions Interactions API
/v3/interaction
now allows to specify if there was a discussion of countries during the interaction and add one or more export countries along with their status.were_countries_discussed
is a nullable boolean field.export_countries
field is of typeInteractionExportCountry
and takes a list ofcountry
andstatus
combinations wherecountry
is of typeCountry
andstatus
is a choice ofNot interested
,Currently exporting to
orFuture country of interest
.- Above details are only valid for non-investment themed interactions. Hence
were_countries_discussed
is mandatory field for bothexport
andother
themed interactions. - At least one country/status combination is mandatory if
were_countries_discussed
is set to True
- Above details are only valid for non-investment themed interactions. Hence
-
Advisers
GET /v4/company-list/<pk>/item
: The latest interaction of each list item now includes an array of DIT participants in thedit_participants
field. In context, the field has the following structure:{ "results": [ { "latest_interaction": { "dit_participants": [ { "adviser": { "id": ..., "name": ... }, "team": { "id": ..., "name": ... } }, ... ] } } ] }
-
The following deprecated endpoints have been removed from Data Hub API:
GET v4/dnb-match/<uuid:company_pk>
POST v4/dnb-match/<uuid:company_pk>/select-match
POST v4/dnb-match/<uuid:company_pk>/select-no-match
-
The following deprecated tables have been removed from Data Hub API:
- dnb_match_dnbmatchingcsvrecord
- dnb_match_dnbmatchingresult
-
Companies The
datahub.dnb_api.tasks.get_company_updates
task now run with a specific list of fields to update by default.This was introduced to not update
domain
®istered_address
fields. This is because the data for these fields does not meet Data Hub standards. D&B have been informed of this and are working on a fix. -
Python was updated from version 3.7.5 to 3.8.1. This includes updating various indirect dependencies.
-
The following internal query utilities were added:
get_array_agg_subquery()
JSONBBuildObject
- Investment
GET /v4/dataset/investment-projects-dataset
: Theallow_blank_possible_uk_regions
field was removed and replaced withuk_region_location_names
.
-
Companies The feature flag that enabled the new add-a-company journey was removed.
This makes the new add-a-company journey the default way to add a new company in Data Hub.
-
Companies The
get_dnb_one_list_tier_companies
management command was removed from Data Hub.This command was put in temporarily to safely run queries required for DNB company hierarchies rollout.
-
The following
dnb-match
endpoints will be deprecated on or after 5 January 2020:GET v4/dnb-match/<uuid:company_pk>
POST v4/dnb-match/<uuid:company_pk>/select-match
POST v4/dnb-match/<uuid:company_pk>/select-no-match
-
The following tables will be removed from Data Hub on or after 5 Jan 2020:
dnb_match_dnbmatchingcsvrecord
dnb_match_dnbmatchingresult
- Companies Added integration tests for the
rollback_dnb_company_updates
management command. This can now be used as it has been fully tested. - Companies A management command
rollback_dnb_company_updates
was added to revert updates applied by either theupdate_company_dnb_data
command or theget_company_updates
task. At present, the rollback command calls a stub function which will be fleshed out later - it is not ready for use.
- Companies A bugfix was made to ensure that the task id for the overall company updates process is used as an update descriptor in reversion comments. This will allow the use of a rollback tool in the event that D&B updates need to be undone.
-
Companies A new management command,
update_company_uk_region
, was added.This can update the UK regions of companies using a CSV file stored in Amazon S3.
-
Companies A new management command,
update_company_sector
, was added.This can update the sectors of companies using a CSV file stored in Amazon S3.
- Companies The
update_company_dnb_data
command was adjusted so that an audit log is fired to sentry after a successful run.
-
Companies A bug was fixed that resulted in a runtime error in the
get_company_updates
celery task.The error happened when
get_company_updates
tried to wait on the results of sub-tasks in order to produce an audit log.
-
Companies A schedule was added for a nightly run of the celery task:
datahub.dnb_api.tasks.get_company_updates
.This task will ingest D&B updates from
dnb_service
. The number of updates applied in a single run will be controlled by the environment variable calledDNB_AUTOMATIC_UPDATE_LIMIT
.
- Companies Companies updated with the
update_company_from_dnb
command and theupdate_companies_from_dnb_service
task are now saved with a reversion version which has a meaningful identifier in the comment. This identifier will help provide the groundwork for an "undo tool" which will allow us to reverse these automatic updates in the event of a problem. - The CSRF token is now being added to API Docs request header. It is now possible to try POST requests.
- Companies We are now recording
future_interest_countries
andexport_to_countries
with both theCompany
model and the new modelCompanyExportCountry
which we're currently integrating. - Investment All
investor_profile
app database migrations were squashed. The old migrations will be removed once the squashed migration has been applied to all environments. - The Elasticsearch suggester query parameter
contexts
is now used instead of the deprecatedcontext
parameter.
-
Investment The following deprecated investor profile tables were removed:
investor_profile_investorprofile_asset_classes_of_interest
investor_profile_investorprofile_construction_risks
investor_profile_investorprofile_deal_ticket_sizes
investor_profile_investorprofile_desired_deal_roles
investor_profile_investorprofile_investment_types
investor_profile_investorprofile_other_countries_being_cons84de
investor_profile_investorprofile_restrictions
investor_profile_investorprofile_time_horizons
investor_profile_investorprofile_uk_region_locations
investor_profile_investorprofile
investor_profile_profiletype
- Companies A setting
DNB_AUTOMATIC_UPDATE_LIMIT
was added which can be used to limit the number of companies updated by thedatahub.dnb_api.tasks.get_company_updates
task. - Companies Info log messages and a sentry-based audit log were added to the DNB company updates tasks to help provide better visibility for task runs.
- Companies A feature flag was added
"dnb-company-updates"
which governs whether or not to run the logic within thedatahub.dnb_api.tasks.get_company_updates
celery task. This affords us the ability to easily switch on/off DNB company updates as needed during the rollout of this feature.
- Companies A bug was fixed to ensure that DNB company updates can be ingested over multiple pages from dnb-service. Previously, the cursor value was not being extracted from the URL for the next page correctly.
-
Companies Integration tests were added for the
datahub.dnb_api.tasks.get_company_updates
task. These were not added as part of the original development as the task and it's dependent task (datahub.dnb_api.tasks.update_company_from_dnb_data
) were developed in parallel.Additionally, the calls that
datahub.dnb_api.tasks.get_company_updates
makes todatahub.dnb_api.tasks.update_company_from_dnb_data
were fixed to be the correct signature. -
Python was updated from version 3.7.4 to 3.7.5 in deployed environments.
- Interactions A new table
interaction_interactionexportcountry
was created. It has foreign key fieldsinteraction_id
andcountry_id
with status, value is expressed as:- 'currently exporting to'
- 'future interest'
- 'not interested'
-
Companies A celery task was added which takes a dictionary of company data sourced from dnb-service and updates the company record corresponding to it in Data Hub.
-
A celery task called
get_company_updates
was added.This task gets all the available company updates from the dnb-service and spawns downstream tasks to apply these updates to D&B matched company records in Data Hub.
-
The views that will replace stock Django Admin method of authentication with Staff SSO were added.
- Companies Merging two companies (via the admin site) now works when both companies are on the same company list.
- We are now exposing
CSRF_COOKIE_SECURE
andCSRF_COOKIE_HTTPONLY
Django settings via environment variables. - The squashed
metadata
app migration0001_squashed_0010_auto_20180613_1553
was transitioned to a normal migration and the migrations it replaced were removed.
- Investment
GET /v4/dataset/investment-projects-dataset
: Thecompeting_countries
field was updated to return country names rather than ids - OMIS
GET /v4/dataset/omis-dataset
: The fieldquote__accepted_on
was added to the omis dataset endpoint
- The
init_es
management command has been removed. Please usemigrate_es
instead.
-
The
migrate_es
management command was updated to handle the case when indexes don‘t already exist.Hence, the
init_es
command is no longer required and has been removed.
- Companies The squashed
company
app migration0001_squashed_0096_company_global_ultimate_duns_number
was transitioned to a normal migration and the migrations it replaced were removed. - Investment The squashed
investment
app migration0001_squashed_0068_remove_interaction_location_from_database
was transitioned to a normal migration and the migrations it replaced were removed.
- Companies A new table
company_companyexportcountry
was created to maintain company's export interests. Multiple countries along with a status can be recorded for each company. Status being one ofnot_interested
,future_interest
orcurrently_exporting
. This will now allow, for each entry, to record date and adviser that created and modified for audit.
- Advisers The
company_list_companylist
columnis_legacy_default
has been removed from database.
- Companies Error handling was added for when a
ConnectionError
occurs when accessing the DNB company search API endpoint.
- Companies A temporary management command
get_dnb_one_list_tier_companies
was added to enable the running of safe queries to facilitate the rollout of DNB company hierarchies.
- Advisers The
company_list_companylist
columnis_legacy_default
has been removed from database.
- Companies The deprecated model
CompaniesHouseCompany
was removed.
- Companies
GET /v4/dataset/companies-dataset
: 5 new fields were added to the companies dataset response:archived
archived_on
headquarter_type__name
modified_on
one_list_account_owner_id
- Contacts
GET /v4/dataset/contacts-dataset
: 3 new fields were added to the contacts dataset response:archived
archived_on
modified_on
- Interactions
GET /v4/dataset/interactions-dataset
: The fieldtheme
was added to the interactions dataset api response - Investment
GET /v4/dataset/investment-projects-dataset
: 5 new fields were added to the investment projects dataset api response:address_1
address_2
address_town
address_postcode
other_business_activity
- OMIS
GET /v4/dataset/omis-dataset
: 5 new fields were added to the OMIS dataset api response:quote__created_on
refund_created
refund_total_amount
total_cost
vat_cost
- Advisers The
company_list_companylist
columnis_legacy_default
has been made nullable and will be removed in the next release. - Companies The deprecated
company_companieshousecompany
table was removed.
- Investment A management command
update_investment_project_status
was added which can update the statuses of a list of investment projects from a CSV file stored in Amazon S3.
-
Companies A field called
dnb_modified_on
was added to the response of the following endpoints:GET /v4/company
GET /v4/company/<company_id>
This fields tracks the last time a company was updated from D&B.
-
Companies A field called
dnb_modified_on
was added to thecompany_company
table.This fields tracks the last time a company was updated from D&B.
- The deprecated
GET /dashboard/homepage/
endpoint was removed.
- Companies A command was added
datahub.dbmaintenance.management.commands.update_companies_dnb_data
which allows us to update the DNB data for a list of company IDs. All Company fields are updated by default, but a subset of fields can be specified if a partial update is preferable.
- Investment All
investment
app database migrations were squashed in order to reduce build times. The old migrations will be removed once the squashed migration has been applied to all environments. - All
metadata
app database migrations were squashed in order to reduce build times. The old migrations will be removed once the squashed migration has been applied to all environments.
- Companies
GET /v4/dataset/company-export-to-countries-dataset
: An API endpoint for a dataset of export_to_countries was added for consumption by data-flow and data-workspace.
-
Advisers The
company_list_companylistitem
columnadviser_id
has been removed from database. -
Companies The following deprecated endpoint has been removed:
POST /v4/company
-
Investment The deprecated
GET /v3/investment/from
endpoint was removed.
- The names of various countries were updated to match DIT reference data.
- Companies Database migrations up to 0096 were squashed in order to reduce build times. The old migrations will be removed once the squashed migration has been applied to all environments.
- Advisers The
company_list_companylistitem
columnadviser_id
has been removed from database.
-
Companies The following deprecated endpoints have been removed:
GET /ch-company
GET /ch-company/<ch-company-id>
-
Companies The following deprecated Comapnies House search endpoints have been removed from Data Hub:
GET /v3/search/companieshousecompany
GET /v4/search/companieshousecompany
-
Companies The
uppdate_company_registered_address
Django command is no longer available in Data Hub.This command was used to sync company registered addresses with Companies House data. We have now moved to D&B as the source for company data.
- Companies A celery task
datahub.dnb_api.tasks.sync_company_from_dnb
was added which gives a mechanism for syncing specified fields for a DNB-matched company with the latest DNB data for that company.
-
Advisers The
company_list_companylistitem
columnadviser_id
will be removed in the next release. -
Advisers The following legacy company list endpoints were removed:
GET /v4/user/company-list
GET /v4/user/company-list/<company ID>
PUT /v4/user/company-list/<company ID>
DELETE /v4/user/company-list/<company ID>
-
Companies The Companies House admin view is no longer available in Data Hub.
-
Companies The
sync_ch
Django command is no longer available in Data Hub.This command was used to sync Companies House data to Data Hub. We have now moved to D&B as the source for company data.
-
Advisers A
company_list_companylist
field"is_legacy_default" boolean NOT NULL
will be removed on or after 20th November. -
Companies The following table will be removed from Data Hub on or after 12 November 2019:
company_companieshousecompany
-
Companies The following Company endpoint is deprecated and will be removed on or after 12 November 2019:
POST /v4/company
DataHub has moved to using D&B creating new companies and so instead of the above endpoint, please use:
POST /v4/dnb/company-create
-
Investment The
GET /v3/investment/from
endpoint is deprecated and will be removed on or after 13 November 2019.(This was used by the old FDI dashboard which has now been decommissioned.)
-
The
GET /dashboard/homepage/
endpoint is deprecated and will be removed on or after 13 November 2019.(This was used for the Data Hub home page before the My companies feature.)
- Companies The
POST /v4/company/<ID>/self-assign-account-manager
andPOST /v4/company/<ID>/remove-account-manager
endpoints now correctly update themodified_by
field of the company (instead of leaving it unchanged).
- Companies A helper function for the "Update from DNB" admin feature was refactored as
a utility function
datahub.dnb_api.utils.update_company_from_dnb
. The function can optionally take an iterable of fields to update so that we can partially update companies from DNB. - Interactions The squashed migration
0001_squashed_0068_remove_interaction_location_from_database
was transitioned to a normal migration and the migrations it replaced were removed. - Elasticsearch mapping type migrations are now automatically run during deployments.
- Companies
GET /v4/dataset/companies-future-interest-countries-dataset
: An API endpoint for a dataset of future interest countries was added for consumption by data-flow and data-workspace. - Companies
POST /v4/search/company
: A filter was added for thelatest_interaction_date
field, in the form oflatest_interaction_date_before
andlatest_interaction_date_after
. Both the fields are optional. A company will only be returned if its latest interaction date falls between those dates. - Contacts
GET /v4/dataset/contacts-dataset
: The primary contact flag and contact address details were added to the contacts dataset response - Events A new events dataset endpoint (
GET /v4/dataset/events-dataset
) was added to be consumed by data-flow and used in data-workspace. - Investment The following endpoint was added:
GET /v4/dataset/investment-projects-dataset
: Present agreed partially denormalized data of all investment projects to be consumed by data-flow and used in data-workspace for reporting and analyst access.
-
Advisers The following legacy company list endpoints are deprecated and will be removed on or after 6 November 2019:
GET /v4/user/company-list
GET /v4/user/company-list/<company ID>
PUT /v4/user/company-list/<company ID>
DELETE /v4/user/company-list/<company ID>
Please use the new multi-list endpoints starting with
/v4/company-list
instead. -
Companies The following Comapnies House endpoints are deprecated and will be removed on or after 6 November 2019:
GET /v4/ch-company
GET /v4/ch-company/<company_number>
-
Companies The following Comapnies House endpoints are deprecated and will be removed on or after 6 November 2019:
GET /v3/search/companieshousecompany
GET /v4/search/companieshousecompany
- Companies The
update-from-dnb
admin tool now shows changes toglobal_ultimate_duns_number
field in the "review changes" table. - Investment The proposition documents feature is now always active and is no longer behind a feature flag. (This feature was introduced in September 2018.)
- Interactions Database migrations up to 0068 were squashed in order to reduce build times. The old migrations will be removed once the squashed migration has been applied to all environments.
- A correction was made to the deleted object collector (used to delete objects from Elasticsearch in bulk) to make it safe to use in web processes. This change has no current effect as the collector has only been used in management commands to date.
- The speed of search tests was improved by using more efficient test set-up. The reduction in running time of the search tests is approximately 65%.
- Various indirect dependencies were updated.
-
Companies
POST /v4/search/company
: new filterone_list_group_global_account_manager
was added. -
Companies
GET /v4/dataset/companies-dataset
: The fieldaddress_country__name
was added to the companies dataset endpoint -
Companies A new endpoint,
POST /v4/company/<ID>/remove-account-manager
, was added.The endpoint removes the assigned tier and account manager for a One List company on tier 'Tier D - Interaction Trade Adviser Accounts'.
If the company is on a One List tier other than 'Tier D - Interaction Trade Adviser Accounts', the operation is not allowed.
The
company.change_company
andcompany.change_regional_account_manager
permissions are required to use this endpoint.
- Companies A new dbmaintenance Django command was added to import data from csv format, with three fields
datahub_company_id
,is_published_find_a_supplier
andhas_find_a_supplier_profile
provided by Data Science platform, into Data Hub company model's field,great_profile_status
.
- Companies The dbmaintenance command
update_company_export_potential
is fixed to disable search signal receivers for company, to avoid queuing huge number of Celery tasks for syncing companies to Elasticsearch.
- Companies A property
is_global_ultimate
was added to theCompany
model - this exposes whether or not a company is the global ultimate.
-
Advisers A new dataset endpoint (
GET /v4/dataset/advisers-dataset
) was added to be consumed by data-flow and used in data-workspace. -
Advisers A new teams dataset endpoint (
GET /v4/dataset/teams-dataset
) was added to be consumed by data-flow and used in data-workspace. -
Companies The property
is_global_ultimate
(a boolean) was added as a field to the following company API endpoints as a read-only field:GET /v4/company
POST /v4/company
- returned in the resultGET /v4/company/<pk>
POST /v4/dnb/company-create
-
Companies The field
global_ultimate_duns_number
was added to theDNBCompanySerializer
.This means that the
global_ultimate_duns_number
returned in the D&B responses will now be saved to theglobal_ultimate_duns_number
field on theCompany
model. -
Companies A new endpoint,
POST /v4/company/<ID>/self-assign-account-manager
, was added. It:- sets the authenticated user as the One List account manager
- sets the One List tier of the company to 'Tier D - Interaction Trade Adviser Accounts'
The operation is not allowed if:
- the company is a subsidiary of a One List company (on any tier)
- the company is already a One List company on a different tier (i.e. not 'Tier D - Interaction Trade Adviser Accounts')
The
company.change_company
andcompany.change_regional_account_manager
permissions are required to use this endpoint. -
Companies A filter was added to the company collection API to allow callers to filter by
global_ultimate_duns_number
- e.g.GET /v4/company?global_ultimate_duns_number=123456789
. -
Companies The field
global_ultimate_duns_number
was added to the response of the following company API endpoints:GET /v4/company
GET /v4/company/<pk>
POST /v4/dnb/company-create
-
Contacts
GET /v4/dataset/contacts-dataset
: Company and contact id fields were added to the contacts dataset endpointGET /v4/dataset/contacts-dataset
: Superfluous company detail fields were removed from the contacts dataset endpoint -
Interactions
GET /v4/dataset/interactions-dataset
: Interaction id was added to the interaction dataset endpoint -
OMIS
GET /v4/dataset/omis-dataset
: Join between order and company was removed from the omis dataset endpointGET /v4/dataset/omis-dataset
: Join between order and contact was removed from the omis dataset endpointGET /v4/dataset/omis-dataset
: Order id, company id and contact id were added to the omis dataset endpointGET /v4/dataset/omis-dataset
: Team name was replaced with team id on the omis dataset endpoint
- Companies The
company_company
table now containsglobal_ultimate_duns_number
field. This field will be populated by theduns_number
for the global ultimate of a company. This data is included in the D&B payload.
- The legacy
GET /metadata/*
endpoints were removed. Please use Hawk authenticatedGET /v4/metadata/*
endpoints instead.
- Companies A new dbmaintenance Django command was added to import data from csv format, with two fields
datahub_company_id
andexport_propensity
provided by Data Science platform, into Data Hub comapany model.
- Unset cursor pagination
offset_cutoff
on dataset endpoints to fix issue when duplicatecreated_on
dates are encountered.
- Companies The
GET /company/<uuid:pk>
endpoint's read-only fieldone_list_group_global_account_manager
now includes the account manager's contact email address under thecontact_email
field. - Companies
GET /v4/company/<id>
: A new read-only field was added to company modelgreat_profile_status
. Values for this field are imported from Data Science platform, as a separate exercise. It can have one of the constant values out ofpublished
,unpublished
andnull
. - Companies Each adviser object returned by
/v4/company/<uuid:pk>/one-list-group-core-team
endpoint now includes a contact email address under thecontact_email
field.
- Companies A nullable
great_profile_status
varchar(255) column was added to the company_company table with possible values 'published', 'unpublished' and NULL.
- Interactions Various search model fields that were not being used in search queries (i.e. searched, filtered or sorted) are no longer indexed. This improves indexing performance.
-
Companies A new permission,
change_regional_account_manager
, was added. This permission currently has no effect and will be used as part of upcoming functionality.In the test data, this permission is assigned to teams with the
International Trade Team
role. -
Companies A tool was added to django admin to allow administrators to pull fresh data from DNB for a company with a
duns_number
.This allows administrators to resolve the unhappy-path for the new add-a-company journey by adding a
duns_number
to a company record followed by pulling data from DNB for the given company.
- Migrations for the
mi
database are now applied automatically during deployments.
- Investment The rounding of
gross value added
now always rounds up rather than using bankers' rounding where it would round to the nearest even number.
- The IP check that is being used with Hawk authenticated endpoints was enhanced with additional rules to allow traffic originating from an internal network.
-
Companies A new One List tier was added:
ID Name 1929c808-99b4-4abf-a891-45f2e187b410
Tier D - International Trade Adviser Accounts This tier currently contains no companies; it will be used as part of upcoming functionality.
-
Companies Various superfluous unused One List tiers were manually removed from all environments.
-
Companies All One List tiers were renamed:
Old name New name Tier A - Strategic Account Tier A - SRM Programme Accounts Tier A2 - Global Partners Tier A - SRM Commercial Partner Accounts Tier B - Global Accounts Tier B - Sector Team Accounts Tier B - Global Accounts (Capital Investment) Tier B - Capital Investment Team Accounts Tier C - Local Accounts (UKTI Managed) Tier C - Investment Services Team Accounts Tier D - POST Identified/Managed Tier D - Overseas Post Accounts Tier D - LEP Managed Branch (not IST) Tier D - Local Enterprise Partnership Accounts
- Interactions
GET /v4/dataset/interactions-dataset
: Added interactions dataset endpoint to be consumed by data-flow and used in data-workspace.
- Companies New fields for
Countries exported to
andCountries of interest
have been added to the csv file resulting from document download.
- Companies
GET /v4/dataset/companies-dataset
: Added companies dataset endpoint to be consumed by data-flow and used in data-workspace. - Companies
GET /v4/company/<id>
: A new read-only field was added to company modelexport_potential
. Values for this field are imported from Data Science platform, as a seperate exercise. It can have one of the constant values out ofvery_higb
,high
,medium
,low
,very_low
andnull
. - The
POST /v4/dnb/company-create
API endpoint will now saveregistered_address_*
fields on Data Hub companies that it creates. Registered address fields will not be saved at all unless a minimum ofline_1
,town
andcountry
fields are provided.
- Companies Some intermittently failing company autocomplete tests were corrected so that they now consistently pass.
- Companies
POST /v4/search/company
: A filter was added for theexport_to_countries
field. This accepts a list of country IDs. A company will only be returned if it contains one of the specified countries in this field. - Companies
POST /v4/search/company
: A filter was added for thefuture_interest_countries
field. This accepts a list of country IDs. A company will only be returned if it contains one of the specified countries in this field.
- Companies A tool was added to django admin to allow administrators to "unarchive" archived companies.
- A configurable blacklist was added so that we can specifically prohibit certain email addresses from the email ingestion feature.
- Email ingestion was adjusted so that emails are deleted after they are ingested. Previously, email ingestion would mark the emails as "seen" but now that we are out of the pilot for meeting invite ingestion we have switched to deletes as this is safer for data retention/protection reasons.
- The email ingestion whitelist was removed so that email ingestion is open to
all DIT advisers.
The email domain that a DIT adviser uses to send an email to Data Hub must be known to Data Hub through aDIT_EMAIL_DOMAIN_<domain>
django setting - there is no longer a default domain authentication value. This ensures that email ingestion is locked down to domains that we know the authentication signature for.
- Interactions The
location
column was removed from theinteraction_interaction
DB table.
- Fixed a bug in the DNB company save API endpoint which prevented DNB companies with no value for domain being saved as Data Hub companies.
-
Contacts Dataset app is split up into subpackages. i.e. datahub.dataset.views to datahub.dataset.contact.views
-
OMIS Dataset app is split up into subpackages. i.e. datahub.dataset.views to datahub.dataset.order.views
-
The PaaS IP checks have been removed from Hawk authorisation code. A separate authentication class to check the IP has been implemented instead.
The PaaS IP check can now be disabled using
DISABLE_PAAS_IP_CHECK
environment variable.
- Companies Composite index (created_on, id) is defined on Contact model for the sake of API endpoints defined under dataset app.
- Interactions The
location
column was removed from theinteraction_interaction
table.
- Interactions The
location
field for interactions was removed following its deprecation period. Please see the API and DB sections for further detail.
- Companies A feature was added to notify a configurable list of recipients when a company is added to Data Hub which has the
pending_dnb_investigation
flag set. The intention is for this to be used to send investigation details to DNB directly; though notifications will be monitored with a DIT email address to begin with.
-
Companies Two metdata API endpoints were added for One List Tiers.
GET /metadata/one-list-tier/
andGET /v4/metadata/one-list-tier
list all One List Tier models in the following format:[ { "id": "b91bf800-8d53-e311-aef3-441ea13961e2", "name": "Tier A - Strategic Account", "disabled_on": null }, ..., ]
-
Interactions The
location
field was removed from theGET /v3/interaction
andGET /v3/interaction/<uuid:pk>
API endpoints. -
-
OMIS The following API endpoint is updated
GET /v4/dataset/omis-dataset
: The sector__segment field was removed and sector_name was added which is a string of multiple sector names separated by ",".
-
- Interactions The
location
field was removed from the django state for theInteraction
model.
- Contacts
POST /v3/search/contact
,POST /v3/search/contact/export
various deprecatedsortby
values were removed. See the API section for more details. - Investment
POST /v3/search/investment_project
,POST /v3/search/investment_project/export
various deprecatedsortby
values were removed. See the API section for more details. - All
/metadata/*
endpoints are deprecated and will be removed on or after 17th October 2019. Please use corresponding/v4/metadata
endpoints instead.
-
The
dnb_api
package now has aDNBCompanyInvestigationSerializer
.This is used to store stub companies in the database when users cannot find a company in the DNB API and want to create a new company subject to DNB review.
-
Companies The
GET /v4/company
andGET /v4/company/<uuid:pk>
endpoints were modified to return the booleanpending_dnb_investigation
in responses. The format of the responses are as follows:"pending_dnb_investigation": true,
-
Contacts The following endpoint was added:
GET /v4/dataset/contacts-dataset
: Present required fields data of all contacts to be consumed by data-flow and used in data-workspace for reporting and analyst access.
-
Contacts
POST /v3/search/contact
,POST /v3/search/contact/export
the following deprecatedsortby
values were removed:accepts_dit_email_marketing
address_county
address_same_as_company
address_town
adviser.name
archived
archived_by.name
archived_on
company_sector.name
email
first_name
id
job_title
name
primary
telephone_countrycode
telephone_number
title.name
-
Investment
POST /v3/search/investment_project
,POST /v3/search/investment_project/export
the following deprecatedsortby
values were removed:actual_land_date
approved_commitment_to_invest
approved_fdi
approved_good_value
approved_high_value
approved_landed
approved_non_fdi
archived
archived_by.name
average_salary.name
business_activities.name
client_cannot_provide_total_investment
client_contacts.name
client_relationship_manager.name
export_revenue
fdi_type.name
foreign_equity_investment
government_assistance
id
intermediate_company.name
investment_type.name
investor_company.name
likelihood_to_land.name
modified_on
new_tech_to_uk
non_fdi_r_and_d_budget
number_new_jobs
project_assurance_adviser.name
project_code
project_manager.name
r_and_d_budget
referral_source_activity.name
referral_source_activity_event
referral_source_activity_marketing.name
referral_source_activity_website.name
sector.name
site_decided
total_investment
uk_company.name
-
An endpoint
POST /v4/dnb/company-create-investigation
was added for creating stub companies in DataHub for investigation by DNB. -
The
POST /v4/dnb/company-create
endpoint was modified to return the booleanpending_dnb_investigation
in responses representing created Data Hub companies.The format of the response is as follows:
"pending_dnb_investigation": true,
-
Following endpoints were added to replace existing
/metadata
endpoint:GET /v4/metadata/administrative-area
GET /v4/metadata/business-type
GET /v4/metadata/capital-investment/asset-class-interest
GET /v4/metadata/capital-investment/construction-risk
GET /v4/metadata/capital-investment/deal-ticket-size
GET /v4/metadata/capital-investment/desired-deal-role
GET /v4/metadata/capital-investment/equity-percentage
GET /v4/metadata/capital-investment/investor-type
GET /v4/metadata/capital-investment/large-capital-investment-type
GET /v4/metadata/capital-investment/required-checks-conducted
GET /v4/metadata/capital-investment/restriction
GET /v4/metadata/capital-investment/return-rate
GET /v4/metadata/capital-investment/time-horizon
GET /v4/metadata/communication-channel
GET /v4/metadata/country
GET /v4/metadata/employee-range
GET /v4/metadata/event-type
GET /v4/metadata/evidence-tag
GET /v4/metadata/export-experience-category
GET /v4/metadata/fdi-type
GET /v4/metadata/fdi-value
GET /v4/metadata/headquarter-type
GET /v4/metadata/investment-activity-type
GET /v4/metadata/investment-business-activity
GET /v4/metadata/investment-delivery-partner
GET /v4/metadata/investment-investor-type
GET /v4/metadata/investment-involvement
GET /v4/metadata/investment-project-stage
GET /v4/metadata/investment-specific-programme
GET /v4/metadata/investment-strategic-driver
GET /v4/metadata/investment-type
GET /v4/metadata/likelihood-to-land
GET /v4/metadata/location-type
GET /v4/metadata/omis-market
GET /v4/metadata/order-cancellation-reason
GET /v4/metadata/order-service-type
GET /v4/metadata/overseas-region
GET /v4/metadata/policy-area
GET /v4/metadata/policy-issue-type
GET /v4/metadata/programme
GET /v4/metadata/project-manager-request-status
GET /v4/metadata/referral-source-activity
GET /v4/metadata/referral-source-marketing
GET /v4/metadata/referral-source-website
GET /v4/metadata/salary-range
GET /v4/metadata/sector
GET /v4/metadata/service-delivery-status
GET /v4/metadata/service
GET /v4/metadata/team-role
GET /v4/metadata/team
GET /v4/metadata/title
GET /v4/metadata/turnover
GET /v4/metadata/uk-region
The responses are exactly the same as their corresponding
/metadata
endpoints.New endpoints use Hawk authentication.
-
All
/metadata/*
endpoints are deprecated and will be removed on or after 15th October 2019. Please use corresponding/v4/metadata
endpoints instead.
- Companies
GET /v4/company/<id>>/timeline
: This deprecated endpoint was removed. Please use/v4/activity-feed
instead.
- Interactions The field
location
is deprecated. Please check the API and Database schema categories for more details.
- OMIS The notification logic in
datahub.omis
was adjusted to optionally use thedatahub.notification
app for triggering GOVUK notifications. This functionality can be switched on using a feature flag.
- Investment The spellings of
Leisure
andCommercial
in the Asset Class Interest metadata for Investor Profiles were fixed.
-
Advisers The following endpoint was added:
GET /v4/company-list/<id>
: Gets details of a single company list belonging to the authenticated user.
Responses are in the following format:
{ "id": "string", "name": "string", "item_count": integer, "created_on": "ISO timestamp" }
-
Companies
GET /v4/company/<id>>/timeline
: This deprecated endpoint was removed. Please use/v4/activity-feed
instead. -
Interactions
GET,PATCH /v3/interaction/<uuid:pk>
andGET,POST /v3/interaction
: the fieldlocation
is deprecated and will be removed on or after 19 September. -
Interactions The
/v3/search/interaction
endpoint was modified to returncompany_one_list_group_tier
in search results. This will be in the following format:... "company_one_list_group_tier": { "id": "b91bf800-8d53-e311-aef3-441ea13961e2", "name": "Tier A - Strategic Account" } ...
The value could alternatively be null (if the interaction's company does not have a one list group tier).
A filter was added to
/v3/search/interaction
-company_one_list_group_tier
-which allows callers to filter interaction searches to companies attributed to a particular one list group tier. -
A field
iso_alpha2_code
was added to theGET /metadata/country/
API endpoint.This endpoint now returns results of the following format:
... { "id": "80756b9a-5d95-e211-a939-e4115bead28a", "name": "United Kingdom", "disabled_on": null, "overseas_region": null, "iso_alpha2_code": "GB" }, { "id": "81756b9a-5d95-e211-a939-e4115bead28a", "name": "United States", "disabled_on": null, "overseas_region": { "name": "North America", "id": "fdfbbc8d-0e8a-479a-b10f-4979d582ff87" }, "iso_alpha2_code": "US" }, ...
-
Companies The
company__company
table now contains thednb_investigation_data
column.This column contains auxiliary data for the company that is required only for the purpose of investigation.
-
Interactions The column
interaction_interaction.location
is deprecated and will be removed on or after 19 September. -
Investment
Bank
andCorporate investor
were added to theinvestor_type
metadata forinvestor_profile
.
- Interactions The
metadata_service.name
column was removed from the database.
-
The
sync_es
management command was updated to use Celery.By default, the Celery task runs asynchronously.
--foreground
can be passed to run the Celery task synchronously (without Celery running).The
--batch_size
argument was removed as it is rarely used and isn't currently supported by the Celery task.
-
Advisers The following endpoint was added:
PUT /v4/company-list/<company list ID>/item/<company ID>
This adds a company to the user's own selected list of companies.
If the operation is successful, a 204 status code will be returned. If there is no company list with specified company list ID or company with the specified company ID, a 404 will be returned.
If an archived company is specified, a 400 status code will be returned and response body will contain:
{ "non_field_errors": "An archived company can't be added to a company list." }
Otherwise, the response body will be empty.
-
Advisers
GET /v4/company-list
,PATCH /v4/company-list/<id>
: Anitem_count
field was added to response items containing the count of items in the list. -
Advisers The following endpoint was added:
GET /v4/company-list/<company list ID>/item
It lists all the companies on the authenticated user's selected list, with responses in the following format:
{ "count": <int>, "previous": <url>, "next": <url>, "results": [ { "company": { "id": <string>, "archived": <boolean>, "name": <string>, "trading_names": [<string>, <string>, ...] }, "created_on": <ISO timestamp>, "latest_interaction": { "id": <string>, "created_on": <ISO timestamp>, "date": <ISO date>, "subject": <string> } }, ... ] }
latest_interaction
may benull
if the company has no interactions.Results are sorted by
latest_interaction.date
in reverse chronological order, withnull
values last.The endpoint has pagination in line with other endpoints; to retrieve all results pass a large value for the
limit
query parameter (e.g.?limit=1000
).If selected list does not exist, the endpoint will return 404 status code.
-
Advisers The following endpoint was added:
DELETE /v4/company-list/<company list ID>/item/<company ID>
This removes a company from the user's own selected list of companies.
If the operation is successful, a 204 status code will be returned. If there is no company list with specified company list ID or a list doesn't belong to the user, a 404 will be returned.
-
OMIS The following endpoint was added:
GET /v4/dataset/omis-dataset
: Present required fields data of all orders to be consumed by data-flow and used in data-workspace for reporting and analyst access.
- Interactions The
metadata_service.name
column was removed from the database.
- Companies
GET /v4/company/<id>>/timeline
: This endpoint is deprecated and will be removed on or after 9 September 2019. Please use/v4/activity-feed
instead. - Contacts
POST /v3/search/contact
,POST /v3/search/contact/export
the followingsortby
values are deprecated and will be removed on or after 12 September 2019:accepts_dit_email_marketing
address_county
address_same_as_company
address_town
adviser.name
archived
archived_by.name
archived_on
company_sector.name
email
first_name
id
job_title
name
primary
telephone_countrycode
telephone_number
title.name
- Investment
POST /v3/search/investment_project
,POST /v3/search/investment_project/export
the followingsortby
values are deprecated and will be removed on or after 12 September 2019:actual_land_date
approved_commitment_to_invest
approved_fdi
approved_good_value
approved_high_value
approved_landed
approved_non_fdi
archived
archived_by.name
average_salary.name
business_activities.name
client_cannot_provide_total_investment
client_contacts.name
client_relationship_manager.name
export_revenue
fdi_type.name
foreign_equity_investment
government_assistance
id
intermediate_company.name
investment_type.name
investor_company.name
likelihood_to_land.name
modified_on
new_tech_to_uk
non_fdi_r_and_d_budget
number_new_jobs
project_assurance_adviser.name
project_code
project_manager.name
r_and_d_budget
referral_source_activity.name
referral_source_activity_event
referral_source_activity_marketing.name
referral_source_activity_website.name
sector.name
site_decided
total_investment
uk_company.name
- Advisers The following endpoint was added:
DELETE /v4/company-list/<list ID>
: Delete a company list and all its items.
- Advisers
GET /v4/company-list
: Theitems__company_id
query parameter can now be used to get the authenticated user's lists that contain a particular company. - Advisers The following endpoint was added:
-
PATCH /v4/company-list/<list ID>
: Rename a company list.The request body must be in following format:
{ "name": "string" }
-
- Companies The
pending_dnb_investigation
field in thecompany_company
table is now non-nullable.
- Advisers An internal constraint preventing multiple company lists per user was removed now that the existing company list functionality is aware of multiple lists.
- Advisers The following endpoint was added:
-
POST /v4/company-list
: Create a company list for the authenticated user.The request body must be in following format:
{ "name": "string" }
-
- Advisers The following endpoint was added:
-
GET /v4/company-list
: Lists the authenticated user's company lists.This is a paginated endpoint. Items are sorted by name, and are in the following format:
{ "id": "string", "name": "string", "created_on": "ISO timestamp" }
-
- Companies The
company_company
table now has a boolean field calledpending_dnb_investigation
. This is to record whether a company is under DNB investigation.
- Advisers The
company_list_companylisttem.adviser_id
column is deprecated and will be removed on or after 2 September 2019.
- The
datahub.notification
app was adapted so that it can work with multiple GOVUK notify API keys - so that different apps can define their GOVUK notify templates on different notify service instances.
-
Interactions Meeting invite ingestion was adjusted so that users do not get error notifications when they send a meeting cancellation.
The notification celery task was modified so that 400/403 level responses do not have automatic retries.
- Advisers The initial teams fixture (used for tests and new environments) was updated so that only the
DIT_staff
group has permission to use the company lists feature. - Advisers All legacy company list endpoints now fully operate on a default list for each user. This is in preparation for it being possible for users to have multiple company lists.
- Advisers The
company_list_companylisttem.adviser_id
column was made nullable.
- Advisers A data migration was added to associate all existing company list items with a default list for each user. This is in preparation for it being possible for users to have multiple company lists.
- Celery was configured to send task events by default (for better compatibility with the Flower monitoring tool).
- The Celery
conf
inspect command was disabled for security reasons.
- An endpoint was added for creating companies through dnb-service (https://github.com/uktrade/dnb-service/) given a
duns_number
.
- Advisers
company_list_companylisttem.list_id
was madeNOT NULL
.
-
Investment
POST /v3/search/investment_project
: Thesortby
valuereferral_source_adviser.name
is no longer accepted.This
sortby
value was non-functional and was returning a 500 error if an attempt to use it was made.
- Interactions It is now possible to upload interactions with service answers using the interaction upload tool in the Django admin.
- Advisers Items added to company lists are now internally associated with a default list for each user. This is in preparation for it being possible for users to have multiple company lists.
- All remaining uses of the
copy_to
mapping parameter were removed from all Elasticsearch mapping types. All search queries were updated to use corresponding sub-fields instead.
-
Advisers A
company_list_companylist
table with the following columns was created:"created_on" timestamp with time zone NULL
"modified_on" timestamp with time zone NULL
"id" uuid NOT NULL PRIMARY KEY
"name" varchar(255) NOT NULL
"is_legacy_default" boolean NOT NULL
"adviser_id" uuid NOT NULL
"created_by_id" uuid NULL
"modified_by_id" uuid NULL
This will be used to store the IDs and names of user-created lists of companies.
-
Advisers A
"list_id" uuid NULL
column was added to thecompany_list_companylisttem
table.
-
Interactions
interaction_interaction
: The deprecateddit_adviser_id
anddit_team_id
columns were removed. Please use theinteraction_interactionditparticipant
table instead. -
The following management commands were removed as they are no longer required:
update_investment_project_archived_state
update_investment_project_comments
update_investment_project_delivery_partners
update_investment_project_referral_source_activity_marketing
update_investment_project_referral_source_activity_website
update_omis_uk_regions
update_service_delivery_grant_fields
These commands were used to make corrections following the initial data migration into Data Hub and no longer in use.
- Various sub-fields were added to all Elasticsearch mapping types as replacements for the few remaining uses of the
copy_to
mapping parameter.
- Interactions
GET /v3/interaction, GET /v3/interaction/<id>, POST /v3/interaction, PATCH /v3/interaction/<id>
: The deprecateddit_adviser
anddit_team
fields were removed from responses. Please usedit_participants
instead. - Interactions
interaction_interaction
: The deprecateddit_adviser_id
anddit_team_id
columns were prepared for removal and will shortly be removed. Please use theinteraction_interactionditparticipant
table instead.
- Contacts The search CSV export was updated to handle interactions with multiple teams in the 'Team of latest interaction' column. Multiple team names are separated by commas, and duplicate teams are omitted. The column was accordingly renamed 'Teams of latest interaction'.
- Interactions It's now possible to edit the advisers and teams associated with an interaction from the admin site.
- It's now possible to configure Gunicorn to emit monitoring metrics to a StatsD host.
-
Interactions An out-of-memory crash when trying to import a CSV file with blank
contact_email
values was fixed.(This would only have happened if there were a large number of active contacts in the database with blank email addresses.)
-
Companies
POST /v4/dnb/company-search
: This endpoint was modified to ensure that DNB results were hydrated with the corresponding Data Hub company, if it is present and can be matched (by duns number).The API response returns Data Hub companies alongside DNB data in the following format:
"datahub_company": { "id": "0f5216e0-849f-11e6-ae22-56b6b6499611", "latest_interaction": { "id": "e8c3534f-4f60-4c93-9880-09c22e4fc011", "created_on": "2018-04-08T14:00:00Z", "date": "2018-06-06", "subject": "Exported to Canada" } }
-
Interactions The
service
metadata data model has been changed from a flat list of services to a tree structure with a help ofdjango-mptt
library. -
Interactions It is now possible to monitor the number of failed and successful calendar invites being ingested in DataHub using StatsD.
-
The API documentation at the URL path
/docs
was updated to use OpenAPI following the upgrade to Django Rest Framework 3.10.0.It is now enabled by default.
There are currently some missing or incorrect details as we are dependent on the web framework we are using. These should be corrected over time.
- Comma- and semicolon-delimited values in CSV exports are now always sorted alphabetically. (Previously, they were in an unspecified order which could change between exports.)
-
Interactions The
metadata_service
table columnname
is deprecated and will be removed on or after the 5th of September 2019. -
-
Interactions The following columns were added to
metadata_service
table to transform flat services list into a tree structure:- segment (character varying(255)) not null
- level (integer) not null
- lft (integer) not null
- parent_id (uuid)
- rght (integer) not null
- tree_id (integer) not null
-
Columns `level`, `lft`, `rght`, `tree_id` are being used by `django-mptt` library to manage the tree structure.
The `parent_id` field points at the parent service.
At present only the leaf nodes are being used as interaction's service foreign keys.
- Advisers
PUT /v4/user/company-list/<company ID>
: A bug was fixed where multiple companies could not be added to a company list.
- The Gunicorn log format was updated to include request times in seconds.
- Interactions A migration was updated to not create a database index concurrently due to a problem encountered during deployment.
-
Advisers The following endpoint was added:
GET /v4/user/company-list
It lists all the companies on the authenticated user's personal list, with responses in the following format:
{ "count": <int>, "previous": <url>, "next": <url>, "results": [ { "company": { "id": <string>, "archived": <boolean>, "name": <string>, "trading_names": [<string>, <string>, ...] }, "created_on": <ISO timestamp>, "latest_interaction": { "id": <string>, "created_on": <ISO timestamp>, "date": <ISO date>, "subject": <string> } }, ... ] }
latest_interaction
may benull
if the company has no interactions.Results are sorted by
latest_interaction.date
in reverse chronological order, withnull
values last.The endpoint has pagination in line with other endpoints; to retrieve all results pass a large value for the
limit
query parameter (e.g.?limit=1000
).
- Interactions The
metadata_service.requires_service_answers_flow_feature_flag
column was removed from the database.
- Companies The admin site company merging tool now updates users' personal company lists if they contain the company being archived.
-
Advisers
PUT /v4/user/company-list/<company ID>
: A 400 is now returned if an archived company is specified.In this case, the response body will contain:
{ "non_field_errors": "An archived company can't be added to a company list." }
(Note that it is still possible to remove archived companies from a user's company list.)
-
Advisers The following endpoint was added:
GET /v4/user/company-list/<company ID>
It checks if a company is on the authenticated user's personal list of companies.
If the company is on the user's list, a 2xx status code will be returned. If it is not, a 404 will be returned.
-
Advisers The following endpoint was added:
DELETE /v4/user/company-list/<company ID>
This removes a company from the authenticated user's personal list of companies.
If the operation is successful, a 2xx status code will be returned. If there is no company with the specified company ID, a 404 will be returned.
Currently, the response body is unused.
- Interactions The
metadata_service.requires_service_answers_flow_feature_flag
column was removed from the database.
- Interactions The
metadata_service.requires_service_answers_flow_feature_flag
column is deprecated will be removed on or after 22 July 2019.
-
Interactions The ability to send received and bounce notifications in case of success and failure of ingesting calendar invite emails respectively has been added to the DataHub.
This is currently behind the
interaction-email-notification
feature flag. -
Interactions The
interaction_service_answers_flow
feature flag was removed and the related functionality is no longer behind a feature flag. -
An initial endpoint was added for searching for companies through dnb-service (https://github.com/uktrade/dnb-service/). This endpoint takes care of auth and proxies requests through to the service - it will return error responses from the proxied DNB service.
There is further work to be done here in terms of iterating features and hardening the implementation.
- Investment The schema in the API documentation was corrected for all investment document upload callback endpoints.
- Django Rest Framework was updated from version 3.9.4 to version 3.10.1.
- Interactions The context of "Export Opportunities" service has been updated to include export interaction.
-
Advisers The following endpoint was added:
PUT /v4/user/company-list/<company ID>
This adds a company to the authenticated user's personal list of companies.
If the operation is successful, a 2xx status code will be returned. If there is no company with the specified company ID, a 404 wil lbe returned.
Currently, the response body is unused.
-
Advisers A
company_list_companylistitem
table was created with the following columns:"id" uuid NOT NULL PRIMARY KEY
"adviser_id" uuid NOT NULL
"company_id" uuid NOT NULL
"created_on" timestamp with time zone NULL
"modified_on" timestamp with time zone NULL
"created_by_id" uuid NULL
"modified_by_id" uuid NULL
This table will store a list of companies advisers have added to their personal list of companies.
- Interactions The service names were changed to enable front-end to display them in hierarchy. Services no longer required have been disabled.
- Schemas in the API documentation were corrected for the following endpoints:
- all archive endpoints
- all unarchive endpoints
- the complete OMIS order endpoint
- the cancel OMIS order endpoint
- all search endpoints
- Python was updated from version 3.7.3 to 3.7.4 in deployed environments.
-
Interactions
POST /v3/interaction
now accepts TAP related fieldsgrant_amount_offered
andnet_company_receipt
for interaction. -
Investment The following endpoints were corrected to return a 404 when a non-existent investment project or proposition was specified:
GET,POST /v3/investment/{project_pk}/proposition/{proposition_pk}/document
GET,DELETE /v3/investment/{project_pk}/proposition/{proposition_pk}/document/{entity_document_pk}
GET /v3/investment/{project_pk}/proposition/{proposition_pk}/document/{entity_document_pk}/download
POST /v3/investment/{project_pk}/proposition/{proposition_pk}/document/{entity_document_pk}/upload-callback
(Previously, they would only return a 404 in some of the possible cases.)
- An
order double precision
column was added to themetadata_service
table to store the order of services.
-
The Django Rest Framework built-in documentation was enabled at the URL path
/docs
.This is currently only enabled if the
ENABLE_API_DOCUMENTATION
environment variable is set toTrue
as the documentation is not fully functional as yet.You must also log into Django admin prior to accessing
/docs
. -
A new
notification
django app was added for the purpose of sending notifications to Data Hub advisers and contacts. This is a wrapper around the GOVUK Notify service and will be used initially for sending receipt/bounce notifications to advisers who use the meeting invite email ingestion tool.The app has not yet been added to
settings.INSTALLED_APPS
; this will happen as part of the follow-up work to use the notification app in the meeting invite email ingestion logic.
- An upgrade to sentry-sdk was reverted due to an observed memory leak.
- Interactions The meeting email invites ingestion parsing logic was adjusted to use a new
max_interactions
strategy for finding a contact. This ensures that when multiple contacts are found which match the same email address, the contact with the most interactions attributed to it takes precedence. It's an imperfect solution, but acts as a best guess for imperfect data.
- The activity-stream payload for OMIS and investment projects will now contain
startTime
.
- The
/whoami/
endpoint was opted out of atomic requests as it does not require them. This change is intended to help reduce the occurence of a race condition that occurs when two requests perform OAuth2 introspection on the same token.
-
Interactions
GET /v3/interaction
,GET /v3/interaction/<id>
: Aservice_answers
field was added to responses. -
Interactions
POST /v3/interaction
,PATCH /v3/interaction/<id>
: An optional (depending on selected Service)service_answers
field was added to request bodies.The
service_answers
body is expected to be in the following format:{ "<service question ID>": { "<service answer option ID>": { # body reserved for future use } }, ... }
-
The activity-stream payload will now contain
dit:team
for alldit:DataHubAdviser
.
- Interactions A nullable
service_answers jsonb
column was added to theinteraction_interaction
table to store answers to service questions.
- Interactions The Django Admin Interaction Service section has been made read only.
- Events Events in the test data for acceptance tests were corrected to use a DIT service that is valid for events.
-
Interactions
GET /metadata/service/
: Theinteraction_questions
field was added to responses. It contains a representation of service questions and answer options fromServiceQuestion
andServiceAnswerOption
models. It is an array of following format:[ # Array of ServiceQuestion { 'id': <uuid>, 'name: <str>, 'disabled_on': <datetime>, 'answer_options': [ # Array of ServiceAnswerOption { 'id': <uuid>, 'name': <str>, 'disabled_on': <datetime> }, ... ] }, ... ]
-
The activity-stream payload will now contain
dit:jobTitle
for alldit:DataHubContact
. -
The activity-stream payload will now contain
url
for alldit:DataHubContact
.
- Interactions The services in production were replicated to all other environments in preparation for forthcoming changes to interactions and services.
- OMIS When a company or a contact name changes, related OMIS orders are now synced to ElasticSearch.
- Interactions A feature flag with code
interaction_service_answers_flow
was added to control whether services with service questions and answer options are returned by the API. - The deprecated Raven Sentry client was replaced with the Sentry SDK.
- Interactions A
metadata_service.requires_service_answers_flow_feature_flag
column was added with typeboolean
. This is used to hide certain services behind a feature flag while related functionality is being built.
- Interactions The admin site import interactions tool is no longer behind a feature flag.
-
Interactions
POST /v3/interaction, PATCH /v3/interaction/<id>
: The API now correctly returns an error ifservice_delivery
is specified forkind
whentheme
isinvestment
. -
It is now possible to get a list of OMIS orders added in activity-stream format.
The URL for this is:
/v3/activity-stream/omis/order-added
- Interactions
POST /v3/interaction, PATCH /v3/interaction/<id>
: The deprecateddit_adviser
anddit_team
fields were made read-only in preparation for their removal. Please usedit_participants
instead. - Interactions
POST /v3/search/interaction
: The deprecateddit_adviser
filter was removed. Please use thedit_participants__adviser
filter instead. - Interactions
POST /v3/search/interaction
: The deprecateddit_adviser_name
filter was removed. There is no replacement for this filter. - Interactions
GET /v3/search
,POST /v3/search/interaction
: The deprecateddit_adviser
anddit_team
interaction fields were removed from interaction objects in responses. Please usedit_participants
instead. - Interactions
POST /v3/search/interaction
: The deprecateddit_team
filter was removed. Please use thedit_participants__team
filter instead.
-
Interactions The theme field was added to the import interactions admin site tool. The tool is currently behind the
admin-interaction-csv-importer
feature flag as it’s incomplete. -
Interactions A feature was activated for ingesting meeting invite emails sent to a shared mailbox as draft interactions. This enables DIT advisers to create interactions more easily.
This is the first instance of a Data Hub app using the framework provided by the
datahub.email_ingestion
app. There will be subsequent iterations on theCalendarInteractionEmailProcessor
class to improve the user experience - most notably sending notifications of bounce/receipt to advisers.
-
GET /v4/activity-feed
now returns an empty list if the authenticated user doesn't have permissions to view all interactions, investment projects or OMIS orders. -
It is now possible to get a list of investment projects created in activity-stream format.
The URL for this is:
/v3/activity-stream/investment/project-added
-
Interactions The ability to download records that could not be matched to contacts was added to the import interactions admin site tool. The tool is currently behind the
admin-interaction-csv-importer
feature flag as it’s incomplete. -
Interactions The import interactions admin site tool now rejects files that contain duplicate items. The tool is currently behind the
admin-interaction-csv-importer
feature flag as it’s incomplete. -
Interactions The search CSV export was updated to handle interactions with multiple advisers. The previous Adviser and Service provider columns have been merged into a single Advisers column. This column contains the names of all the advisers for each interaction separated by commas. The team of each adviser is in brackets after each name.
For existing interactions, existing teams associated with each interaction have been preserved. For new interactions, the team included is the team each adviser was in when they were added to the interaction.
- Interactions A GIN index for
source
was added to theinteraction_interaction
table.
- Interactions The ability to save loaded interactions was added to the import interactions admin site tool. The tool is currently behind the
admin-interaction-csv-importer
feature flag as it’s incomplete.
- Investment A fix was applied to the SPI report generation task so that it restarts if it's interrupted.
-
New endpoint added
GET /v4/activity-feed
which acts as a proxy for Activity Stream and allows a Data Hub frontend client to read from it. -
It is now possible to get a list of interactions in activity-stream format.
The URL for this is:
/v3/activity-stream/interactions
- Interactions The database table
interaction_serviceadditionalquestion
has been added with the following columns:id uuid not null
disabled_on timestamp with time zone
name text not null
is_required boolean not null
type character varying(255) not null
order double precision not null
answer_option_id uuid not null
- Interactions The database table
interaction_serviceansweroption
has been added with the following columns:id uuid not null
disabled_on timestamp with time zone
name text not null
order double precision not null
question_id uuid not null
- Interactions The database table
interaction_servicequestion
has been added with the following columns:id uuid not null
disabled_on timestamp with time zone
name text not null
order double precision not null
service_id uuid not null
- Companies
PATCH /v4/company/<uuid:pk>
:headquarter_type
andglobal_headquarters
can now always be changed. They were previously read-only if a company had a non-emptyduns_number
set.
-
Companies The trading_address fields have now been removed from the
company_company
table in the database. These include:trading_address_1
trading_address_2
trading_address_town
trading_address_county
trading_address_country
trading_address_postcode -
Companies The
/v3/ch-company/*
endpoints have been removed. These include:/v3/ch-company
/v3/ch-company/<company-number>
-
Investment The validation for the endpoint
PATCH /v4/investor-profile/
has been updated.The field
required_checks_conducted_on
now needs to be a date that is within the last 12 months.
-
Investment The database table used to store large capital investor profiles has been changed from
investor_profile_investorprofile
toinvestor_profile_largecapitalinvestorprofile
.The column
profile_type_id
was removed.The database tables
investor_profile_investorprofile
andinvestor_profile_profiletype
will be removed on or before 27th May.
-
Companies The trading_address fields have now been removed from the codebase. These include:
trading_address_1
trading_address_2
trading_address_town
trading_address_county
trading_address_country
trading_address_postcode
- Interactions A preview page was added to the admin site tool for importing interactions. The tool is currently behind the
admin-interaction-csv-importer
feature flag as it is incomplete.
-
Companies On 16 May 2019, the
company_company.trading_address_<xyz>
columns will be removed from the database. These include:trading_address_1
trading_address_2
trading_address_town
trading_address_county
trading_address_country_id
trading_address_postcode
-
Companies The
/v3/company
endpoints have been removed. These include:/v3/company
/v3/company/<uuid:pk>
/v3/company/<uuid:pk>/archive
/v3/company/<uuid:pk>/audit
/v3/company/<uuid:pk>/one-list-group-core-team
/v3/company/<uuid:pk>/timeline
/v3/company/<uuid:pk>/unarchive
-
The
/v3/search/company/
endpoints have been removed. These include:/v3/search/company
/v3/search/company/autocomplete
/v3/search/company/export
- Interactions Validation of rows in the input file was added to the admin site tool for importing interactions. The tool is currently behind the
admin-interaction-csv-importer
feature flag as it is incomplete.
- Investment The logic to streamline the investment flow by removing the assign pm stage has been removed. The logic was hidden behind a feature flag that was never activated.
-
Companies The endpoint
/v4/search/company/autocomplete
has been updated to accept an optional parameter ofcountry
.Company typeahead searches are now filterable by
country
the filter accepts a single or list of country ids.
- Interactions The
interaction_interaction
table has been modified such that the following columns are no longer nullable:status
- this has an application-enforced default of 'complete'location
- this has an application-enforced default of ''archived
- this has an application-enforced default of false
- The
update_company_registered_address
Django command is now available for internal use. This copies theregistered_address
of all CompaniesHouseCompany records to the corresponding Company record with the samecompany_number
. If a CompaniesHouseCompany is not found, it resets theregistered_address
.
-
Companies New API endpoints were added to aid matching Data Hub companies with D&B companies:
All endpoints return a response body with the following format:
{ "result": { ... }, "candidates": [ { ... }, { ... } ], "company": { "id": "81756b9a-5d95-e211-a939-e4115bead28a", "name": 'My Corp', "trading_names": ["trading name"] } }
The value of
result
depends on the type of match.If a match was found and recorded:
{ "dnb_match": { "duns_number": "111", 'name': 'NAME OF A COMPANY', "country": { "id": "81756b9a-5d95-e211-a939-e4115bead28a", "name": "United States" }, "global_ultimate_duns_number": "112", "global_ultimate_name": "NAME OF A GLOBAL COMPANY", "global_ultimate_country": { "id": "81756b9a-5d95-e211-a939-e4115bead28a", "name": "United States" }, }, "matched_by": "data-science" },
If
matched_by
containsadviser
value, then additionaladviser
key will be added to theresult
response:{ ... "matched_by": "adviser", "adviser": { "id": "12777b9a-5d95-2241-a939-fa112be2d22a", "first_name": "John", "last_name": "Doe", "name": "John Doe" } },
If a match wasn't found because the company isn't listed or the adviser is not confident to make the match:
{ "no_match": { "reason': "not_listed", # or "not_confident" }, "matched_by": "adviser", "adviser": { ... } },
If a match wasn't found because there were multiple potential matches:
{ "no_match": { "reason": "more_than_one", "candidates": [ # list of duns numbers "123456789", "987654321" ] }, "matched_by": "adviser", "adviser": { ... } },
If a match wasn't found because of other reasons:
{ "no_match": { "reason": "other", "description": "explanation..." }, "matched_by": "adviser", "adviser": { ... } },
The top level
candidates
is a list of objects with this format:{ "duns_number": 12345, "name": 'test name', "global_ultimate_duns_number": 12345, "global_ultimate_name": "test name global", "global_ultimate_country": { "id": "81756b9a-5d95-e211-a939-e4115bead28a", "name": "United States" }, "address_1": "1st LTD street", "address_2": "", "address_town": "London", "address_postcode": "SW1A 1AA", "address_country": { "id": "81756b9a-5d95-e211-a939-e4115bead28a", "name": "United States" }, "confidence": 10, "source": "cats" }
Endpoints:
GET /v4/dnb-match/<company_pk>
returns the response abovePOST /v4/dnb-match/<company_pk>/select-match
accepts theduns_number
of the candidate to be selected as a match from the list of candidatesPOST /v4/dnb-match/<company_pk>/select-no-match
acceptsreason
with value:not_listed
: if none of the candidates is a good matchnot_confident
: if the adviser is not confident to make the matchmore_than_one
: if there are multiple potential matches. In this case an extracandidates
field is required with the list of valid duns numbers.other
: for other reasons. In this case an extra free textdescription
field is required
-
Investment The field
actual_land_date
is now required to move an investment project from active to verify win.
- Companies On the 4th of May 2019, all data in the
company_company
registered address fields will be replaced by the official data from the Companies House record identified by thecompany_company.company_number
field. In cases wherecompany_company.company_number
is invalid or blank (e.g. for non-UK companies), the registered address fields will be made blank and the related data lost. List of registered address fields:registered_address_1
registered_address_2
registered_address_town
registered_address_county
registered_address_postcode
registered_address_country_id
- Companies The field
company.Company.registered_address_country
was made blankable so that it becomes optional in the Django admin. - The
company_field_with_copy_to_name_trigram
search field type was removed and uses of it replaced withcompany_field
. Thename.keyword
,name.trigram
andtrading_names.trigram
sub-fields are now used in search queries. This change also means that the type of thename
sub-field has been corrected fromkeyword
totext
. - Python was updated from version 3.7.2 to 3.7.3 in deployed environments.
- Companies The following columns were made
NOT NULL
- optional values will be represented by empty strings:company_company.registered_address_2
company_company.registered_address_county
company_company.registered_address_postcode
company_company.address_1
company_company.address_2
company_company.address_town
company_company.address_county
company_company.address_postcode
company_company.trading_address_1
company_company.trading_address_2
company_company.trading_address_town
company_company.trading_address_county
company_company.trading_address_postcode
- Interactions The deprecated
interaction_interaction.contact_id
column was deleted from the database. Please use theinteraction_interaction_contacts
many-to-many table instead.
- Investment The logic has been updated for selecting which financial year's data is used to calculate the GVA for an investment project.
- The
name.keyword
andname.trigram
sub-fields of thecontact_or_adviser_field
field type are now used in search queries. Hence, thename_trigram
sub-field ofcontact_or_adviser_field
has been removed, and the type of thename
sub-field has been changed fromkeyword
totext
.
- Interactions
GET /v3/interaction
,GET /v3/interaction/<id>
: Atheme
field was added to responses with possible values"export"
,"investment"
,"other"
andnull
. - Interactions
POST /v3/interaction
,PATCH /v3/interaction/<id>
: An optionaltheme
field was added to request bodies with possible values"export"
,"investment"
,"other"
andnull
. - Investment The endpoint
/v4/large-investor-profile
has been updated to allow the following fields to be set to empty values.- investor_type
- minimum_return_rate
- minimum_equity_percentage
- Interactions The deprecated
interaction_interaction.contact_id
column was deleted from the database. Please use theinteraction_interaction_contacts
many-to-many table instead. - Interactions A nullable
theme varchar(255)
column was added to theinteraction_interaction
table with possible values'export'
,'investment'
,'other'
and NULL. This column is primarily for internal use.
- Interactions The deprecated
interaction_interaction.contact
column is being prepared for removal and will shortly be removed. Please use theinteraction_interaction_contacts
table instead.
-
Companies
POST /v3/company
andPATCH /v3/company/<uuid:pk>
: None values for address CharFields are now internally converted to empty strings as Django recommends: https://docs.djangoproject.com/en/2.1/ref/models/fields/#null -
Interactions
GET /v3/interaction
andGET /v3/interaction/<uid>
: The following fields were added:archived
- boolean - whether the interaction has been archived or not, defaults toFalse
archived_on
- datetime string, nullable - the datetime at which the interaction was archivedarchived_by
- object, nullable - the Adviser that archived the interactionarchived_reason
- string, nullable - free-form text explaining the reason for archiving the interaction
These fields cannot be modified with PATCH or POST requests.
Two additional API endpoints were added:
POST /v3/interaction/<uid>/archive
- requires a"reason"
parameter. This will archive an interaction with the supplied reason.POST /v3/interaction/<uid>/unarchive
This will 'un-archive' an interaction.
- Interactions Four supporting fields were added to
interaction_interaction
for the purpose of allowing interactions to be archived:archived
(boolean, nullable)archived_on
(datetime string, nullable)archived_by_id
(uuid, nullable) - foreign key tocompany_adviser
archived_reason
(string, nullable)
- Interactions A supporting field was added to
interaction_interaction
for the purpose of logging the external source of an interaction:source
(JSONB, nullable)
- Interactions The first page of admin site tool for importing interactions was added, allowing a CSV file to be selected. This feature is currently behind the
admin-interaction-csv-importer
feature flag as it is incomplete. - Investment Large capital profiles can now be downloaded as a csv file
- The
cleanse_companies_using_worldbase_match
command now ignores matches for duns numbers already used in Data Hub as there can be only one Data Hub company record with a given duns number.
-
Interactions
GET /v3/interaction
andGET /v3/interaction/<uid>
: The following fields were added:status
- string - one of'draft'
or'complete'
, defaults to'complete'
location
- string - free text representing the location of a meeting, defaults to''
These can both modified with
PATCH
requests.When creating or updating an interaction whose
status='draft'
, bothservice
andcommunication_channel
are no longer required. -
Investment The following endpoint has been added
/v4/search/large-investor-profile/export
to allow large capital profiles to be download as a csv file.The following data columns are returned per large capital profile in the csv (in this order):
- Date created
- Data Hub profile reference
- Data Hub link
- Investor company
- Investor type
- Investable capital
- Global assets under management
- Investor description
- Required checks conducted
- Required checks conducted by
- Required checks conducted on
- Deal ticket sizes
- Asset classes of interest
- Investment types
- Minimum return rate
- Time horizons
- Restrictions
- Construction risks
- Minimum equity percentage
- Desired deal roles
- UK regions of interest
- Other countries being considered
- Notes on locations
- Date last modified
- Interactions Two supporting fields were added to
interaction_interaction
for the purpose of recording meetings:status
(text, nullable) - one of"draft"
or"complete"
location
(text, nullable) - free text representing the location of a meeting
- A Django command was added to data cleanse some Data Hub companies using the D&B Worldbase matches.
- Interactions
GET /v3/interaction
: The deprecateddit_adviser__first_name
anddit_adviser__last_name
values for thesortby
query parameter were removed.
-
Companies Company match candidates can now be updated with a management command using data from CSV file
-
Investment The following fields have been added to Investment Search:
- gross_value_added
To allow
gross_value added
to be filtered by a range the following filters have been added:- gross_value_added_start
- gross_value_added_end
-
Investment The following fields have been added to the investment csv download:
- FDI type
- Foreign equity investment
- GVA multiplier
- GVA
- Investment An investment project with a business activity of sales now uses the GVA Multiplier for retail to calculate Gross Value Added.
- Investment New Django Admin page to update and add GVA Multipliers.
- Investment Renamed command
populate_gross_value_addded
torefresh_gross_value_added_values
and updated to include projects with a business activity ofsales
that do not have a sector. name.keyword
,name.trigram
andtrading_names.trigram
sub-fields were added to thecompany_field_with_copy_to_name_trigram
field type in all search models. These will replace the existingname_trigram
andtrading_names_trigram
sub-fields and allow the type of thename
sub-field to be changed fromkeyword
totext
.- Celery was updated to version 4.3.
- Python was updated from version 3.6.8 to 3.7.2.
-
Investment Investment project search endpoint
/v3/search/investment_project
now returnsgross_value_added
for each investment project.Search results can now be filtered by
gross_value_added
using the range filtersgross_value_added_start
andgross_value_added_end
.
- Interactions Communication channel is now included in CSV exports of search results.
- Investment
Gross Value Added
has been added to investment projects. This is calculated based on the sector, business activity and the projected foreign equity investment amount.
name.keyword
andname.trigram
sub-fields were added to thecontact_or_adviser_field
field type in all search models. This is in preparation of the removal of thename_trigram
sub-field, and also so we can change the type of thename
sub-field fromkeyword
totext
.- Django was updated to version 2.2.
- Events
POST /v3/event, PATCH /v3/event/<id>
: Theorganiser
field is now required. - Investment The following read only field has been added to
/v3/investment/
endpoint.gross_value_added
-
Investment The database table
investment_investmentproject
has been updated with the following columns:- gross_value_added (decimal)
The the following columns in database table
investment_gva_multiplier
has been updated:multiplier (float) not null
changed tomultiplier (decimal) not null
- Investment Fix for investment admin updated GVA multiplier string.
-
Interactions
GET /metadata/service/
: The following values for thecontexts
field are deprecated and will be removed on or after 8 April 2019:interaction
service_delivery
Please see the API section for more details.
-
Interactions The following service contexts were added in Django admin:
- Export interaction
- Export service delivery
- Investment interaction
- Other interaction
- Other service delivery
All existing, non-disabled services with the 'Interaction' context have also been given the 'Other interaction' context.
All existing, non-disabled services with the 'Service delivery' context have also been given the 'Other service delivery' context.
The 'Interaction' context was renamed 'Interaction (deprecated)' and will be removed at a later date.
The 'Service delivery' context was renamed 'Service delivery (deprecated)' and will be removed at a later date.
-
Investment A mapping from
Sectors
toSIC Groupings
andGVA Multiplier
information has been added. This mapping will be used to help calculate the GVA of an investment project. -
The service contexts and team tags fields in the admin site were updated to use tick boxes for better usability.
-
A context filter was added to the service list in the admin site.
-
Interactions
GET /metadata/service/
: The following values for thecontexts
field were added:export_interaction
export_service_delivery
investment_interaction
other_interaction
other_service_delivery
The following contexts are deprecated and will be removed on or after 8 April 2019:
interaction
service_delivery
Please migrate to the new values above.
-
Investment The database table
investment_fdisicgrouping
has been added with the following columns:- id (uuid) not null,
- name (text) not null,
- disabled_on (datetime),
The database table
investment_gva_multiplier
has been added with the following columns:- id (uuid) not null,
- multiplier (float) not null,
- financial_year (int) not null,
- fdisicgrouping_id (uuid) not null,
Where
fdi_sicgrouping_id
is a foreign key toinvestment_fdisicgrouping
.The database table
investment_investmentsector
has been added with the following columns:- sector_id (uuid) not null pk,
- fdi_sicgrouping_id (uuid) not null,
Where
sector_id
is a foreign key tometadata_sector
andfdi_sicgrouping_id
is a foreign key toinvestment_fdisicgrouping
.The database_table
investment_investmentproject
has been updated and the following column has been added:- gva_multiplier_id (uuid),
Where
gva_multiplier_id
is a foreign key toinvestment_gvamultiplier
.
-
Investment The endpoint
/v4/large-capital-profile
now accepts and returnsrequired_checks_conducted_on
(date) andrequired_checks_conducted_by
(adviser id).Both become required fields when
required_checks_conducted
is set toCleared
orIssues identified
. -
Investment New endpoint added
POST /v4/search/large-investor-profile
to search and retrieve large capital investor profiles.Profiles are filterable as follows. The following filters accept and single or list of ids:
- id
- asset_classes_of_interest (metadata id)
- country_of_origin (country id)
- investor_company (company id)
- created_by (adviser id)
- investor_type (metadata id)
- required_checks_conducted (metadata id)
- deal_ticket_size (metadata id)
- investment_type (metadata id)
- minimum_return_rate (metadata id)
- time_horizon (metadata id)
- restriction (metadata id)
- construction_risk (metadata id)
- minimum_equity_percentage (metadata id)
- desired_deal_role (metadata id)
- uk_region_location (uk region id)
- other_countries_being_considered (country id)
The following range filters have been added:
- created_on_before (date)
- created_on_after (date)
- global_assets_under_management_start (int)
- global_assets_under_management_end (int)
- investable_capital_start (int)
- investable_capital_end (int)
The following text search filter has been added:
- investor_company_name (text)
- Interactions
POST /v3/search/interaction
: Thedit_adviser
filter is deprecated and will be removed on or after 4 April 2019. Please use thedit_participants__adviser
filter instead. - Interactions
POST /v3/search/interaction
: Thedit_adviser_name
filter is deprecated and will be removed on or after 4 April 2019. There is no replacement for this filter. - Interactions
GET /v3/search
,POST /v3/search/interaction
: Thedit_adviser
anddit_team
interaction fields are deprecated and will be removed on or after 28 March 2019. Please usedit_participants
instead. - Interactions
POST /v3/search/interaction
: Thedit_team
filter is deprecated and will be removed on or after 4 April 2019. Please use thedit_participants__team
filter instead. - Investment The column
investmentproject.likelihood_of_landing
was removed from the database.
- Interactions A DIT participants section was added to the interaction form in the admin site. This displays all advisers and teams that are associated with an interaction. This section will remain read-only until the old DIT adviser and DIT team fields are removed from the database.
- Interactions Global search is now aware of multiple interaction advisers and teams. This means that it searches the names of all advisers and teams added to an interaction instead of only one of them.
- The 'My latest interactions' list on the home page is now aware of multiple interaction advisers. This means that if multiple advisers are added to an interaction, the interaction will show up on all of those advisers' home pages.
- Investment Large Capital investor profile search index added.
- Various dependencies were updated.
- Interactions
POST /v3/search/interaction
:dit_participants__adviser
was added as a filter. This is intended to replace the existingdit_adviser
filter. - Interactions
POST /v3/search/interaction
:dit_participants__team
was added as a filter. This is intended to replace the existingdit_team
filter.
- Investment The column
investmentproject.likelhood_of_landing
was removed from the database.
- Interactions
GET /v3/interaction
: Thedit_adviser__first_name
anddit_adviser__last_name
values for thesortby
query parameter are deprecated and will be removed on or after 28 March 2019. - Interactions
GET /v3/interaction, GET /v3/interaction/<id>, POST /v3/interaction, PATCH /v3/interaction/<id>
: Thedit_adviser
anddit_team
fields are deprecated and will be removed on or after 28 March 2019. Please usedit_participants
instead. - Interactions The DIT adviser and DIT team fields were temporarily made read-only in the admin site until the transition to allowing multiple advisers in an interaction is complete.
- Interactions
interaction_interaction
: Thedit_adviser_id
anddit_team_id
columns are deprecated and will be removed on or after 22 April 2019. Please use theinteraction_interactionditparticipant
table instead.
-
Interactions
GET /v3/interaction, GET /v3/interaction/<id>, POST /v3/interaction, PATCH /v3/interaction/<id>
:dit_participants
was added to responses. This is an array in the following format:[ { "adviser": { "id": ..., "first_name": ..., "last_name": ..., "name": ... }, "team": { "id": ..., "name": ... } }, { "adviser": { "id": ..., "first_name": ..., "last_name": ..., "name": ... }, "team": { "id": ..., "name": ... } }, ... ]
This field is intended to replace the
dit_adviser
anddit_team
fields. -
Interactions
POST /v3/interaction, PATCH /v3/interaction/<id>
:dit_participants
is now a valid field in request bodies. This should be an array in the following format:[ { "adviser": { "id": ... } }, { "adviser": { "id": ... } }, ... ]
Note that the team for each participant will be set automatically. (If a team is provided it will be ignored.)
dit_participants
is intended to replace thedit_adviser
anddit_team
fields. -
Interactions
GET /v3/search
,POST /v3/search/interaction
:dit_participants
was added to interaction search results in responses. This is an array in the following format:[ { "adviser": { "id": ..., "first_name": ..., "last_name": ..., "name": ... }, "team": { "id": ..., "name": ... } }, { "adviser": { "id": ..., "first_name": ..., "last_name": ..., "name": ... }, "team": { "id": ..., "name": ... } }, ... ]
This field is intended to replace the
dit_adviser
anddit_team
fields.
- Interactions
GET,POST /v3/interaction
,GET,PATCH /v3/interaction/<id>
: The deprecatedcontact
field was removed. Please usecontacts
instead. - Interactions
GET /v3/search
,POST /v3/search/interaction
: The deprecatedcontact
field in interaction search results was removed. Please usecontacts
instead.
- Investment A new endpoint has been added for creating and maintaining Large capital investor profiles on datahub.
- Interactions A Celery task was added to create
InteractionDITParticipant
objects from thedit_adviser
anddit_team
values for interactions that do not already have aInteractionDITParticipant
object. The task must be run manually.
-
Investment
GET /v4/large-investor-profile
returns a list of all the large capital profiles. The results can be filtered using a parameter ofinvestor_company_id
given a company id.POST /v4/large-investor-profile
creates a large capital profile for a giveninvestor_company
.GET /v4/large-investor-profile/<uuid:pk>
returns the large capital profile for the given id.PATCH /v4/large-investor-profile/<uuid:pk>
updates the large capital profile for the given id.-
A large capital profile consists of the following fields:
id
the uuid of the of the investor profile (readonly),investor_company
a company (uuid and name),investor_type
the capital investment investor type (uuid and name),investable_capital
the capital that could be invested in USD (int),global_assets_under_management
Global assets under management amount in USD (int),investor_description
a text description of the investor,required_checks_conducted
a required background checks conducted status (uuid and name),deal_ticket_sizes
a list of deal ticket sizes (uuid and name),investment_types
a list of large capital investment types (uuid and name),minimum_return_rate
a return rate (uuid and name),time_horizons
a list of time horizons (uuid and name),construction_risks
a list of construction risks (uuid and name),minimum_equity_percentage
an equity percentage (uuid and name),desired_deal_roles
a list of desired deal roles (uuid and name),restrictions
a list of restrictions (uuid and name),asset_classes_of_interest
a list of asset class interests (uuid and name),uk_region_locations
a list of uk regions (uuid and name),notes_on_locations
a text field,other_countries_being_considered
a list of countries (uuid and name),created_on
the time and date the profile was created,modified_on
the time and date the profile was last modified,incomplete_details_fields
a list of the detail fields that are yet to have a value set.incomplete_requirements_fields
a list of the requirements fields that are yet to have a value set.incomplete_location_fields
a list of the location fields that are yet to have a value set. -
The detail fields:
investor_type
investable_capital
,global_assets_under_management
,investor_description
,background_checks_conducted
-
The requirement fields:
deal_ticket_sizes
,investment_types
,minimum_return_rate
,time_horizons
,construction_risks
,minimum_equity_percentage
,desired_deal_roles
,restrictions
,asset_classes_of_interest
-
The location fields:
uk_region_locations
,notes_on_locations
,other_countries_being_considered
-
-
Investment The following metadata endpoints have been added
GET /metadata/capital-investment/asset-class-interest/
returns all possibleasset_class_interest
values. The values also include a fieldasset-class-interest-sector
which returns theid
andname
of the the associatedasset_class_interest_sector
.GET /metadata/capital-investment/required-checks-conducted/
returns all possibleinvestor_profile_requiredchecksconducted
values.GET /metadata/capital-investment/construction-risk/
returns all possibleinvestor_profile_constructionrisk
values.GET /metadata/capital-investment/deal-ticket-size/
returns all possibleinvestor_profile_dealticketsize
values.GET /metadata/capital-investment/desired-deal-role/
returns all possibleinvestor_profile_desireddealrole
values.GET /metadata/capital-investment/equity-percentage/
returns all possibleinvestor_profile_equitypercentage
values.GET /metadata/capital-investment/investor-type/
returns all possibleinvestor_profile_investortype
values.GET /metadata/capital-investment/large-capital-investment-type/
returns all possibleinvestor_profile_largecapitalinvestmenttype
values.GET /metadata/capital-investment/restriction/
returns all possibleinvestor_profile_restriction
values.GET /metadata/capital-investment/return-rate/
returns all possibleinvestor_profile_returnrate
values.GET /metadata/capital-investment/time-horizon/
returns all possibleinvestor_profile_time_horizon
values.
-
Interactions The table
interaction_interactionditparticipant
table was added with the following columns:"id" bigserial NOT NULL PRIMARY KEY
"adviser_id" uuid NULL
"interaction_id" uuid NOT NULL
"team_id" uuid NULL
This is a many-to-many relationship table linking interactions with advisers.
The table had not been fully populated with data yet; continue to use
interaction_interaction.dit_adviser_id
andinteraction_interaction.dit_team_id
for the time being.
- Interactions
GET /v3/interaction
: The deprecatedcontact__first_name
andcontact__last_name
values for thesortby
query parameter were removed. - Interactions
GET /v3/interaction
: The deprecatedcontact_id
query parameter was removed. Please usecontacts__id
instead. - Interactions
POST /v3/search/interaction
: The deprecatedcontact
andcontact_name
filters were removed. - Interactions
POST /v3/search/interaction
: The deprecatedcontact.name
,dit_adviser.name
,dit_team.name
andid
values for thesortby
query parameter were removed. GET /v3/search
: all the values for thesortby
query parameter were removed.
- Investment Fix for
generate_spi_report
celery task having the incorrect path.
-
-
Investment The database table
investor_profile_investorprofile
has been added with the following columns:
id (uuid) not null
,investor_company_id (uuid) not null
,profile_type_id (uuid) not null
,created_on (timestamp)
,modified_on (timestamp)
,created_by_id (uuid)
,modified_by_id (uuid)
,global_assets_under_management (numeric)
,investable_capital (numeric)
,investor_description (text)
,notes_on_locations (text)
,investor_type_id (uuid)
,minimum_equity_percentage_id (uuid)
,minimum_return_rate_id (uuid)
,required_checks_conducted_id (uuid)
.
-
-
-
Investment The following metadata database tables have been added:
investor_profile_assetclassinterestsector
investor_profile_backgroundchecksconducted
investor_profile_constructionrisk
investor_profile_dealticketsize
investor_profile_desireddealrole
investor_profile_equitypercentage
investor_profile_investortype
investor_profile_largecapitalinvestmenttype
investor_profile_restriction
investor_profile_returnrate
investor_profile_timehorizon
-
Each table has the following columns:
id (uuid) not null
,name (text) not null
,order (float) not null
. -
The metadata table
investor_profile_assetclassinterest
has the columns:
id (uuid) not null
,name (text) not null
,order (float) not null
,asset_class_interest_sector_id (uuid) not null
.
-
-
Companies The
contacts
field in company search results was removed from the following endpoints:/v3/search
/v3/search/company
/v4/search/company
If you require a list of contacts for a company, please use
/v3/contacts?company_id=<company ID>
- Chinese administrative areas were added.
- Advisers The adviser autocomplete feature no longer returns an error when certain non-ASCII characters such as é are entered.
- Companies Previously squashed migrations were removed.
- Investment The subdirectory
project
has been added to the investment django application and all investment project related code moved to it and all import paths updated. - Various dependencies were updated.
- Companies
GET /v4/public/company/<id>
was added as a Hawk-authenticated endpoint for retrieving a single company. This is similar toGET /v4/company/<id>
but has a slightly reduced set of fields. - Companies
POST /v4/public/search/company
was added as a Hawk-authenticated company search endpoint. This is similar toPOST /v4/search/company
but has a reduced set of filters (name
,archived
andoriginal_query
) and slightly reduced set of response fields.
- Companies
POST /v3/search/company
,POST /v3/search/company/export
the following filters were deleted:description
export_to_country
future_interest_country
global_headquarters
sector
trading_address_country
- Companies
POST /v3/search/company
,POST /v3/search/company/export
the following sortby values were deleted:archived
archived_by
business_type.name
companies_house_data.company_number
company_number
created_on
employee_range.name
headquarter_type.name
id
registered_address_town
sector.name
trading_address_town
turnover_range.name
uk_based
uk_region.name
- Interactions
POST /v3/search/interaction
: Thedit_adviser.name
,dit_team.name
andid
values for thesortby
query parameter are deprecated and will be removed on or after 28 February 2019. - Investment The field
InvestmentProject.likelihood_of_landing
was removed from django. GET /v3/search
: all the values for thesortby
query parameter are deprecated and will be removed on or after 28 February 2019.
- Companies Company merge tool now supports merging companies having OMIS orders.
- Companies The companieshouse company search endpoints now use the nested registered address object when searching by term.
- The django app
leads
was deleted.
- Companies The endpoint
/v3/search/companieshousecompany
is deprecated and will be removed on or after the 28th of February, please use v4 instead.
- Companies Company merge tool now supports merging companies having investment projects.
- Administrative areas of countries were added to the admin site. These cannot be edited and will initially be used by the Market Access service (but are not used within Data Hub CRM at present).
- Companies The search logic is now using company address and registered address instead of trading address behind the scenes.
- Companies API V4 of companieshouse company search was introduced with nested object format for addresses. The endpoint
/v4/search/companieshousecompany
was added with theregistered_address_*
fields replaced by the nested objectregistered_address
. GET /metadata/administrative-area/
was added to retrieve a list of administrative areas of countries./metadata/country/
:overseas_region
was added to each country in responses. For non-UK countries, this is an object containing the the ID and name of the DIT overseas region the country belongs to.
-
The
metadata_administrative_area
table was added with columns("disabled_on" timestamp with time zone NULL, "id" uuid NOT NULL PRIMARY KEY, "name" text NOT NULL, "country_id" uuid NOT NULL)
.This contains a list of administrative areas of countries.
- Companies The
contacts
field in company search results is deprecated and will be removed on or after 28 February 2019 from the following endpoints:/v3/search
/v3/search/company
/v4/search/company
- Companies
company.address_country_id
andcompany.registered_address_country_id
are now indexed in ElasticSearch so that they can be used when filtering down results. - Various dependencies were updated.
- Advisers
GET /adviser/
: Thefirst_name
,first_name__icontains
,last_name
,last_name__icontains
,email
andemail__icontains
query parameters are deprecated and will be removed on or after 4 March 2019. - Companies The following endpoints are deprecated and will be removed on or after the 28th of February, please use v4 instead:
/v3/search/company
/v3/search/company/autocomplete
/v3/search/company/export
- Companies The field
trading_name
was removed from the endpoints below, please use thetrading_names
field instead:/v3/search/company
/v3/search/company/autocomplete
/v3/search/contact
: from the nested company object/v3/search/interaction
: from the nested company object/v3/search/order
: from the nested company object
- Interactions Policy issue types, policy areas and policy feedback notes were added to interaction search result CSV exports.
-
Advisers This adds a new
autocomplete
query parameter toGET /adviser/
intended to replace the previous name-related query parameters.The new parameter matches prefixes of words in the
first_name
,last_name
anddit_team.name
fields. Each token must match the prefix of at least one word in (at least) one of those fields.Results are automatically ordered with advisers with a match on
first_name
appearing first,last_name
second anddit_team.name
last.As a result, the
first_name
,first_name__icontains
,last_name
,last_name__icontains
,email
andemail__icontains
query parameters are deprecated and will be removed on or after 4 March 2019. -
Companies API V4 for company search was introduced with nested object format for addresses. The following endpoints were added:
/v4/search/company
: see below/v4/search/company/autocomplete
: see below/v4/search/company/export
: same response body as v3
/v4/search/company
,/v4/search/company/autocomplete
:- The
trading_address_*
fields were removed from v4 - The
registered_address_*
fields were replaced by the nested objectregistered_address
- The nested object
address
was added. Its data was populated from trading_address fields or registered_address whichever was defined.
-
Companies The field
trading_name
was removed from the endpoints below, please use thetrading_names
field instead:/v3/search/company
/v3/search/company/autocomplete
/v3/search/contact
: from the nested company object/v3/search/interaction
: from the nested company object/v3/search/order
: from the nested company object
- Companies The following endpoints are deprecated and will be removed on or after the 21st of February, please use v4 instead:
/v3/ch-company
/v3/ch-company/<uuid:pk>
- Companies The following endpoints are deprecated and will be removed on or after the 21st of February, please use v4 instead:
/v3/company
/v3/company/<uuid:pk>
/v3/company/<uuid:pk>/archive
/v3/company/<uuid:pk>/audit
/v3/company/<uuid:pk>/one-list-group-core-team
/v3/company/<uuid:pk>/timeline
/v3/company/<uuid:pk>/unarchive
- Companies
POST /v3/search/company
,POST /v3/search/company/export
the following filters are deprecated and will be removed on or after the 21st of February:description
export_to_country
future_interest_country
global_headquarters
sector
trading_address_country
- Companies
POST /v3/search/company
,POST /v3/search/company/export
the following sortby values are deprecated and will be removed on or after the 21st of February:archived
archived_by
business_type.name
companies_house_data.company_number
company_number
created_on
employee_range.name
headquarter_type.name
id
registered_address_town
sector.name
trading_address_town
turnover_range.name
uk_based
uk_region.name
- Companies The following database fields are deprecated and will be removed on or after the 21st of February, please use the
address_*
fields instead:trading_address_1
trading_address_2
trading_address_town
trading_address_county
trading_address_postcode
trading_address_country_id
- Companies The field
trading_name
was removed from all/v3/company/*
and/v4/company/*
endpoints, please use thetrading_names
field instead.
- Companies Companies now define fields for a mandatory address representing the main location for the business and fields for an optional registered address. Trading address fields are still automatically updated but deprecated. The data was migrated in the following way:
- address fields: populated from trading address or (as fallback) registered address in this specific order.
- registered fields: kept untouched for now but will be overridden by the values from Companies House where possible or (as fallback) set to blank values. A deprecation notice will be announced before this happens.
- Interactions Global search was updated to handle multiple interaction contacts correctly when matching search terms with interactions.
- Investment A note can now be submitted with any change to an Investment Project.
- Interactions A performance problem with the interaction list in the admin site was resolved.
- The permissions and content type for the previously deleted businesslead model/table were also deleted.
- Django was updated from 2.1.5 to 2.1.7.
-
Advisers
GET /adviser/
:is_active
was added as a query parameter. This is a boolean filter that filters advisers by whether they are active or not. -
Companies API V4 for companies house companies was introduced with nested object format for registered address. The
registered_address_*
fields were replaced by the nested objectregistered_address
for the following endpoints:/v4/ch-company
/v4/ch-company/<uuid:pk>
The nested object has the following contract:
'line_1': '2', 'line_2': 'Main Road', 'town': 'London', 'county': 'Greenwich', 'postcode': 'SE10 9NN', 'country': { 'id': '80756b9a-5d95-e211-a939-e4115bead28a', 'name': 'United Kingdom', }
-
Companies
/v4/company
,/v4/company/<uuid:pk>
,/v4/company/<uuid:pk>/archive
,/v4/company/<uuid:pk>/unarchive
:- The
trading_address_*
fields were removed from v4 - The
registered_address_*
fields were replaced by the nested objectregistered_address
and made optional - The nested object
address
was added and is mandatory when creating a company. Its data was populated from trading_address fields or registered_address whichever was defined. - The nested
companies_house_data
object was removed from v4
- The
-
Companies API V4 for companies was introduced with nested object format for addresses. A new prefix
v4
was introduced along with the following endpoints:/v4/company
: see the related news fragment/v4/company/<uuid:pk>
: see the related news fragment/v4/company/<uuid:pk>/archive
:see the related news fragment/v4/company/<uuid:pk>/unarchive
: see the related news fragment/v4/company/<uuid:pk>/audit
: same response body as v3/v4/company/<uuid:pk>/one-list-group-core-team
: same response body as v3/v4/company/<uuid:pk>/timeline
: same response body as v3
The nested object has the following contract:
'line_1': '2', 'line_2': 'Main Road', 'town': 'London', 'county': 'Greenwich', 'postcode': 'SE10 9NN', 'country': { 'id': '80756b9a-5d95-e211-a939-e4115bead28a', 'name': 'United Kingdom', }
-
Companies
GET /v3/search/company/autocomplete
: the query paramterm
is now required. -
Companies The field
trading_name
was removed from all/v3/company/*
and/v4/company/*
endpoints, please use thetrading_names
field instead. -
Investment
POST /v3/investment
endpoint now acceptsnote
as an optional property that can be set whilst creating an investment project. The property expects a dictionary with a mandatory field oftext
and an optional field ofactivity_type
.activity_type
expects ainvestment_activity_type
id.PATCH /v3/investment/<uuid:pk>
endpoint now acceptsnote
as an optional property that can be set whilst updating an investment project. The property expects a dictionary with a mandatory field oftext
and an optional field ofactivity_type
.activity_type
expects ainvestment_activity_type
id.GET /v3/investment/<uuid:pk>/audit
endpoint now returns a propertynote
within each audit change entry.New endpoint
GET /metadata/investment-activity-type/
added that returns all possibleinvestment_activity_type
options.
-
Companies The following columns in the
company_companieshousecompany
table were made NOT NULL:registered_address_2
registered_address_county
registered_address_country_id
registered_address_postcode
-
Companies The following database fields are deprecated and will be removed on or after the 21st of February, please use the
address_*
fields instead:trading_address_1
trading_address_2
trading_address_town
trading_address_county
trading_address_postcode
trading_address_country_id
-
Investment The table
investment_investmentactivitytype
has been added. The values of the columnname
will initial bechange
,risk
,issue
,SPI Interaction
andInternal Interaction
.The table
investment_investmentactivity
has been added. The columns areid
,investment_project_id
,revision_id
,activity_type_id
andtext
. Whererevision_id
is a link to a copy of the investment projects data at the time of adding the row. Wheretext
can be used as a note to be associated with a change to a project or as a way to detail an activity on the project.
- Interactions
POST /v3/search/interaction
: Thecontact
andcontact_name
filters in request bodies are deprecated and will be removed on or after 28 February 2019. - Interactions
GET /v3/search
,POST /v3/search/interaction
: Thecontact
field in responses is deprecated and will be removed on or after 28 February 2019. Please usecontacts
instead. - Interactions
POST /v3/search/interaction
: Thecontact.name
value for thesortby
query parameter is deprecated and will be removed on or after 28 February 2019. - Interactions
GET /v3/interaction
: Thecontact__first_name
andcontact__last_name
values for thesortby
query parameter are deprecated and will be removed on or after 28 February 2019. Please usefirst_name_of_first_contact
andlast_name_of_first_contact
instead for event service deliveries only.
- Contacts The contact search CSV export was updated to handle interactions with multiple contacts for the 'Date of latest interaction' and 'Team of latest interaction' fields.
- Contacts Contacts can now be sorted by name in the admin site.
- Interactions The admin site now uses an autocomplete widget for the contacts field when editing or adding an interaction.
- Interactions The search CSV export was updated to handle interactions with multiple contacts. The previous Contact and Job title columns have been merged into a single Contacts column. This column contains the names of all the contacts for each interaction with the job title in brackets after each name and a comma between contacts.
- Companies The system is now using the address and registered address for internal business logic instead of the trading and registered address.
- A management command to delete all Elasticsearch indices matching the configured index name prefix was added. This is intended for use on GOV.UK PaaS when required as GOV.UK PaaS Elasticsearch does not allow deletions using wildcards.
- A management command to run MI Dashboard pipeline if changes to the relevant models have been made was added.
- Updated various dependencies.
-
Interactions
GET /v3/search
,POST /v3/search/interaction
:contacts
was added as an array field in search results. This field is intended to replace thecontact
field. Thecontact
field is deprecated and will be removed on or after 28 February 2019. -
Interactions
GET /v3/interaction
:first_name_of_first_contact
andlast_name_of_first_contact
were added assortby
query parameter values for sorting event service deliveries by the first or last name of the contact. These sorting options aren't intended to be used for other types of interaction which may have multiple contacts.The
contact__first_name
andcontact__last_name
sorting options are deprecated and will be removed on or after 28 February 2019.
- Interactions
GET,POST /v3/interaction
,GET,PATCH /v3/interaction/<id>
: Thecontact
field is deprecated and will be removed on or after 24 February 2019. Please usecontacts
instead. - Interactions The
interaction_interaction.contact_id
column is deprecated and will be removed on or after 4 March 2019. Please use theinteraction_interaction_contacts
many-to-many table instead. - Interactions
GET /v3/interaction
: Thecontact_id
query parameter is deprecated and will be removed on or after 24 February 2019. Please usecontacts__id
instead.
- Interactions The admin site now displays multiple contacts for interactions.
- Interactions
POST /v3/interaction
,PATCH /v3/interaction/<id>
: Additional validation was added to make sure that allcontacts
belong to the specifiedcompany
. This validation only occurs when an interaction is created, or thecontacts
orcompany
field is updated. - Interactions
GET,POST /v3/interaction
,GET,PATCH /v3/interaction/<id>
:contacts
was added as an array field to replace thecontact
field. Thecontact
andcontacts
field will mirror each other (except thatcontact
will only return a single contact). Thecontact
field is deprecated and will be removed on or after 24 February 2019. - Interactions
GET /v3/interaction
:contacts__id
was added as a query parameter to support filtering by contact ID for interactions with multiple contacts. The previouscontact_id
filter is deprecated and will be removed on or after 24 February 2019.
- Interactions The
interaction_interaction.contact_id
column is deprecated and will be removed on or after 4 March 2019. Please use theinteraction_interaction_contacts
many-to-many table instead.
- The MI dashboard pipeline task now loads all investment projects instead of only for current financial year.
- Companies A celery task to populate company address fields from trading and registered address fields was added to allow data to be migrated.
- The MI dashboard pipeline was rescheduled to run at around 1 AM each night.
- Various dependencies were updated.
-
Companies The following fields were added:
"address_1" varchar(255)
"address_2" varchar(255)
"address_country_id" uuid
"address_county" varchar(255)
"address_postcode" varchar(255)
"address_town" varchar(255)
The system will be migrated from using the
registered_address_*
andtrading_address_*
fields toaddress_*
(main location for the business) andregistered_address_*
(official address) fields instead. However, you should not use the new address fields yet and migration steps will be communicated in future release notes. -
Interactions The table
interaction_interaction_contacts
table with columns("id" serial NOT NULL PRIMARY KEY, "interaction_id" uuid NOT NULL, "contact_id" uuid NOT NULL)
was added.This is a many-to-many table linking interactions with contacts.
The table had not been fully populated with data yet; continue to use
interaction_interaction.contact_id
for the time being.
- Companies The column
company_company.alias
was deleted from the database.
- OMIS Search response for OMIS orders now contains total subtotal cost for given query.
- The MI dashboard pipeline now correctly selects the investment projects for given fiscal year.
- Country URL in the MI dashboard is now assembled correctly.
- OMIS
POST /v3/search/order
: The response now containssummary
property that includes a total value of filtered orders' subtotal cost (total_subtotal_cost
)`.
- Companies The column
company_company.alias
was deleted from the database.
country_url
in the MI dashboard pipeline is now formatted correctly.
- Interactions
POST /v3/interaction
:was_policy_feedback_provided
can no longer be omitted when creating interactions.
- Companies The column
company_company.trading_names
was made NOT NULL. - Interactions The
interaction_interaction.policy_feedback_notes
column is now non-nullable. (An empty string is used for blank values.) - Interactions The
interaction_interaction.was_policy_feedback_provided
column is now non-nullable.
- Companies The field
Company.alias
was removed from django. - Companies
PATCH /v3/company/<uuid:pk>
: the PATCH string fieldtrading_name
is deprecated and will be removed on or after January 24. Please use the array fieldtrading_names
instead. - Interactions The
interaction_interaction.policy_issue_type_id
column was deleted from the database. - Investment
POST /v3/search/investment_project
: Theaggregations
property of responses was removed. - The table
metadata_companyclassification
was deleted.
- Companies
PATCH /v3/company/<uuid:pk>
: when updating trading names, the PATCH array fieldtrading_names
should be used instead of the deprecated string fieldtrading_name
. - Interactions
GET /v3/search
,POST /v3/search/interaction
:policy_areas
was added to interaction search results. - Interactions
POST /v3/search/interaction
:policy_areas
was added as a filter, accepting one or more policy area IDs that results should match one of. - Interactions
GET /v3/search
,POST /v3/search/interaction
:policy_issue_types
was added to interaction search results. - Interactions
POST /v3/search/interaction
:policy_issue_types
was added as a filter, accepting one or more policy issue type IDs that results should match one of. - Investment
POST /v3/search/investment_project
: Theaggregations
property of responses was removed.
- Interactions The
interaction_interaction.policy_issue_type_id
column was deleted from the database. - The table
metadata_companyclassification
was deleted.
- It is now possible to specify the location of SSL CA certificates for Django Redis cache client. Environment variable
REDIS_SSL_CA_CERTS_PATH
defaults to '/etc/ssl/certs/ca-certificates.crt'.
-
Investment
POST /v3/investment
endpoint now acceptsproject_manager_request_status
as an optional property that can be set whilst creating an investment project. The property expects ainvestment_projectmanagerrequeststatus
id.GET /v3/investment/<uuid:pk>
endpoint now includesproject_manager_request_status
and read-only fieldproject_manager_requested_on
in the response.PATCH /v3/investment/<uuid:pk>
endpoint now acceptsproject_manager_request_status
as an optional property that can be set whilst updating an investment project. The property expects ainvestment_projectmanagerrequeststatus
id.New endpoint
GET /metadata/project-manager-request-status/
added that returns all possibleproject_manager_request_status
options.
-
Investment The columns
project_manager_request_status (uuid NULL)
andproject_manager_requested_on (timestamp NULL)
were added to the tableinvestment_investmentproject
.The table
investment_projectmanagerrequeststatus
has been added.
- Interactions The 'Policy feedback' service is no longer created in new environments.
- Interactions
GET /v3/interaction, GET /v3/interaction/<id>
:policy_issue_type
was removed from responses.
- Python was updated from version 3.6.7 to 3.6.8 in deployed environments.
- Interactions
GET /v3/interaction, GET /v3/interaction/<id>
:policy_issue_type
was removed from responses.
- A bug for audit history where a related entity has a null value and cannot be iterated over was fixed.
- Companies The column
company_company.classification_id
was removed from the database. - Interactions Policy feedback permissions relating to the legacy version of the policy feedback feature were removed.
- Interactions
POST /v3/interaction
:"policy_feedback"
is no longer accepted as a value for thekind
field. - Investment
POST /v3/search/investment_project
: Theaggregations
property of responses is deprecated and will be removed on or after 17 January 2019. - The model
metadata.CompanyClassification
was removed from the django definition and the django admin. The related database table will be deleted with the next release. GET /v3/search
:companieshousecompany
is now correctly not accepted in theentity
parameter, and not included in the returnedaggregations
array. (Previously, specifyingcompanieshousecompany
in theentity
parameter caused all search models to be searched.) If you want to search Companies House companies, please use/v3/search/companieshousecompany
instead.
- OMIS Less than or equal to and greater than or equal to filters were added for the completed on field to OMIS order search.
- OMIS Less than or equal to and greater than or equal to filters were added for the delivery date field to OMIS order search.
- Companies The value of the model field
alias
is now ignored and thetrading_name
API field now gets and saves its value from/into the model fieldtrading_names
instead. - Investment All nested fields were replaced with object fields in the investment project search model for improved maintainability and performance.
- The app
dnb_match
and the tablesdnb_match_dnbmatchingresult
,dnb_match_dnbmatchingcsvrecord
were created to support the D&B matching pieces of work. At this stage, they are to be considered private and not to be used as they may be temporary and can change without notice. - All nested fields were replaced with object fields in the Companies House company search model for improved maintainability and performance.
- The option to synchronise single objects to Elasticsearch using the thread pool was removed. Celery is now used in all cases.
- Various dependencies were updated.
- Optimisations were made to the search models so improve performance when sorting by text fields and make the sorting order more logical in some cases.
- Companies GET
/v3/company/<uuid:pk>/audit
now returns string representation of any changes made to related objects rather than ids. - Contacts GET
/v3/contact/<uuid:pk>/audit
now returns string representation of any changes made to related objects rather than ids. - Interactions
POST: /v3/interaction
:"policy_feedback"
is no longer accepted as a value for thekind
field. - Investment
POST /v3/search/investment_project
: Theaggregations
property of responses is deprecated and will be removed on or after 17 January 2019. - Investment GET
/v3/investment/<uuid:pk>/audit
now returns string representation of any changes made to related objects rather than ids. - OMIS
POST /v3/search/order
:completed_on_before
andcompleted_on_after
filters were added. These only accept dates without a time component. Timestamps on the dates specified will be included in the results. - OMIS
POST /v3/search/order
:delivery_date_before
anddelivery_date_after
filters were added. GET /v3/search
:companieshousecompany
is now correctly not accepted in theentity
parameter, and not included in the returnedaggregations
array. (Previously, specifyingcompanieshousecompany
in theentity
parameter caused all search models to be searched.) If you want to search Companies House companies, please use/v3/search/companieshousecompany
instead.
- Companies The column
company_company.classification_id
was removed from the database.
- Companies The field
classification
was removed from the django definition and the related database column will be deleted with the next release.
- OMIS
Lead adviser
is now available in the OMIS CSV extract.
- Companies All nested fields were replaced with object fields in the company search model for improved maintainability and performance.
- Contacts All nested fields were replaced with object fields in the contact search model for improved maintainability and performance.
- Events All nested fields were replaced with object fields in the event search model for improved maintainability and performance.
- OMIS OMIS order invoices can now be viewed and searched for by invoice number and order reference in the admin site.
- OMIS All nested fields were replaced with object fields in the OMIS order search model for improved maintainability and performance.
- OMIS OMIS orders can now be searched for by the current invoice number for the order in the admin site.
- The performance of the
migrate_es
andsync_es
management commands was improved in some cases by the use of prefetching for to-many fields. - The
migrate_es
andsync_es
management commands were modified to avoid the use of stale data when copying data to Elasticsearch.
- All sorting options and filters in Companies House company search were removed as these were not being used by any client.
- Investment Following fields in
mi
database have got their default values changed:sector_name
now hasNo Sector assigned
default when source field has no valuepossible_uk_region_names
now hasNo UK region assigned
default when source field has no valueactual_uk_region_names
now hasNo UK region assigned
default when source field has no valueuk_region_name
now hasNo UK region assigned
default when source fields have no valueinvestor_company_country
now has an empty string as default when source field has no valuecountry_url
now has an empty string as default when source field has no value
POST /v3/search/companieshousecompany
: Allsortby
options and filters were removed as these were not being used by any client.
- Investment The columns
number_new_jobs_with_zero (int NULL)
,number_safeguarded_jobs_with_zero (int NULL)
andtotal_investment_with_zero (decimal NULL)
were added tomi
database. These column contain the same values as their counterparts without_with_zero
suffix except instead of NULL a zero should be given. - Investment The table
datahub.mi_dashboard_miinvestmentproject
has been renamed tomi_dashboard_miinvestmentproject
as the dashboard software doesn't support dots in the table names.
- The database connection configuration was updated to prevent unnecessary MI database transactions during API requests.
-
Companies The column
company_company.alias
is deprecated and it will be deleted on or after January, 7. Please usecompany_company.trading_names
instead. -
Companies The endpont
/company/<uuid:pk>/core-team
was deleted, please use/company/<uuid:pk>/one-list-group-core-team
instead. -
Companies The field
trading_name
is deprecated from all GET company endpoints and GET/POST search endpoints and will be removed on or after January, 7. Please use the array fieldtrading_names
instead. However,trading_name
is not deprecated when adding/editing a trading name using POST/PATCH as the newtrading_names
field is currently read-only. -
Interactions
GET /v3/search
,POST /v3/search/interaction
: thenet_company_receipt
field is deprecated for interaction search responses and will be removed on or after 27 December.GET /v3/search
,POST /v3/search/interaction
: thegrant_amount_offered
field is deprecated for interaction search responses and will be removed on or after 27 December.
- Companies Companies now have a
trading names
field defined as a list of strings. It will eventually replace alias/trading_name. - Interactions It's now possible to filter interactions by whether they contain policy feedback when searching for interactions.
- OMIS The UK region and sector of an OMIS order can now be edited from the admin site.
-
OMIS Viewing OMIS order assignees (advisers in the market) now requires the
order.view_orderassignee
permission.Changing OMIS order assignees (advisers in the market) now requires the
order.change_orderassignee
permission.Viewing OMIS order subscribers (advisers in the UK) now requires the
order.view_ordersubscriber
permission.Changing OMIS order subscribers (advisers in the UK) now requires the
order.change_ordersubscriber
permission.
- Interactions Nightly MI dashboard pipeline was added. It loads the anonymised Investment Project data to a separate database that powers MI Dashboards.
- Interactions The interaction Elasticsearch mapping was cleaned up substantially by replacing unnecessary nested fields with object fields and not indexing
is_event
. The removal of nested fields means each interaction is now represented by a single document, instead of 14 documents (as was the case previously).
-
Companies The endpont
/company/<uuid:pk>/core-team
was deleted, please use/company/<uuid:pk>/one-list-group-core-team
instead. -
Companies
GET /v3/company
andGET /v3/company/<uuid:pk>
: The read-only fieldsnumber_of_employees
andis_number_of_employees_estimated
were added and will only be set whenduns_number
is not empty. -
Companies
GET /v3/company/<uuid:pk>
now returns the read-only fieldtrading_names
which replacestrading_name
. -
Companies
GET /v3/search
now also searches for a company'strading_names
when using theterm
param.POST /v3/search/company
now also returns and searches for a company'strading_names
when using thename
param.GET /v3/search/company/autocomplete
now also returns and searches for a company'strading_names
POST /v3/search/contact
now also searches for a company'strading_names
when using thecompany_name
param.POST /v3/search/interaction
now also searches for a company'strading_names
when using thecompany_name
param.POST /v3/search/order
now also searches for a company'strading_names
when using thecompany_name
param. -
Companies
GET /v3/company
andGET /v3/company/<uuid:pk>
: The read-only fieldsturnover
andis_turnover_estimated
were added and will only be set whenduns_number
is not empty. The value ofturnover
is in USD. -
Interactions
GET /v3/search
,POST /v3/search/interaction
: thenet_company_receipt
field is deprecated for interaction search responses and will be removed on or after 27 December.GET /v3/search
,POST /v3/search/interaction
: thegrant_amount_offered
field is deprecated for interaction search responses and will be removed on or after 27 December. -
Interactions
POST /v3/search/interaction
: A new boolean filter,was_policy_feedback_provided
, was added. -
Investment The field
likelihood_of_landing
is deprecated and has been removed from all investment projects APIs, please uselikelihood_to_land
instead. -
OMIS
GET /v3/omis/order/<id>/assignee
now requires theorder.view_orderassignee
permission.PATCH /v3/omis/order/<id>/assignee
now requires theorder.change_orderassignee
permission.GET /v3/omis/order/<id>/subscriber-list
now requires theorder.view_ordersubscriber
permission.PUT /v3/omis/order/<id>/subscriber-list
now requires theorder.change_ordersubscriber
permission.
- Companies The column
company_company.alias
is deprecated and it will be deleted on or after January, 7. Please usecompany_company.trading_names
instead. - Companies The columns
number_of_employees (int NULL)
andis_number_of_employees_estimated (bool NULL)
were added to the tablecompany_company
. They should only be used as replacement foremployee_range
when the fieldduns_number
is set. - Companies The column
company_company.trading_names
was added as nullable varchar[]. It will eventually replacecompany_company.alias
. - Companies The columns
turnover (bigint NULL)
andis_turnover_estimated (bool NULL)
were added to the tablecompany_company
. They should only be used as replacement forturnover_range
when the fieldduns_number
is set.
-
Interactions
POST /v3/interaction
: omitting thewas_policy_feedback_provided
field is deprecated and it will become a mandatory field on or after 27 December 2018.GET,POST /v3/interaction, GET,PATCH /v3/interaction/<id>
: thepolicy_issue_type
field is deprecated and will become read-only on or after 27 December 2018, and removed on or after 7 January 2019.GET,POST /v3/interaction, GET,PATCH /v3/interaction/<id>
: the valuepolicy_feedback
for thekind
field is deprecated and will be not be accepted on or after 27 December 2018.interaction_interaction
: thepolicy_issue_type
column is deprecated and will be removed on or after 7 January 2019.interaction_interaction
: the valuepolicy_feedback
for thekind
column is deprecated andwas_policy_feedback_provided
should be used to identify policy feedback instead.
- Interactions It's now possible to record policy feedback within a service delivery or standard interaction, with one or more policy issue types, one or more policy areas and free text policy feedback notes. This is intended to replace the existing policy feedback functionality (where policy feedback is a separate type of interaction).
-
Interactions
GET,POST /v3/interaction, GET,PATCH /v3/interaction/<id>
:was_policy_feedback_provided
was added as a boolean field.GET,POST /v3/interaction, GET,PATCH /v3/interaction/<id>
:policy_issue_types
was added as an array field.GET,POST /v3/interaction, GET,PATCH /v3/interaction/<id>
:policy_feedback_notes
was added as a text field.POST /v3/interaction
: omitting thewas_policy_feedback_provided
field is deprecated and it will become a mandatory field on or after 27 December 2018.GET,POST /v3/interaction, GET,PATCH /v3/interaction/<id>
: thepolicy_issue_type
field is deprecated and will become read-only on or after 27 December 2018, and removed on or after 7 January 2019.GET,POST /v3/interaction, GET,PATCH /v3/interaction/<id>
: the valuepolicy_feedback
for thekind
field is deprecated and will be not be accepted on or after 27 December 2018.
-
Interactions
interaction_interaction
:was_policy_feedback_provided
was added as a nullable boolean column.interaction_interaction
:policy_feedback_notes
was added as a nullable text column.interaction_interaction_policy_issue_types
was added as a new many-to-many table linkinginteraction_interaction
andmetadata_policyissuetype
.interaction_interaction
: thepolicy_issue_type
column is deprecated and will be removed on or after 7 January 2019.interaction_interaction
: the valuepolicy_feedback
for thekind
column is deprecated andwas_policy_feedback_provided
should be used to identify policy feedback instead.
-
Investment The column
investment_investmentproject.likelihood_of_landing
is deprecated and will be deleted on or after December, 20. Please useinvestment_investmentproject.likelihood_to_land
with a foreign key toinvestment_likelihoodtoland
instead of an integer value.The field
likelihood_of_landing
is deprecated and will be removed from all investment projects APIs on or before December 20, please uselikelihood_to_land
instead.
- Companies Company autocomplete support has been added to be utilised on search pages and forms when there is a need to add a company to another entity such as an investment project or interaction.
- Interactions The notes field is now optional for standard interactions and for service deliveries.
-
Companies New endpoint
GET /v3/search/company/autocomplete
which supports a query argument ofterm
that will return theid
,name
andtrading_name
of any company matching the search query. -
Companies
PATCH /v3/company/<uuid:pk>
: the following fields are now read-only if the company has a non-blankduns_number
field:- name
- trading_name
- company_number
- vat_number
- registered_address_1
- registered_address_2
- registered_address_town
- registered_address_county
- registered_address_postcode
- registered_address_country
- website
- trading_address_1
- trading_address_2
- trading_address_town
- trading_address_county
- trading_address_postcode
- trading_address_country
- business_type
- employee_range
- turnover_range
- headquarter_type
- global_headquarters
-
Interactions
GET,POST /v3/interaction
,GET,PATCH /v3/interaction/<id>
: The notes field can now be left blank (as an empty string) for standard interactions and for service deliveries. -
Investment The field
likelihood_of_landing
is deprecated and will be removed from all investment projects APIs on or before December 20, please uselikelihood_to_land
instead. -
Investment
POST /v3/investment
endpoint now acceptslikelihood_to_land
as an optional property that can be set whilst creating an investment project. The property expects ainvestment_likelihoodtoland
id.GET /v3/investment/<uuid:pk>
endpoint now includeslikelihood_to_land
field in the response.PATCH /v3/investment/<uuid:pk>
endpoint now acceptslikelihood_to_land
as an optional property that can be set whilst updating an investment project. The property expects ametadata_likelihoodtoland
id.New endpoint
GET /metadata/likelihood-to-land/
added that returns all possiblelikelihood_to_land
options.POST /v3/search/investment_project/export
response body now includeslikelihood_to_land
.
- Companies The field
company_company.duns_number
was made unique. - Investment Column
likelihood_to_land
has been added toinvestment_investmentproject
table and is nullable.
- Companies Companies that have not been updated in the last ten years can now be deleted using the
delete_old_records
management command. - Contacts Contacts that have not been updated in the last ten years can now be deleted using the
delete_old_records
management command.
- Various dependencies were updated.
- Companies The field
classification
was removed from all company API endpoints. - Companies The column
company_company.classification_id
is deprecated and will be deleted on or after December 13. Please usecompany_company.one_list_tier_id
with foreign keys tocompany_onelisttier
instead ofmetadata_companyclassification
. The IDs were preserved so the records in thecompany_onelisttier
table match the records in the deprecatedmetadata_companyclassification
. - Companies The field
one_list_account_owner
was removed from all company API endpoints, please useone_list_group_global_account_manager
instead. - The API endpoint
/metadata/company-classification
was removed. - The table
metadata_companyclassification
is deprecated and will be deleted on or after December 13. Please usecompany_onelisttier
instead.
- Companies The field
Company.classification
was made read-only in the Django Admin and is now populated automatically fromCompany.one_list_tier
. - Investment Investment projects that have not been updated in the last ten years can now be deleted using the
delete_old_records
management command. - OMIS OMIS orders that have not been updated in the last seven years can now be deleted using the
delete_old_records
management command.
- Investment It is now possible to delete investment projects using added management command
delete_investment_project
. - Investment It is now possible to unarchive and update status of investment projects using added management command
update_investment_project_archive_state
.
- Companies The field
classification
was removed from all company API endpoints. - Companies The field
one_list_account_owner
was removed from all company API endpoints, please useone_list_group_global_account_manager
instead. - Investment The global account manager field in the
POST /v3/search/investment_project/export
response body now inherits the value from the investor company's Global Headquarters in case of subsidiaries. - The API endpoint
/metadata/company-classification
was removed.
- Companies The column
company_company.classification_id
is deprecated, please check the Deprecations section for more details. - Companies Blank values in the
company_company.duns_number
field are now NULLs instead of empty strings. - Companies The column
company_company.one_list_tier_id
was added and replaces the columncompany_company.classification_id
. - The table
metadata_companyclassification
is deprecated, please check the Deprecations section for more details.
- Companies Editing
CompanyClassification
using the Django Admin is temporaneously suspended to allow it to be migrated into the newly createdOneListTier
. - Companies The field
duns_number
representing the nine-digit D&B unique identifier was added to the Company model and can be updated using the Django Admin. - Investment New read-only field
level_of_involvement_simplified
has been added that contains simplified information about the level of involvement. It has one of three values:unspecified
,not_involved
andinvolved
derived fromlevel_of_involvement
field. This field can be filtered by using the search endpoint. - Investment
Involvements
section in Django admin is now view only as values for level of involvement are not meant to be changed.
-
Companies
GET /v3/company/<uuid:pk>
,GET /v3/company
andPOST /v3/search/company
now return the read-only fieldduns_number
representing the nine-digit D&B unique identifier. -
Investment
GET /v3/investment/<uuid:pk>/
endpoint now includeslevel_of_involvement_simplified
field in the response.POST /v3/search/investment_project/
: new filterlevel_of_involvement_simplified
was added.
- Companies The column
company_company.duns_number
representing the nine-digit D&B unique identifier was added. - Companies The table
company_onelisttier
was added with the intention of replacingmetadata_companyclassification
in the near future.
- Companies (Correction) The API field
one_list_account_owner
is deprecated and will be removed on or after November, 29. The recommended and most efficient way to upgrade is to use the fieldone_list_group_global_account_manager
instead.
- The
delete_old_records
anddelete_orphans
management commands were optimised to use less memory and be faster when run without the--simulate
or--only-print-queries
arguments.
- Various dependencies were updated.
- Companies (Correction) The API field
one_list_account_owner
is deprecated and will be removed on or after November, 29. The recommended and most efficient way to upgrade is to use the fieldone_list_group_global_account_manager
instead. - Companies
GET /company/<uuid:pk>
and the other company endpoints now return the read-only fieldone_list_group_global_account_manager
with details of the One List Global Account Manager for the group that the company is part of. This value is inherited from the Global Headquarters.
- Companies The table
company_companycoreteammember
was renamed tocompany_onelistcoreteammember
.
- Companies The API field
classification
is deprecated and will be removed on or after November, 29. Please use one_list_group_tier instead. - Companies The API field
one_list_account_owner
is deprecated and will be removed on or after November, 29. Please useGET /company/<uuid:pk>/one-list-group-core-team
and get the item in the list withis_global_account_manager
= True instead. - Companies The endpoint
GET /company/<uuid:pk>/core-team
is deprecated and will be removed on or after November, 29. Please useGET /company/<uuid:pk>/one-list-group-core-team
instead. - The API endpoint
/metadata/company-classification
is deprecated as not currently necessary. It will be completely removed on or after November, 29.
- Investment The permission
Can change SPI report (change_spireport)
was renamed toCan view SPI report (view_spireport)
as Django 2.1 supports view permission and SPI report is read only.
-
Companies The field
classification
is deprecated and will be removed on or after November, 29. Please use one_list_group_tier instead. -
Companies The field
one_list_account_owner
is deprecated and will be removed on or after November, 29. Please useGET /company/<uuid:pk>/one-list-group-core-team
and get the item in the list withis_global_account_manager
= True instead. -
Companies The One List Core Team endpoint was changed:
GET /company/<uuid:pk>/core-team
was renamed toGET /company/<uuid:pk>/one-list-group-core-team
. The old/core-team
endpoint still exists but will be completely removed on or after November, 29.GET /company/<uuid:pk>/one-list-group-core-team
now returns the Core Team for the group that the company is part of. All companies in the group inherit that team from their Global Headquarters. -
Companies
GET /v3/company/<uuid:pk>
andGET /v3/company
now include the read-only fieldone_list_group_tier
which is the One List Tier for the group, inherited from the Global Headquarters. -
Companies The field classification is now read-only in all company endpoints.
-
Investment
POST /v3/investment/
endpoint now acceptscountry_investment_originates_from
as an optional property that can be set whilst creating an investment project. The property expects an id of a country.GET /v3/investment/<uuid:pk>/
endpoint now includescountry_investment_originates_from
field in the response.PATCH /v3/investment/<uuid:pk>/
endpoint now acceptscountry_investment_originates_from
as an optional property that can be set whilst updating an investment project. The property expects an id of a country. -
The endpoint
/metadata/company-classification
is deprecated as not currently necessary. It will be completely removed on or after November, 29.
- Investment Column
country_investment_originates_from
has been added toinvestment_investmentproject
table and is nullable.
- Investment Exports of search results now include the town or city of the investor company.
- Countries now have defined ISO codes.
- Django Rest Framework was updated to version 3.9.0.
- Investment
POST /v3/search/investment_project/export
: the field 'Investor company town or city' was added to the CSV output.
- Companies A tool for merging duplicate companies was added to the admin site. This tool moves contacts and interactions from one company to another, and archives the company that the contacts and interactions were moved from. The tool is accessed via a link displayed when viewing a single company (in the admin site). Some limitations exist (for example, companies with investment projects or OMIS orders cannot be merged into another company).
- Various dependencies were updated.
- Advisers The column
company_advisor.use_cdms_auth
was deleted from the database.
- Investment First part of the streamlined investment flow. Feature flag
streamlined-investment-flow
introduced to control when the project manager information is required and to allow the assign pm stage to be deprecated.
- Investment A command
activate_streamlined_investment_flow
has been added to active thestreamlined_investment_flow
feature and update any project at theAssign PM
stage toProspect
. - The
countries.yaml
fixture was updated to reflect the current production data. - It's not possible to change
Countries
andOverseasRegions
from the django admin anymore. They will need to be updated using data migrations instead. - The Elasticsearch Python client libraries were updated to 6.x versions, as was the Docker image used during development.
- A setting to sync updates to records to Elasticsearch using Celery (rather than the thread pool) was adding. This will improve performance when many records are updated at once, and increase reliability as failed synchronisation attempts are automatically retried. When the setting is enabled, Redis and Celery must be configured and running to use endpoints that create or update records.
- Investment
GET /metadata/investment-project-stage/<uuid:pk>/
endpoint no longer returns null values for fieldexclude_from_investment_flow
. All existing records now return false with the exception of 'Assign PM' which returns true.
- Advisers The column
company_advisor.use_cdms_auth
was deleted from the database. - Investment Column
exclude_from_investment_flow
onmetadata_investmentprojectstage
table is no longer nullable and the default value has been set to False. Existing entries have all been updated to False with the exception of 'Assign PM' which has been set to True. - A new field
iso_alpha2_code
was added to themetadata_country
table. It has not been populated yet.
- Companies Company timeline now includes
data_source_label
field that contains human-readable data source description. - Companies New fields named
transferred_to
andtransfer_reason
have been added to indicate if a company has had its data transferred to another record and should no longer be used. The field contains a reference to the company that should be used instead. The field cannot be directly changed; it will be set by an upcoming admin tool for merging duplicate companies. - Investment A new field
exclude_from_investment_flow
has been added to theInvestmentProjectStage
metadata to indicate if a stage should be excluded from the investment flow. The field will be used to aid with deprecating and adding new stages.
- Python was updated from version 3.6.6 to 3.6.7 in deployed environments.
-
Companies
GET /v3/company/<uuid:pk>/timeline
endpoint now includesdata_source_label
field in the response. This field contains human-readable data source description. -
Companies
GET,POST /v3/company
,GET,POST /v3/company/<id>
: New, optional read-only fields namedtransferred_to
andtransfer_reason
have been added to indicate if a company has had its data transferred to another record and should no longer be used. When set, this field contains two sub-fields (id
andname
) which give details of the company that should be used instead. The only possible value for transfer_reason at present isduplicate
, which indicates that it was a duplicate record.GET,POST /v3/company/unarchive
: It is not possible to unarchive a company that has a value in thetransferred_to
field. -
Investment
GET /metadata/investment-project-stage/<uuid:pk>/
endpoint now includesexclude_from_investment_flow
field in the response.
-
Companies A new nullable column
transferred_to
has been added to thecompany_company
table as a foreign key to another company record. The column indicates that data about the company has been transferred to another record, and the referenced company is the one that should be used instead.A new column
transfer_reason
has been added to thecompany_company
table. This indicates the reason that data about the company was transferred. The current possible values are an empty string, or'duplicate'
. -
Investment A new column
exclude_from_investment_flow
has been added to themetadata_investmentprojectstage
table. The column indicates if the stage should be excluded from the investment flow timeline.
- Advisers The field
use_cdms_auth
is deprecated and will be removed on or after 1 November. - The table
leads_businesslead
was deleted.
- Interactions Policy feedback interactions are now always excluded from interaction exports (regardless of the current user's permissions).
- Investment SPI report now shows "Project manager first assigned by" (who first time assigned a project manager) column.
- Various dependencies were updated.
- Interactions
POST /v3/search/interaction/export
now always excludes policy feedback interactions (regardless of the current user's permissions).
- Advisers The column
company_advisor.use_cdms_auth
is deprecated and will be removed on or after 1 November. - Investment The column
investment_investmentproject.project_manager_first_assigned_by
has been added. It is nullable and contains a foreign key to the adviser who first time assigned a project manager. - The table
leads_businesslead
was deleted.
- All business leads endpoints were removed from the API.
- Investment SPI report now shows "Enquiry type" (the type of interaction that triggered the end of SPI1) and "Enquiry processed by" (who has created the interaction) columns.
- When viewing a record in the admin site, a link to the page for the record in the main application is now displayed (when applicable).
- Contacts The speed of the admin site tool for loading marketing email opt-outs was improved via the creation of an additional database index.
- Investment Estimated land date is now validated when other required fields are missing.
-
The following endpoints were removed:
GET,POST /v3/business-leads
GET,PATCH /v3/business-leads/<uuid:pk>
POST /v3/business-leads/<uuid:pk>/archive
POST /v3/business-leads/<uuid:pk>/unarchive
-
Contacts The column
company_contact.contactable_by_dit
has been deleted from the database.The column
company_contact.contactable_by_uk_dit_partners
has been deleted from the database.The column
company_contact.contactable_by_overseas_dit_partners
has been deleted from the database.The column
company_contact.contactable_by_email
has been deleted from the database.The column
company_contact.contactable_by_phone
has been deleted from the database. -
GET /whoami/
no longer returns theread_*
permissions that were being returned for backwards compatibility following the introduction ofview_*
permissions.
- Various dependencies were updated.
GET /whoami/
no longer returns theread_*
permissions that were being returned for backwards compatibility following the introduction ofview_*
permissions.
-
Contacts The column
company_contact.contactable_by_dit
has been deleted from the database.The column
company_contact.contactable_by_uk_dit_partners
has been deleted from the database.The column
company_contact.contactable_by_overseas_dit_partners
has been deleted from the database.The column
company_contact.contactable_by_email
has been deleted from the database.The column
company_contact.contactable_by_phone
has been deleted from the database.
-
Contacts The field
contactable_by_dit
was removed from the API. The database column will be deleted with the next release.The field
contactable_by_uk_dit_partners
was removed from the API. The database column will be deleted with the next release.The field
contactable_by_overseas_dit_partners
was removed from the API. The database column will be deleted with the next release.The field
contactable_by_email
was removed from the API. The database column will be deleted with the next release.The field
contactable_by_phone
was removed from the API. The database column will be deleted with the next release. -
Business leads table and endpoints are deprecated. Please check the API and Database schema categories for more details.
- Interactions The character limit for the notes field was increased from 4000 to 10,000.
- The index.mapping.single_type Elasticsearch setting is no longer set to improve compatibility with Elasticsearch 6.x.
- Various dependencies were updated.
-
Contacts The field
contactable_by_dit
was removed from all contact endpoints.The field
contactable_by_uk_dit_partners
was removed from all contact endpoints.The field
contactable_by_overseas_dit_partners
was removed from all contact endpoints.The field
contactable_by_email
was removed from all contact endpoints.The field
contactable_by_phone
was removed from all contact endpoints. -
Interactions The character limit for the notes field was increased from 4000 to 10000 for the following endpoints:
GET,POST /v3/interaction
GET,PATCH /v3/interaction/<uuid:pk>
-
The following endpoints are deprecated and will be removed on or after October 11:
GET,POST /v3/business-leads
GET,PATCH /v3/business-leads/<uuid:pk>
POST /v3/business-leads/<uuid:pk>/archive
POST /v3/business-leads/<uuid:pk>/unarchive
-
Contacts The column
company_contact.contactable_by_dit
was made nullable in preparation for its removal.The column
company_contact.contactable_by_uk_dit_partners
was made nullable in preparation for its removal.The column
company_contact.contactable_by_overseas_dit_partners
was made nullable in preparation for its removal.The column
company_contact.contactable_by_email
was made nullable in preparation for its removal.The column
company_contact.contactable_by_phone
was made nullable in preparation for its removal. -
The table
leads_businesslead
is deprecated and will be removed on or after October 11.
- Companies The column
company_company.account_manager_id
was deleted from the database.
- Contacts A list of email addresses to opt out of marketing emails can now be loaded via the admin site.
- URLs in CSV exports and reports are no longer clickable when the CSV file is opened in Excel. This is because the links do not behave correctly when clicked on in Excel (see https://support.microsoft.com/kb/899927 for further information on why).
- Companies The link in the admin site to export the One List was removed from the adviser, Companies House company, contact and export experience category lists. (It still appears on the company list as originally intended.)
- Investment Restricted users can now list proposition documents associated to their team's investment projects.
- Investment Deletion of proposition or evidence document is now logged in UserEvent model. UserEvent records can be viewed from the admin site.
- Various dependencies were updated.
- Companies The column
company_company.account_manager_id
was deleted from the database.
-
Companies The field account_manager was removed from the API, from the Django admin and from the model definition. The database column will be deleted with the next release.
-
Contacts The field
contactable_by_dit
is deprecated. Please check the API and Database schema categories for more details.The field
contactable_by_uk_dit_partners
is deprecated. Please check the API and Database schema categoriesThe field
contactable_by_overseas_dit_partners
is deprecated. Please check the API and Database schema categories for more details.The field
contactable_by_email
is deprecated. Please check the API and Database schema categories for more details.The field
contactable_by_phone
is deprecated. Please check the API and Database schema categories for more details.
- Companies It's now possible to export company search results as a CSV file (up to a maximum of 5000 results).
- Contacts It's now possible to export contact search results as a CSV file (up to a maximum of 5000 results).
- Investment It is now possible to upload evidence documents for a given investment project.
- OMIS It's now possible to export OMIS order search results as a CSV file (up to a maximum of 5000 results).
- URLs in all CSV exports and reports were made clickable when the CSV file is opened in Excel. This was achieved by using the Excel HYPERLINK() function.
- Existing read-only model views in the admin site were updated to disable the change button that previously had no purpose.
- Performed exports of search results are now logged in a new model called UserEvent. UserEvent records can be viewed from the admin site.
- Investment Proposition now needs to have at least one document uploaded in order to be completed. It is now optional to provide details when completing a proposition. This functionality is behind
proposition-documents
feature flag, that needs to be active in order for the new behaviour to work.
-
Companies The field account_manager was removed from all company endpoints.
-
Companies
POST /v3/search/company/export
was added for exporting company search results as a CSV file with up to 5000 rows. Thecompany.export_company
permission was also added and is required to use this endpoint. -
Contacts
POST /v3/search/contact/export
was added for exporting contact search results as a CSV file with up to 5000 rows. Thecompany.export_contact
permission was also added and is required to use this endpoint. -
Contacts
`GET,POST /v3/contact
andGET,POST /v3/contact/<uuid:pk>
` the fields contactable_by_dit, contactable_by_uk_dit_partners, contactable_by_overseas_dit_partners, contactable_by_email, contactable_by_phone are deprecated and will be removed on or after September 11 -
Investment
GET /v3/investment/<investment project pk>/evidence
gets list of evidence documents.POST /v3/investment/<investment project pk>/evidence
creates new evidence document upload.GET /v3/investment/<investment project pk>/evidence/<evidence document pk>
gets details of evidence documentDELETE /v3/investment/<investment project pk>/evidence/<evidence document pk>
deletes given evidence document.POST /v3/investment/<investment project pk>/evidence/<evidence document pk>/upload_callback
notifies that file upload has been completed and initiates virus scanning.GET /v3/investment/<investment project pk>/evidence/<evidence document pk>/download
returns a signed URL to the document file object.Following permissions are required to use the endpoints:
evidence.add_all_evidencedocument
evidence.view_all_evidencedocument
evidence.change_all_evidencedocument
evidence.delete_all_evidencedocument
For DA and LEP:
evidence.add_associated_evidencedocument
evidence.view_associated_evidencedocument
evidence.change_associated_evidencedocument
evidence.delete_associated_evidencedocument
-
OMIS
POST /v3/search/order/export
was added for exporting OMIS order search results as a CSV file with up to 5000 rows. Theorder.export_order
permission was also added and is required to use this endpoint.
-
Contacts The column
`contact.contactable_by_dit
` is deprecated and may be removed on or after 11 September.The column
`contact.contactable_by_uk_dit_partners
` is deprecated and may be removed on or after 11 September.The column
`contact.contactable_by_overseas_dit_partners
` is deprecated and may be removed on or after 11 September.The column
`contact.contactable_by_email
` is deprecated and may be removed on or after 11 September.The column
`contact.contactable_by_phone
` is deprecated and may be removed on or after 11 September. -
Investment New tables
evidence_evidencedocuments
,evidence_evidence_tag
andevidence_evidencedocument_tags
have been added to enable evidence document upload. -
Investment The
details
field inproposition_proposition
table can now be blank. -
Investment The
add_associated_investmentproject_proposition
permission has been renamed toadd_associated_proposition
to be consistent with other entities. -
Investment The
change_associated_investmentproject_proposition
permission has been renamed tochange_associated_proposition
to be consistent with other entities. -
Investment The
view_associated_investmentproject_proposition
permission has been renamed toview_associated_proposition
to be consistent with other entities. -
Investment The
delete_propositiondocument
permission has been renamed todelete_all_propositiondocument
to be consistent with other entities. -
Investment The
deleted_associated_propositiondocument
permission has been renamed todelete_associated_propositiondocument
.
- Companies The field
account_manager
has been deprecated. Please check the API and Database schema categories for more details. - Companies The column
company_company.parent_id
has been deleted from the database. GET /whoami/
endpoint:read_*
permissions have been renamed toview_*
. This endpoint will return bothview_*
andread_*
permissions for now butread_*
permissions are deprecated and will soon be removed.
- Companies It's now possible to export the one list via the django admin from the company changelist.
- Interactions The CSV export of search results has been amended to return various additional columns.
- Investment It's now possible to export investment project search results as a CSV file (up to a maximum of 5000 results).
- The format of timestamps in CSV exports and reports was changed to YYYY-MM-DD HH-MM-SS for better compatibility with Microsoft Excel.
- Document upload now uses V2 API of AV service.
- Document upload streaming to AV service now uses a StreamWrapper to encode the file as multipart/form-data in order to send it to AV service. This fixes the problem when the file has been sent incorrectly.
- Django was updated to version 2.1.
- Companies
GET,POST /v3/company/<uuid:pk>
andGET /v3/search/company
: the fieldaccount_manager
has been deprecated and will be removed on or after August 30. Please useone_list_account_owner
instead. - Interactions
GET /v3/interaction
can now be sorted bydit_adviser__first_name
,dit_adviser__last_name
, andsubject
. - Investment
POST /v3/search/investment_project/export
was added for exporting investment project search results as a CSV file with up to 5000 rows. Theinvestment.export_investmentproject
permission was also added and is required to use this endpoint. GET /whoami/
endpoint:read_*
permissions have been renamed toview_*
. This endpoint will return bothview_*
andread_*
permissions for now butread_*
permissions are deprecated and will soon be removed.
- Companies The column
company_company.account_manager_id
has been deprecated and will be removed on or after August 30. Please usecompany_company.one_list_account_owner_id
instead. - Companies The column
company_company.parent_id
has been deleted from the database.
- Added models for evidence documents (endpoints to follow in a future release)
- Fixed a bug in the Celery task for SPI report creation that caused the task to fail. (As a result, S3 keys for future reports will no longer include the bucket name.)
- Rewrote the mechanism for exporting results to run the search against Elasticsearch but extract data from PostgreSQL, and limited the number of rows exported to 5000
- Removed all data exports expect for the interactions one (further changes to follow in a future release)
- Removed unused
parent
field from the model definition. The database column will be deleted from the schema on or after August 21
- Added a management command to update the email marketing status of contacts using a CSV file
- Added the ability to upload documents to propositions
- Removed old document functionality
- Stopped using nested Elasticsearch queries
- Removed the migration path from legacy Elasticsearch single-index set-ups
- Updated various dependencies
- Updated the test data
- Added a core team member model to hold the advisers in the core team for a company
- Updated the core team endpoint to return advisers from the core team member model
- Improved the layout of the admin page for a company
- Updated the admin site to display the created on and by and modified on and by fields more consistently, and to correctly update those fields when changes are made via the admin site
- Removed (unused) Elasticsearch alias-related management commands
- Improved timeout handling during Elasticsearch queries
- Updated various dependencies
- Added a company core team endpoint at
/v3/company/<company-pk>/core-team
(currently only returning the global account manager)
- Moved to one Elasticsearch index per mapping type, and added a command (
./manage.py migrate_es
) to migrate Elasticsearch index mappings. See docs/Elasticsearch migrations.md for more detail. (After upgrading,./manage.py init_es
must be run to update index aliases.) - Fixed a random failure in the
TestListCompanies.test_sort_by_name
test - Added a contact for an archived company to the test data
- Updated various dependencies
Please check the previous releases on GitHub.