Skip to main content

Acre Platform User API

Project description

acre-api

CORS

CORS is implemented by all Acre API endpoints and only certain hostnames are allowed for each deployment of the API. If your use case requires calling the Acre User API from a browser, please contact Acre to arrange the appropriate configuration.

API Authentication

The primary method of authentication for users of the Acre API is with the use of JSON Web Tokens (JWTs), which are suplemented by an application specific API Key. The API key must be provided through the X-API-KEY HTTP header and will be provided by your Acre Customer Success Manager. The JWT must be provided through a cookie with key of authorization. The JWT must be generated and signed as per the following section.

Generating JWTs

JWT must either be generated by a third-party such as Azure ADB2C that has been configured for the appropriate service and/or user account, or alternatively can be generated locally and signed by an private key for which the public key has been made available to Acre via a JWKS URL. In addition to being signed by your private key, the JWT will also need to contain at a minimum:

  • An issuer iss, which must be a valid URI previously agreed with Acre.
  • A subject sub, which must be a unique identifier for the user and/or service account previously agreed with Acre.
  • An expiry time exp which must not be more than four hours in the future.
  • A not before time nbf which must be in the past, but not greater than six hours in the past. The JWT should be signed using RS256.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.0.0
  • Generator version: 7.12.0-SNAPSHOT
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.8+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import acre_api

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import acre_api

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import acre_api
from acre_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = acre_api.Configuration(
    host = "http://localhost"
)



