...
This example is for service id 123 and type VESSEL. You can get a list from the GetList page.
Code Block | ||
---|---|---|
| ||
[ { "Id": 1"VESSEL_NM", "Value": "test 1 " }, { "Id": 2"CDN_SHIP_IND", "Value": "test 2" }, { "Id": 3"IMO", "Value": "test 3" }, { "Id": 4,"OFFICIAL_NO", "Value": "test 4" } ] |
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.
...
Sample response body – Returns the added values.
Note: The ids will be different than this example because they’re generated from the database.
Code Block | ||
---|---|---|
| ||
[ { "Id": 1"VESSEL_NM", "Value": "test 1 " }, { "Id": 2"CDN_SHIP_IND", "Value": "test 2" }, { "Id": 3"IMO", "Value": "test 3" }, { "Id": 4"OFFICIAL_NO", "Value": "test 4" } ] |
Example
Note: Make sure to use the proper ids from the GetList function.
Code Block | ||
---|---|---|
| ||
//Use your own service request id. const int serviceRequetId = 1234; //Make sure to use the proper ids from the GetList function. var regulatedEntities = new List<ServiceRegulatedEntity> { new ServiceRegulatedEntity { "Id = 1": "VESSEL_NM",, Value = "Your value" }, new ServiceRegulatedEntity { "Id = 2": "CDN_SHIP_IND",, Value = "Your value" }, new ServiceRegulatedEntity { "Id = 3": "IMO", Value = "Your value" }, new ServiceRegulatedEntity { "Id = 4": "OFFICIAL_NO", Value = "Your value" } }; var newServiceRegulatedEntities = await ServiceRegulatedEntityManager.Add(serviceRequestId, regulatedEntities); |