To assign a supplier to the specific job.
To assign a supplier you need to specify either the personId or the companyId or both.
To remove the assignment set the personId and companyId to null.
URL
(POST) /jobs/{id}/supplier
PARAMETERS
URL parameters are:
|
id |
The job ID. Also see jobs/{id}/summary |
string, Mandatory |
REQUEST BODY
The other parameters are included as a JSON object in the request body:
|
personid |
Assign the job to a worker with this person id. |
Int |
optional |
|
companyid |
Assign the job to a company with this company id |
Int |
optional |
|
allocmode |
The allocation mode. See ApiCodytTask for allocation mode values. |
Int |
optional, default value is 0 |
|
sendproposal |
If true will send the proposal to the worker. |
boolean |
optional, default value is false |
|
proposalmessage |
message that will be send with the proposal if set. |
string |
optional, default is empty string |
Example: Assign the job to a worker with personid 42, the person is an in-house worker
{
"companyid": 73,
"personid": 42,
"allocmode": 0,
"sendproposal": true,
"proposalmessage": ""
}
Example: Assign the job to a supplier company with companyid 73 In case the worker is not in-house. Any of the workers from this company can pickup the job later
{
"companyid": 73,
"allocmode": 0,
"sendproposal": true,
"proposalmessage": ""
}
Example: To remove assignment send an empty body payload
{ }
SUCCESS RESULT
None