Intermediary

Intermediary services integration.

Introduction

Introduction

Overview

Introduction

Integrated Services

Read Api

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.

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"
}
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": [
    {}
  ]
}

Possible errors are:

Read Api

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.

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"
    }
 ]
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": [
    {}
  ]
}

Possible errors are:

Read Api

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.

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"
    }
 ]
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": [
    {}
  ]
}

Possible errors are:

Read Api

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.

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"
  }
 ]
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": [
    {}
  ]
}

Possible errors are:

 

Write Api

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.

Body

Body request for this endpoint is a JSON in a format described below

{
  "taxId": "stringstringstri",
  "firstName": "string",
  "lastName": "string",
  "description": "string"
}

Response

On successful response

If successful, the API responds with HTTP code 200(OK) with the following body:

{
  "firstName": "string",
  "lastName": "string",
  "description": "string"
}
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": [
    {}
  ]
}

Possible errors are: