Job Router Operations - Decline Job Offer

Declines an offer to work on a job.

POST {endpoint}/routing/workers/{workerId}/offers/{offerId}:decline?api-version=2023-11-01

URI Parameters

Name In Required Type Description
endpoint
path True

string

Uri of your Communication resource

offerId
path True

string

Id of an offer.

workerId
path True

string

Id of a worker.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
retryOfferAt

string

If the RetryOfferAt is not provided, then this job will not be offered again to the worker who declined this job unless the worker is de-registered and re-registered. If a RetryOfferAt time is provided, then the job will be re-matched to eligible workers at the retry time in UTC. The worker that declined the job will also be eligible for the job at that time.

Responses

Name Type Description
200 OK

object

The request has succeeded.

Other Status Codes

Azure.Core.Foundations.ErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

Examples

Declines 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:decline?api-version=2023-11-01

{
  "retryOfferAt": "2023-05-26T00:00:00.0000000Z"
}

Sample response

{}

Definitions

Name Description
Azure.Core.Foundations.Error

The error object.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

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.

DeclineJobOfferOptions

Request payload for declining offers.

Azure.Core.Foundations.Error

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror

Azure.Core.Foundations.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

Azure.Core.Foundations.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

Azure.Core.Foundations.InnerError

Inner error.

DeclineJobOfferOptions

Request payload for declining offers.

Name Type Description
retryOfferAt

string

If the RetryOfferAt is not provided, then this job will not be offered again to the worker who declined this job unless the worker is de-registered and re-registered. If a RetryOfferAt time is provided, then the job will be re-matched to eligible workers at the retry time in UTC. The worker that declined the job will also be eligible for the job at that time.