---
title: "Detect API"
canonical: https://documentation.maventa.com/api-specification/rest-api/detect-api/
---

Detect API is used to integrate to Maventa Detect service. Read more about the service at [Detect service](https://documentation.maventa.com/integration-guide/invoice-receiving/detect/).

## API endpoints

### GET /v1/invoices/reports/definitions


Get useful definitions for user reports

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `ReportsDefinitions` |

### GET /v1/services/detect/checks

List enabled Detect checks

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 | List enabled Detect checks | `Detect_Checks` |

### PATCH /v1/services/detect/checks

Update Detect checks

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| on_invoice_receive | query | array[string] | no | List of checks to enable. Currently supported checks: SUPPLIER_ACTIVATION, BANK_ACCOUNT_CHANGED, SENDER_BID_STATUS, SENDER_WARNING_LIST, VAT |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 204 | Detect checks updated successfully |  |

### GET /v1/invoices/{id}/detect_results

Fetch results provided by Detect service

Returns the check results provided by the Detect service

The JSON (`application/json`) response contains the following fields.
- **status** The overall status of the executed checks.
  - On status **OK** all the checks have been executed without findings.
  - On status **DISABLED** the Detect service has not been enabled by the customer and no checks have been executed.
  - On status **WARN** at least one of the checks has been executed with findings.
- **executed_checks** List of checks that were executed.
- **findings** List of findings that were found when executing the checks.

The `lang` request parameter can be used to specify the language the checks and findings will be presented in. The default language is English.

An example response:
```
{
  "status": "WARN",
  "executed_checks": [
    "Check if the supplier sent the material in a non-optimal way",
    "Check that the sender's business ID is active",
    "Check that the sender of the invoice is registered to charge VAT",
    "Check if the sender of the invoice has had suspicious activity in the past"
  ],
  "findings": [
    "The sender '9944556677' was found in Brønnøysundregistrene, but has been closed.",
    "The sender 'NO9944556677MVA' is not found in VAT registry.",
    "Something went wrong when executing the check. Detect could not automatically check if sender is found in a warning list."
  ]
}
```

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | yes | Invoice ID |
| lang | query | string | no | The language the checks and findings will be presented in |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 | The Detect service has analysed the invoice and result are available | `Invoices_HttpApi_Entities_InvoiceDetectResults` |
| 404 | The Detect service has not been enabled by the customer | `Invoices_HttpApi_Entities_InvoiceDetectResults` |

### GET /v1/definitions/detect/checks

Get definition of all supported detect checks

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| checks | query | array[string] | no | Filter definitions by checks. Possible values:  SUPPLIER_ACTIVATION, BANK_ACCOUNT_CHANGED, SENDER_BID_STATUS, SENDER_WARNING_LIST, VAT |
| check_attributes | query | array[string] | no | Filter only definitions of interest. Possible values:  name, friendly_name, friendly_names, title, titles, description, descriptions, doc_description, resource_type, scope, scopes, sources, metadata, possible_results |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `CheckDefinitions` |

### GET /v1/analysis/definitions


Get definition of all supported analysis checks

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| checks | query | array[string] | no | Filter definitions by checks. Possible values:  SUPPLIER_ACTIVATION, BANK_ACCOUNT_CHANGED, SENDER_BID_STATUS, SENDER_WARNING_LIST, VAT |
| check_attributes | query | array[string] | no | Filter only definitions of interest. Possible values:  name, friendly_name, friendly_names, title, titles, description, descriptions, doc_description, resource_type, scope, scopes, sources, metadata, possible_results |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `CheckDefinitions` |

### POST /v1/analysis

Trigger analysis for resource

Following checks can be triggered:

**SUPPLIER_ACTIVATION**
Check performed on: INVOICE
For invoices received through scan service, checks if the sender has sent electronic invoices in the past and could be contacted to change to electronic sending.


**BANK_ACCOUNT_CHANGED**
Check performed on: INVOICE



**SENDER_BID_STATUS**
Check performed on: INVOICE
Checks the invoice sender against national company register to see that the company business ID is registered and active.
The check also returns information if the company is going through insolvency or bankruptcy proceedings.
For Finland additional checking that the company is found in the Prepayment register.
The registries used to get this information, depend on the country of the sender and are as follows:
1. Finland - YTJ [ http://www.ytj.fi ]
2. Norway - Brønnøysundregistrene [ https://brreg.no ]
3. Other countries -> not supported



**SENDER_WARNING_LIST**
Check performed on: INVOICE
Checks the invoice sender against a list of suspicious/fraud companies.


**VAT**
Check performed on: INVOICE
For invoices containing value added tax, checks that the sender of the invoice is found in VAT register.
Note that if the total amount of value added tax on the invoice is under 1 EUR/NOK/SEK etc., the invoice sender is not checked against the VAT register.
The registries used to get this information, depend on the country of the sender and are as follows:
1. Norway - Brønnøysundregistrene [ https://brreg.no ]
2. EU countries - Vies [ https://ec.europa.eu/taxation_customs/vies/ ]
3. Other countries - not supported

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| resource_id | query | string | yes | The ID of the resource |
| resource_type | query | string | yes | The type of the resource to run checks for |
| checks_to_run | query | array[string] | yes | Which checks to run: e.g. SUPPLIER_ACTIVATION, BANK_ACCOUNT_CHANGED, SENDER_BID_STATUS, SENDER_WARNING_LIST, VAT |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 201 | Analysis was triggered and the status is pending | `array[Analysis]` |
| 400 | Bad request | `API_Entities_Error` |
| 401 | Unauthorized | `API_Entities_Error` |
| 404 | Resource not found or you don't have access to it | `API_Entities_Error` |

### GET /v1/analysis/{id}


Resource analysis result

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | yes | The ID of the invoice |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 | Possible results:  **SUPPLIER_ACTIVATION** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Supplier activation check was not performed.`\|`SUPPLIER_ACTIVATION_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check. Detect could not automatically check if supplier can send electronic invoices.`\|`SUPPLIER_ACTIVATION_FAILED`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`SUPPLIER_ACTIVATION_PENDING`\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`Invoice is not from scan. Supplier activation check was not performed.`\|`SUPPLIER_ACTIVATION_INVOICE_NOT_FROM_SCAN`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Sender information is missing from the invoice. Detect could not check if the company can send electronic invoices.`\|`SUPPLIER_ACTIVATION_INVALID_INPUT`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`According to our data it looks that the company '%{bid}' could also send electronic invoices.`\|`SUPPLIER_ACTIVATION_COMPANY_CAN_SEND_ELECTRONIC`\| `                RUN_SUCCESSFUL`\|`OK`\|`According to our data, the company '%{bid}' has no record of sending electronic invoices.`\|`SUPPLIER_ACTIVATION_COMPANY_CAN_ONLY_SEND_SCAN`   **BANK_ACCOUNT_CHANGED** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Bank account changed check was not performed.`\|`BANK_ACCOUNT_CHANGED_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check. Detect could not automatically check if supplier's bank account has changed.`\|`BANK_ACCOUNT_CHANGED_FAILED`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`BANK_ACCOUNT_CHANGED_PENDING`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`No valid bank accounts were found on the invoice. Detect could not check the sender bank account.`\|`BANK_ACCOUNT_CHANGED_INVALID_INPUT`\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`No bank account information to check was found on the invoice.`\|`BANK_ACCOUNT_CHANGED_NO_BANK_ACCOUNTS`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`There are no previously known bank accounts for the sender or use of the data is restricted. Detect could not check if the sender bank account has changed.`\|`BANK_ACCOUNT_CHANGED_UNKNOWN`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The bank account %{bank_account} on the invoice is different from what the sender %{bid} has used before.`\|`BANK_ACCOUNT_CHANGED_CHANGED`\| `                RUN_SUCCESSFUL`\|`OK`\|`The bank account %{bank_account} on the invoice is known to be used by the sender %{bid} before.`\|`BANK_ACCOUNT_CHANGED_NOT_CHANGED`   **SENDER_BID_STATUS** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Sender BID check was not performed.`\|`SENDER_BID_STATUS_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check.`\|`SENDER_BID_STATUS_FAILED`\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`The sender BID status check is not supported for senders from '%{country}'.`\|`SENDER_BID_STATUS_COUNTRY_NOT_SUPPORTED`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was not found in %{registry_name}.`\|`SENDER_BID_STATUS_NOT_FOUND`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Invalid sender bid '%{bid}' for registry '%{registry_name}'.`\|`SENDER_BID_STATUS_INVALID_BID`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Sender BID is missing from the invoice. Detect could not check sender BusinessID status.`\|`SENDER_BID_STATUS_NOT_FOUND_NO_BID`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but has been closed.`\|`SENDER_BID_STATUS_INACTIVE`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but is under liquidation (%{liquidation_state}).`\|`SENDER_BID_STATUS_UNDER_LIQUIDATION`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but is under reorganization (%{reorganization_state}).`\|`SENDER_BID_STATUS_UNDER_REORGANIZATION`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but is bankrupt (%{bankruptcy_state}).`\|`SENDER_BID_STATUS_BANKRUPT`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but is on hold (%{on_hold_state}).`\|`SENDER_BID_STATUS_ON_HOLD`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name} but is not in the Prepayment register.`\|`SENDER_BID_STATUS_PREPAYMENT_REGISTER_NOT_FOUND`\| `                RUN_SUCCESSFUL`\|`OK`\|`The sender '%{bid}' was found in %{registry_name} and is in the Prepayment register.`\|`SENDER_BID_STATUS_PREPAYMENT_REGISTER_FOUND`\| `                RUN_SUCCESSFUL`\|`OK`\|`The sender '%{bid}' was found in %{registry_name}.`\|`SENDER_BID_STATUS_FOUND`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`SENDER_BID_STATUS_PENDING`   **SENDER_WARNING_LIST** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Sender warning list check was not performed.`\|`SENDER_WARNING_LIST_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check. Detect could not automatically check if sender is found in a warning list.`\|`SENDER_WARNING_LIST_FAILED`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`SENDER_WARNING_LIST_PENDING`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Sender information is missing from the invoice. Detect could not check if the invoice sender is found on the warning list or has been reported suspicious.`\|`SENDER_WARNING_LIST_INVALID_INPUT`\| `                RUN_SUCCESSFUL`\|`OK`\|`The sender '%{bid} - %{name}' was not found in a warning list.`\|`SENDER_WARNING_LIST_NOT_FOUND`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{found_search_term}' was found from warning list (sources: %{sources}%{links_to_source_warnings}).`\|`SENDER_WARNING_LIST_FOUND`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{found_search_term}' was found in warning list (sources: %{sources}%{links_to_source_warnings}), this company has been reported by %{reporter_count} Visma customers.`\|`SENDER_WARNING_LIST_USER_REPORTED_FOUND`   **VAT** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Sender VAT check was not performed.`\|`VAT_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check. Detect could not automatically check if sender is found in the VAT register.`\|`VAT_FAILED`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`VAT_PENDING`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Invoice is missing information of sender or VAT amount. Detect could not perform sender VAT check.`\|`VAT_INVALID_INPUT`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' is not found in VAT registry.`\|`VAT_COMPANY_NOT_REGISTERED`\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`No VAT charged in the invoice.`\|`VAT_NO_VAT_CHARGED`\| `                RUN_SUCCESSFUL`\|`OK`\|`The sender '%{bid}' is found in VAT registry.`\|`VAT_COMPANY_REGISTERED` | `array[Analysis]` |
| 401 | Unauthorized | `API_Entities_Error` |
| 404 | Invoice not found or you don't have access to it | `API_Entities_Error` |


### GET /status


Public status checks

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| auth | query | string | no |  |
| long | query | boolean | no |  |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 | Public status checks |  |

### GET /v1/data/sending_parties


Fetch sending parties

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| identifiers | query | array[string] | yes | Identifiers. Maximum number: 10 |
| country | query | string | no | Country in ISO 3166-1 alpha-2 format (2 letters) |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 | Fetch sending parties |  |

### POST /v1/data/sending_parties


Create sending parties

**Request body**

Schema: `postV1DataSendingParties`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| identifier | `string` | yes |  |
| country | `string` | yes | Country in ISO 3166-1 alpha-2 format (2 letters) |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 201 | Create sending parties |  |

### POST /v1/data/supplier/bank_accounts


Stores supplier bank account information

**Request body**

Schema: `postV1DataSupplierBankAccounts`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| bid | `string` | yes | Supplier identifier |
| country | `string` | yes | Supplier country in ISO 3166-1 alpha-2 format (2 letters) |
| bank_accounts | `array[string]` | yes | Supplier bank accounts |
| origin_id | `string` | yes | Id of invoice supplier data comes from |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 201 | Stores supplier bank account information |  |

### GET /v1/check/vat

Check if an organisation is found from VAT registry

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| bid | query | string | yes | BID (Business Identification) or VAT number |
| country | query | string | yes | Country in ISO 3166-1 alpha-2 format (2 letters) |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `Analysis_API_Entities_V1_IndividualChecks_VatCheckResult` |
| 400 | Bad Request | `Analysis_API_Entities_V1_Error` |
| 401 | Unauthorized | `Analysis_API_Entities_V1_Error` |

### GET /v1/check/auto_supplier

Check if a supplier is sending documents electronically

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| bid | query | string | yes | BID (Business Identification) or VAT number |
| country | query | string | yes | Country in ISO 3166-1 alpha-2 format (2 letters) |
| document_type | query | string | yes | Document type to check |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `Analysis_API_Entities_V1_IndividualChecks_AutoSupplierCheckResult` |
| 400 | Bad Request | `Analysis_API_Entities_V1_Error` |
| 401 | Unauthorized | `Analysis_API_Entities_V1_Error` |

### GET /v1/check/bid_status

Check if an organisation is registered and active, going through insolvency or bankruptcy proceedings. For Finland additional checking that the company is found in the Prepayment register.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| bid | query | string | yes | BID (Business Identification) |
| country | query | string | yes | Country in ISO 3166-1 alpha-2 format (2 letters) |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `Analysis_API_Entities_V1_IndividualChecks_BidStatusCheckResult` |
| 400 | Bad Request | `Analysis_API_Entities_V1_Error` |
| 401 | Unauthorized | `Analysis_API_Entities_V1_Error` |

### GET /v1/check/warning_list

Check if an organization has had suspicious activity in the past.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| bid | query | string | no | BID (Business Identification) |
| name | query | string | no | Organization name |
| country | query | string | no | Country in ISO 3166-1 alpha-2 format (2 letters). If bid does not contain country as prefix, giving it as separate parameter could improve matching a result in search. |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `Analysis_API_Entities_V1_IndividualChecks_WarningListCheckResult` |
| 400 | Bad Request | `Analysis_API_Entities_V1_Error` |
| 401 | Unauthorized | `Analysis_API_Entities_V1_Error` |

### POST /v1/analysis

Trigger analysis for given resource

Following checks can be triggered:

**SUPPLIER_ACTIVATION**
Check performed on: INVOICE
For invoices received through scan service, checks if the sender has sent electronic invoices in the past and could be contacted to change to electronic sending.


**BANK_ACCOUNT_CHANGED**
Check performed on: INVOICE



**SENDER_BID_STATUS**
Check performed on: INVOICE
Checks the invoice sender against national company register to see that the company business ID is registered and active.
The check also returns information if the company is going through insolvency or bankruptcy proceedings.
For Finland additional checking that the company is found in the Prepayment register.
The registries used to get this information, depend on the country of the sender and are as follows:
1. Finland - YTJ [ http://www.ytj.fi ]
2. Norway - Brønnøysundregistrene [ https://brreg.no ]
3. Other countries -> not supported



**SENDER_WARNING_LIST**
Check performed on: INVOICE
Checks the invoice sender against a list of suspicious/fraud companies.


**VAT**
Check performed on: INVOICE
For invoices containing value added tax, checks that the sender of the invoice is found in VAT register.
Note that if the total amount of value added tax on the invoice is under 1 EUR/NOK/SEK etc., the invoice sender is not checked against the VAT register.
The registries used to get this information, depend on the country of the sender and are as follows:
1. Norway - Brønnøysundregistrene [ https://brreg.no ]
2. EU countries - Vies [ https://ec.europa.eu/taxation_customs/vies/ ]
3. Other countries - not supported

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | query | string | no | Unique ID for the analysis. UUID (Universally Unique Identifier) recommended |
| external_id | query | string | no | External reference for the analysis. UUID (Universally Unique Identifier) recommended |
| resource_type | query | string | yes |  |
| resource_format | query | string | yes | Resource data format |
| checks_to_run | query | array[string] | yes | Which checks to run: e.g. ["SUPPLIER_ACTIVATION", "BANK_ACCOUNT_CHANGED", "SENDER_BID_STATUS", "SENDER_WARNING_LIST", "VAT"] |

**Request body**

Schema: `postV1Analysis`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| resource_data | `file` | yes | Resource data in chosen format  **INTERNAL** ```javascript {   "company_bid": "876820102",   "company_country": "NO",   "company_name": "Oslo Kommune Brann- og Redningsetaten",   "sum": "10",   "sum_tax": "11",   "origin": "SCAN_NO",   "source": "SCAN" } ``` |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 201 | Analysis was triggered | `array[Analysis_API_Entities_V1_Analysis]` |
| 400 | Bad Request | `Analysis_API_Entities_V1_Error` |
| 401 | Unauthorized | `Analysis_API_Entities_V1_Error` |
| 403 | Forbidden | `Analysis_API_Entities_V1_Error` |

### GET /v1/analysis/{id}

Get status of results or results when ready

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | yes | ID of the analysis |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 | **SUPPLIER_ACTIVATION** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Supplier activation check was not performed.`\|`SUPPLIER_ACTIVATION_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check. Detect could not automatically check if supplier can send electronic invoices.`\|`SUPPLIER_ACTIVATION_FAILED`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`SUPPLIER_ACTIVATION_PENDING`\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`Invoice is not from scan. Supplier activation check was not performed.`\|`SUPPLIER_ACTIVATION_INVOICE_NOT_FROM_SCAN`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Sender information is missing from the invoice. Detect could not check if the company can send electronic invoices.`\|`SUPPLIER_ACTIVATION_INVALID_INPUT`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`According to our data it looks that the company '%{bid}' could also send electronic invoices.`\|`SUPPLIER_ACTIVATION_COMPANY_CAN_SEND_ELECTRONIC`\| `                RUN_SUCCESSFUL`\|`OK`\|`According to our data, the company '%{bid}' has no record of sending electronic invoices.`\|`SUPPLIER_ACTIVATION_COMPANY_CAN_ONLY_SEND_SCAN`   **BANK_ACCOUNT_CHANGED** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Bank account changed check was not performed.`\|`BANK_ACCOUNT_CHANGED_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check. Detect could not automatically check if supplier's bank account has changed.`\|`BANK_ACCOUNT_CHANGED_FAILED`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`BANK_ACCOUNT_CHANGED_PENDING`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`No valid bank accounts were found on the invoice. Detect could not check the sender bank account.`\|`BANK_ACCOUNT_CHANGED_INVALID_INPUT`\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`No bank account information to check was found on the invoice.`\|`BANK_ACCOUNT_CHANGED_NO_BANK_ACCOUNTS`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`There are no previously known bank accounts for the sender or use of the data is restricted. Detect could not check if the sender bank account has changed.`\|`BANK_ACCOUNT_CHANGED_UNKNOWN`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The bank account %{bank_account} on the invoice is different from what the sender %{bid} has used before.`\|`BANK_ACCOUNT_CHANGED_CHANGED`\| `                RUN_SUCCESSFUL`\|`OK`\|`The bank account %{bank_account} on the invoice is known to be used by the sender %{bid} before.`\|`BANK_ACCOUNT_CHANGED_NOT_CHANGED`   **SENDER_BID_STATUS** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Sender BID check was not performed.`\|`SENDER_BID_STATUS_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check.`\|`SENDER_BID_STATUS_FAILED`\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`The sender BID status check is not supported for senders from '%{country}'.`\|`SENDER_BID_STATUS_COUNTRY_NOT_SUPPORTED`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was not found in %{registry_name}.`\|`SENDER_BID_STATUS_NOT_FOUND`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Invalid sender bid '%{bid}' for registry '%{registry_name}'.`\|`SENDER_BID_STATUS_INVALID_BID`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Sender BID is missing from the invoice. Detect could not check sender BusinessID status.`\|`SENDER_BID_STATUS_NOT_FOUND_NO_BID`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but has been closed.`\|`SENDER_BID_STATUS_INACTIVE`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but is under liquidation (%{liquidation_state}).`\|`SENDER_BID_STATUS_UNDER_LIQUIDATION`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but is under reorganization (%{reorganization_state}).`\|`SENDER_BID_STATUS_UNDER_REORGANIZATION`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but is bankrupt (%{bankruptcy_state}).`\|`SENDER_BID_STATUS_BANKRUPT`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name}, but is on hold (%{on_hold_state}).`\|`SENDER_BID_STATUS_ON_HOLD`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' was found in %{registry_name} but is not in the Prepayment register.`\|`SENDER_BID_STATUS_PREPAYMENT_REGISTER_NOT_FOUND`\| `                RUN_SUCCESSFUL`\|`OK`\|`The sender '%{bid}' was found in %{registry_name} and is in the Prepayment register.`\|`SENDER_BID_STATUS_PREPAYMENT_REGISTER_FOUND`\| `                RUN_SUCCESSFUL`\|`OK`\|`The sender '%{bid}' was found in %{registry_name}.`\|`SENDER_BID_STATUS_FOUND`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`SENDER_BID_STATUS_PENDING`   **SENDER_WARNING_LIST** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Sender warning list check was not performed.`\|`SENDER_WARNING_LIST_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check. Detect could not automatically check if sender is found in a warning list.`\|`SENDER_WARNING_LIST_FAILED`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`SENDER_WARNING_LIST_PENDING`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Sender information is missing from the invoice. Detect could not check if the invoice sender is found on the warning list or has been reported suspicious.`\|`SENDER_WARNING_LIST_INVALID_INPUT`\| `                RUN_SUCCESSFUL`\|`OK`\|`The sender '%{bid} - %{name}' was not found in a warning list.`\|`SENDER_WARNING_LIST_NOT_FOUND`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{found_search_term}' was found from warning list (sources: %{sources}%{links_to_source_warnings}).`\|`SENDER_WARNING_LIST_FOUND`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{found_search_term}' was found in warning list (sources: %{sources}%{links_to_source_warnings}), this company has been reported by %{reporter_count} Visma customers.`\|`SENDER_WARNING_LIST_USER_REPORTED_FOUND`   **VAT** \| <div style="width:150px">Status</div> \| <div style="width:150px">Result</div> \| <div style="width:390px">Reason</div> \| <div style="width:200px">Reason code</div> \| \|------------------\|------------------\|------------------\|-----------------------\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`This is not an invoice. Sender VAT check was not performed.`\|`VAT_NOT_AN_INVOICE`\| `                    RUN_FAILED`\|`FAILED`\|`Something went wrong when executing the check. Detect could not automatically check if sender is found in the VAT register.`\|`VAT_FAILED`\| `                       PENDING`\|\|`Check is waiting to be executed.`\|`VAT_PENDING`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`Invoice is missing information of sender or VAT amount. Detect could not perform sender VAT check.`\|`VAT_INVALID_INPUT`\| `                RUN_SUCCESSFUL`\|`WARNING`\|`The sender '%{bid}' is not found in VAT registry.`\|`VAT_COMPANY_NOT_REGISTERED`\| `                NOT_APPLICABLE`\|`NOT_APPLICABLE`\|`No VAT charged in the invoice.`\|`VAT_NO_VAT_CHARGED`\| `                RUN_SUCCESSFUL`\|`OK`\|`The sender '%{bid}' is found in VAT registry.`\|`VAT_COMPANY_REGISTERED` | `array[Analysis_API_Entities_V1_Analysis]` |
| 401 | Unauthorized | `Analysis_API_Entities_V1_Error` |
| 403 | Forbidden | `Analysis_API_Entities_V1_Error` |
| 404 | Analysis result for id not found | `Analysis_API_Entities_V1_Error` |

### GET /v1/analysis_definitions


Get definition of all supported analysis checks

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| checks | query | array[string] | no | Filter definitions by checks. Possible values:  SUPPLIER_ACTIVATION, BANK_ACCOUNT_CHANGED, SENDER_BID_STATUS, SENDER_WARNING_LIST, VAT |
| check_attributes | query | array[string] | no | Filter only definitions of interest. Possible values:  name, friendly_name, friendly_names, title, titles, description, descriptions, doc_description, resource_type, scope, scopes, sources, metadata, possible_results |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `Analysis_API_Entities_V1_AnalysisDefinitions` |

### GET /v1/reports

Fetch user reports

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| bid | query | string | no | Company bid to get user reports for |
| invoice_id | query | string | no | ID of the invoice to get user reports for |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `array[Analysis_API_Entities_V1_UserReport]` |
| 401 | Unauthorized | `Analysis_API_Entities_V1_Error` |
| 403 | Forbidden | `Analysis_API_Entities_V1_Error` |
| 404 | No user report found | `Analysis_API_Entities_V1_Error` |

### POST /v1/reports


Report company

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| invoice_id | query | string | no | Invoice ID |
| company[bid] | query | string | yes | Company business id |
| company[name] | query | string | yes | Company name |
| company[country_code] | query | string | no | Company country code in ISO 3166-1 alpha-2 format (2 letters) |
| company[bank_account] | query | string | no | Company bank account |
| reason | query | array[string] | yes | Reporting reason. Can be multiple. |
| contact_email | query | string | yes | Contact email for reporter in case of follow up questions |
| description | query | string | no | Description for reporting with certain reasons |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 204 | Company successfully reported |  |
| 400 | Bad Request | `Analysis_API_Entities_V1_Error` |
| 401 | Unauthorized | `Analysis_API_Entities_V1_Error` |
| 403 | Forbidden | `Analysis_API_Entities_V1_Error` |
| 409 | Conflict: company already reported | `Analysis_API_Entities_V1_Error` |

### DELETE /v1/reports/{id}

Delete a user report

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | yes | User report id to delete |

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 204 | User report successfully deleted |  |
| 401 | Unauthorized | `Analysis_API_Entities_V1_Error` |
| 403 | Forbidden | `Analysis_API_Entities_V1_Error` |
| 404 | No report found with this id | `Analysis_API_Entities_V1_Error` |

### GET /v1/reports_definitions


Get useful definitions for user reports

**Responses**

| Status | Description | Schema |
| --- | --- | --- |
| 200 |  | `Analysis_API_Entities_V1_ReportsDefinitions` |


_OpenAPI spec snapshot: 2026-05-06_
