ProZ.com global directory of translation services
The translation workplace
Ideas

PUT: /availability/:uuid/:date

Set information about a user's availability to take on new work on a given day.

Required authorization scope

When using OAuth2 access tokens, the availability scope is required to set availability for a user. See scopes in the authentication guide for information about how to request this scope of authorization.

Parameters

Query parameters:
  • :uuid: (uuid) The UUID of the user to set availability for. Use the special value me to refer to the currently authenticated user.
  • :date: (date) The date for which to set availability.
Request body:
{
    "date": "2016-05-23",
    "availability": 100
}

Send the JSON representation of a day availability object in the request body. Only the availability property is actually required. Other day availability properties can optionally be set, but they will be silently ignored, and their values will be taken from the request URI.

Example request

curl --request PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer OAUTH2_ACCESS_TOKEN' \
    -d '{
          "date": "2016-05-23",
          "availability": 100
        }' \
    https://api.proz.com/v2/availability/32a9a4d0-cb6e-463f-a0ab-63d0a0418bc7/2016-05-23

Response

On success, a 200 Ok response is returned, along with the current JSON representation of the day availability object.

{
  "day_availability":   {
    "self_link": "https://api.proz.com/v2/availability/32a9a4d0-cb6e-463f-a0ab-63d0a0418bc7/2016-05-23",
    "user": "https://api.proz.com/v2/users/32a9a4d0-cb6e-463f-a0ab-63d0a0418bc7",
    "date": "2016-05-23",
    "availability": 75
  }
}