# Enter a context with an instance of the API client
with acre_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = acre_api.AuthenticationApi(api_client)
    authentication_provider = acre_api.CdmAuthenticationProvider() # CdmAuthenticationProvider | Details of the authentication provider to be created. Required.

    try:
        # Create a new authentication provider.
        api_response = api_instance.create_authentication_provider(authentication_provider)
        print("The response of AuthenticationApi->create_authentication_provider:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AuthenticationApi->create_authentication_provider: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AuthenticationApi create_authentication_provider POST /v1/acre/auth_provider Create a new authentication provider.
AuthenticationApi delete_authentication_provider DELETE /v1/acre/auth_provider/{authentication_provider.authentication_provider_id} Delete an authentication provider.
AuthenticationApi get_authentication_provider GET /v1/acre/auth_provider Get the authentication provider details.
AuthenticationApi get_user_auth_url GET /v1/acre/user/auth_url Get a user-specific URL for the user to authenticate.
AuthenticationApi replace_authentication_provider PUT /v1/acre/auth_provider/{authentication_provider.authentication_provider_id} Replace replaces an authentication provider.
AuthenticationApi update_authentication_provider PATCH /v1/acre/auth_provider/{authentication_provider.authentication_provider_id} Update an existing authentication provider.
CaseApi bulk_assign_case POST /v1/acre/case/assign Bulk assign case owner and bulk add related users
CaseApi bulk_create_lead_cases POST /v1/acre/case/leads Bulk create lead cases from complete cases.
CaseApi create_case POST /v1/acre/case Create a new case.
CaseApi create_case_flag POST /v1/acre/case/{flag.case_id}/flag Create case flag.
CaseApi create_case_flag_review POST /v1/acre/case/{case_id}/flag/{flag_id}/review Create case flag review.
CaseApi create_case_referral POST /v1/acre/case/referral Create a new case from an existing one.
CaseApi create_case_version POST /v1/acre/case/{case_id}/version Create a case version.
CaseApi describe_case_verification GET /v1/acre/case/verification Describe all installed verifications for cases.
CaseApi get_case GET /v1/acre/case Get cases with their latest version.
CaseApi get_case_survey GET /v1/acre/case/{case_id}/survey Get case survey.
CaseApi get_case_verifications GET /v1/acre/case/{case_id}/verifications Retrieve verifications of an existing case.
CaseApi get_case_version GET /v1/acre/case/{case_id}/version/{version} Get a case, specifying a version (use zero for latest).
CaseApi get_hydrated_case GET /v1/acre/case/{case_id}/hydrated Get hydrated case.
CaseApi list_case_version GET /v1/acre/case/{case_id}/version List case versions.
CaseApi replace_case PUT /v1/acre/case/{case.case_id} Replace (PUT) an existing case and current mutable version.
CaseApi update_case PATCH /v1/acre/case/{case.case_id} Update (PATCH) an existing case and current mutable version.
CaseApi update_case_status POST /v1/acre/case/{case_id}/case_transition Update a case's status.
ClientApi create_client POST /v1/acre/client Create a new client.
ClientApi create_client_organisation_relationship POST /v1/acre/client/{client_id}/organisation_relationship/{organisation_id_or_ext} Create a client organisation relationship.
ClientApi create_client_version POST /v1/acre/client/{client_id}/version Create a client version.
ClientApi delete_client_data DELETE /v1/acre/client/{client_id}
ClientApi delete_client_health_data DELETE /v1/acre/client/{client_id}/health_data
ClientApi deprecated_get_client_organisation_relationship GET /v1/acre/client/{client_id}/organisation_relationship Deprecated - Get client organisation relationship.
ClientApi get_client GET /v1/acre/client Get clients with their latest version.
ClientApi get_client_linked_data GET /v1/acre/client/{client_id}/delete_data
ClientApi get_client_organisation_relationship GET /v1/acre/client/{client_id}/organisation_relationship/{organisation_id_or_ext} Get client organisation relationship.
ClientApi get_client_verifications GET /v1/acre/client/{client_id}/verifications Retrieve verifications of an existing client.
ClientApi get_client_version GET /v1/acre/client/{client_id}/version/{version} Get a client, specifying a version (use zero for latest).
ClientApi list_client_version GET /v1/acre/client/{client_id}/version List client versions.
ClientApi replace_client PUT /v1/acre/client/{client.client_id} Replace (PUT) an existing client and current mutable version.
ClientApi run_id_verification POST /v1/acre/client/{client_id}/identity/request_verification Request eIDV check of an existing client.
ClientApi update_client PATCH /v1/acre/client/{client.client_id} Update (PATCH) an existing client and current mutable version.
ClientApi update_client_organisation_relationship PATCH /v1/acre/client/{client_id}/organisation_relationship/{organisation_id_or_ext} Update (PATCH) an existing client organisation relationship.
CommissionStructureApi create_commission_structure POST /v1/acre/commission_structure Create Commission Structure.
CommissionStructureApi get_commission_structure GET /v1/acre/commission_structure Retrieve Commission Structure.
CommissionStructureApi update_commission_structure PATCH /v1/acre/commission_structure/{commission_structure.commission_structure_id} Update (PATCH) Commission Structure.
DocumentApi add_case_document POST /v1/acre/document/{document_id}/case Add a document to an existing case.
DocumentApi create_document_verification POST /v1/acre/document/{document_id}/verification Create a document verification.
DocumentApi delete_case_document DELETE /v1/acre/document/{document_id}/case/{case_id} Delete (DELETE) document from an existing case.
DocumentApi delete_document DELETE /v1/acre/document/{document_id} Delete (DELETE) document.
DocumentApi get_document GET /v1/acre/document/{document.document_id} Get a document.
DocumentApi get_document_summaries GET /v1/acre/document Get summaries for multiple documents. No document details are returned.
DocumentApi get_document_verification GET /v1/acre/document/{document_id}/verification Get a document verification.
DocumentApi render_template POST /v1/acre/document/render_template Render a template to generate a document and (optionally) store it.
DocumentApi replace_document PUT /v1/acre/document/{document.document_id} Replace (PUT) an existing document.
DocumentApi template_ctx POST /v1/acre/document/render_template/ctx Return the context a given template would have been rendered with.
DocumentApi test_render_template POST /v1/acre/document/render_template/test Test rendering a template without having to store it, by passing the code.
DocumentApi update_document PATCH /v1/acre/document/{document.document_id} Update (PATCH) an existing document.
DocumentApi upload_document POST /v1/acre/document Upload a document.
DocumentRequirementApi create_document_requirement POST /v1/acre/requirement Create a new document requirement.
DocumentRequirementApi get_document_requirements GET /v1/acre/requirement Get document requirements.
DocumentRequirementApi update_document_requirement PATCH /v1/acre/requirement/{document_requirement.requirement_id} Update document requirement.
GeneralInsuranceProductApi add_general_insurance_product_case POST /v1/acre/general_insurance_product/{general_insurance_product_id}/case Add a general insurance product to an existing case.
GeneralInsuranceProductApi create_general_insurance_product POST /v1/acre/general_insurance_product Create a general insurance product.
GeneralInsuranceProductApi delete_general_insurance_product_case DELETE /v1/acre/general_insurance_product/{general_insurance_product_id}/case/{case_id} Delete a general insurance product from an existing case.
GeneralInsuranceProductApi get_general_insurance_product GET /v1/acre/general_insurance_product Get general insurance products.
GeneralInsuranceProductApi update_general_insurance_product PATCH /v1/acre/general_insurance_product/{general_insurance_product.general_insurance_product_id} Update (PATCH) an existing general insurance product.
GroupApi create_group POST /v1/acre/group Create a new group.
GroupApi get_group GET /v1/acre/group Get the group details.
GroupApi replace_group PUT /v1/acre/group/{group.group_id} Replace (PUT) an existing group.
GroupApi update_group PATCH /v1/acre/group/{group.group_id} Update (PATCH) an existing group.
InternalApi get_hydrated_case GET /v1/acre/case/{case_id}/hydrated Get hydrated case.
MortgageSourcingApi get_mortgage_product_details GET /v1/acre/mortgage_product/source/{product_code} Get mortgage product details for sourced product.
MortgageSourcingApi run_source POST /v1/acre/mortgage_product/source Run mortgage product sourcing.
MortgageMortgageProductApi add_mortgage_case POST /v1/acre/mortgage/{mortgage_id}/case Add a mortgage to an existing case.
MortgageMortgageProductApi add_mortgage_product POST /v1/acre/mortgage/{mortgage_id}/product Add a mortgage product to an existing mortgage.
MortgageMortgageProductApi create_acre_mortgage_product POST /v1/acre/mortgage_product Create a mortgage product stored within Acre.
MortgageMortgageProductApi create_mortgage POST /v1/acre/mortgage Create a new mortgage.
MortgageMortgageProductApi create_mortgage_version POST /v1/acre/mortgage/{mortgage_id}/version Create a Mortgage version.
MortgageMortgageProductApi create_mortgage_with_product POST /v1/acre/mortgage_with_product Create a new mortgage with a product and link it to a case.
MortgageMortgageProductApi delete_mortgage_case DELETE /v1/acre/mortgage/{mortgage_id}/case/{case_id} Delete (DELETE) mortgage from an existing case.
MortgageMortgageProductApi delete_mortgage_product DELETE /v1/acre/mortgage/{mortgage_id}/product/{product_id} Delete (DELETE) mortgage product from an existing mortgage.
MortgageMortgageProductApi get_acre_mortgage_product GET /v1/acre/mortgage_product/{product_id} Get mortgage product details for a mortgage product stored in Acre.
MortgageMortgageProductApi get_mortgage GET /v1/acre/mortgage Get the details of existing mortgages.
MortgageMortgageProductApi get_mortgage_version GET /v1/acre/mortgage/{mortgage_id}/version/{version} Get a mortgage, specifying a version (use zero for latest).
MortgageMortgageProductApi replace_mortgage PUT /v1/acre/mortgage/{mortgage.mortgage_id} Replace (PUT) an existing mortgage.
MortgageMortgageProductApi update_mortgage PATCH /v1/acre/mortgage/{mortgage.mortgage_id} Update (PATCH) an existing mortgage.
MortgageMortgageProductApi update_mortgage_with_product PATCH /v1/acre/mortgage_with_product/{mortgage_with_product.mortgage.mortgage_id} Update (PATCH) an existing mortgage and its product
NoteApi create_note POST /v1/acre/note Create a note.
NoteApi get_note GET /v1/acre/note Retrieve note.
NoteApi update_note PATCH /v1/acre/note/{note.note_id} Update a note.
OrganisationApi create_organisation POST /v1/acre/organisation Create a new organisation.
OrganisationApi get_organisation GET /v1/acre/organisation Get the details of existing organisations.
OrganisationApi replace_organisation PUT /v1/acre/organisation/{organisation_id_or_ext} Replace (PUT) an existing organisation.
OrganisationApi update_organisation PATCH /v1/acre/organisation/{organisation_id_or_ext} Update (PATCH) an existing organisation.
PermissionApi create_permission_assignment POST /v1/acre/permission_assignment Create a new permission assignment.
PermissionApi create_permission_assignments POST /v1/acre/permission_assignment/bulk Create new permission assignments. If one fails the call, none will be applied. Note that this endpoint must be defined after /v1/acre/permission_assignment/{permission_assignment.permission_assignment_id}, otherwise requests to /v1/acre/permission_assignment/bulk will be handled as if `bulk` is permission_assignment_id
PermissionApi get_permission GET /v1/acre/permission Get permission details. Permissions are populated using a default configuration, and cannot be manipulated via API.
PermissionApi get_permission_assignment GET /v1/acre/permission_assignment Get the permission assignment details.
PermissionApi replace_permission_assignment PUT /v1/acre/permission_assignment/{permission_assignment.permission_assignment_id} Replace (PUT) a permission assignment.
PermissionApi resolve_permission POST /v1/acre/resolve_permission Check permissions with the given scopes.
PermissionApi update_permission_assignment PATCH /v1/acre/permission_assignment/{permission_assignment.permission_assignment_id} Update (PATCH) a permission assignment. Note that this endpoint must be defined before /v1/acre/permission_assignment/bulk, otherwise requests to /v1/acre/permission_assignment/bulk will be handled as if `bulk` is permission_assignment_id
PermissionApi update_permission_assignments PATCH /v1/acre/permission_assignment/bulk Update (PATCH) permission assignments. If one fails the call, none will be applied.
PropertyApi create_property POST /v1/acre/property Create a new property.
PropertyApi create_property_version POST /v1/acre/property/{property_id}/version Create a property version.
PropertyApi get_property GET /v1/acre/property Get properties with their latest version.
PropertyApi get_property_version GET /v1/acre/property/{property_id}/version/{version} Get a property, specifying a version (use zero for latest).
PropertyApi list_property_version GET /v1/acre/property/{property_id}/version List property versions. Only versions that the caller can view are returned.
PropertyApi replace_property PUT /v1/acre/property/{property.property_id} Replace (PUT) an existing property and current mutable version.
PropertyApi update_property PATCH /v1/acre/property/{property.property_id} Update (PATCH) an existing property and current mutable version.
ProtectionProductApi add_case_protection_product POST /v1/acre/protection_product/{protection_id}/case Add a protection product to an existing case.
ProtectionProductApi create_protection_product POST /v1/acre/protection_product Create a protection product.
ProtectionProductApi create_protection_product_version POST /v1/acre/protection_product/{protection_id}/version Create a protection product version.
ProtectionProductApi delete_case_protection_product DELETE /v1/acre/protection_product/{protection_id}/case/{case_id} Delete (DELETE) case from a protection product.
ProtectionProductApi get_protection_product GET /v1/acre/protection_product Get protection product details.
ProtectionProductApi get_protection_product_version GET /v1/acre/protection_product/{protection_id}/version/{version} Get a protection product, specifying a version (use zero for latest).
ProtectionProductApi save_protection_solution_to_case POST /v1/acre/protection_solution Create protection products which belong to a single solution and add to case.
ProtectionProductApi update_protection_product PATCH /v1/acre/protection_product/{protection_product.protection_id} Update (PATCH) an existing protection product.
ProtectionProductApi list_protection_product_version GET /v1/acre/protection_product/{protection_id}/version List protection product versions.
RoleApi create_role POST /v1/acre/role Create a new role.
RoleApi get_role GET /v1/acre/role Get the role details.
RoleApi replace_role PUT /v1/acre/role/{role.role_id} Replace (PUT) an existing role.
RoleApi update_role PATCH /v1/acre/role/{role.role_id} Update (PATCH) an existing role.
ServiceApi health_check GET /v1/acre/health_check Check the health of the acre processor. This is used by load balancers to check end-to-end service health.
TemplateApi create_template POST /v1/acre/template Create a template.
TemplateApi email_template POST /v1/acre/email_template Email Template.
TemplateApi get_template GET /v1/acre/template Get the template details.
UserApi create_user POST /v1/acre/user Create a new user.
UserApi get_me GET /v1/acre/user/me Get the details of the currently logged in user.
UserApi get_user GET /v1/acre/user Get the details of users.
UserApi replace_user PUT /v1/acre/user/{user.user_id} Replace (PUT) an existing user.
UserApi update_user PATCH /v1/acre/user/{user.user_id} Update (PATCH) an existing user.

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acre_api-1.2.3.tar.gz (432.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acre_api-1.2.3-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file acre_api-1.2.3.tar.gz.

File metadata

  • Download URL: acre_api-1.2.3.tar.gz
  • Upload date:
  • Size: 432.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.9.13 Windows/10

File hashes

Hashes for acre_api-1.2.3.tar.gz
Algorithm Hash digest
SHA256 edac15e28bc7bcffe369cf3d5ec430623a91f7421067d940e15161eaed5b2e24
MD5 d0f874be351e71f87ffaa15679226093
BLAKE2b-256 655dfd001bce6e4c9f54a9e1bdd0e1283d009106aeaf09656a86fe09c26acf70

See more details on using hashes here.

File details

Details for the file acre_api-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: acre_api-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.9.13 Windows/10

File hashes

Hashes for acre_api-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 26b153a85e58f7916a9f1f0c405d37789ad6e8804546097755f1fbd639f3684b
MD5 cda3a3ee3b8e635d516440ce90653efc
BLAKE2b-256 0bd6176124a27f079241f8bed24611a72034659d1cf4bf0b557a06381d1dc199

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page