Intermediary
Intermediary services integration.
- Introduction
- Read Api
- Retrieve Intermediaries
- Retrieve Security Environments
- Retrieve Security Environment Files
- Retrieve Delegates
- Write Api
Introduction
Overview
Integrated Services
Read Api
Retrieve Intermediaries
This API is responsible for retrieving all intermediaries that are connected to a unique itemId.
[GET]/api/v1/{itemId}/intermediary
Response: List of Intermediaries.
Header
Header used on this API are those taken from header standards of TS Digital.
Content-type is accepted in application/json
Query Parameters
Parameters used to make a successful request.
- itemId: Unique personal identification of the item associated with the Intermediary requested. Mandatory for personal or technical users. (required)
Body
No body is needed to make this request.
Response
On successful response
If successful, the API responds with HTTP code 200(OK) with the following body:
{
"id": "string",
"taxId": "string",
"vatNumber": "string",
"description": "string",
"type": "string",
"itemUuid": "string",
"deleted": true,
"deletedAt": "2022-05-05T12:46:42.013Z",
"deletedBy": "string",
"createdAt": "2022-05-05T12:46:42.013Z",
"createdBy": "string",
"updatedAt": "2022-05-05T12:46:42.013Z",
"updatedBy": "string"
}
- id: Unique identifier.
- taxId: Fiscal code associated with the Intermediary requested.
- vatNumber: Number of IVA registration associated with the Intermediary requested (11 characters).
- description: Description of the Intermediary requested.
- type:
- deleted: Boolean value , describes if Intermediary requested is deleted or not.
- deletedAt: Date of Intermediary if it's deleted.
- deletedBy: Item which deleted requested Intermediary.
- createdAt: Date of Intermediary creation.
- createdBy: Item which created requested Intermediary.
- updatedAt: Date of the last update for the requested Intermediary.
- updatedBy: Item which updated requested Intermediary.
On error response
In the event of an error, the API responds with a body JSON with the following format:
{
"code": "string",
"timestamp": "2022-05-05T12:46:42.016Z",
"message": "string",
"subErrors": [
{}
]
}
- code: A string representation of the HTTP error code, linked with the returned http error
- timestamp: Date and time of the answer, expressed as a string.
- message: Message expressing error.
Possible errors are:
- 400: The request is malformed (parameters with incorrect format, invalid or inconsistent parameters).
- 401: An authorization token has not been provided or the authorization token provided is invalid (eg: it has expired).
- 403: The provided token is valid, but the user is not authorized to perform the operation.
- 500: An unexpected error occurred.
Retrieve Security Environments
This API is responsible for retrieving all Security environments that are connected to a unique itemId and taxId.
[GET]/api/v1/{itemId}/intermediary/{taxId}/security-environment
Response: List of Security Environments with an active status.
Header
Header used on this API are those taken from header standards of TS Digital.
Content-type is accepted in application/json
Query Parameters
Parameters used to make a successful request.
- itemId: Unique personal identification of the item associated with Security Environments requested. Mandatory for personal or technical users .(required)
- taxId: Unique fiscal code of the item associated with Security Environments requested. (required)
Body
No body is needed to make this request.
Response
On successful response
If successful, the API responds with HTTP code 200(OK) with the following body:
[
{
"id": "string",
"siteCode": "string",
"entratelCode": "string",
"description": "string",
"startDate": "2022-05-06T08:48:50.675Z",
"expirationDate": "2022-05-06T08:48:50.675Z",
"createdAt": "2022-05-06T08:48:50.675Z",
"createdBy": "string",
"updatedAt": "2022-05-06T08:48:50.675Z",
"updatedBy": "string"
}
]
- id: Unique identifier.
- siteCode:
- entratelCode:
- startDate: Start date of the Security Environment.
- expirationDate: Expiration date of Security Environment.
- createdAt: Date of Security Environment creation.
- createdBy: Item which created requested Security Environment.
- updatedAt: Date of the last update for the requested Security Environment.
- updatedBy: Item which updated requested Security Environment.
On error response
In the event of an error, the API responds with a body JSON with the following format:
{
"code": "string",
"timestamp": "2022-05-05T12:46:42.016Z",
"message": "string",
"subErrors": [
{}
]
}
- code: A string representation of the HTTP error code, linked with the returned http error
- timestamp: Date and time of the answer, expressed as a string.
- message: Message expressing error.
Possible errors are:
- 400: The request is malformed (parameters with incorrect format, invalid or inconsistent parameters).
- 401: An authorization token has not been provided or the authorization token provided is invalid (eg: it has expired).
- 403: The provided token is valid, but the user is not authorized to perform the operation.
- 500: An unexpected error occurred.
Retrieve Security Environment Files
This API is responsible for retrieving all files associated to a unique Security Environment.
[GET]/api/v1/{itemId}/intermediary/{taxId}/security-environment/{siteCode}/{version}
[GET]/api/v1/{itemId}/intermediary/{taxId}/security-environment/{siteCode}
version parameter is optional.
Response: List of Security Environment files.
Header
Header used on this API are those taken from header standards of TS Digital.
Content-type is accepted in application/json
Query Parameters
Parameters used to make a successful request.
- itemId: Unique personal identification of the item associated with Security Environments requested. Mandatory for personal or technical users .(required)
- taxId: Unique fiscal code of the item associated with Security Environments requested. (required)
- siteCode: (required)
- version: Current version of the Security Environment Version. (optional)
Body
No body is needed to make this request.
Response
On successful response
If successful, the API responds with HTTP code 200(OK) with the following body:
[
{
"name": "string",
"content": "string"
}
]
- name: Name of the file.
- content: Content of the file encrypted on Base64.
On error response
In the event of an error, the API responds with a body JSON with the following format:
{
"code": "string",
"timestamp": "2022-05-05T12:46:42.016Z",
"message": "string",
"subErrors": [
{}
]
}
- code: A string representation of the HTTP error code, linked with the returned http error
- timestamp: Date and time of the answer, expressed as a string.
- message: Message expressing error.
Possible errors are:
- 400: The request is malformed (parameters with incorrect format, invalid or inconsistent parameters).
- 401: An authorization token has not been provided or the authorization token provided is invalid (eg: it has expired).
- 403: The provided token is valid, but the user is not authorized to perform the operation.
- 500: An unexpected error occurred.
Retrieve Delegates
Retrieves the delegates linked with an intermediary based on itemId , intermediaryTaxId, delegatedTaxId.
[GET]/api/v1/{itemId}/intermediary/{intermediaryTaxId}/delegated
[GET]/api/v1/{itemId}/intermediary/{intermediaryTaxId}/delegated/{delegatedTaxId}
delegatedTaxId parameter is optional.
Response: List of delegates.
Header
Header used on this API are those taken from header standards of TS Digital.
Content-type is accepted in application/json
Query Parameters
Parameters used to make a successful request.
- itemId: Unique personal identification of the item associated with an Intermediary. Mandatory for personal or technical users. (required)
- intermediaryTaxId: Unique fiscal code associated with with an intermediary . (required)
- delegatedTaxId: Unique fiscal code associated with with an delegated. (optional)
Body
No body is needed to make this request.
Response
On successful response
If successful, the API responds with HTTP code 200(OK) with the following body:
[
{
"id": "string",
"taxId": "string",
"firstName": "string",
"lastName": "string",
"description": "string",
"deleted": true,
"deletedAt": "2022-05-06T12:21:24.675Z",
"deletedBy": "string",
"intermediaryId": "string",
"createdAt": "2022-05-06T12:21:24.675Z",
"createdBy": "string",
"updatedAt": "2022-05-06T12:21:24.675Z",
"updatedBy": "string"
}
]
- id: Unique identifier.
- taxId: Fiscal code associated with the Intermediary requested.
- firstName: First name of the item associated with requested delegated.
- lastName: First name of the item associated with requested delegated.
- description: Description of the Intermediary requested.
- deleted: Boolean value , describes if Delegated requested is deleted or not.
- deletedAt: Date of Delegated, if it's deleted.
- deletedBy: Item which deleted requested Delegated.
- createdAt: Date of Delegated creation.
- createdBy: Item which created requested Delegated.
- updatedAt: Date of the last update for the requested Delegated.
- updatedBy: Item which updated requested Delegated.
On error response
In the event of an error, the API responds with a body JSON with the following format:
{
"code": "string",
"timestamp": "2022-05-05T12:46:42.016Z",
"message": "string",
"subErrors": [
{}
]
}
- code: A string representation of the HTTP error code, linked with the returned http error
- timestamp: Date and time of the answer, expressed as a string.
- message: Message expressing error.
Possible errors are:
- 400: The request is malformed (parameters with incorrect format, invalid or inconsistent parameters).
- 401: An authorization token has not been provided or the authorization token provided is invalid (eg: it has expired).
- 403: The provided token is valid, but the user is not authorized to perform the operation.
- 500: An unexpected error occurred.
Write Api
Create new Delegated
This endpoint creates a new delegated which is linked to an intermediary .
[POST] /api/v1/{itemId}/intermediary/{taxId}/delegated
Reminder : One intermediary can have many delegates
Header
Header used on this API are those taken from header standards of TS Digital.
Content-type is accepted in application/json
Query Parameters
Parameters used to make a successful request.
- itemId: Unique personal identification of the item associated with the Intermediary requested. Mandatory for personal or technical users. (required)
- taxId: Unique fiscal code of the item associated with Intermediary requested. (required)
Body
Body request for this endpoint is a JSON in a format described below
{
"taxId": "stringstringstri",
"firstName": "string",
"lastName": "string",
"description": "string"
}
- taxId: Unique fiscal code of the Delegated which is being requested.
- firstName: First name of the item which is requesting Delegated.
- lastName: Last name of the item which is requesting Delegated.
- description: Description associated with the Delegated which is being processed.
Response
On successful response
If successful, the API responds with HTTP code 200(OK) with the following body:
{
"firstName": "string",
"lastName": "string",
"description": "string"
}
- firstName: First name of the Delegated created.
- lastName: Last name of the Delegated created.
- description: Description of the Delegated created
On error response
In the event of an error, the API responds with a body JSON with the following format:
{
"code": "string",
"timestamp": "2022-04-13T13:35:16.678Z",
"message": "string",
"subErrors": [
{}
]
}
- code: A string representation of the HTTP error code, linked with the returned http error
- timestamp: Date and time of the answer, expressed as a string.
- message: Message expressing error.
Possible errors are:
- 400: The request is malformed (parameters with incorrect format, invalid or inconsistent parameters).
- 401: An authorization token has not been provided or the authorization token provided is invalid (eg: it has expired).
- 403: The provided token is valid, but the user is not authorized to perform the operation.
- 500: An unexpected error occurred.