Job Router Operations - Accept Job Offer
Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already.
POST {endpoint}/routing/workers/{workerId}/offers/{offerId}:accept?api-version=2023-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
Uri of your Communication resource |
offer
|
path | True |
string |
Id of an offer. |
worker
|
path | True |
string |
Id of a worker. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The request has succeeded. |
|
Other Status Codes |
An unexpected error response. Headers x-ms-error-code: string |
Examples
Accepts an offer to work on a job
Sample request
POST https://contoso.westus.communications.azure.com/routing/workers/DefaultWorker/offers/1d5896f3-8b54-40be-82d3-910323f5e2af:accept?api-version=2023-11-01
Sample response
{
"assignmentId": "246d5a06-c04a-4b6b-8a34-02bbd9fdad68",
"jobId": "632f5345-220b-4e46-b31f-aeaf03cc2df9",
"workerId": "DefaultWorker"
}
Definitions
Name | Description |
---|---|
Accept |
Response containing ids for the worker, job, and assignment from an accepted offer. |
Azure. |
The error object. |
Azure. |
A response containing error details. |
Azure. |
An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses. |
AcceptJobOfferResult
Response containing ids for the worker, job, and assignment from an accepted offer.
Name | Type | Description |
---|---|---|
assignmentId |
string |
Id of job assignment that assigns a worker that has accepted an offer to a job. |
jobId |
string |
Id of the job assigned. |
workerId |
string |
Id of the worker that has been assigned this job. |
Azure.Core.Foundations.Error
The error object.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
details |
An array of details about specific errors that led to this reported error. |
|
innererror |
An object containing more specific information than the current object about the error. |
|
message |
string |
A human-readable representation of the error. |
target |
string |
The target of the error. |
Azure.Core.Foundations.ErrorResponse
A response containing error details.
Name | Type | Description |
---|---|---|
error |
The error object. |
Azure.Core.Foundations.InnerError
An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.
Name | Type | Description |
---|---|---|
code |
string |
One of a server-defined set of error codes. |
innererror |
Inner error. |