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

PUT: /availabilities

Set information about a user's availability for multiple days in one request.

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.
Request body:
{
    "2017-07-19": { "availability": 15 },
    "2017-07-20": { "availability": 75 },
    "2017-07-21": { "availability": 75 },
    "2017-07-22": { "availability": 95 }
}

Example request

curl --request PUT \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer OAUTH2_ACCESS_TOKEN' \
    -d '{
          "2017-07-19": { "availability": 15 },
          "2017-07-20": { "availability": 75 },
          "2017-07-21": { "availability": 75 },
          "2017-07-22": { "availability": 95 }
        }' \
    https://api.proz.com/v2/availabilities/32a9a4d0-cb6e-463f-a0ab-63d0a0418bc7

Response

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

{
  "day_availability_{date}":   {
    "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
  }
}