Versions Compared

Key

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

...

You can get all of the ids and values from the GetAll.

Code Block
languagejson
[ 
  {
       "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 service request regulated entity values with their ids, English and French display names.

Sample response body – Returns the added values.

Code Block
languagejson
[
  {
    "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 GetAll function.

Code Block
languagec#
//Use your own service request id.
const int serviceRequetId = 1234;

var serviceRequestRegulatedEntities = await ServiceRegulatedEntityManager.GetAll(serviceRequestId);
var regulatedEntities = new List<ServiceRegulatedEntity>();
foreach (var serviceRequestRegulatedEntity in serviceRequestRegulatedEntities)
{
    regulatedEntities.Add(new ServiceRegulatedEntity
    {
        Id = serviceRequestRegulatedEntity.IdRegulatedEntityIdTypeCode,
        Value = "Updated value"
     });
}

var updated = await ServiceRegulatedEntityManager.Update(serviceRequestId, regulatedEntities);