Create segment roles by segment Id
post
/PASService/rest/services/v1/segments/{segmentId}/roles
Creates segment role based on the specified segment Id.
Request
Path Parameters
-
segmentId(required): string(guid)
Segment Id
Supported Media Types
- application/json
Root Schema : schema
Type:
string
Response
201 Response
This response code indicates creation of segment roles by segment Id successfully.
Examples
This example describes how to create a segment role based on the specified segment Id.
Example cURL Command
Use the following cURL command to submit a request on the REST resource:
curl -X POST \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \ -L "http://server:port/PASService/rest/services/v1/segments/5C8FA666-56A1-434E-8E81-A29A599E3E96/roles" \ -d '{"Use this placeholder to plug-in the example request body given below"}'
Example Request Body
The following shows an example of the request body in JSON format:
{ "roles": [ { "multiFields": { }, "roleAmount": 12, "rolePercent": 100, "stateCode": "CA", "roleId": "B8D6328F-07CD-4A94-BB4C-F82DC04A3420", "clientId": "37D2EEE3-8624-48C6-981F-2B2891CDB852", "externalclientId": "4B29A809-18AD-4D2F-9B0F-821049FCFF63", "companyId": "2A93476C-E995-4001-870E-287EE8475921", "percentDollar": "C", "policyId": "F8CC7B38-95F9-4240-A528-B890AF87188C", "role": "72", "segmentId": "71A92161-CC46-44F6-85E1-6FACDFE7961D", "status": "01" } ] }
Example Response Body
The following shows an example of the response body in JSON format:
{ "roles": [ "B8D6328F-07CD-4A94-BB4C-F82DC04A3420" ] }