Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

GET - /api/v1/services/{id}/regulated-entities

Parameters

Parameter

Description

Type

id

The service id associated to the regulated entity.

Path

type

The entity type of the regulated type (ex. VESSEL). This is case insensitive.

Query string

Returns

HTTP 200 - OK

Returns a list of regulated entities with their ids, English and French display names. The ids are returned based on a sort order.

Is there’s no regulated entity ids found, an empty list is returned.

Sample response body

Note: This example is for ServiceId = 1230 and Type = Vessel.

Code Block
languagejson
[
  {
    "ServiceId": 1230,
    "IdRegulatedEntityTypeCode": "VESSEL",
    "RegulatedEntityIdTypeCode": "VESSEL_NM",
    "SortOrder": 1,
    "EnglishDisplayName": "Vessel Name",
    "FrenchDisplayName": "Nom du bâtiment"
  },
  {
    "ServiceId": 1230,
    "RegulatedEntityTypeCode": "VESSEL",
    "RegulatedEntityIdTypeCode": "Id"CDN_SHIP_IND",
    "SortOrder": 2,
    "EnglishDisplayName": "Canadian Vessel?",
    "FrenchDisplayName": "BâtimentBâtment canadien?"
  },
  {
    "ServiceId": 1230,
    "IdRegulatedEntityTypeCode": "VESSEL",
    "RegulatedEntityIdTypeCode": "IMO",
    "SortOrder": 3,
    "EnglishDisplayName": "IMO",
    "FrenchDisplayName": "OMI"
  },
  {
    "ServiceId": 1230,
    "RegulatedEntityTypeCode": "VESSEL",
    "RegulatedEntityIdTypeCode": "Id"OFFICIAL_NO",
    "SortOrder": 4,
    "EnglishDisplayName": "Official No.",
    "FrenchDisplayName": "Numéro officiel"
  }
]

Returns

...

Returns a list of regulated entities with their ids, English and French display names. The ids are returned based on a sort order.

Is there’s no regulated entity ids found, an empty list is returned.

Example

Code Block
languagec#
//Use your service id and entity type.
const int serviceId = 1230;
const string entity = "VESSEL";

//Returns a list of service regulated entity type ids.
var serviceRegulatedEntityIdTypes = await MtoaApi.ServiceRegulatedEntityApiserviceRegulatedEntityManager.GetList(serviceId, entity);

...