Create a credential assignment
*Note: The required parameters are based on the credential settings, and will vary from credential to credential.
*Note: The required parameters are based on the credential settings, and will vary from credential to credential.
| Name | Type | Required | Optional | Searchable | Note |
|---|---|---|---|---|---|
| credentialid | numeric | REQUIRED, Passed via URI | |||
| userid | numeric | REQUIRED, Passed via BODY | |||
| startdate | datetime | REQUIRED, Passed via BODY | |||
| expirationdate | datetime | REQUIRED, Passed via BODY |
http://devsandbox.targetsolutions.com/v1/credentials/{credentialid}/assignments
POST /credentials/{credentialid}/assignments HTTP/1.1
Host: http://devsandbox.targetsolutions.com/v1
AccessToken: YY82LRESt7Lo0JNb/HxMAA==
Cache-Control: no-cache
{
"userid":"random userid data",
"startdate":"random startdate data",
"expirationdate":"random expirationdate data"
}
{
"httpcode":201,
"moreinfo":"http://developers.targetsolutions.com/v1/responsecodes/701",
"developermessage":"The request has been fulfilled and resulted in a new resource being created. ",
"statuscode":701,
"status":"created"
}
{
"httpcode":401,
"moreinfo":"http://developers.targetsolutions.com/v1/responsecodes/800",
"developermessage":"A request was made to a resource that you do not have ownership of.",
"statuscode":800,
"status":"access denied"
}