Introduction
Integrate Upwork functionalities to your web-based or mobile apps
Upwork Developers Site offers you access to our web services
to build your own applications and to integrate our features and workflow
to your dashboards, websites and management systems.
Please read Terms of use prior to using the Upwork Public API.
Featured functionalities
- • Authenticate and authorize your users with Upwork
- • Search for freelancers and find jobs
- • Create job postings
- • Invite freelancers to an interview
- • Make job offers
- • Manage existing contracts
- • Make custom payments
- • Close contracts
- • Manage activities for your team
- • Manage, send and receive messages
- • Retrieve time and financial reports for freelancers, teams and companies
- • Manage work diary snapshots
- • Retrieve metadata information - available categories, tests, skills, regions, etc.
Getting started is easy. Check out our Getting Started section to learn about the core concepts of our API, such as supported authentication methods, languages and formats.
This page contains complete API reference documentation about our API technical implementation, just use your browser search or navigation panel on the left.
Have a question? Visit us at:
Don’t forget to visit our Recent changes section to check out the new releases and features.
Libraries
Here you can find a list of available libraries for several languages.
API Entry Point
https://www.upwork.com/api
For Reports resources:
https://www.upwork.com/gds
Getting Started
Preparation
Before you start using Upwork API, you need to register your application and obtain your client credentials (a.k.a consumer key and consumer secret). To register, you just fill in basic information about your application and its intended use.
Note
Every new request for an API Key will be reviewed. For a quick positive decision, you need to comply the following conditions:
- your Upwork profile must have:
- a. a valid name in your profile (no fake names, no company names)
- b. a full valid address (including apartment number) - either in your personal or your company’s profile
- c. a valid profile portrait
- provide a clear description on what you are planning using our APIs for (this info is required when you apply for a key). Make sure you add a note stating if you are going to use your application internally or publicly, or for any other purposes.
- agree to use the Upwork API in a manner that does not exceed a reasonable request volume. Our daily allowed limit is 40K requests.
- refrain from using the Upwork logo, brand name, brand theme/colors and trademarked content in your application
- meet the other requirement described on this Support Page
Warning
Users who try registering a new application/key, but have a profile without a valid ID will be forced to go through the ID verification process.
Application Permissions
When you register a new application, you are asked to define a list of permissions to access third-party resource data; we call them “Application Permissions”. You can later modify the application permissions you request, but note that doing so makes all previously generated access tokens invalid. You will also have to request authorization from resource owners again.
Authentication
To access Upwork API, you need to go through an authentication process. Currently, we support the OAuth 1.0 method.
Note
You need to authenticate for all requests following the OAuth 1.0, RFC 5849.
The authentication process is simple. See the authentication section for a detailed description.
Libraries and Tools
A library is a collection of behavior implementations, written in a specific programming language. Libraries help you make system calls without the need to re-write code over and over again.
These are the libraries built specifically to support Upwork API:
On the right-hand side you can see the examples of how to make API calls with the chosen library.
Additionally, you can find a list of libraries for the language of your choice to help you with the OAuth mechanism here. To start using most of these libraries, you just need to provide your client credentials and the necessary URLs.
Try examples
$ mkdir upwork_project
$ cd upwork_project
$ virtualenv ve
$ source ../ve/bin/activate
Install latest stable version from PyPI:
$ pip3 install python-upwork
Run the example application:
$ cd example
$ python myapp.py
Find the library documentation at https://upwork.github.io/python-upwork/
$ mkdir php_project
$ cd php_project
$ cat > composer.json <Enter>
{
"name": "upwork/my-oauth-app",
"require": {
"upwork/php-upwork": "dev-master"
}
}
$ composer.phar update
$ cp vendor/upwork/php-upwork/example/console-own-auth-lib.php myapp.php
Edit app.php to include your oAuth keys and run the application:
$ php myapp.php
Find the library documentation at https://upwork.github.io/php-upwork/
$ gem install upwork-api
$ git clone https://github.com/upwork/ruby-upwork.git
$ cd ruby-upwork/examples
Edit myapp.rb to include your oAuth keys and run the application:
$ ruby myapp.rb
Use the interactive ruby console for debugging:
$ gem install pry
Find the library documentation at https://upwork.github.io/ruby-upwork/
$ git clone https://github.com/upwork/java-upwork.git
$ cd java-upwork/example
$ make
Edit the upwork.properties file to include your oAuth keys and run the application:
$ make run
Find the library documentation at https://upwork.github.io/java-upwork/
$ mkdir myapp
$ cd myapp
$ npm install upwork-api
$ cp node_modules/upwork-api/example/example.js example.js
Edit the example.js file to include your oAuth keys and run the application:
$ node example.js
Find the library documentation at https://upwork.github.io/node-upwork/
$ cpan
cpan[1]> install Net::Upwork::API
We recommend installing the library from CPAN, otherwise you can download the source from the GIT repository.
$ perl myapp.pl
Find the library documentation at https://upwork.github.io/perl-upwork/
$ go get -u github.com/upwork/golang-upwork/api
We recommend installing using GO tools, otherwise you can download the source from the GIT repository.
$ go install myapp.go
Architecture style
Upwork follows the REST style. Thus, our API resources are accessed by explicitly using HTTP methods (GET, POST, PUT and DELETE) and following the protocol as defined by RFC 3986 standard.
Note
PUT and DELETE methods have couple important constraints:
- • Methods are available only for JSON and XML requests.
- • Content-Type (RFC 1049) header must be equal to application/json (RFC 4627) for a JSON request.
- • Content-Type (RFC 1049) header must be equal to application/xml (RFC 2376) for an XML request .
- • All parameters must be encoded in JSON format {"key1": "value1", "key2": "value2"} or XML format <request><key1>value1</key1></request> respectively.
- • All parameters data must be sent as raw post data encoded as described above .
Request structure
The base URLs for all Upwork API requests are:
- • https://www.upwork.com/api/ - main entry point
- • https://www.upwork.com/gds/ - an entry point for Report resources over GDS protocol
Note
All API requests must be made over HTTPS. API requests made over plain HTTP will be redirected to their equivalent HTTPS.
Cross-domain requests
Getting domain data from a domain different from the REST servers can cause failures. This is why we standardized our API for cross-domain requests. This makes it possible for you to use standard jQuery functions with the callback parameter.
Note
You must add &callback=? and oauth_xxx parameters to all your cross-domain requests, otherwise the API will not return standardized jQuery data. You can supply a ?callback parameter to any request in order to enable JSON-P wrapping. This is useful for cross-domain AJAX requests.
You can use this code to make JSON requests using jQuery:
$(document).ready(function(){
$.getJSON("https://www.upwork.com/api/profiles/v2/search/jobs.json?q=java&callback=?&oauth_params=xxxxx",
function(response){
alert('Server Time: ' + response.server_time);
});
});
You can also use the code below to make JSONP request with jQuery:
$.ajax({
url:"https://www.upwork.com/api/profiles/v2/search/jobs.json?q=java&callback=?&oauth_params=xxxxx",
dataType: 'JSONP',
success:function(json){
alert("Success: "+json.server_time);
},
error:function(){
alert("Error");
},
});
Versioning
We version our API to support forward and backward compatibility. This means that new implementations don’t affect applications which depend on our API. The API version you target is defined the first time you make an API request. Every time we make backward-incompatible changes to the API, we release a new version. To avoid affecting your applications, we don’t modify your version until you’re ready to upgrade. Note that our versioning process is made at the resource level.
Our API supports three ways of requesting a version of the API (see options on the right-hand side).
Note
We also support locating the version number on the second sub-path (if needed due to framework requirements). For example: /api/v1/auth/info.json
Three ways of specifying a version for the API call:
standard (recommended)
the version is located on the third subpath in the URL:
/api/auth/v1/info.json
via ``X-Upwork-Version`` header (has higher priority):
X-Upwork-Version: v1
via ``Accept`` header (has lower priority)
Accept: application/vnd.upwork.api-v1+json
Response format
Our API supports both XML and JSON response formats. We suggest you append the format specifier (.json or .xml) to the request URI to explicitly select JSON or XML. Otherwise, the API may default to either format. You can also use the Accept request-header, passing application/xml (RFC3023) or application/json (RFC4627) to define the response format.
Response elements
All responses include at least two elements:
- auth_user - Information about the user making the request
- server_time - Server time, in UNIX timestamp format
Response properties are always one of the following data types:
- integer
- A positive or negative whole number
- string
- Unicode text
- URL
- A string that conforms to RFC 1738
- timestamp
- A date expressed as seconds elapsed since January 1st, 1970
Pagination
Many calls support pagination. Although details of pagination and ordering may differ (see specific information for each resource in the API reference), API calls that do support pagination mostly do so by using the page and paging parameters. The format of these parameters is: $offset;$count, for example: page=20;10
The default values are 0;10. Count can be restricted to <= N, where N is the maximum page size, found in the parameter description.
Encoding
We use UTF-8 encoding. UTF-8 encodes each Unicode character as a variable number of 1 to 4 octets, where the number of octets depends on the integer value assigned to the Unicode character. It is an efficient encoding of Unicode documents that use mostly US-ASCII characters because it represents each character in the range U+0000 through U+007F as a single octet.
UTF-8 is the default encoding for XML and since 2010, it has become the dominant character set on the Web.
Rate Limits
Rate limiting of the API is primarily considered on a per-IP basis. We allow you to make 60 requests per window per IP. We use 1 min windows. Requests should be made with a minimum interval of 1,5 sec between them. When an application exceeds the rate limit for our API, we will return an HTTP 429 “Too Many Requests” response code. If your application gets rate limited, then it will be unblocked within a minute since the last request that got rate limited.
To avoid being rate limited, please use caching in your application. Store API responses in your application if you expect a lot of use. For example, don’t try to call the Upwork API on every page load. Instead, call the API infrequently and load the response into a local cache. When users hit your website load the cached version of the results.
Error Handling
Upwork API returns standard HTTP error codes and provides additional error information in the response body (when allowed by HTTP specification), and in the special HTTP headers.
Headers examples:
- X-Upwork-Error-Code - Internal error code, useful in case you contact our Support team
- X-Upwork-Error-Message - Additional error information
The following table describes the most common HTTP error messages you may receive and possible solutions.
- 400 - Bad Request
The request could not be understood by the server due to malformed syntax.
- • You should not repeat the request without modifications.
- • Check the error message and response body to obtain information about the possible reason.
- • Visit our Documentation site to learn more about the requirements, limits and allowed values of the request parameters and fields.
The request requires user authentication.
- • Check the error message and response body to obtain information about the possible reason.
- • Authenticate by following OAuth 1.0 protocol.
- • Visit our Authentication page to learn more about Upwork authentication process.
- 403 - Forbidden
The server understood the request, but is refusing to fulfill it.
- • Authorization will not help and the request SHOULD NOT be repeated.
- • Check the error message and response body to obtain information about the possible reason.
- • Visit our Documentation site to learn more about the requirements, limits and allowed values of the request parameters and fields.
- 404 - Not Found
The Request-URI did not match any resource in the server.
- • Check the error message and response body to obtain information about the possible error cause.
- • Visit our Documentation site to learn more about the requirements, limits and allowed values of the request parameters and fields.
- 413 - Request Entity Too Large
The server is refusing to process a request because the request entity is larger than the server is able to process.
- • Check the error message and response body to obtain information about the possible reason.
- • The server MAY close the connection to prevent you from continuing the request. If the condition is temporary, you MAY try again.
- • Visit our Documentation site to learn more about the requirements limits and allowed values of the request parameters and fields.
- 429 - Too Many Requests
The server is refusing to process a request because an application has sent too many requests in a given amount of time. Intended for use with rate limiting schemes.
- • You should reduce the number of simultaneous requests.
- • You should comply with our rate-limit-policy, i.e. avoid exceeding daily limits.
In case you are still unable to work the error out, contact our Support team. They are more than happy to help you further. Please, include the following information on your message:
- • error code
- • error message
- • public key of your (web server) application
- • Upwork username used in requests
- • full URL, please include all parameters (keys, signature, token) and headers used
- • time of request (if possible)
- • method of the request (GET/POST/PUT/DELETE. Note that PUT and DELETE are overloaded via POST+http_method=<method>.)
- • your environment (OS, library, programming language)
- • how did you run the request? Mobile, desktop, console, web (for web please specify your browser), etc.
- • response headers and HTTP status
- • response body
Body example:
{
server_time: 1320658441
error: {
status: "403" // equal to HTTP status
code: "174" // internal error code, useful in case you contact Support team
message: "Insufficient permission to list offers" // additional error message
}
}
Terminology
In order to use Upwork API, it is important to have a good understanding of the underlying concepts of Upwork Platform.
Users, clients, freelancers
- User
- An Upwork account holder. A user can have multiple roles simultaneously: client, freelancer, agency staffing manager, and so on. A user must be a single person and account sharing is not allowed. Others can be added to your company or agency.
- Freelancer
- A person who can apply to jobs, work, and get paid by clients via Upwork. In API parameters and arguments, sometimes the terms provider and contractor are used to mean freelancer. Those are legacy names for the term.
- Client
- A person who, as part of a company, can hire Upwork freelancers. In API parameters and arguments, sometimes the term buyer is used to mean client- it’s a synonym.
- Agency contractor
- There are two types of agency contractors. Exclusive agency contractors can only work on behalf of the agency. The agency controls all their earnings. They cannot control their rates. Non-exclusive agency contractors can work for multiple agencies and/or independently. An agency can only control their agency jobs. Agency contractors can access reports on their worked hours, but not their earnings reports.
Companies, teams, agencies
- Company
- A primary financial entity and organizational unit. Larger companies can request to be divided into multiple teams.
- Team
- A basic unit of organization. Members of the team can see each other and work on common tasks. Most user permissions are also relative to the team. At the beginning, each company has one dedicated team room, but others can be added later.
- Agency
- Acts as intermediary between the client and the freelancer. The client still hires a specific person, but the contract is paid to the agency. Agency size and staffing manager involvement varies widely.
Job postings, offers and contracts
- Job posting
- Description of the work to be done and the application guidelines for freelancers.
- Offer
- Proposal of contract terms as part of the hiring process. It can be initiated by the client or the freelancer, but it must be agreed upon by both parties.
- Contract
- The terms and conditions that rule a particular job between a client and a freelancer. Legacy terms: engagement.
- Fixed-price contract
- Flat-rate contract or payment for milestones. It is not covered by the Upwork Guarantee.
- Hourly contract
- Contract billed per hour based on the Work diary registry. It is covered by the Upwork Guarantee.
- Charge Amount
- The amount of money that is deducted from the company’s financial account (Upwork fee included).
- Amount
- The amount of money that a freelancer or an agency receives as payment (Upwork fee not included).
- Work diary
- The Work diary acts as a visual time card. It is the basis for Upwork’s automated weekly billing system. It shows clients hours worked and work-in-progress screenshots.
Roles and permissions
There are two kinds of permissions within the context of our API:
- • Application Permission: a permission to access an API endpoint. It is also called “scope” or “Key Permission”.
- • User permission: a permission to access content and it is specific to the user and context of the call (team, company).
Permissions define what a user can do in the context of a given team or a company. All permissions are relative to the team room, except for owner, which is relative to the company. In order to get certain permission on the API, you’re required to have specific permissions on the UI. The following diagrams explain how permissions returned by the API are connected to the UI team roles.


The above mapping applies to cases where the user is assigned only one role. When a user is assigned multiple roles, only one role will be returned with the following order of precedence: admin, manager, recruiter and member.
On the other hand, the API can return multiple permissions. In this case, the result is the combination of all of them. For example, if a user is full admin and full hiring manager, the following permissions are returned: manage_finance, manage_employment, manage_recruiting...
The following table provides further details on the different roles.
- Admin
Finance only: Can manage payment methods, view financial reports, and make deposits and withdrawals. Finance privileges are company-wide, even when Teams are in use.
Full: In addition to finance privileges, can invite or remove team members, manage members permissions, and edit company information.
- Hiring
Source Talent Only: Can post jobs, invite freelancers to interviews, and review proposals. Cannot hire, end contracts, give bonuses, or update contract terms.
Full: In addition to Talent Sourcing privileges, can make contract offers, give bonuses, increase rates, end contracts, and submit freelancers feedback.
- View Work Diaries
Self Only: Can log time and view their own Work Diary. (Only applicable to freelancers with active contracts).
All: Can log time (with an active contract) and view Work Diaries and hours-only reports for all team members.
- Can Chat With
No One: Can only see and respond to team members who initiate messaging.
Team Members: Can see and chat with everyone on the team.
Company Members: Can see and chat with everyone in the company, across all teams.
- Contact Person
- Main point of contact responsible for the freelancer’s contract. By default this is the person who hired the freelancer, but you can set it to be anyone on your team who has a Hiring permission “Full”.
Authentication
To make API requests, you need to authenticate to Upwork API. Currently, we support OAuth 1.0 authentication. All API requests MUST be signed following the RFC 5849 specification.
OAuth 1.0
The OAuth protocol enables websites or applications (clients) to access protected resources from a web service (server) via an API, without requiring resource owners to disclose their service provider credentials to the clients. For more information on the OAuth workflow process visit Beginner’s Guide to OAuth and the OAuth 1.0 Guide.
Client credentials
For each application you develop, you need to obtain new client credentials. These include a client identifier and a client shared-secret. You can request these credentials at https://www.upwork.com/services/api/apply while logged into your Upwork account. You will receive a public and a private key for each client identifier and client shared-secret you request.
Upwork OAuth 1.0 workflow
At a basic level, the OAuth 1.0 authentication process involves the following steps:
- Get Request token
- Get authorization from the resource owner and obtain a Verifier code
- Exchange Request token and Verifier for an Access Token

Below you will find the list of API calls needed for authentication.
Get request token
Returns
Returns a token/secret pair to be used for authorization and getting the access token. Example:
oauth_callback_confirmed=true&oauth_token=d6b9dba626bf43f187a2aed2d5f8e387&oauth_token_secret=517af7d4c335cc59
DEFINITION
# the library does it automatically, but if you need, you can use
client.get_request_token()
$client->getRequestToken();
There’s no public method for getting request token in ruby-upwork, request token is retrieved during invocation of the authorization:
client.get_authorization_url()
There’s no public method for getting request token in java-upwork, request token is retrieved during invocation of the authorization:
client.getAuthorizationUrl();
There’s no public method for getting request token in node-upwork, request token is retrieved during invocation of the authorization:
api.getAuthorizationUrl(callbackUrl, callback);
There’s no public method for getting request token in perl-upwork, request token is retrieved during invocation of the authorization:
$api->get_authorization_url();
There’s no public method for getting request token in golang-upwork, request token is retrieved during invocation of the authorization:
client.GetAuthorizationUrl(callback);
EXAMPLE REQUEST
import upwork
client = upwork.Client(config)
client.get_request_token()
$client = new \Upwork\API\Client($config);
$client->getRequestToken()
EXAMPLE RESPONSE
Returns tuple of request_token and request_token_secret.Array
(
[authorize_uri] => /services/api/auth
[token] => abcdefghijklmnopqrstuvwxyz123
[token_secret] => 1a2b3c4defghi
)
Authorize and get verifier
Upwork server needs to request authorization from the resource owner to grant you access to the required data. To do so, you need to redirect the resource owner to Upwork server’s authentication endpoint.
Returns
If the authorization is successful, this call returns a verifier. You can also check for the X-Upwork-Oauth-Verifier header in the response.
If the resource owner is not currently logged in to Upwork, he/she is asked to do so at www.upwork.com/login?redir=https://www.upwork.com/services/api/auth....
Then, Upwork checks if the resource owner has already authorized your (web server) application.
- • If the resource owner has not authorized your (web server) application, Upwork asks the resource owner if he/she wishes to do so.
- • If your application is authorized, the resource owner is redirected to your (web server) application using the callback URL provided with the request, or, if empty, to the one registered for the client identifier used. The callback URL will have the following query parameters appended: ?oauth_token=...&oauth_verifier=.... For desktop applications, there’s no callback triggered. Instead, the verifier is shown to the resource owner in the browser window.
DEFINITION
client.get_authorization_url()
This method does both authorizing and retrieving access token:
$client->auth();
This method does both authorizing and retrieving access token:
client.get_authorization_url()
client.getAuthorizationUrl();
client.getAuthorizationUrl(String oauthCallback);
api.getAuthorizationUrl(callbackUrl, callback);
$api->get_authorization_url();
client.GetAuthorizationUrl("");
EXAMPLE REQUEST
get_authorize_url() method implicitly checks for the presence of request tokens, and obtains them if necessary, so you can omit calling get_request_token() manually and just call get_authorize_url() to get a verifier.
In desktop application flow, just copy the verifier manually from the browser.
In web application flow make a GET request to the generated authorization URL. Your registered callback URL is triggered and verifier is passed as oauth_verifier parameter.
import upwork
client = upwork.Client(config)
authorization_url = client.get_authorization_url()
# Or in the desktop flow
verifier = raw_input(
'Please enter the verification code you get '
'following this link:\n{0}\n\n> '.format(
client.get_authorization_url()))
$client = new \Upwork\API\Client($config);
$client->auth();
require 'upwork/api'
config = Upwork::Api::Config.new({
'consumer_key' => 'FILL_ME',
'consumer_secret' => 'FILL_ME',
})
# setup client
client = Upwork::Api::Client.new(config)
authz_url = client.get_authorization_url
import com.Upwork.api.Config;
import com.Upwork.api.OAuthClient;
import java.util.Properties;
Properties keys = new Properties();
keys.setProperty("consumerKey", "FILL_ME");
keys.setProperty("consumerSecret", "FILL_ME");
Config config = new Config(keys);
OAuthClient client = new OAuthClient(config);
String authzUrl = client.getAuthorizationUrl();
var UpworkApi = require('upwork-api')
, rl = require('readline');
var config = {
'consumerKey' : 'FILL_ME',
'consumerSecret' : 'FILL_ME'
};
var api = new UpworkApi(config);
var callbackUrl = 'http://my.callback.example.com';
api.getAuthorizationUrl(callbackUrl, function(error, url, requestToken, requestTokenSecret) {
if (error) throw new Error('can not get authorization url, error: ' + error);
// Authorize application
var i = rl.createInterface(process.stdin, process.stdout);
i.question('Please, visit an url ' + url + ' and enter a verifier: ', function(verifier) {
i.close();
process.stdin.destroy();
});
});
use Net::Upwork::API;
$config = Net::Upwork::API::Config->new(
'consumer_key' => 'FILL_ME',
'consumer_secret' => 'FILL_ME',
);
# setup api/client object
$api = Net::Upwork::API->new($config);
if (!$api->has_access_token()) {
my $authz_url = $api->get_authorization_url();
}
import (
"github.com/upwork/golang-upwork/api"
)
const cfgFile = "config.json"
client := api.Setup(api.ReadConfig(cfgFile))
if !client.HasAccessToken() {
aurl := client.GetAuthorizationUrl("")
}
EXAMPLE RESPONSE
Get the verifier manually or extract it from the callback request.Array
(
[access_token] => abcdefghijklmnopqrstuvwxyz
[access_secret] => a1b2c3defghijk
)
Get access token
Once you receive the request token and the resource owner’s authorization (verifier code), you are ready to request Upwork Server an Access token.
Returns
Returns the Access token.
Note
Once created, the Access token never expires.
DEFINITION
client.get_access_token(verifier)
$client->auth();
client.get_access_token(verifier)
client.getAccessTokenSet(String verifier);
api.getAccessToken(
requestToken, requestTokenSecret,
verifier, callback);
$api->get_access_token($verifier);
client.GetAccessTokenSet(verifier)
EXAMPLE REQUEST
import upwork
client = upwork.Client(config)
verifier = raw_input(
'Please enter the verification code you get '
'following this link:\n{0}\n\n> '.format(
client.get_authorization_url()))
access_token, access_token_secret = client.get_access_token(verifier)
$client = new \Upwork\API\Client($config);
$client->auth();
require 'upwork/api'
config = Upwork::Api::Config.new({
'consumer_key' => '',
'consumer_secret' => '',
})
# setup client
client = Upwork::Api::Client.new(config)
authz_url = client.get_authorization_url
puts "Visit the authorization url and enter the oauth_verifier for further authorization:"
puts authz_url
verifier = gets.strip
access_token = client.get_access_token(verifier)
import com.Upwork.api.Config;
import com.Upwork.api.OAuthClient;
import java.util.Properties;
import java.util.Scanner;
Properties keys = new Properties();
keys.setProperty("consumerKey", "FILL_ME");
keys.setProperty("consumerSecret", "FILL_ME");
Config config = new Config(keys);
OAuthClient client = new OAuthClient(config);
String authzUrl = client.getAuthorizationUrl();
Scanner scanner = new Scanner(System.in);
System.out.println(authzUrl);
System.out.println("1. Copy paste the following url in your browser : ");
System.out.println(authzUrl);
System.out.println("2. Grant access ");
System.out.println("3. Copy paste the oauth_verifier parameter here :");
String oauth_verifier = scanner.nextLine();
scanner.close();
String verifier = null;
try {
verifier = URLDecoder.decode(oauth_verifier,"UTF-8");
}
catch (Exception e) {
e.printStackTrace();
}
HashMap<String, String> token = client.getAccessTokenSet(verifier);
var UpworkApi = require('upwork-api')
, rl = require('readline');
var config = {
'consumerKey' : 'FILL_ME',
'consumerSecret' : 'FILL_ME'
};
var api = new UpworkApi(config);
var callbackUrl = 'http://my.callback.example.com';
api.getAuthorizationUrl(callbackUrl, function(error, url, requestToken, requestTokenSecret) {
if (error) throw new Error('can not get authorization url, error: ' + error);
// Authorize application
var i = rl.createInterface(process.stdin, process.stdout);
i.question('Please, visit an url ' + url + ' and enter a verifier: ', function(verifier) {
i.close();
process.stdin.destroy();
// Get access token/secret pair
api.getAccessToken(requestToken, requestTokenSecret, verifier, function(error, accessToken, accessTokenSecret) {
if (error) throw new Error(error);
// Here you can store access token in safe place
});
});
});
use Net::Upwork::API;
$config = Net::Upwork::API::Config->new(
'consumer_key' => 'FILL_ME',
'consumer_secret' => 'FILL_ME',
);
# setup api/client object
$api = Net::Upwork::API->new($config);
if (!$api->has_access_token()) {
my $authz_url = $api->get_authorization_url();
print "Visit the authorization url and provide oauth_verifier for further authorization\n";
print $authz_url . "\n";
$| = "";
$verifier = <STDIN>;
my $token = $api->get_access_token($verifier);
# store access token data in safe place!
}
import (
"fmt"
"bufio"
"os"
"github.com/upwork/golang-upwork/api"
)
const cfgFile = "config.json"
func main() {
client := api.Setup(api.ReadConfig(cfgFile))
if !client.HasAccessToken() {
aurl := client.GetAuthorizationUrl("")
// read verifier
reader := bufio.NewReader(os.Stdin)
fmt.Println("Visit the authorization url and provide oauth_verifier for further authorization")
fmt.Println(aurl)
verifier, _ := reader.ReadString('\n')
// get access token
token := client.GetAccessToken(verifier)
// store access token data in safe place!
}
}
EXAMPLE RESPONSE
Returns a tuple of oauth_access_token and oauth_access_token_secret.Array
(
[access_token] => abcdefghijklmnopqrstuvwxyz
[access_secret] => a1b2c3defghijk
)
=> #<OAuth::AccessToken:0x00000002553e10
@consumer=
#<OAuth::Consumer:0x0000000269f5a8
@http=#<Net::HTTP www.upwork.com:443 open=false>,
@http_method=:post,
@key="abcdef123456789",
@options=
{:signature_method=>nil,
:request_token_path=>"/api/auth/v1/oauth/token/request",
:authorize_path=>"/services/api/auth",
:access_token_path=>"/api/auth/v1/oauth/token/access",
:proxy=>nil,
:scheme=>:header,
:http_method=>:post,
:oauth_version=>"1.0",
:site=>"https://www.upwork.com"},
@secret="">,
@params=
{:oauth_token=>"abcdef123456789",
"oauth_token"=>"abcdef123456789",
:oauth_token_secret=>"abcdef123456789",
"oauth_token_secret"=>"abcdef123456789"},
@secret="abcdef123456789",
@token="abcdef123456789">
HashMap<String, String>
{token=abcdefghijklmnopqrstuvwxyz1234567890,
secret=abcdef0123456789}
{
'access_token' => 'abcdefghijklmnopqrstuvwxyz',
'access_secret' => 'a1b2c3defghijk'
}
&{abcdefghijklmnopqrstuvwxyz a1b2c3defghijk map[]}
Required OAuth 1.0 parameters
Each API request must include a list of OAuth parameters (all the descriptions and meanings of parameters are defined by the OAuth specification at RFC 5849):
- • oauth_consumer_key
- • oauth_signature
- • oauth_nonce
- • oauth_signature_method (persistent constant equal to HMAC-SHA1)
- • oauth_timestamp
- • oauth_token
- • any additional parameters for the specific API request.
Here is an example of a simple API request based on an authorized OAuth session:
/api/auth/v1/info.json?oauth_signature=jL08juSnj9FQDzHY6%2BB4yr25QiA%3D& oauth_consumer_key=5bba83419248517d7883285e2b5976b1&oauth_nonce=580f9c6d6b490fb16bb5dd29b5c& oauth_signature_method=HMAC-SHA1&oauth_timestamp=1292557402&oauth_token=6b3b412b60c4e7000329e990a4dbbb2c
Troubleshooting authentication issues
Authentication errors are the most common issues received by our Support team. Here are some troubleshooting tips you may want to try to solve frequent authentication issues and start using our API.
- • Most OAuth signing issues are caused by an invalid format in the signature base string.
- • If you use a header-based OAuth request, make sure that the HTTP authorization header is being properly setup and formatted according to the specific language you use. Remember that you SHOULD NOT repeat any of the oauth_* parameters in the POST body or URL of the request you are making. Parameters that begin with oauth_* SHOULD NOT be part of the POST body or query string.
- • Don’t include unnecessary oauth_* parameters in the request.
- • Use auth in all REST API methods that support it. All Upwork REST API methods require authentication and using auth ensures that the requests are evaluated within the context of your current user.
- • Use valid endpoints.
- • Make sure you are using the appropriate HTTP request method. Most calls to the Upwork API use POST or GET methods.
- • If you use an OAuth library, make sure you select a well-supported one.
- • Try making the request in another OAuth library or tool. Comparing successful and failed requests will help you identify what might be going wrong.
- • Learn how to override the oauth_timestamp and oauth_nonce values in your OAuth library. Use this capability to replay signature generation scenarios for comparative analysis.
- • oauth_token and oauth_token_secret strings change when a user’s access moves between permission levels, or if a user denies your application access and then re-grants access. Never assume that the strings will remain constant.
The following are the most frequent authentication errors you may come across:
400 - Bad request
The request could not be understood by the server due to malformed syntax.
Suggestion: Review the error message and make the necessary modifications before retrying. You should not repeat the request without modifications.
- • Can’t verify request, missing oauth_consumer_key or oauth_token.
- • Can’t verify request signature, missing parameter.
- • None of the signing methods is supported.
- • Unsupported signature method.
- • Expected OAuth version.
- • Unsupported characters in host name.
- • Unsupported scheme type, expected Timestamp is out of sequence.
401 - Unauthorized
User authentication is required and has failed or has not yet been provided.
Suggestion: Check the procedure for signature calculation.
- • Verification of signature failed.
403 - Forbidden
The server understood the request, but is refusing to fulfill it.
Suggestion: Review the error message and make the necessary modifications before retrying. You should not repeat the request without modifications.
- • Duplicate timestamp/nonce combination, possible replay attack.
- • The consumer_key and token combination does not exist or is not enabled.
404 - Not Found
User authentication has failed or has not yet been provided.
Suggestion: Check the list of parameters you send. One of them might be wrong and can not be found.
Authentication (Beta)
The OAuth 2.0 protocol enables websites or applications (clients) to access protected resources from a Web service (server) via an API, without requiring resource owners to disclose their service provider credentials to the clients. For more information on the OAuth 2.0 workflow process, visit the OAuth 2.0 protocol official site.
Note
Dear users,
Thank you for your interest in the OAuth 2.0 authentication workflow for the Upwork API. We are pleased to announce that this project has entered the beta phase of testing. While this is a great accomplishment we still can’t guarantee that access to the feature is either reliable or stable.
If you still want to be part of our testing process and gain early access to the OAuth2 authentication workflow, please contact us. We’ll add you to our mailing list and advise you of future updates.
Thanks again
Client ID
For each application you develop, you need to obtain new client credentials. These include a client identifier and a client shared-secret. You can request these credentials in the API Center while logged into your Upwork account (select Key Type OAuth 2.0). You will receive a key (client_id) for each client identifier and client shared-secret you request.
OAuth 2.0
For authenticating via OAuth 2.0 protocol, API requests MUST follow RFC 6749 specification.
At a basic level, the OAuth 2.0 authentication process involves the following steps:
- Authorize the application using one of the available grants and obtain an Authorization code in Code Authorization Grant
- Get an Access token in Code Authorization Grant and read it from the Implicit Grant workflow callback that follows the redirect in step#1

Once you receive an access token, you can use it to access protected resources. Use either the access_token parameter, or the Authorization header (recommended) with the Bearer schema and one of the supported grants.
Note
TTL for an access token is 24 hours; TTL for a refresh token is 2 weeks since its last usage.
Below you will find the list of API calls needed for authentication using different grants.
Supported Grants
- • Authorization Code Grant - requires Authorization Request and Access Token Request calls.
- • Implicit Grant - requires Authorization Request call.
Authorization Request
The Upwork server must request authorization from the resource owner to grant you access to the required data. To do so, you must redirect the resource owner to Upwork server’s authentication endpoint.
Warning
Keep the refresh and access token private. If someone obtains your tokens, they could use them to access private user data.
Returns
Returns a code for the Authorization Code Grant or an access token for the Implicit Grant. Example:
/#access_token=abcdefghijklmnopqrstuvwxyz&expires_in=86399 // Implicit Grant
Access Token Request
Warning
Keep refresh and access token private. If someone obtains your tokens, they could use them to access private user data.
Returns
If the authorization is successful, this call returns the tokens and the TTL of the access token.
DEFINITION
We recommend using our official library, available on GitHub and central repository.EXAMPLE REQUEST
As of now, we do not provide a library. Use any library compatible with OAuth 2.0. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub.Refresh Access Token Request
Warning
Keep refresh and access token private. If someone obtains your tokens, they could use them to access private user data.
Returns
If you authenticated previously and have a working refresh token, this call returns the refreshed tokens and the TTL of the access token.
DEFINITION
We recommend using our official library, available on GitHub and central repository.EXAMPLE REQUEST
As of now, we do not provide a library. Use any library compatible with OAuth 2.0. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub. Check this example file in our official library at GitHub.Troubleshooting issues
Authentication errors are the most common issues received by our support team. Here are some troubleshooting tips you may want to try to resolve authentication issues and start using our API.
- • Respect the TTL of the Access Token and refresh it expires.
- • Respect the TTL of the Refresh Token. Either refresh the token before it expires or request a new one.
- • If you use a header-based OAuth 2.0 request, make sure that the HTTP authorization header is being properly set up and formatted according to the specific language you use.
- • Use auth in all REST API methods that support it. All Upwork REST API methods require authentication and using auth ensures that the requests are evaluated within the context of your current user.
- • Use valid endpoints.
- • Make sure you are using the appropriate HTTP request method. Most calls to the Upwork API use POST or GET methods.
- • If you use an OAuth 2.0 compatible library, make sure you select a well-supported one.
- • Try making the request in another OAuth2 library or tool. Comparing successful and failed requests will help you identify what might be going wrong.
The following are the most frequent authentication errors you may come across:
400 - Bad request
The request could not be understood by the server due to malformed syntax.
Suggestion: Review the error message and make the necessary modifications before retrying. You should not repeat the request without modifications.
401 - Unauthorized
User authentication is required and has failed or has not yet been provided.
Suggestion: Check your Access Token.
403 - Forbidden
The server understood the request, but is refusing to fulfill it.
Suggestion: Review the error message and make the necessary modifications before retrying. You should not repeat the request without modifications. Make sure your Client ID has enough permissions to access the resource.
404 - Not Found
User authentication has failed or has not yet been provided.
Suggestion: Validate the URL you call and check the list of parameters you send. One of them might be wrong and can not be found.
Users
This section describes resources that return information about users.
Authenticated User
Returns
Returns information about the currently authenticated user.
DEFINITION
auth.get_info()
$auth->getUserInfo();
auth.get_user_info()
auth.getUserInfo();
auth.getUserInfo(callback);
$auth->get_user_info();
auth.GetUserInfo()
EXAMPLE REQUEST
import upwork
from upwork.routers.reports import auth
client = upwork.Client(config)
auth.Api(client).get_info()
$auth = new \Upwork\API\Routers\Auth($client);
$auth->getUserInfo();
auth = Net::Upwork::API::Routers::Auth.new(client)
auth.get_user_info
import com.Upwork.api.Routers.Auth;
Auth auth = new Auth(client);
auth.getUserInfo();
var Auth = require('upwork-api/lib/routers/auth').Auth;
var auth = new Auth(api);
auth.getUserInfo(function(error, data) {
console.log(data);
});
my $auth = Net::Upwork::API::Routers::Auth->new($api);
$auth->get_user_info();
import ( authUpwork "github.com/upwork/golang-upwork/api/routers/auth" )
auth := authUpwork.New(client)
auth.GetUserInfo()
EXAMPLE RESPONSE
{
'server_time': '1400662109',
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Bangkok',
'timezone_offset': '25200'
},
'info': {
'portrait_50_img': 'https://...',
'ref': '525',
'portrait_32_img': 'https://...',
'has_agency': '0',
'portrait_100_img': 'https://...',
'company_url': '',
'capacity': {
'provider': 'yes',
'buyer': 'yes',
'affiliate_manager': 'no'
},
'location': {
'city': 'San Francisco',
'state': 'CA',
'country': 'United States'
},
'profile_url': 'https://...'
}
}
Referenced User
Returns
Returns the following information about the referenced user:
- reference
- reference to User object
The reference ID of the user - id
- string
The literal ID of the user - first_name
- string
The user’s first name - last_name
- string
The user’s last name - timezone
- string
The user’s time zone. - timezone_offset
- integer
The time zone offset in seconds - is_provider
- boolean
Indicates whether the user is a freelancer (can be hired) or not - status
- string (“active”, “inactive”)
The status of the user - string
User’s email - public_url
- string
The URL to the public profile
DEFINITION
users.get_my_info()
users.get_specific(user_reference)
$users->getMyInfo();
$users->getSpecific( integer $userReference );
users.get_my_info()
users.get_specific(user_reference)
users.getMyInfo();
users.getSpecific(String userReference);
users.getMyInfo(callback);
users.getSpecific(userReference, callback);
$users->get_my_info();
$users->get_specific($user_reference);
users.GetMyInfo()
users.GetSpecific(userReference)
EXAMPLE REQUEST
import upwork
from upwork.routers.reports import auth
client = upwork.Client(config)
auth.Api(client).get_my_info()
$users = new \Upwork\API\Routers\Organization\Users($client);
$users->getMyInfo();
users = Net::Upwork::API::Routers::Organization::Users.new(client)
users.get_my_info
import com.Upwork.api.Routers.Organization.Users;
Users users = new Users(client);
users.getMyInfo();
var Users = require('upwork-api/lib/routers/organization/users.js').Users;
var users = new Users(api);
users.getMyInfo(function(error, data) {
console.log(data);
});
my $users = Net::Upwork::API::Routers::Organization::Users->new($api);
$users->get_my_info();
import ( usersUpwork "github.com/upwork/golang-upwork/api/routers/organization/users" )
users := usersUpwork.New(client)
users.GetMyInfo()
EXAMPLE RESPONSE
{
'timezone': 'UTC+07:00 Bangkok, Jakarta, Hanoi',
'status': 'active',
'timezone_offset': '25200',
'public_url': 'https://www.upwork.com/...',
'last_name': 'Johnson',
'email': 'my_upwork_username@example.com',
'reference': '12345',
'id': 'my_upwork_username',
'is_provider': '1',
'first_name': 'John',
'profile_key': '...'
}
User Permissions
This section explains how permissions returned by the API are connected to team roles.


Below you can find the details and requirements for the API.
Returns
While permission and role information is contained in the permission field, this API returns a complete list of a team information for each team that the authorized user has access to. It is also important to consider that a user may have multiple roles within a team.
For example, a user who has full manager permissions within a team returns the following fields:
- manage_finance
- Access to the company or team financial details.
- manage_affiliation
- Access to the affiliate freelancers within a company or team.
- manage_employment
- Permission to start engagements (actually hire freelancers).
- manage_recruiting
- Permission to post new jobs and interview candidates.
DEFINITION
roles.get_all()
$roles->getAll();
roles.get_all()
roles.get_by_specific_user(user_reference)
roles.getAll();
roles.getBySpecificUser(String reference);
roles.getAll(callback);
roles.getBySpecificUser(reference, callback);
$roles->get_all();
$roles->get_by_specific_user($user_reference);
roles.GetAll()
roles.GetBySpecificUser(reference)
EXAMPLE REQUEST
import upwork
from upwork.routers.reports.hr import roles
client = upwork.Client(config)
roles.get_all()
$roles = new \Upwork\API\Routers\Hr\Roles($client);
$roles->getAll();
roles = Net::Upwork::API::Routers::Hr::Roles.new(client)
roles.get_all
import com.Upwork.api.Routers.Hr.Roles;
Roles roles = new Roles(client);
roles.getAll();
var Roles = require('upwork-api/lib/routers/hr/roles.js').Roles;
var roles = new Roles(api);
roles.getAll(function(error, data) {
console.log(data);
});
my $roles = Net::Upwork::API::Routers::Hr::Roles->new($api);
$roles->get_all();
import ( rolesUpwork "github.com/upwork/golang-upwork/api/routers/hr/roles" )
roles := rolesUpwork.New(client)
roles.GetAll()
EXAMPLE RESPONSE
{
'userrole': [
{
'parent_team__id': '0123456789abcdf',
'user__first_name': 'John',
'permissions': {
'permission': [
'manage_finance',
'manage_employment',
'manage_recruiting',
'manage_teamroom'
]
},
'company__reference': '12345',
'user__last_name': 'Johnson',
'team__is_hidden': '',
'reference': '12345',
'team__reference': '12345',
'affiliation_status': 'none',
'user__reference': '12345',
'user__is_provider': '1',
'parent_team__name': 'Upwork',
'has_team_room_access': '1',
'parent_team__reference': '12345',
'team__id': '0123456789abcdf',
'engagement__reference': '',
'team__name': 'Upwork',
'company__name': 'Upwork',
'role': 'admin',
'user__id': 'my_user_id',
'is_owner': '1'
},
# ...
]
}
Public profiles
Public profiles resources allow you to search the public profile of a freelancer and get detailed information on a specific profile.
Search for Freelancers
Returns
Returns the list of the objects with information about each freelancer who matches the requested query and parameters.
DEFINITION
freelancers.find(params)
$freelancers->find( array $params = array() );
freelancers.find(params)
freelancers.find(
java.util.HashMap<String,String> params);
freelancers.find(params, callback);
$freelancers->find(%params);
freelancers.Find(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.freelancers import search
client = upwork.Client(config)
data = {'q': 'python', 'title': 'Web Developer'}
search.Api(client).find(data)
$freelancers = new \Upwork\API\Routers\Freelancers\Search($client);
$params = array("q" => "python", "title" => "Web Developer");
$freelancers->find($params);
freelancers = Net::Upwork::API::Routers::Freelancers::Search.new(client)
params = {'q' => 'python', 'title' => 'Web Developer'}
freelancers.find(params)
import com.Upwork.api.Routers.Freelancers.Search;
import java.util.HashMap;
Search freelancers = new Search(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("q", "python");
params.put("title", "Web Developer");
freelancers.find(params);
var Search = require('upwork-api/lib/routers/freelancers/search.js').Search;
var freelancers = new Search(api);
var params = {'q': 'python', 'title': 'Web Developer'};
freelancers.find(params, function(error, data) {
console.log(data);
});
my $freelancers = Net::Upwork::API::Routers::Freelancers::Search->new($api);
my %params = ('q' => 'python', 'title' => 'Web Developer');
$freelancers->find(%params);
import ( searchUpwork "github.com/upwork/golang-upwork/api/routers/freelancers/search" )
freelancers := searchUpwork.New(client)
params := make(map[string]string)
params["q"] = "python"
params["title"] = "Web Developer"
freelancers.Find(params)
EXAMPLE RESPONSE
[
{'categories2': ['Legal',
'Web & Mobile Development',
'Admin Support'],
'country': 'India',
'description': 'I do ...',
'feedback': '4.8424790960452',
'id': '~aaaa9999d3f394624e',
'last_activity': 'June 17, 2014',
'member_since': 'July 21, 2011',
'name': 'John Johnson',
'portfolio_items_count': '1',
'portrait_50': 'https://...',
'profile_type': 'Independent',
'rate': '22.22',
'skills': ['python',
'django-framework',
'mongodb',
'jquery',
'html5',
'postgresql'],
'test_passed_count': '3',
'title': 'Web Developer'},
{
# Another freelancer
},
# ...
]
Get brief profile summary
Returns
Returns a brief summary of a freelancer profile.
DEFINITION
freelancers.get_specific(key)
$freelancers->getSpecific( string $key );
freelancers.get_specific_brief(key)
freelancers.getSpecificBrief(String key);
freelancers.getSpecificBrief(key, callback);
$freelancers->get_specific_brief($key);
freelancers.GetSpecificBrief(key)
EXAMPLE REQUEST
import upwork
from upwork.routers.freelancers import profile
client = upwork.Client(config)
profile.Api(client).get_specific('~aaa99955d3f394624e')
$freelancers = new \Upwork\API\Routers\Freelancers\Profile($client);
$freelancers->getSpecific("~aaa99955d3f394624e");
freelancers = Net::Upwork::API::Routers::Freelancers::Profile.new(client)
freelancers.get_specific_brief('~aaa99955d3f394624e')
import com.Upwork.api.Routers.Freelancers.Profile;
Profile freelancers = new Profile(client);
freelancers.getSpecificBrief("~aaa99955d3f394624e");
var Profile = require('upwork-api/lib/routers/freelancers/profile.js').Profile;
var freelancers = new Profile(api);
freelancers.getSpecificBrief('~aa9955d3f394624e', function(error, data) {
console.log(data);
});
my $freelancers = Net::Upwork::API::Routers::Freelancers::Profile->new($api);
$freelancers->get_specific_brief('~aaa99955d3f394624e');
import ( profileUpwork "github.com/upwork/golang-upwork/api/routers/freelancers/profile" )
freelancers := profileUpwork.New(client)
freelancers.GetSpecificBrief("~aaa99955d3f394624e")
EXAMPLE RESPONSE
{'ciphertext': '~aaa99955d3f394624e',
'dev_ac_agencies': '',
'dev_adj_score': '4.8424790960452',
'dev_adj_score_recent': '4.83652565536548',
'dev_billed_assignments': '16',
'dev_city': 'Bangkok',
'dev_country': 'Thailand',
'dev_eng_skill': '5',
'dev_groups': '',
'dev_is_affiliated': '0',
'dev_last_activity': 'June 17, 2014',
'dev_last_worked': 'June 8, 2014',
'dev_last_worked_ts': '1402185600000',
'dev_portfolio_items_count': '1',
'dev_portrait': 'https://...',
'dev_portrait_100': 'https://...',
'dev_portrait_32': 'https://...',
'dev_portrait_50': 'https://...',
'dev_profile_title': 'Web Developer',
'dev_recno_ciphertext': '~aaa99955d3f394624e',
'dev_short_name': 'John Johnson',
'dev_timezone': 'UTC+07:00 Bangkok, Jakarta, Hanoi',
'dev_tot_feedback': '10',
'dev_total_hours': '48.6666666666667',
'dev_ui_profile_access': 'Public'}
Get freelancer profile by key
Returns
There is a lot of information returned by this call and the best way to see what it actually means is by pulling data from a few providers and match up the fields. Most of the response fields are human readable. Here is some additional info that should help understand this response:
- dev_profile_access
- The status of the freelancer’s profile (public or private).
- skill
- Describes a skill that the freelancer has listed in his/her profile.
- dev_score
- Describes feedback that the freelancer has received after a job has been completed (or just closed).
- dev_recent_rank_percentile
- The freelancer’s rank at Upwork based on data from the last 90 days.
- dev_active_interviews
- The number of active interviews the freelancer is engaged in at the moment.
- dev_total_hours
- The total hours worked on Upwork by the freelancer.
- experience
- Describes the freelancer’s experience as listed in his/her profile under the Experience section.
- assignment
- Describes past assignments that are publicly viewable.
- skill, skl_level
- A skill level for the current freelancer. Values can be one of the following: Familiar, Good, Very Good, Proficient, Expert.
- dev_ic, affiliated
- Both these metrics return the same data. They were added at different times and both of them are kept for backward compatibility purposes.
DEFINITION
freelancers.get_specific()
$freelancers->getSpecific( string $key );
freelancers.get_specific(key)
freelancers.getSpecific(String key);
freelancers.getSpecific(key, callback);
$freelancers->get_specific($key);
freelancers.GetSpecific(key)
EXAMPLE REQUEST
import upwork
from upwork.routers.freelancers import profile
client = upwork.Client(config)
profile.Api(client).get_specific('~aaa99955d3f394624e')
$freelancers = new \Upwork\API\Routers\Freelancers\Profile($client);
$freelancers->getSpecific("~aaa99955d3f394624e");
freelancers = Net::Upwork::API::Routers::Freelancers::Profile.new(client)
freelancers.get_specific('~aaa99955d3f394624e')
import com.Upwork.api.Routers.Freelancers.Profile;
Profile freelancers = new Profile(client);
freelancers.getSpecific("~aaa99955d3f394624e");
var Profile = require('upwork-api/lib/routers/freelancers/profile.js').Profile;
var freelancers = new Profile(api);
freelancers.getSpecific('~aa9955d3f394624e', function(error, data) {
console.log(data);
});
my $freelancers = Net::Upwork::API::Routers::Freelancers::Profile->new($api);
$freelancers->get_specific('~aaa99955d3f394624e');
import ( profileUpwork "github.com/upwork/golang-upwork/api/routers/freelancers/profile" )
freelancers := profileUpwork.New(client)
freelancers.GetSpecific("~aaa99955d3f394624e")
EXAMPLE RESPONSE
{
'assignments': {
# ...
},
'ciphertext': '~~aaa9999db7b5808b',
'dev_ac_agencies': '',
'dev_adj_score': '4.99924101793537',
'dev_adj_score_recent': '4.99981986177941',
'dev_billed_assignments': '27',
'dev_blurb': "My description",
'dev_city': 'Bangkok',
'dev_country': 'Thailand',
'dev_eng_skill': '5',
'dev_groups': {
# ...
},
'dev_is_affiliated': '0',
'dev_last_activity': 'June 20, 2014',
'dev_last_worked': 'June 20, 2014',
'dev_last_worked_ts': '1403222400000',
'dev_portfolio_items_count': '11',
'dev_portrait': 'https://...',
'dev_portrait_100': 'https://...',
'dev_portrait_32': 'https://...',
'dev_portrait_50': 'https://...',
'dev_profile_title': 'Python web developer +',
'dev_recno_ciphertext': '~aaa999e7116ea7c92d',
'dev_short_name': 'John Johnson',
'dev_timezone': 'UTC+07:00 Bangkok, Jakarta, Hanoi',
'dev_tot_feedback': '16',
'dev_total_hours': '48.5',
'dev_ui_profile_access': 'Public',
'education': {
# ...
},
'experiences': {
# ...
},
'job_categories': {
# ...
},
'permalink': '',
'portfolio_items': {
# ...
},
'skills': {
# ...
}
}
Jobs
This section describes API resources to manage jobs and job-related activities. You can use these resources to search for jobs, post new jobs, list posted jobs, update jobs and delete them. You can also invite freelancers to a job interview.
Search for jobs
Returns
This resource allows third-party applications to search for public jobs on Upwork. The search parameters mirror the options available on the site.
DEFINITION
jobs.find(params)
$jobs->find( array $params = array() );
jobs.find(params)
jobs.find(
java.util.HashMap<String,String> params);
jobs.find(params, callback);
$jobs->find(%params);
jobs.Find(params)
EXAMPLE REQUEST:
import upwork
from upwork.routers.jobs import search
client = upwork.Client(config)
params = {'q': 'python', 'title': 'Web developer'}
search.Api(client).find(params)
$jobs = new \Upwork\API\Routers\Jobs\Search($client);
$params = array("q" => "python", "title" => "Web Developer");
$jobs->find($params);
jobs = Net::Upwork::API::Routers::Jobs::Search.new(client)
params = {'q' => 'python', 'title' => 'Web Developer'}
jobs.find(params)
import com.Upwork.api.Routers.Jobs.Search;
import java.util.HashMap;
Search jobs = new Search(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("q", "python");
params.put("title", "Web Developer");
jobs.find(params);
var Search = require('upwork-api/lib/routers/jobs/search.js').Search;
var jobs = new Search(api);
jobs.find(params, function(error, data) {
console.log(data);
});
my $jobs = Net::Upwork::API::Routers::Jobs::Search->new($api);
my %params = ('q' => 'python', 'title' => 'Web Developer');
$jobs->find(%params);
import ( searchUpwork "github.com/upwork/golang-upwork/api/routers/jobs/search" )
jobs := searchUpwork.New(client)
params := make(map[string]string)
params["q"] = "python"
params["title"] = "Web Developer"
jobs.Find(params)
EXAMPLE RESPONSE
[
{'budget': 750,
'category2': 'Web & Mobile Development',
'client': {'country': None,
'feedback': 0,
'jobs_posted': 1,
'past_hires': 0,
'payment_verification_status': None,
'reviews_count': 0},
'date_created': '2014-06-30T23:50:17+0000',
'duration': None,
'id': '~aaa9992d99e35a386e',
'job_status': 'Open',
'job_type': 'Fixed',
'skills': ['css',
'css3',
'database-design',
'database-programming',
'english',
'html',
'javascript',
'mysql',
'php',
'python'],
'snippet': u"Need a custom website <...>",
'subcategory2': 'Web Development',
'title': 'Looking for highly skilled web developer',
'url': 'http://...',
'workload': '30+ hrs/week'},
{
# Another job
# ...
},
# ...
]
List jobs
Returns
If successful, the resource returns a list of jobs.
DEFINITION
jobs.get_list(params)
$jobs->getList( array $params );
jobs.get_list(params)
jobs.getList(
java.util.HashMap<String,String> params);
jobs.getList(params, callback);
$jobs->get_list(%params);
jobs.GetList(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import jobs
client = upwork.Client(config)
params = {'buyer_team__reference' => '~abcdef'}
jobs.Api(client).get_list(params)
$jobs = new \Upwork\API\Routers\Hr\Jobs($client);
$params = array("buyer_team__reference" => "~abcdef");
$jobs->getList($params);
jobs = Net::Upwork::API::Routers::Hr::Jobs.new(client)
params = {'buyer_team__reference' => '~abcdef'}
jobs.get_list(params)
import com.Upwork.api.Routers.Hr.Jobs;
import java.util.HashMap;
Jobs jobs = new Jobs(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("buyer_team__reference", "~abcdef");
jobs.getList(params);
jobs.getList(callback);
var Jobs = require('upwork-api/lib/routers/hr/jobs.js').Jobs;
var jobs = new Jobs(api);
var params = {'buyer_team__reference': '~abcdef'};
jobs.getList(params, function(error, data) {
console.log(data);
});
my $jobs = Net::Upwork::API::Routers::Hr::Jobs->new($api);
my %params = {'buyer_team__reference' => '~abcdef'};
$jobs->get_list(%params);
import ( jobsUpwork "github.com/upwork/golang-upwork/api/routers/hr/jobs" )
jobs := jobsUpwork.New(client)
params := make(map[string]string)
params["buyer_team__reference"] = "~abcdef"
jobs.GetList(params)
EXAMPLE RESPONSE
{
'lister': {
'paging': {'count': '20', 'offset': '0'},
'query': '',
'sort': {'sort': {'sort': ['created_time', 'asc']}},
'total_items': '5'
},
'jobs': [
{
'attachment_file_url': '',
'budget': '5',
'buyer_company__name': 'My Company',
'buyer_company__reference': '1040945',
'buyer_team__name': 'My Company',
'buyer_team__reference': '1040945',
'cancelled_date': '1380067200000',
'category2': 'Web, Mobile & Software Dev',
'created_time': '1377423220000',
'description': 'Testing some functionality',
'duration': '',
'end_date': '1380067200000',
'filled_date': '',
'job_ref_ciphertext': '~12345abcdf',
'job_type': 'fixed-price',
'keep_open_on_hire': '',
'num_active_candidates': '0',
'num_candidates': '0',
'num_new_candidates': '0',
'preference_candidate_type': 'individuals',
'public_url': 'https://...',
'reference': '~12345abcdf',
'skills': '',
'start_date': '1377388800000',
'status': 'cancelled',
'subcategory2': 'Web & Mobile Development',
'title': 'Test python-upwork',
'visibility': 'invite-only'
}
]
}
Get job by key
Returns
This resource returns the following details on the referenced job:
- title
- The title of the job.
- job_type
- The job type.
- description
- The description of the job.
- public_url
- The public URL of the job.
- created_time
- The time when the job was created.
- created_by
- The ID of the user who created the job.
- start_date
- The intended start date of the job.
- end_date
- The intended end date of the job.
- filled_date
- The date when the job was filled.
- cancelled_date
- The date when the job was cancelled.
- buyer_team__reference
- The reference ID for the client’s team that posted the job.
- buyer_team__id
- The name of the client’s team that posted the job.
- buyer_company__reference
- The reference ID for the company of the client’s team.
- buyer_company__name
- The name of the company of the client’s team.
- visibility
- The visibility of the job.
- budget
- The intended budget, if job fixed price.
- duration
- The intended duration, if job is hourly tracked.
- category2
- The category (V2) of the job.
- subcategory2
- The subcategory (V2) of the job.
- num_candidates
- The number of candidates.
- num_active_candidates
- The number of active candidates.
- num_new_candidates
- The number of new candidates.
- status
- The status of the job.
DEFINITION
jobs.get_specific(key)
$jobs->getSpecific( string $key );
jobs.get_specific(key)
jobs.getSpecific(String key);
jobs.getSpecific(String key);
$jobs->get_specific($key);
jobs.GetSpecific(key)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import jobs
client = upwork.Client(config)
jobs.Api(client).get_job('~12345abcdf')
$jobs = new \Upwork\API\Routers\Hr\Jobs($client);
$jobs->getSpecific("~12345abcdf");
jobs = Net::Upwork::API::Routers::Hr::Jobs.new(client)
jobs.get_specific('~12345abcdf')
import com.Upwork.api.Routers.Hr.Jobs;
Jobs jobs = new Jobs(client);
jobs.getSpecific("~12345abcdf");
var Jobs = require('upwork-api/lib/routers/hr/jobs.js').Jobs;
var jobs = new Jobs(api);
jobs.getSpecific('~12345abcdf', function(error, data) {
console.log(data);
});
my $jobs = Net::Upwork::API::Routers::Hr::Jobs->new($api);
$jobs->get_specific('~12345abcdf');
import ( jobsUpwork "github.com/upwork/golang-upwork/api/routers/hr/jobs" )
jobs := jobsUpwork.New(client)
jobs.GetSpecific("~12345abcdf")
EXAMPLE RESPONSE
{
'attachment_file_url': '',
'budget': '5',
'buyer_company__name': 'My Company',
'buyer_company__reference': '1040945',
'buyer_team__name': 'My Company',
'buyer_team__reference': '1040945',
'cancelled_date': '1380067200000',
'category2': 'Web, Mobile & Software Dev',
'created_time': '1377423220000',
'description': 'Testing some functionality',
'duration': '',
'end_date': '1380067200000',
'filled_date': '',
'job_type': 'fixed-price',
'keep_open_on_hire': '',
'num_active_candidates': '0',
'num_candidates': '0',
'num_new_candidates': '0',
'preference_candidate_type': 'individuals',
'public_url': 'https://...',
'skills': '',
'start_date': '1377388800000',
'status': 'cancelled',
'subcategory2': 'Web & Mobile Development',
'title': 'Test python-upwork',
'visibility': 'invite-only'
}
Post job
Returns
If successful, this resource returns a 200 OK message and the job reference number.
DEFINITION
jobs.post_job(params)
$jobs->postJob( array $params );
jobs.post_job(params)
jobs.postJob(
java.util.HashMap<String,String> params);
jobs.postJob(params, callback);
$jobs->post_job(%params);
jobs.PostJob(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import jobs
client = upwork.Client(config)
params = {
'buyer_team__reference' => '~12345abcdf',
'title' => 'Test oAuth API create job',
'job_type' => 'hourly',
'description' => 'A description',
'visibility' => 'public',
'category2' => 'Web, Mobile & Software Dev',
'subcategory2' => 'Web Development',
'skills' => 'python;javascript'
}
jobs.Api(client).post_job(params)
$jobs = new \Upwork\API\Routers\Hr\Jobs($client);
$params = array(
"buyer_team__reference" => "~12345abcdf",
"title" => "Test oAuth API create job",
"job_type" => "hourly",
"description" => "A description",
"visibility" => "public",
"category2" => "Web, Mobile & Software Dev",
"subcategory2" => "Web Development",
"skills" => "python;javascript"
);
$jobs->postJob($params);
jobs = Net::Upwork::API::Routers::Hr::Jobs.new(client)
params = {
'buyer_team__reference' => '~12345abcdf',
'title' => 'Test oAuth API create job',
'job_type' => 'hourly',
'description' => 'A description',
'visibility' => 'public',
'category2' => 'Web, Mobile & Software Dev',
'subcategory2' => 'Web Development',
'skills' => 'python;javascript'
}
jobs.post_job(params)
import com.Upwork.api.Routers.Hr.Jobs;
import java.util.HashMap;
Jobs jobs = new Jobs(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("buyer_team__reference", "~12345abcdf");
params.put("title", "Test oAuth API create job");
params.put("job_type", "hourly");
params.put("description", "A description");
params.put("visibility", "public");
params.put("category2", "Web, Mobile & Software Dev");
params.put("subcategory2", "Web Development");
params.put("skills", "python;javascript");
jobs.postJob(params);
var Jobs = require('upwork-api/lib/routers/hr/jobs.js').Jobs;
var jobs = new Jobs(api);
var params = {
'buyer_team__reference': '~12345abcdf',
'title': 'Test oAuth API create job',
'job_type': 'hourly',
'description': 'A description',
'visibility': 'public',
'category2': 'Web, Mobile & Software Dev',
'subcategory2': 'Web Development',
'skills': 'python;javascript'
};
jobs.postJob(params, function(error, data) {
console.log(data);
});
my $jobs = Net::Upwork::API::Routers::Hr::Jobs->new($api);
my %params = {
'buyer_team__reference' => '~12345abcdf',
'title' => 'Test oAuth API create job',
'job_type' => 'hourly',
'description' => 'A description',
'visibility' => 'public',
'category2' => 'Web, Mobile & Software Dev',
'subcategory2' => 'Web Development',
'skills' => 'python;javascript'
};
$jobs->post_job(%params);
import ( jobsUpwork "github.com/upwork/golang-upwork/api/routers/hr/jobs" )
jobs := jobsUpwork.New(client)
params := make(map[string]string)
params["buyer_team__reference"] = "~12345abcdf"
params["title"] = "Test oAuth API create job"
params["job_type"] = "hourly"
params["description"] = "A description"
params["visibility"] = "public"
params["category2"] = "Web, Mobile & Software Dev"
params["subcategory2"] = "Web Development"
params["skills"] = "python;javascript"
jobs.PostJob(params)
EXAMPLE RESPONSE
{'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'job': {'public_url': 'https://...',
'reference': '~aaa999f4c68af61ed6'},
'server_time': 1404364847}
Update job
Returns
If successful, this resource returns a 200 OK message.
DEFINITION
jobs.edit_job(key, params)
$jobs->editJob( string $key, array $params );
jobs.edit_job(key, params)
jobs.editJob(
String key,
java.util.HashMap<String,String> params);
jobs.editJob(key, params, callback);
$jobs->edit_job($key, %params);
jobs.EditJob(key, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import jobs
client = upwork.Client(config)
params = {
'buyer_team__reference' => '~12345abcdf',
'title' => 'Test oAuth API create job',
'description' => 'Updated description',
'visibility' => 'public',
'category2' => 'Web, Mobile & Software Dev',
'subcategory2' => 'Web Development',
'duration' => '100',
'status' => 'open'
}
job_ref = '~abcd12345'
jobs.Api(client).edit_job(job_ref, params)
$jobs = new \Upwork\API\Routers\Hr\Jobs($client);
$params = array(
"buyer_team__reference" => "~12345abcdf",
"title" => "Test oAuth API create job",
"description" => "Updated description",
"visibility" => "public",
"category2" => "Web, Mobile & Software Dev",
"subcategory2" => "Web Development",
"duration" => "100",
"status" => "open"
);
$job_ref = "~abcd12345";
$jobs->editJob($job_ref, $params);
jobs = Net::Upwork::API::Routers::Hr::Jobs.new(client)
params = {
'buyer_team__reference' => '~12345abcdf',
'title' => 'Test oAuth API create job',
'description' => 'Updated description',
'visibility' => 'public',
'category2' => 'Web, Mobile & Software Dev',
'subcategory2' => 'Web Development',
'duration' => '100',
'status' => 'open'
}
job_key = '~abcd12345'
jobs.edit_job(job_key, params)
import com.Upwork.api.Routers.Hr.Jobs;
import java.util.HashMap;
Jobs jobs = new Jobs(client);
String jobKey = "~abcd12345";
HashMap<String, String> params = new HashMap<String, String>();
params.put("buyer_team__reference", "~12345abcdf");
params.put("title", "Test oAuth API create job");
params.put("description", "Updated description");
params.put("visibility", "public");
params.put("category2", "Web, Mobile & Software Dev");
params.put("subcategory2", "Web Development");
params.put("duration", "100");
params.put("status", "open");
jobs.editJob(jobKey, params);
var Jobs = require('upwork-api/lib/routers/hr/jobs.js').Jobs;
var jobs = new Jobs(api);
var key = '~abcd12345';
var params = {
'buyer_team__reference': '~12345abcdf',
'title': 'Test oAuth API create job',
'description': 'Updated description',
'visibility': 'public',
'category2': 'Web, Mobile & Software Dev',
'subcategory2': 'Web Development',
'duration': '100',
'status': 'open'
};
jobs.editJob(key, params, function(error, data) {
console.log(data);
});
my $jobs = Net::Upwork::API::Routers::Hr::Jobs->new($api);
my %params = {
'buyer_team__reference' => '~12345abcdf',
'title' => 'Test oAuth API create job',
'description' => 'Updated description',
'visibility' => 'public',
'category2' => 'Web, Mobile & Software Dev',
'subcategory2' => 'Web Development',
'duration' => '100',
'status' => 'open'
};
my $job_key = '~abcd12345';
$jobs->edit_job($job_key, %params);
import ( jobsUpwork "github.com/upwork/golang-upwork/api/routers/hr/jobs" )
jobs := jobsUpwork.New(client)
jobKey = "~abcd12345";
params := make(map[string]string)
params["buyer_team__reference"] = "~12345abcdf"
params["title"] = "Test oAuth API create job"
params["description"] = "Updated description"
params["visibility"] = "public"
params["category2"] = "Web, Mobile & Software Dev"
params["subcategory2"] = "Web Development"
params["duration"] = "100"
params["status"] = "open"
jobs.EditJob(jobKey, params)
EXAMPLE RESPONSE
{'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'job': {'message': 'updated'},
'server_time': 1404365740}
Cancel job
Returns
If successful, this resource returns a 200 OK message.
DEFINITION
jobs.delete_job(key, params)
$jobs->deleteJob( string $key, array $params );
jobs.delete_job(key, params)
jobs.deleteJob(
String key,
java.util.HashMap<String,String> params);
jobs.deleteJob(key, params, callback);
$jobs->delete_job($key, %params);
jobs.DeleteJob(key, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import jobs
client = upwork.Client(config)
jobs.Api(client).delete_job('~abcdf12345', {'reason': '41'})
$jobs = new \Upwork\API\Routers\Hr\Jobs($client);
$params = array("reason" => "41");
$job_ref = "~abcd12345";
$jobs->deleteJob($job_ref, $params);
jobs = Net::Upwork::API::Routers::Hr::Jobs.new(client)
params = {'reason' => '41'}
job_key = '~abcd12345'
jobs.delete_job(job_key, params)
import com.Upwork.api.Routers.Hr.Jobs;
import java.util.HashMap;
Jobs jobs = new Jobs(client);
String jobKey = "~abcd12345";
HashMap<String, String> params = new HashMap<String, String>();
params.put("reason", "41");
jobs.deleteJob(jobKey, params);
var Jobs = require('upwork-api/lib/routers/hr/jobs.js').Jobs;
var jobs = new Jobs(api);
var key = '~abcd12345';
var params = {'reason': '41'};
jobs.deleteJob(key, params, function(error, data) {
console.log(data);
});
my $jobs = Net::Upwork::API::Routers::Hr::Jobs->new($api);
my %params = {'reason' => '41'};
my $job_key = '~abcd12345';
$jobs->delete_job($job_key, %params);
import ( jobsUpwork "github.com/upwork/golang-upwork/api/routers/hr/jobs" )
jobs := jobsUpwork.New(client)
jobKey = "~abcd12345";
params := make(map[string]string)
params["reason"] = "41"
jobs.DeleteJob(jobKey, params)
EXAMPLE RESPONSE
{'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'job': {'message': 'deleted'},
'server_time': 1404389886}
Get job profile
Returns
This resource returns an exhaustive list of attributes about the job. We recommend to pull data for a few freelancers and match up the fields to understand the meaning of the fields. Note that most of the response fields are human readable.
DEFINITION
profile.get_specific(job_reference)
$profile->getSpecific( string $key );
profile.get_specific(key)
profile.getSpecific(String key);
profile.getSpecific(key, callback);
$profile->get_specific($key);
profile.GetSpecific(key)
EXAMPLE REQUEST
import upwork
from upwork.routers.jobs import profile
client = upwork.Client(config)
profile.Api(client).get_specific('~abcdf12345')
$profile = new \Upwork\API\Routers\Jobs\Profile($client);
$profile->getSpecific("~abcdf12345");
profile = Net::Upwork::API::Routers::Jobs::Profile.new(client)
profile.get_specific('~abcdf12345')
import com.Upwork.api.Routers.Jobs.Profile;
Profile profile = new Profile(client);
profile.getSpecific("~abcdf12345");
var Profile = require('upwork-api/lib/routers/jobs/profile.js').Profile;
var profile = new Profile(api);
profile.getSpecific('~abcdf12345', function(error, data) {
console.log(data);
});
my $profile = Net::Upwork::API::Routers::Jobs::Profile->new($api);
$profile->get_specific('~abcdf12345');
import ( profileUpwork "github.com/upwork/golang-upwork/api/routers/jobs/profile" )
profile := profileUpwork.New(client)
profile.GetSpecific("~abcdf12345")
EXAMPLE RESPONSE
{'amount': '5',
'assignment_info': '',
'assignments': {'assignment': [{'as_ciphertext': '~abcdf1234567',
'as_ciphertext_opening_recno': '~abcdf1234549353a08',
'as_engagement_title': 'API test job',
'as_from': '02/2014',
'as_job_type': 'Fixed',
'as_opening_title': 'API test job',
'as_rate': '$0.00',
'as_status': 'Active',
'as_to': 'Present',
'as_total_charge': '0',
'as_total_hours': '0'},
{'as_ciphertext': '~abcdf1234567',
'as_ciphertext_opening_recno': '~abcdf123454e8f073e',
'as_engagement_title': 'Testing an API',
'as_from': '10/2013',
'as_job_type': 'Fixed',
'as_opening_title': 'Test create job via API',
'as_rate': '$0.00',
'as_status': 'Closed',
'as_to': '10/2013',
'as_total_charge': '1.11',
'as_total_hours': '0',
'feedback': {'comment': 'Test Company is a very good client, clean specs and nice to communicate.',
'comment_is_public': '1',
'score': '5.00',
'scores': {'score': [{'description': 'competency and skills for the job, understanding of task complexities',
'label': 'Skills',
'score': '5'},
{'description': 'quality of specifications/instructions',
'label': 'Quality',
'score': '5'},
{'description': 'online presence on a consistent schedule',
'label': 'Availability',
'score': '5'},
{'description': 'understanding of complexities and trade-offs',
'label': 'Deadlines',
'score': '5'},
{'description': 'communication skills and responsiveness, feedback and guidance',
'label': 'Communication',
'score': '5'},
{'description': 'cooperation and flexibility, open to suggestions for improvement',
'label': 'Cooperation',
'score': '5'}]}}}]},
'buyer': {'op_adjusted_score': '5',
'op_city': 'Bangkok',
'op_contract_date': 'August 25, 2013',
'op_country': 'Thailand',
'op_timezone': 'UTC-08:00 Pacific Time (US & Canada); Los Angeles',
'op_tot_asgs': '2',
'op_tot_charge': '1.11',
'op_tot_fp_asgs': '2',
'op_tot_hours': '0',
'op_tot_jobs_filled': '2',
'op_tot_jobs_open': '0',
'op_tot_jobs_posted': '5'},
'candidates': '',
'ciphertext': '~abcdf1234542a395a4',
'engagement_weeks': '',
'interviewees_total_active': '0',
'job_category_level_one': 'Web, Mobile & Software Dev',
'job_category_level_two': 'Web Development',
'job_type': 'Fixed',
'op_attached_doc': '',
'op_cny_upm_verified': '1',
'op_contractor_tier': '',
'op_ctime': '1377423220000',
'op_description': 'Will be discussed.',
'op_engagement': 'Full-time - 30+ hrs/week',
'op_high_hourly_rate_all': '0',
'op_low_hourly_rate_all': '0',
'op_other_jobs': '',
'op_pref_english_skill': '0',
'op_pref_fb_score': '0',
'op_pref_has_portfolio': '0',
'op_pref_hourly_rate_max': '',
'op_pref_hourly_rate_min': '',
'op_pref_location': '',
'op_pref_odesk_hours': '0',
'op_required_skills': '',
'op_title': 'Test Upwork API',
'op_tot_cand': '0',
'op_tot_feedback': '1',
'op_pref_group_id': 'somegroup',
'op_pref_group_name': 'Super group',
'op_pref_group_logo': 'http://...',
'ui_opening_status': 'Closed'}
Invite freelancer to an interview
Returns
If successful, this resource returns a 200 OK message.
DEFINITION
interviews.invite(job_key, params)
$interviews->invite( string $jobKey, array $params );
interviews.invite(job_key, params)
interviews.invite(
String jobKey,
java.util.HashMap<String,String> params);
interviews.invite(jobKey, params, callback);
$interviews->invite($job_key, %params);
interviews.Invite(jobKey, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import interviews
client = upwork.Client(config)
job_ref = '~aaabb99900'
params = {
'profile_key' => '~abcdf12345',
'cover' => 'Please accept this interview'
}
interviews.invite(job_ref, params)
$interviews = new \Upwork\API\Routers\Hr\Interviews($client);
$params = array(
"profile_key" => "~abcdf12345",
"cover" => "Please accept this interview"
);
$jobKey = "~aaabb99900";
$interviews->invite($jobKey, $params);
interviews = Net::Upwork::API::Routers::Hr::Interviews.new(client)
params = {
'profile_key' => '~abcdf12345',
'cover' => 'Please accept this interview'
}
job_key = '~aaabb99900'
interviews.invite(job_key, params)
import com.Upwork.api.Routers.Hr.Interviews;
import java.util.HashMap;
Interviews interviews = new Interviews(client);
String jobKey = "~aaabb99900";
HashMap<String, String> params = new HashMap<String, String>();
params.put("profile_key", "~abcdf12345");
params.put("cover", "Please accept this interview");
interviews.invite(jobKey, params);
var Interviews = require('upwork-api/lib/routers/hr/interviews.js').Interviews;
var interviews = new Interviews(api);
var jobKey = '~aaabb99900';
var params = {
'profile_key': '~abcdf12345',
'cover': 'Please accept this interview'
};
interviews.invite(jobKey, params, function(error, data) {
console.log(data);
});
my $interviews = Net::Upwork::API::Routers::Hr::Interviews->new($api);
my %params = {
'profile_key' => '~abcdf12345',
'cover' => 'Please accept this interview'
};
my $job_key = '~aaabb99900';
$interviews->invite($job_key, %params);
import ( interviewsUpwork "github.com/upwork/golang-upwork/api/routers/hr/interviews" )
interviews := interviewsUpwork.New(client)
jobKey = "~aaabb99900";
params := make(map[string]string)
params["profile_key"] = "~abcdf12345"
params["cover"] = "Please accept this interview"
interviews.Invite(jobKey, params)
EXAMPLE RESPONSE
{'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'code': '200',
'job_info': {'company_id': ''},
'message': 'OK',
'server_time': '1404389611'}
Companies and teams
This section describes resources that allow you to manage companies and teams on Upwork.
This diagram displays API transition from the outdated to new version of API.

Below you can find the details and requirements for each API.
List companies
Returns
This resource returns the list of companies that the currently authorized user has access to.
DEFINITION
companies.get_list()
$companies->getList();
companies.get_list()
companies.getList();
companies.getList(callback);
$companies->get_list();
companies.GetList()
EXAMPLE REQUEST
import upwork
from upwork.routers.organization import companies
client = upwork.Client(config)
companies.Api(client).get_companies()
$companies = new \Upwork\API\Routers\Organization\Companies($client);
$companies->getList();
companies = Net::Upwork::API::Routers::Organization::Companies.new(client)
companies.get_list()
import com.Upwork.api.Routers.Organization.Companies;
Companies companies = new Companies(client);
companies.getList();
var Companies = require('upwork-api/lib/routers/organization/companies.js').Companies;
var companies = new Companies(api);
companies.getList(function(error, data) {
console.log(data);
});
my $companies = Net::Upwork::API::Routers::Organization::Companies->new($api);
$companies->get_list();
import ( companiesUpwork "github.com/upwork/golang-upwork/api/routers/organization/companies" )
companies := companiesUpwork.New(client)
companies.GetList()
EXAMPLE RESPONSE
[
{'name': 'A Test Company',
'owner_ciphertext': '~~abcdf12345',
'payment_verification_status': 'VERIFIED',
'reference': '12345'
},
{
# Another team
},
# ...
]
Get company
Returns
This resource returns the details of the referenced company. If a user does not have access to the company, the resource returns a 403 error. This resource does not return the list of teams within the company.
DEFINITION
companies.get_specific(company_reference)
$companies->getSpecific( integer $cmpReference );
companies.get_specific(company_reference)
companies.getSpecific(String cmpReference);
companies.getSpecific(cmpReference, callback);
$companies->get_specific($company_reference);
companies.GetSpecific(cmpReference)
EXAMPLE REQUEST
import upwork
from upwork.routers.organization import companies
client = upwork.Client(config)
companies.Api(client).get_specific(12345)
$companies = new \Upwork\API\Routers\Organization\Companies($client);
$companies->getSpecific(12345);
companies = Net::Upwork::API::Routers::Organization::Companies.new(client)
companies.get_specific(12345)
import com.Upwork.api.Routers.Organization.Companies;
Companies companies = new Companies(client);
companies.getSpecific("12345");
var Companies = require('upwork-api/lib/routers/organization/companies.js').Companies;
var companies = new Companies(api);
companies.getSpecific('12345', function(error, data) {
console.log(data);
});
my $companies = Net::Upwork::API::Routers::Organization::Companies->new($api);
$companies->get_specific(12345);
import ( companiesUpwork "github.com/upwork/golang-upwork/api/routers/organization/companies" )
companies := companiesUpwork.New(client)
companies.GetSpecific("12345")
EXAMPLE RESPONSE
{'name': 'A Test Company',
'owner_ciphertext': '~~abcdf12345',
'payment_verification_status': 'VERIFIED',
'reference': '12345'}
List teams in company
Returns
This resource returns the list of teams in the referenced company.
DEFINITION
companies.get_teams(company_referece)
$companies->getTeams( integer $cmpReference );
companies.get_teams(company_reference)
companies.getTeams(String cmpReference);
companies.getTeams(cmpReference, callback);
$companies->get_teams($company_reference);
companies.GetTeams(cmpReference)
EXAMPLE REQUEST
import upwork
from upwork.routers.organization import companies
client = upwork.Client(config)
companies.Api(client).get_company_teams(12345)
$companies = new \Upwork\API\Routers\Organization\Companies($client);
$companies->getTeams(12345);
companies = Net::Upwork::API::Routers::Organization::Companies.new(client)
companies.get_teams(12345)
import com.Upwork.api.Routers.Organization.Companies;
Companies companies = new Companies(client);
companies.getTeams("12345");
var Companies = require('upwork-api/lib/routers/organization/companies.js').Companies;
var companies = new Companies(api);
companies.getTeams('12345', function(error, data) {
console.log(data);
});
my $companies = Net::Upwork::API::Routers::Organization::Companies->new($api);
$companies->get_teams(12345);
import ( companiesUpwork "github.com/upwork/golang-upwork/api/routers/organization/companies" )
companies := companiesUpwork.New(client)
companies.GetTeams("12345")
EXAMPLE RESPONSE
[
{'company__reference': '12345',
'company_name': 'A Test Company',
'id': 'zyxadtnasd',
'name': 'A Team in Test Company',
'parent_team__id': 'abcdfghijk',
'parent_team__name': 'A Test Company',
'parent_team__reference': '12345',
'payment_verification_status': 'VERIFIED',
'reference': '74951'
},
{
# Another team
},
# ...
]
List users in company
Returns
This resource returns the list of users within the referenced company.
DEFINITION
companies.get_users(company_referece, active=True)
$companies->getUsers( integer $cmpReference );
companies.get_users(company_reference)
companies.getUsers(String cmpReference);
companies.getUsers(cmpReference, callback);
$companies->get_users($company_reference);
companies.GetUsers(cmpReference)
EXAMPLE REQUEST
import upwork
from upwork.routers.organization import companies
client = upwork.Client(config)
companies.Api(client).get_users(12345)
$companies = new \Upwork\API\Routers\Organization\Companies($client);
$companies->getUsers(12345);
companies = Net::Upwork::API::Routers::Organization::Companies.new(client)
companies.get_users(12345)
import com.Upwork.api.Routers.Organization.Companies;
Companies companies = new Companies(client);
companies.getUsers("12345");
var Companies = require('upwork-api/lib/routers/organization/companies.js').Companies;
var companies = new Companies(api);
companies.getUsers('12345', function(error, data) {
console.log(data);
});
my $companies = Net::Upwork::API::Routers::Organization::Companies->new($api);
$companies.get_users(12345);
import ( companiesUpwork "github.com/upwork/golang-upwork/api/routers/organization/companies" )
companies := companiesUpwork.New(client)
companies.GetUsers("12345")
EXAMPLE RESPONSE
[
{
'first_name': 'John',
'has_contract': '0',
'id': 'john_johnson',
'is_provider': '1',
'last_name': 'Johnson',
'public_url': 'https://...',
'reference': '12345',
'status': 'active',
'timezone_offset': '25200'
},
{
# Another teammate
},
# ...
]
List teams
Returns
This resource returns the list of all teams that the currently authorized user has access to.
DEFINITION
teams.get_list()
$teams->getList();
teams.get_list()
teams.getList();
teams.getList(callback);
$teams->get_list();
teams.GetList()
EXAMPLE REQUEST
import upwork
from upwork.routers.organization import teams
client = upwork.Client(config)
teams.Api(client).get_list()
$teams = new \Upwork\API\Routers\Organization\Teams($client);
$teams->getList();
teams = Net::Upwork::API::Routers::Organization::Teams.new(client)
teams.get_list()
import com.Upwork.api.Routers.Organization.Teams;
Teams teams = new Teams(client);
teams.getList();
var Teams = require('upwork-api/lib/routers/organization/teams.js').Teams;
var teams = new Teams(api);
teams.getList(function(error, data) {
console.log(data);
});
my $teams = Net::Upwork::API::Routers::Organization::Teams->new($api);
$teams.get_list();
import ( teamsUpwork "github.com/upwork/golang-upwork/api/routers/organization/teams" )
teams := teamsUpwork.New(client)
teams.GetList()
EXAMPLE RESPONSE
[
{
'company__reference': '12345',
'company_name': 'A Test Company',
'id': 'abcdfghijk',
'name': 'A Test Team',
'parent_team__id': 'abcdfghijk',
'parent_team__name': 'A Test Company',
'parent_team__reference': '12345',
'reference': '12345'
},
{
# Another team
},
# ...
]
List users in team
Returns
This resource returns the following details of all the users in the referenced team:
- reference
- Reference ID of the team.
status
- timezone_offset
- The user’s timezone.
- id
- The user ID.
- is_provider
- Indicates whether a user is a freelancer. The value 1 means “yes” and 0 means “no”.
- last_name
- The user’s last name.
- first_name
- The user’s first name.
DEFINITION
teams.get_users_in_team(team_reference, active=True)
$teams->getUsersInTeam( integer $teamReference );
teams.get_users_in_team(team_reference)
teams.getUsersInTeam(String teamReference);
teams.getUsersInTeam(teamReference, callback);
$teams->get_users_in_team($team_reference);
teams.GetUsersInTeam(teamReference)
EXAMPLE REQUEST
import upwork
from upwork.routers.organization import teams
client = upwork.Client(config)
teams.Api(client).get_users_in_team(12345)
$teams = new \Upwork\API\Routers\Organization\Teams($client);
$teams->getUsersInTeam(12345);
teams = Net::Upwork::API::Routers::Organization::Teams.new(client)
teams.get_users_in_team(12345)
import com.Upwork.api.Routers.Organization.Teams;
Teams teams = new Teams(client);
teams.getUsersInTeam("12345");
var Teams = require('upwork-api/lib/routers/organization/teams.js').Teams;
var teams = new Teams(api);
teams.getUsersInTeam('12345', function(error, data) {
console.log(data);
});
my $teams = Net::Upwork::API::Routers::Organization::Teams->new($api);
$teams->get_users_in_team(12345);
import ( teamsUpwork "github.com/upwork/golang-upwork/api/routers/organization/teams" )
teams := teamsUpwork.New(client)
teams.GetUsersInTeam("12345")
EXAMPLE RESPONSE
[
{
'first_name': 'John',
'has_contract': '0',
'id': 'john_johnson',
'is_provider': '1',
'last_name': 'Johnson',
'public_url': 'https://...',
'reference': '12345',
'status': 'active',
'timezone_offset': '25200'
},
{
# Another teammate
},
# ...
]
Get Work Diary
Note
Due to legacy terminology the term “activity” is used with the meaning “Level of activity” and the term “task” with the meaning “activity the freelancer is working on” for this particular endpoint
Returns
DEFINITION
workdiary.get(
team_id, date=None, sort_by=None, activity=None, freelancer=None, paging=None)
$workdiary->get( string $company, string $date, string $params = array() );
workdiary.get(company, date, params = {})
workdiary.get(
String company,
String date,
java.util.HashMap<String,String> params);
workdiary.get(
company, date,
params, callback);
$workdiary->get($company, $date, %params);
workdiary.Get(company, date, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import workdiary
client = upwork.Client(config)
workdiary.Api(client).get('abcde12345', '20140704')
$workdiary = new \Upwork\API\Routers\Workdiary($client);
$workdiary->get("abcde12345", "20140704");
workdiary = Net::Upwork::API::Routers::Workdiary.new(client)
workdiary.get('abcde12345', '20140704')
import com.Upwork.api.Routers.Workdiary;
import java.util.HashMap;
Workdiary workdiary = new Workdiary(client);
HashMap<String, String> params = new HashMap<String, String>();
workdiary.get("abcde12345", "20140704", params);
var Workdiary = require('upwork-api/lib/routers/workdiary.js').Workdiary;
var workdiary = new Workdiary(api);
var params = {};
workdiary.get('abcde12345', '20140704', params, function(error, data) {
console.log(data);
});
my $workdiary = Net::Upwork::API::Routers::Workdiary->new($api);
$workdiary->get('abcde12345', '20140704');
import ( workdiaryUpwork "github.com/upwork/golang-upwork/api/routers/workdiary" )
workdiary := workdiaryUpwork.New(client)
params := make(map[string]string)
workdiary.Get("abcde12345", "20140704", params)
EXAMPLE RESPONSE
(
'total': '1',
'snapshots':
[
{
'snapshot_time': 1525363081,
...
},
{
# Another entry
},
# ...
],
'users': {...}
'contracts': {...}
)
Get Work Diary by List of Contracts
Note
Due to legacy terminology the term “activity” is used with the meaning “Level of activity” and the term “task” with the meaning “activity the freelancer is working on” for this particular endpoint
Returns
DEFINITION
workdiary.get_by_contract(
contract_ids, date=None, offset=None)
$workdiary->getByContract( string $contract_ids, string $date, string $params = array() );
workdiary.get_by_contract(contract_ids, date, params = {})
workdiary.getByContract(
String contract_ids,
String date,
java.util.HashMap<String,String> params);
workdiary.getByContract(
contract_ids, date,
params, callback);
$workdiary->get_by_contract($contract_ids, $date, %params);
workdiary.GetByContract(contract_ids, date, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import workdiary
client = upwork.Client(config)
workdiary.Api(client).get_by_contract('12345;78912', '20140704')
$workdiary = new \Upwork\API\Routers\Workdiary($client);
$workdiary->getByContract("12345;78912", "20140704");
workdiary = Net::Upwork::API::Routers::Workdiary.new(client)
workdiary.get_by_contract('12345;78912', '20140704')
import com.Upwork.api.Routers.Workdiary;
import java.util.HashMap;
Workdiary workdiary = new Workdiary(client);
HashMap<String, String> params = new HashMap<String, String>();
workdiary.getByContract("12345;78912", "20140704", params);
var Workdiary = require('upwork-api/lib/routers/workdiary.js').Workdiary;
var workdiary = new Workdiary(api);
var params = {};
workdiary.getByContract('12345;78912', '20140704', params, function(error, data) {
console.log(data);
});
my $workdiary = Net::Upwork::API::Routers::Workdiary->new($api);
$workdiary->get_by_contract('12345;78912', '20140704');
import ( workdiaryUpwork "github.com/upwork/golang-upwork/api/routers/workdiary" )
workdiary := workdiaryUpwork.New(client)
params := make(map[string]string)
workdiary.GetByContract("12345;78912", "20140704", params)
EXAMPLE RESPONSE
(
{
'archiving_time': '1404691200',
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Bangkok',
'timezone_offset': '25200',
'uid': 'john_johnson'
},
[
{
'cell_time': '1525362600',
'active_window_title': 'emacs@user-laptop',
'activity': '2',
'allow_edit': 'true',
'billing_status': 'billed.active',
'keyboard_events_count': '142',
'memo': 'New Upwork Public API documentation',
'mouse_events_count': '33',
'screenshot_img': 'https://...',
'screenshot_img_lrg': 'https://...',
'screenshot_img_med': 'https://...',
'screenshot_img_thmb': 'https://...',
'screenshot_url': 'https://...',
'status': 'NORMAL',
...
},
{
# Another entry
},
# ...
]
)
Get Work Diary by Contract
Note
Due to legacy terminology the term “activity” is used with the meaning “Level of activity” and the term “task” with the meaning “activity the freelancer is working on” for this particular endpoint
Returns
DEFINITION
workdiary.get_by_contract(
contract_id, date=None, offset=None)
$workdiary->getByContract( string $contract_id, string $date, string $params = array() );
workdiary.get_by_contract(contract_id, date, params = {})
workdiary.getByContract(
String contract_id,
String date,
java.util.HashMap<String,String> params);
workdiary.getByContract(
contract_id, date,
params, callback);
$workdiary->get_by_contract($contract_id, $date, %params);
workdiary.GetByContract(contract_id, date, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import workdiary
client = upwork.Client(config)
workdiary.Api(client).get_by_contract('12345', '20140704')
$workdiary = new \Upwork\API\Routers\Workdiary($client);
$workdiary->getByContract("12345", "20140704");
workdiary = Net::Upwork::API::Routers::Workdiary.new(client)
workdiary.get_by_contract('12345', '20140704')
import com.Upwork.api.Routers.Workdiary;
import java.util.HashMap;
Workdiary workdiary = new Workdiary(client);
HashMap<String, String> params = new HashMap<String, String>();
workdiary.getByContract("12345", "20140704", params);
var Workdiary = require('upwork-api/lib/routers/workdiary.js').Workdiary;
var workdiary = new Workdiary(api);
var params = {};
workdiary.getByContract('12345', '20140704', params, function(error, data) {
console.log(data);
});
my $workdiary = Net::Upwork::API::Routers::Workdiary->new($api);
$workdiary->get_by_contract('12345', '20140704');
import ( workdiaryUpwork "github.com/upwork/golang-upwork/api/routers/workdiary" )
workdiary := workdiaryUpwork.New(client)
params := make(map[string]string)
workdiary.GetByContract("12345", "20140704", params)
EXAMPLE RESPONSE
(
{
'archiving_time': '1404691200',
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Bangkok',
'timezone_offset': '25200',
'uid': 'john_johnson'
},
[
{
'cell_time': '1525362600',
'active_window_title': 'emacs@user-laptop',
'activity': '2',
'allow_edit': 'true',
'billing_status': 'billed.active',
'keyboard_events_count': '142',
'memo': 'New Upwork Public API documentation',
'mouse_events_count': '33',
'screenshot_img': 'https://...',
'screenshot_img_lrg': 'https://...',
'screenshot_img_med': 'https://...',
'screenshot_img_thmb': 'https://...',
'screenshot_url': 'https://...',
'status': 'NORMAL',
...
},
{
# Another entry
},
# ...
]
)
Get Workdays by Company
Returns
DEFINITION
workdays.get_by_company(
company_id, date=None, offset=None)
$workdays->getByCompany( string $contract_id, string $from_date, string $till_date, string $params = array() );
workdays.get_by_company(company_id, from_date, till_date, params = {})
workdays.getByCompany(
String company_id,
String from_date,
String till_date,
java.util.HashMap<String,String> params);
workdays.getByCompany(
company_id, from_date, till_date,
params, callback);
$workdays->get_by_company($company_id, $from_date, $till_date, %params);
workdays.GetByCompany(company_id, from_date, till_date, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import workdays
client = upwork.Client(config)
workdays.Api(client).get_by_company('testcompany', '20150704', '20150710')
$workdays = new \Upwork\API\Routers\Workdays($client);
$workdays->getByCompany("testcompany", "20150704", "20150710");
workdays = Net::Upwork::API::Routers::Workdays.new(client)
workdays.get_by_company('testcompany', '20150704', '20150710')
import com.Upwork.api.Routers.Workdays;
import java.util.HashMap;
Workdays workdays = new Workdays(client);
HashMap<String, String> params = new HashMap<String, String>();
workdays.getByCompany("testcompany", "20150704", "20150710" params);
var Workdays = require('upwork-api/lib/routers/workdays.js').Workdays;
var workdays = new Workdays(api);
var params = {};
workdays.getByCompany('testcompany', '20150704', '20150710', params, function(error, data) {
console.log(data);
});
my $workdays = Net::Upwork::API::Routers::Workdays->new($api);
$workdays->get_by_company('testcompany', '20150704', '20150710');
import ( workdaysUpwork "github.com/upwork/golang-upwork/api/routers/workdays" )
workdays := workdaysUpwork.New(client)
params := make(map[string]string)
workdays.GetByCompany("testcompany", "20150704", "20150710" params)
EXAMPLE RESPONSE
(
'workdays': {
'20180416',
'20180504'
}
)
Get Workdays by Contract
Returns
DEFINITION
workdays.get_by_contract(
contract_id, date=None, offset=None)
$workdays->getByContract( string $contract_id, string $from_date, string $till_date, string $params = array() );
workdays.get_by_contract(contract_id, from_date, till_date, params = {})
workdays.getByContract(
String contract_id,
String from_date,
String till_date,
java.util.HashMap<String,String> params);
workdays.getByContract(
contract_id, from_date, till_date,
params, callback);
$workdays->get_by_contract($contract_id, $from_date, $till_date, %params);
workdays.GetByContract(contract_id, from_date, till_date, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import workdays
client = upwork.Client(config)
workdays.Api(client).get_by_contract('12345', '20150704', '20150710')
$workdays = new \Upwork\API\Routers\Workdays($client);
$workdays->getByContract("12345", "20150704", "20150710");
workdays = Net::Upwork::API::Routers::Workdays.new(client)
workdays.get_by_contract('12345', '20150704', '20150710')
import com.Upwork.api.Routers.Workdays;
import java.util.HashMap;
Workdays workdays = new Workdays(client);
HashMap<String, String> params = new HashMap<String, String>();
workdays.getByContract("12345", "20150704", "20150710" params);
var Workdays = require('upwork-api/lib/routers/workdays.js').Workdays;
var workdays = new Workdays(api);
var params = {};
workdays.getByContract('12345', '20150704', '20150710', params, function(error, data) {
console.log(data);
});
my $workdays = Net::Upwork::API::Routers::Workdays->new($api);
$workdays->get_by_contract('12345', '20150704', '20150710');
import ( workdaysUpwork "github.com/upwork/golang-upwork/api/routers/workdays" )
workdays := workdaysUpwork.New(client)
params := make(map[string]string)
workdays.GetByContract("12345", "20150704", "20150710" params)
EXAMPLE RESPONSE
(
'workdays': {
'20180416',
'20180504'
}
)
Contracts and offers
This section describes resources that allow you to manage contracts and offers. For example, you can send offers, create and close contracts and manage existing contracts.
List client offers
Returns
See “Possible output fields” section.
DEFINITION
offers.get_list(params)
$offers->getList( array $params );
offers.get_list(params)
offers.getList(
java.util.HashMap<String,String> params);
offers.getList(params, callback);
$offers.get_list(%params);
offers.GetList(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr.clients import offers
client = upwork.Client(config)
offers.Api(client).get_list('12345')
$offers = new \Upwork\API\Routers\Hr\Clients\Offers($client);
$params = array("company_id" => "12345");
$offers->getList($params);
offers = Net::Upwork::API::Routers::Hr::Clients::Offers.new(client)
params = {'company_id' => '12345'}
offers.get_list(params)
import com.Upwork.api.Routers.Hr.Clients.Offers;
import java.util.HashMap;
Offers offers = new Offers(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("company_id", "12345");
offers.getList(params);
var Offers = require('upwork-api/lib/routers/hr/clients/offers.js').Offers;
var offers = new Offers(api);
var params = {'company_id': '12345'};
offers.getList(params, function(error, data) {
console.log(data);
});
my $offers = Net::Upwork::API::Routers::Hr::Clients::Offers->new($api);
my %params = {company_id => '12345'};
$offers->get_list(%params);
import ( offersUpwork "github.com/upwork/golang-upwork/api/routers/hr/clients/offers" )
offers := offersUpwork.New(client)
params := make(map[string]string)
params["company_id"] = "12345"
offers.GetList(params)
EXAMPLE RESPONSE
{'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'offers': {
'lister': {'paging': {'count': '20', 'offset': '0'},
'query': '',
'sort': '',
'total_items': ''},
'offer': [
{
'client_org_ref': '55102',
'client_user_ref': '106975',
'contractor_org_ref': '',
'contractor_user_ref': '3',
'is_visible_to_contractor': '',
'job_posting_ref': '',
'last_event_state': 'new',
'rid': '70727',
'terms_data': {
'charge_rate': '21.0',
'charge_weekly_stipend_amount': '',
'manual_time_allowed': '',
'start_date': '1405036800000',
'type': 'hourly',
'weekly_limit': ''
},
'title': 'Test offers API',
'type': 'hourly'
},
{
# Another offer object
},
# ..
]
},
'server_time': '1405046576'}
Get client offer
Returns
See “Possible output fields” section.
DEFINITION
offers.get_specific(reference, params)
$offers->getSpecific( integer $reference, array $params = array() );
offers.get_specific(reference, params)
offers.getSpecific(
String reference,
java.util.HashMap<String,String> params);
offers.getSpecific(reference, params, callback);
$offers->get_specific($reference, %params);
offers.GetSpecific(reference, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr.clients import offers
client = upwork.Client(config)
offers.Api(client).get_specific(12345, '~012345abcdef')
$offers = new \Upwork\API\Routers\Hr\Clients\Offers($client);
$params = array("job__reference" => "~012345abcdef");
$offers->getSpecific(12345, $params);
offers = Net::Upwork::API::Routers::Hr::Clients::Offers.new(client)
params = {'job__reference' => '~012345abcdef'}
offers.get_specific(12345, params)
import com.Upwork.api.Routers.Hr.Clients.Offers;
import java.util.HashMap;
Offers offers = new Offers(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("job__reference", "~012345abcdef");
offers.getSpecific("12345", params);
var offers = require('upwork-api/lib/routers/hr/clients/offers.js').Offers;
var Offers = new Offers(api);
var reference = '12345';
var params = {'job__reference': '~012345abcdef'};
offers.getSpecific(reference, params, function(error, data) {
console.log(data);
});
my $offers = Net::Upwork::API::Routers::Hr::Clients::Offers->new($api);
my %params = {job__reference => '~012345abcdef'};
$offers->get_specific(12345, %params);
import ( offersUpwork "github.com/upwork/golang-upwork/api/routers/hr/clients/offers" )
offers := offersUpwork.New(client)
params := make(map[string]string)
params["job__reference"] = "~012345abcdef"
offers.GetSpecific("12345", params)
EXAMPLE RESPONSE
{
'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'offer': {
'client_org_ref': '12345',
'client_user_ref': '102345',
'contractor_org_ref': '',
'contractor_user_ref': '102345',
'is_visible_to_contractor': '',
'job_posting_ref': '',
'last_event_state': 'new',
'rid': '77777',
'terms_data': {
'charge_rate': '20.0',
'charge_weekly_stipend_amount': '',
'start_date': '1404777600000',
'type': 'hourly',
'weekly_limit': ''
},
'title': 'Test offers API send offer',
'type': 'hourly'
},
'server_time': '1404906002'
}
Send client offer
Returns
If the request is successful, a 200 OK message is returned together with the offer ID.
DEFINITION
offers.make_offer(params)
$offers->makeOffer( array $params );
offers.make_offer(params)
offers.makeOffer(
java.util.HashMap<String,String> params);
offers.makeOffer(params, callback);
$offers->make_offer(%params);
offers.MakeOffer(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr.clients import offers
client = upwork.Client(config)
params[milestones] = [
{"milestone_description":"description 1", "deposit_amount":"101", "due_date":"03-15-2015"},
{"milestone_description":"description 2", "deposit_amount":"102", "due_date":"03-18-2015"}
]
params[context] = {'related_jobcategory2': '531770282589057025'}
offers.Api(client).make_offer(params)
$offers = new \Upwork\API\Routers\Hr\Clients\Offers($client);
$params = array(
"title" => "Test offers API send offer 02",
"job_type" => "hourly",
"charge_rate" => "20.0",
"message_to_contractor" => "Please accept this test job",
"team__reference" => "12345",
"contractor_username" => "john_freelancer"
);
$offers->makeOffer($params);
offers = Net::Upwork::API::Routers::Hr::Clients::Offers.new(client)
params = {
'title' => 'Test offers API send offer 02',
'job_type' => 'hourly',
'charge_rate' => '20.0',
'message_to_contractor' => 'Please accept this test job',
'team__reference' => '12345',
'contractor_username' => 'john_freelancer'
}
offers.make_offer(params)
import com.Upwork.api.Routers.Hr.Clients.Offers;
import java.util.HashMap;
Offers offers = new Offers(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("title", "Test offers API send offer 02");
params.put("job_type", "hourly");
params.put("charge_rate", "20.0");
params.put("message_to_contractor", "Please accept this test job");
params.put("team__reference", "12345");
params.put("contractor_username", "john_freelancer");
offers.makeOffer(params);
var Offers = require('upwork-api/lib/routers/hr/clients/offers.js').Offers;
var offers = new Offers(api);
var params = {
'title': 'Test offers API send offer 02',
'job_type': 'hourly',
'charge_rate': '20.0',
'message_to_contractor': 'Please accept this test job',
'team__reference': '12345',
'contractor_username': 'john_freelancer'
};
offers.makeOffer(params, function(error, data) {
console.log(data);
});
my $offers = Net::Upwork::API::Routers::Hr::Clients::Offers->new($api);
my %params = {
'title' => 'Test offers API send offer 02',
'job_type' => 'hourly',
'charge_rate' => '20.0',
'message_to_contractor' => 'Please accept this test job',
'team__reference' => '12345',
'contractor_username' => 'john_freelancer'
};
$offers->make_offer(%params);
import ( offersUpwork "github.com/upwork/golang-upwork/api/routers/hr/clients/offers" )
offers := offersUpwork.New(client)
params := make(map[string]string)
params["title"] = "Test offers API send offer 02"
params["job_type"] = "hourly"
params["charge_rate"] = "20.0"
params["message_to_contractor"] = "Please accept this test job"
params["team__reference"] = "12345"
params["contractor_username"] = "john_freelancer"
offers.MakeOffer(params)
EXAMPLE RESPONSE
{
'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'offer_id': '12345',
'server_time': 1404844979
}
List freelancer’s offers
Returns
See “Possible output fields” section.
DEFINITION
offers.get_list(params)
$offers->getList( array $params );
offers.get_list(params = {})
offers.getList(
java.util.HashMap<String,String> params);
offers.getList(params, callback);
$offers->get_list(%params);
offers.GetList(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr.freelancers import offers
client = upwork.Client(config)
offers.Api(client).get_list()
$offers = new \Upwork\API\Routers\Hr\Freelancers\Offers($client);
$params = array("status" => "new");
$offers->getList($params);
offers = Net::Upwork::API::Routers::Hr::Freelancers::Offers.new(client)
params = {'status' => 'new'}
offers.get_list(params)
import com.Upwork.api.Routers.Hr.Freelancers.Offers;
import java.util.HashMap;
Offers offers = new Offers(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("status", "new");
offers.getList(params);
var Offers = require('upwork-api/lib/routers/hr/freelancers/offers.js').Offers;
var offers = new Offers(api);
var params = {'status': 'new'};
offers.getList(params, function(error, data) {
console.log(data);
});
my $offers = Net::Upwork::API::Routers::Hr::Freelancers::Offers->new($api);
my %params = {'status' => 'new'};
$offers->get_list(%params);
import ( offersUpwork "github.com/upwork/golang-upwork/api/routers/hr/freelancers/offers" )
offers := offersUpwork.New(client)
params := make(map[string]string)
params["status"] = "new"
offers.GetList(params)
EXAMPLE RESPONSE
{
'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'offers': {
'lister': {'paging': {'count': '20', 'offset': '0'},
'query': '',
'sort': '',
'total_items': ''},
'offer': [
{
'client_org_ref': '55102',
'client_user_ref': '106975',
'contractor_org_ref': '',
'contractor_user_ref': '106976',
'is_visible_to_contractor': '',
'job_posting_ref': '',
'last_event_state': 'new',
'rid': '70449',
'terms_data': {
'charge_rate': '20.0',
'charge_weekly_stipend_amount': '',
'manual_time_allowed': '',
'start_date': '1404777600000',
'type': 'hourly',
'weekly_limit': ''
},
'title': 'Test offers API send offer',
'type': 'hourly'
},
{
# Another offer object
},
# ...
]
},
'server_time': '1405092898'
}
Get freelancer’s offer
Returns
See “Possible output fields” section.
DEFINITION
offers.get_specific(reference)
$offers->getSpecific( integer $reference );
offers.get_specific(reference)
offers.getSpecific(String reference);
offers.getSpecific(reference, callback);
$offers->get_specific($reference);
offers.GetSpecific(reference)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr.freelancers import offers
client = upwork.Client(config)
offers.Api(client).get_specific('12345')
$offers = new \Upwork\API\Routers\Hr\Freelancers\Offers($client);
$offers->getSpecific(12345);
offers = Net::Upwork::API::Routers::Hr::Freelancers::Offers.new(client)
offers.get_specific(12345)
import com.Upwork.api.Routers.Hr.Freelancers.Offers;
import java.util.HashMap;
Offers offers = new Offers(client);
offers.getSpecific("12345");
var Offers = require('upwork-api/lib/routers/hr/freelancers/offers.js').Offers;
var offers = new Offers(api);
var reference = '12345';
offers.getSpecific(reference, function(error, data) {
console.log(data);
});
my $offers = Net::Upwork::API::Routers::Hr::Freelancers::Offers->new($api);
$offers->get_specific(12345);
import ( offersUpwork "github.com/upwork/golang-upwork/api/routers/hr/freelancers/offers" )
offers := offersUpwork.New(client)
offers.GetSpecific("12345")
EXAMPLE RESPONSE
{'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'offer': {
'client_org_ref': '55102',
'client_user_ref': '106975',
'contractor_org_ref': '',
'contractor_user_ref': '106976',
'is_visible_to_contractor': '',
'job_posting_ref': '',
'last_event_state': 'new',
'rid': '12345',
'terms_data': {
'charge_rate': '20.0',
'charge_weekly_stipend_amount': '',
'manual_time_allowed': '',
'related_jobcategory2': '',
'start_date': '1404777600000',
'type': 'hourly',
'version': 'v1',
'weekly_limit': ''
},
'title': 'Test offers API resource sends an offer',
'type': 'hourly'
},
'server_time': '1405101130'}
Accept or decline an offer
Returns
This resource returns the following response message:
- message
- Result message.
DEFINITION
offers.actions(params)
$offers->actions( array $params );
offers.actions(params = {})
offers.actions(
java.util.HashMap<String,String> params);
offers.actions(params, callback);
$offers->actions(%params);
offers.Actions(params)
EXAMPLE REQUEST
import upwork
client = upwork.Client(config)
offers.Api(client).actions('12345', {'name' => 'accept'})
$offers = new \Upwork\API\Routers\Hr\Freelancers\Offers($client);
$params = array("name" => "accept");
$offerId = "12345";
$offers->actions($offerId, $params);
offers = Net::Upwork::API::Routers::Hr::Freelancers::Offers.new(client)
offer_id = '12345'
params = {'name' => 'accept'}
offers.actions(offer_id, params)
import com.Upwork.api.Routers.Hr.Freelancers.Offers;
import java.util.HashMap;
Offers offers = new Offers(client);
String offerId = "12345";
HashMap<String, String> params = new HashMap<String, String>();
params.put("name", "accept");
offers.actions(offerId, params);
var Offers = require('upwork-api/lib/routers/hr/freelancers/offers.js').Offers;
var offers = new Offers(api);
var offerId = '12345';
var params = {'name': 'accept'};
offers.actions(offerId, params, function(error, data) {
console.log(data);
});
my $offers = Net::Upwork::API::Routers::Hr::Freelancers::Offers->new($api);
my $offer_id = '12345';
%params = {'name' => 'accept'};
$offers->actions($offer_id, %params);
import ( offersUpwork "github.com/upwork/golang-upwork/api/routers/hr/freelancers/offers" )
offers := offersUpwork.New(client)
offerId = "12345";
params := make(map[string]string)
params["name"] = "accept"
offers.Actions(offerId, params)
EXAMPLE RESPONSE
{
'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'message': 'Offer 12345 accepted',
'server_time': '1405092898'
}
List job applications as client
Returns
See “Possible output fields” section.
DEFINITION
applications.get_list(params)
$applications->getList( array $params );
applications.get_list(params)
applications.getList(
java.util.HashMap<String,String> params);
applications.getList(params, callback);
$applications->get_list(%params);
applications.GetList(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr.clients import applications
client = upwork.Client(config)
applications.Api(client).get_list(12345, '~12345abcdef')
$applications = new \Upwork\API\Routers\Hr\Clients\Applications($client);
$params = array(
"buyer_team__reference" => 12345,
"job_key" => "~12345abcdef"
);
$applications->getList($params);
applications = Net::Upwork::API::Routers::Hr::Clients::Applications.new(client)
params = {
'buyer_team__reference' => 12345,
'job_key' => '~12345abcdef'
}
applications.get_list(params)
import com.Upwork.api.Routers.Hr.Clients.Applications;
import java.util.HashMap;
Applications applications = new Applications(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("buyer_team__reference", 12345);
params.put("job_key", "~12345abcdef");
applications.getList(params);
var Applications = require('upwork-api/lib/routers/hr/clients/applications.js').Applications;
var applications = new Applications(api);
var params = {
'buyer_team__reference': 12345,
'job_key': '~12345abcdef'
};
applications.getList(params, function(error, data) {
console.log(data);
});
my $applications = Net::Upwork::API::Routers::Hr::Clients::Applications->new($api);
my %params = {
'buyer_team__reference' => 12345,
'job_key' => '~12345abcdef'
};
$applications->get_list(%params);
import ( applicationsUpwork "github.com/upwork/golang-upwork/api/routers/hr/clients/applications" )
applications := applicationsUpwork.New(client)
params := make(map[string]string)
params.Put("buyer_team__reference", 12345)
params["job_key"] = "~12345abcdef"
applications.GetList(params)
EXAMPLE RESPONSE
{
'applications': [
{
'contractor_ciphertext': '~012345abcdef',
'contractor_name': 'John Johnson',
'contractor_portrait_url': 'https://...',
'contractor_ref': '675604',
'contractor_title': 'Software developer - test WEBAPI oAuth',
'cover_letter': '',
'created_type': 'Client',
'ctime_epoch': '1404794618',
'engagement_duration_ref': '2',
'feedback_score': '0',
'fp_amount_agreed': '',
'fp_pay_amount': '0',
'fp_upfront_payment': '0',
'hr_charge_rate': '22.22',
'hr_pay_rate': '20',
'interview_status': 'Waiting For Provider',
'invite_letter': 'Test invite to interview via oAuth',
'is_auto_hidden': 'f',
'is_hidden_by_buyer': '0',
'is_hidden_by_provider': '0',
'is_seen_by_buyer': 't',
'is_shortlisted': '0',
'is_undecided': '1',
'job__description': 'Create job via oAuth api',
'job_pref_matches': {'prefs_match': '0', 'prefs_total': '0'},
'job_type': 'Hourly',
'offer_status': '',
'opening_ciphertext': '~012345abcdef',
'rid': '12345',
'status': 'In Process',
'team_nid': 'unazcm8kj7ytdrwwgc-pkq',
'total_hours': '0',
'ui_opening_title': 'Test oAuth API create job'
}
],
'auth_user': {'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'},
'lister': {'paging': {'count': '10', 'offset': '0'},
'query': '',
'sort': '',
'total-count': '1',
'total_items': ''},
'server_time': '1405339447'
}
Get job application as client
Returns
See “Possible output fields” section.
DEFINITION
applications.get_specific(reference, params)
$applications->getSpecific( integer $reference, array $params );
applications.get_specific(reference, params)
applications.getSpecific(
String reference,
java.util.HashMap<String,String> params);
applications.getSpecific(reference, params);
$applications->get_specific($reference, %params);
applications.GetSpecific(reference, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr.clients import applications
client = upwork.Client(config)
applications.Api(client).get_specific(12345)
$applications = new \Upwork\API\Routers\Hr\Clients\Applications($client);
$params = array("buyer_team__reference" => 67890);
$applications->getSpecific(12345, $params);
applications = Net::Upwork::API::Routers::Hr::Clients::Applications.new(client)
params = {'buyer_team__reference' => 67890}
applications.get_specific(12345, params)
import com.Upwork.api.Routers.Hr.Clients.Applications;
import java.util.HashMap;
Applications applications = new Applications(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("buyer_team__reference", "67890");
applications.getSpecific("12345", params);
var Applications = require('upwork-api/lib/routers/hr/clients/applications.js').Applications;
var applications = new Applications(api);
var params = {'buyer_team__reference': 67890};
applications.getSpecific('12345', params, function(error, data) {
console.log(data);
});
my $applications = Net::Upwork::API::Routers::Hr::Clients::Applications->new($api);
my %params = {'buyer_team__reference' => 67890};
$applications->get_specific(12345, %params);
import ( applicationsUpwork "github.com/upwork/golang-upwork/api/routers/hr/clients/applications" )
applications := applicationsUpwork.New(client)
params := make(map[string]string)
params["buyer_team__reference"] = "67890"
applications.GetSpecific("12345", params)
EXAMPLE RESPONSE
{
'application': {
'contractor_ciphertext': '~012345abcdef',
'contractor_name': 'John Johnson',
'contractor_portrait_url': 'https://...',
'contractor_ref': '675604',
'contractor_title': 'Software developer - test WEBAPI oAuth',
'cover_letter': '',
'created_type': 'Client',
'ctime_epoch': '1404794618',
'engagement_duration_ref': '2',
'feedback_score': '0',
'fp_amount_agreed': '',
'fp_pay_amount': '0',
'fp_upfront_payment': '0',
'hr_charge_rate': '22.22',
'hr_pay_rate': '20',
'interview_status': 'Waiting For Provider',
'invite_letter': 'Test invite to interview via oAuth',
'is_auto_hidden': 'f',
'is_hidden_by_buyer': '0',
'is_hidden_by_provider': '0',
'is_seen_by_buyer': 't',
'is_shortlisted': '0',
'is_undecided': '1',
'job__description': 'Create job via oAuth api',
'job_pref_matches': {'prefs_match': '0', 'prefs_total': '0'},
'job_type': 'Hourly',
'offer_status': '',
'opening_ciphertext': '~00012345abcde',
'rid': '12345',
'status': 'In Process',
'team_nid': 'unazcm8kj7ytdrwwgc-pkq',
'total_hours': '0',
'ui_opening_title': 'Test oAuth API create job'
},
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'server_time': '1405392072'
}
List job applications as freelancer
Returns
See “Possible output fields” section.
DEFINITION
applications.get_list(params)
$applications->getList( array $params );
applications.get_list(params = {})
applications.getList(
java.util.HashMap<String,String> params);
applications.getList(params, callback);
$applications->get_list(%params);
applications.GetList(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr.freelancers import applications
client = upwork.Client(config)
applications.Api(clients).get_list()
$applications = new \Upwork\API\Routers\Hr\Freelancers\Applications($client);
$applications->getList();
applications = Net::Upwork::API::Routers::Hr::Freelancers::Applications.new(client)
applications.get_list()
import com.Upwork.api.Routers.Hr.Freelancers.Applications;
import java.util.HashMap;
Applications applications = new Applications(client);
HashMap<String, String> params = new HashMap<String, String>();
applications.getList(params);
var Applications = require('upwork-api/lib/routers/hr/freelancers/applications.js').Applications;
var applications = new Applications(api);
var params = {};
applications.getList(params, function(error, data) {
console.log(data);
});
my $applications = Net::Upwork::API::Routers::Hr::Freelancers::Applications->new($api);
$applications->get_list();
import ( applicationsUpwork "github.com/upwork/golang-upwork/api/routers/hr/freelancers/applications" )
applications := applicationsUpwork.New(client)
params := make(map[string]string)
applications.GetList(params)
EXAMPLE RESPONSE
{
'applications': [
{
'contractor_ciphertext': '~012345abcdef',
'ctime_epoch': '1404794618',
'interview_status': 'Waiting For Provider',
'opening_ciphertext': '~012345abcdef',
'opening_title': 'Test oAuth API create job',
'rid': '12345',
'status': 'In Process'
}
],
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'server_time': '1405399432'
}
Get job application as freelancer
Returns
See “Possible output fields” section.
DEFINITION
applications.get_specific(application_id)
$applications->getSpecific( integer $reference );
applications.get_specific(reference)
applications.getSpecific(String reference);
applications.getSpecific(reference, callback);
$applications->get_specific($reference);
applications.GetSpecific(reference)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr.freelancers import applications
client = upwork.Client(config)
applications.Api(client).get_specific(12345)
$applications = new \Upwork\API\Routers\Hr\Freelancers\Applications($client);
$applications->getSpecific(12345);
applications = Net::Upwork::API::Routers::Hr::Freelancers::Applications.new(client)
applications.get_specific(12345)
import com.Upwork.api.Routers.Hr.Freelancers.Applications;
Applications applications = new Applications(client);
applications.getSpecific("12345");
var Applications = require('upwork-api/lib/routers/hr/freelancers/applications.js').Applications;
var applications = new Applications(api);
applications.getSpecific('12345', function(error, data) {
console.log(data);
});
my $applications = Net::Upwork::API::Routers::Hr::Freelancers::Applications->new($api);
$applications->get_specific(12345);
import ( applicationsUpwork "github.com/upwork/golang-upwork/api/routers/hr/freelancers/applications" )
applications := applicationsUpwork.New(client)
applications.GetSpecific("12345")
EXAMPLE RESPONSE
{
'application': {
'contractor_ciphertext': '~012345abcdef',
'contractor_name': 'John Johnson',
'contractor_portrait_url': 'https://...',
'contractor_ref': '675604',
'contractor_title': 'Software developer - test WEBAPI oAuth',
'cover_letter': '',
'created_type': 'Client',
'ctime_epoch': '1404794618',
'engagement_duration_ref': '2',
'feedback_score': '0',
'fp_amount_agreed': '',
'fp_pay_amount': '0',
'fp_upfront_payment': '0',
'hr_charge_rate': '22.22',
'hr_pay_rate': '20',
'interview_status': 'Waiting For Provider',
'invite_letter': 'Test invite to interview via oAuth',
'is_auto_hidden': 'f',
'is_hidden_by_buyer': '0',
'is_hidden_by_provider': '0',
'is_seen_by_buyer': 't',
'is_shortlisted': '0',
'is_undecided': '1',
'job__description': 'Create job via oAuth api',
'job_pref_matches': {'prefs_match': '0', 'prefs_total': '0'},
'job_type': 'Hourly',
'offer_status': '',
'opening_ciphertext': '~012345abcdef',
'rid': '12345',
'status': 'In Process',
'team_nid': 'unazcm8kj7ytdrwwgc-pkq',
'total_hours': '0',
'ui_opening_title': 'Test oAuth API create job'
},
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'server_time': '1405399734'
}
List engagements
Returns
See “Possible output fields” section.
DEFINITION
engagements.get_list(params)
$engagements->getList( array $params );
engagements.get_list(params)
engagements.getList(
java.util.HashMap<String,String> params);
engagements.getList(params, callback);
$engagements->get_list(%params);
engagements.GetList(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import engagements
client = upwork.Client(config)
engagements.Api(client).get_list()
$engagements = new \Upwork\API\Routers\Hr\Engagements($client);
$engagements->getList();
engagements = Net::Upwork::API::Routers::Hr::Engagements.new(client)
engagements.get_list({})
import com.Upwork.api.Routers.Hr.Engagements;
import java.util.HashMap;
Engagements engagements = new Engagements(client);
HashMap<String, String> params = new HashMap<String, String>();
engagements.getList(params);
var Engagements = require('upwork-api/lib/routers/hr/engagements.js').Engagements;
var engagements = new Engagements(api);
var params = {};
engagements.getList(params, function(error, data) {
console.log(data);
});
my $engagements = Net::Upwork::API::Routers::Hr::Engagements->new($api);
$engagements->get_list({});
import ( engagementsUpwork "github.com/upwork/golang-upwork/api/routers/hr/engagements" )
engagements := engagementsUpwork.New(client)
params := make(map[string]string)
engagements.GetList(params)
EXAMPLE RESPONSE
{
'engagement': {
"engagement_start_date":"1516147200000",
"job_ref_ciphertext":"~01e55e24e...",
"status":"closed",
"provider__reference":"12345",
"engagement_job_type":"fixed-price",
"offer_id":"12345",
"job__title":"Embedded login page with Python",
"cj_job_application_uid":"123456789012345678",
"provider_team__id":"",
"fixed_charge_amount_agreed":"150",
"job_application_ref":"",
"dev_recno_ciphertext":"~0192ebf.......",
"reference":"12345",
"active_milestone":"",
"engagement_end_ts":"1516215373000",
"provider__id":"providerid",
"engagement_title":"Embedded login page with Python",
"created_time":"1516172330000",
"engagement_end_date":"1516147200000",
"provider_team__reference":"",
"engagement_start_ts":"1516172329000",
"buyer_team__reference":"2345",
"buyer_team__id":"xsdf-6sdfsyuia...",
"fixed_price_upfront_payment":"",
"portrait_url":"https:\/\/url.com\/Users:auser:PortraitUrl_original?AWSAccessKeyId=AK7&Signature=8k%3D",
"feedback":{
"feedback_for_provider":{
"score":"4.5 - 5.0 Stars"
},
"feedback_for_buyer":{
"score":"4.5 - 5.0 Stars"
}
}
},
'lister': {
'paging': {'count': '20', 'offset': '0'},
'query': '',
'sort': {'sort': {'sort': ['created_time', 'asc']}},
'total_count': '1',
'total_items': '2'
}
}
Get engagement
Returns
Returns information about the specified engagement.
DEFINITION
engagements.get_specific(reference)
$engagements->getSpecific( integer $reference );
engagements.get_specific(reference)
engagements.getSpecific(String reference);
engagements.getSpecific(reference, callback);
$engagements->get_specific($reference);
engagements.GetSpecific(reference)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import engagements
client = upwork.Client(config)
engagements.Api(client).get_specific(12345)
$engagements = new \Upwork\API\Routers\Hr\Engagements($client);
$engagements->getSpecific(12345);
engagements = desk::Api::Routers::Hr::Engagements.new(client)
engagements.get_specific(12345)
import com.Upwork.api.Routers.Hr.Engagements;
Engagements engagements = new Engagements(client);
engagements.getSpecific("12345");
var Engagements = require('upwork-api/lib/routers/hr/engagements.js').Engagements;
var engagements = new Engagements(api);
engagements.getSpecific('12345', function(error, data) {
console.log(data);
});
my $engagements = desk::Api::Routers::Hr::Engagements->new($api);
$engagements->get_specific(12345);
import ( engagementsUpwork "github.com/upwork/golang-upwork/api/routers/hr/engagements" )
engagements := engagementsUpwork.New(client)
engagements.GetSpecific("12345")
EXAMPLE RESPONSE
{
"engagement_start_date":"1516147200000",
"job_ref_ciphertext":"~01e55e24e...",
"status":"closed",
"provider__reference":"12345",
"engagement_job_type":"fixed-price",
"offer_id":"12345",
"job__title":"Embedded login page with Python",
"cj_job_application_uid":"123456789012345678",
"provider_team__id":"",
"fixed_charge_amount_agreed":"150",
"job_application_ref":"",
"dev_recno_ciphertext":"~0192ebf.......",
"reference":"12345",
"active_milestone":"",
"engagement_end_ts":"1516215373000",
"provider__id":"providerid",
"engagement_title":"Embedded login page with Python",
"created_time":"1516172330000",
"engagement_end_date":"1516147200000",
"provider_team__reference":"",
"engagement_start_ts":"1516172329000",
"buyer_team__reference":"2345",
"buyer_team__id":"xsdf-6sdfsyuia...",
"fixed_price_upfront_payment":"",
"portrait_url":"https:\/\/url.com\/Users:auser:PortraitUrl_original?AWSAccessKeyId=AK7&Signature=8k%3D",
"feedback":{
"feedback_for_provider":{
"score":"4.5 - 5.0 Stars"
},
"feedback_for_buyer":{
"score":"4.5 - 5.0 Stars"
}
}
}
Suspend contract
Returns
If successful, this resource returns a 200 OK message.
DEFINITION
contracts.suspend_contract(
contract_reference, params)
$contracts->suspendContract(
integer $reference, array $params );
contracts.suspend_contract(reference, params)
contracts.suspendContract(
String reference,
java.util.HashMap<String,String> params);
contracts.suspendContract(reference, params, callback);
$contracts->suspend_contract($reference, %params);
contracts.SuspendContract(reference, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import contracts
client = upwork.Client(config)
contracts.Api(client).suspend_contract(
12345, {'message': 'Suspended the contract'})
$contracts = new \Upwork\API\Routers\Hr\Contracts($client);
$params = array(
"message" => "Suspended the contract"
);
$contracts->suspendContract(12345, $params);
contracts = Net::Upwork::API::Routers::Hr::Contracts.new(client)
params = {
'message' => 'Suspended the contract'
}
contracts.suspend_contract(12345, params)
import com.Upwork.api.Routers.Hr.Contracts;
import java.util.HashMap;
Contracts contracts = new Contracts(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("message", "Suspended the contract");
contracts.suspendContract("12345", params);
var Contracts = require('upwork-api/lib/routers/hr/contracts.js').Contracts;
var contracts = new Contracts(api);
var reference = '12345';
var params = {'message': 'Suspended the contract'};
contracts.suspendContract(reference, params, function(error, data) {
console.log(data);
});
my $contracts = Net::Upwork::API::Routers::Hr::Contracts->new($api);
my %params = {
'message' => 'Suspended the contract'
};
$contracts->suspend_contract(12345, %params);
import ( contractsUpwork "github.com/upwork/golang-upwork/api/routers/hr/contracts" )
contracts := contractsUpwork.New(client)
params := make(map[string]string)
params["message"] = "Suspended the contract"
contracts.SuspendContract("12345", params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'OK',
'server_time': 1405516669
}
Restart contract
Returns
If successful, this resource returns a 200 OK message.
DEFINITION
contracts.restart_contract(
contract_reference, params)
$contracts->restartContract(
integer $reference, array $params );
contracts.restart_contract(reference, params)
contracts.restartContract(
String reference,
java.util.HashMap<String,String> params);
contracts.restartContract(reference, params, callback);
$contracts->restart_contract($reference, %params);
contracts.RestartContract(reference, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import contracts
client = upwork.Client(config)
contracts.Api(client).restart_contract(
12345, {'message':'Restarting the contract'})
$contracts = new \Upwork\API\Routers\Hr\Contracts($client);
$params = array(
"message" => "Restarting the contract"
);
$contracts->restartContract(12345, $params);
contracts = Net::Upwork::API::Routers::Hr::Contracts.new(client)
params = {
'message' => 'Restarting the contract'
}
contracts.restart_contract(12345, params)
import com.Upwork.api.Routers.Hr.Contracts;
import java.util.HashMap;
Contracts contracts = new Contracts(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("message", "Restarting the contract");
contracts.restartContract("12345", params);
var Contracts = require('upwork-api/lib/routers/hr/contracts.js').Contracts;
var contracts = new Contracts(api);
var reference = '12345';
var params = {'message': 'Restarting the contract'};
contracts.restartContract(reference, params, function(error, data) {
console.log(data);
});
my $contracts = Net::Upwork::API::Routers::Hr::Contracts->new($api);
my %params = {
'message' => 'Restarting the contract'
};
$contracts->restart_contract(12345, %params);
import ( contractsUpwork "github.com/upwork/golang-upwork/api/routers/hr/contracts" )
contracts := contractsUpwork.New(client)
params := make(map[string]string)
params["message"] = "Restarting the contract"
contracts.RestartContract("12345", params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'OK',
'server_time': 1405516669
}
End contract
Warning
Currently, Upwork website does not show scores sent in the fb_scores field. We strongly suggest you to use Upwork user interface to provide scores. Also, the fb_scores can be applied only to hourly jobs which have billed hours.
Returns
If successful, this resource returns a 200 OK message.
DEFINITION
contracts.end_contract(reference, params)
$contracts->endContract( integer $reference, array $params );
contracts.end_contract(reference, params)
contracts.endContract(
String reference,
java.util.HashMap<String,String> params);
contracts.endContract(reference, params, callback);
$contracts->end_contract($reference, %params);
contracts.EndContract(reference, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import contracts
client = upwork.Client(config)
contracts.Api(client).end_contract(
12345, {'reason':'API_REAS_WORK_NOT_NEEDED'})
$contracts = new \Upwork\API\Routers\Hr\Contracts($client);
$params = array(
"reason" => "API_REAS_WORK_NOT_NEEDED"
);
$contracts->endContract(12345, $params);
contracts = Net::Upwork::API::Routers::Hr::Contracts.new(client)
params = {
'reason' => 'API_REAS_WORK_NOT_NEEDED'
}
contracts.end_contract(12345, params)
import com.Upwork.api.Routers.Hr.Contracts;
import java.util.HashMap;
Contracts contracts = new Contracts(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("reason", "API_REAS_WORK_NOT_NEEDED");
contracts.endContract("12345", params);
var Contracts = require('upwork-api/lib/routers/hr/contracts.js').Contracts;
var contracts = new Contracts(api);
var reference = '12345';
var params = {'reason': 'API_REAS_WORK_NOT_NEEDED'};
contracts.endContract(reference, params, function(error, data) {
console.log(data);
});
my $contracts = Net::Upwork::API::Routers::Hr::Contracts->new($api);
my %params = {
'reason' => 'API_REAS_WORK_NOT_NEEDED'
};
$contracts->end_contract(12345, %params);
import ( contractsUpwork "github.com/upwork/golang-upwork/api/routers/hr/contracts" )
contracts := contractsUpwork.New(client)
params := make(map[string]string)
params["reason"] = "API_REAS_WORK_NOT_NEEDED"
contracts.EndContract("12345", params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'OK',
'server_time': 1405516669
}
Milestones
Fixed-priced jobs allow splitting the contract into milestones (significant points in the process of the work to be done). Then, clients are charged when a milestone is created, the money is placed into “escrow”, and released when the milestone is completed.
As a client, once you’ve hired a freelancer on a fixed-price contract, you can start adding milestones. Milestones are created in a “not funded” status. You can activate one milestone at a time. Also note, that only milestones with a “not funded” status can be edited or deleted. Once the milestone is active it can only be closed by approving it or ending the contract, which cancels it.
As a freelancer you can submit work to a milestone. This work submission can be either approved or rejected by a client. If the submission is approved, the milestone proceeds to a “paid” status and funds in escrow are released to the freelancer.
Get active milestone
Returns
Returns an object representing the currently active milestone.
DEFINITION
milestones.get_active_milestone(contract_id)
$milestones->getActiveMilestone( integer $contractId );
milestones.get_active_milestone(contract_id)
milestones.getActiveMilestone(String contractId);
milestones.getActiveMilestone(contractId, callback);
$milestones->get_active_milestone($contract_id);
milestones.GetActiveMilestone(contractId)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import milestones
client = upwork.Client(config)
contract_reference = 1234
milestones.Api(client).get_active_milestone(contract_reference)
$milestones = new \Upwork\API\Routers\Hr\Milestones($client);
$contractId = 1234
$milestones->getActiveMilestone($contractId);
milestones = Net::Upwork::API::Routers::Hr::Milestones.new(client)
contract_id = 1234
milestones.get_active_milestone(contract_id)
import com.Upwork.api.Routers.Hr.Milestones;
Milestones milestones = new Milestones(client);
String contractId = "1234";
milestones.getActiveMilestone(contractId);
var Milestones = require('upwork-api/lib/routers/hr/milestones.js').Milestones;
var milestones = new Milestones(api);
var contractId = 1234;
milestones.getActiveMilestone(contractId, function(error, data) {
console.log(data);
});
my $milestones = Net::Upwork::API::Routers::Hr::Milestones->new($api);
my $contract_id = 1234;
$milestones->get_active_milestone($contract_id);
import ( milestonesUpwork "github.com/upwork/golang-upwork/api/routers/hr/milestones" )
milestones := milestonesUpwork.New(client)
contractId = "1234";
milestones.GetActiveMilestone(contractId)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'server_time': 1405516669,
'milestone': {
'contract_id': '214794',
'deposit_amount': '30',
'description': 'New description of milestone 2',
'due_date': '2015-01-01 00:00:00',
'id': '11206'
}
}
List submissions for a milestone
Returns
Returns a list of submission IDs.
DEFINITION
milestones.get_submissions(milestone_id)
$milestones-getSubmissions( integer $milestoneId );
milestones.get_submissions(milestone_id)
milestones.getSubmissions(String milestoneId);
milestones.getSubmissions(milestoneId, callback);
$milestones->get_submissions($milestone_id);
milestones.GetSubmissions(milestoneId)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import milestones
client = upwork.Client(config)
milestone_id = 1234
milestones.Api(client).get_submissions(milestone_id)
$milestones = new \Upwork\API\Routers\Hr\Milestones($client);
$milestoneId = 1234;
$milestones->getSubmissions($milestoneId);
milestones = Net::Upwork::API::Routers::Hr::Milestones.new(client)
milestone_id = 1234
milestones.get_submissions(milestone_id)
import com.Upwork.api.Routers.Hr.Milestones;
Milestones milestones = new Milestones(client);
String milestoneId = "1234";
milestones.getSubmissions(milestoneId);
var Milestones = require('upwork-api/lib/routers/hr/milestones.js').Milestones;
var milestones = new Milestones(api);
var milestoneId = 1234;
milestones.getSubmissions(milestoneId, function(error, data) {
console.log(data);
});
my $milestones = Net::Upwork::API::Routers::Hr::Milestones->new($api);
my $milestone_id = 1234;
$milestones->get_submissions($milestone_id);
import ( milestonesUpwork "github.com/upwork/golang-upwork/api/routers/hr/milestones" )
milestones := milestonesUpwork.New(client)
milestoneId = "1234";
milestones.GetSubmissions(milestoneId)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'server_time': 1405516669,
'submissions': [{u'id': u'3378'}, {u'id': u'3380'}]
}
Create a milestone
Returns
This resource returns the ID of the milestone created.
DEFINITION
milestones.create(params)
$milestones->create( array $params );
milestones.create(params)
milestones.create(
java.util.HashMap<String,String> params);
milestones.create(params, callback);
$milestones->create(%params);
milestones.Create(params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import milestones
client = upwork.Client(config)
params = {
'contract_reference' => '1234',
'milestone_description' => 'First milestone',
'deposit_amount' => '50',
'due_date' => '12-12-2014'
}
milestones.Api(client).create_milestone(params)
$milestones = new \Upwork\API\Routers\Hr\Milestones($client);
$params = array(
"contract_reference" => "1234",
"milestone_description" => "First milestone",
"deposit_amount" => "50",
"due_date" => "12-12-2014"
);
$milestones->create($params);
milestones = Net::Upwork::API::Routers::Hr::Milestones.new(client)
params = {
'contract_reference' => '1234',
'milestone_description' => 'First milestone',
'deposit_amount' => '50',
'due_date' => '12-12-2014'
}
milestones.create(params)
import com.Upwork.api.Routers.Hr.Milestones;
import java.util.HashMap;
Milestones milestones = new Milestones(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("contract_reference", "1234");
params.put("milestone_description", "First milestone");
params.put("deposit_amount", "50");
params.put("due_date", "12-12-2014");
milestones.create(params);
var Milestones = require('upwork-api/lib/routers/hr/milestones.js').Milestones;
var milestones = new Milestones(api);
var params = {
'contract_reference': '1234',
'milestone_description': 'First milestone',
'deposit_amount': '50',
'due_date': '12-12-2014'
};
milestones.create(params, function(error, data) {
console.log(data);
});
my $milestones = Net::Upwork::API::Routers::Hr::Milestones->new($api);
my %params = {
'contract_reference' => '1234',
'milestone_description' => 'First milestone',
'deposit_amount' => '50',
'due_date' => '12-12-2014'
};
$milestones->create(%params);
import ( milestonesUpwork "github.com/upwork/golang-upwork/api/routers/hr/milestones" )
milestones := milestonesUpwork.New(client)
params := make(map[string]string)
params["contract_reference"] = "1234"
params["milestone_description"] = "First milestone"
params["deposit_amount"] = "50"
params["due_date"] = "12-12-2014"
milestones.Create(params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'id': '9974',
'server_time': 1405516669
}
Edit a milestone
Returns
Returns 200 OK in case of success.
DEFINITION
milestones.edit(milestone_id, params)
$milestones->edit(
integer $milestoneId, array $params );
milestones.edit(milestone_id, params)
milestones.edit(
String milestoneId,
HashMap<String, String> params);
milestones.edit(milestoneId, params, callback);
$milestones->edit($milestone_id, %params);
milestones.Edit(milestoneId, HashMap<String, String> params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import milestones
client = upwork.Client(config)
params = {
'milestone_description' => 'New description',
'deposit_amount' => '30',
'due_date' => '01-01-2015',
'message' => 'Updating the milestone terms'
}
milestones.Api(client).edit(params)
$milestones = new \Upwork\API\Routers\Hr\Milestones($client);
$milestoneId = 1234;
$params = array(
"milestone_description" => "New description",
"deposit_amount" => "30",
"due_date" => "01-01-2015",
"message" => "Updating the milestone terms"
);
$milestones->edit($milestoneId, $params);
milestones = Net::Upwork::API::Routers::Hr::Milestones.new(client)
milestone_id = 1234
params = {
'milestone_description' => 'New description',
'deposit_amount' => '30',
'due_date' => '01-01-2015',
'message' => 'Updating the milestone terms'
}
milestones.edit(milestone_id, params)
import com.Upwork.api.Routers.Hr.Milestones;
import java.util.HashMap;
Milestones milestones = new Milestones(client);
String milestoneId = "1234";
HashMap<String, String> params = new HashMap<String, String>();
params.put("milestone_description", "New description");
params.put("deposit_amount", "30");
params.put("due_date", "01-01-2015");
params.put("message", "Updating the milestone terms");
milestones.edit(milestoneId, params);
var Milestones = require('upwork-api/lib/routers/hr/milestones.js').Milestones;
var milestones = new Milestones(api);
var milestoneId = 1234;
var params = {
'milestone_description': 'New description',
'deposit_amount': '30',
'due_date': '01-01-2015',
'message': 'Updating the milestone terms'
};
milestones.edit(milestoneId, params, function(error, data) {
console.log(data);
});
my $milestones = Net::Upwork::API::Routers::Hr::Milestones->new($api);
my $milestone_id = 1234;
my %params = {
'milestone_description' => 'New description',
'deposit_amount' => '30',
'due_date' => '01-01-2015',
'message' => 'Updating the milestone terms'
};
$milestones->edit($milestone_id, %params);
import ( milestonesUpwork "github.com/upwork/golang-upwork/api/routers/hr/milestones" )
milestones := milestonesUpwork.New(client)
milestoneId = "1234";
params := make(map[string]string)
params["milestone_description"] = "New description"
params["deposit_amount"] = "30"
params["due_date"] = "01-01-2015"
params["message"] = "Updating the milestone terms"
milestones.Edit(milestoneId, params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'ok',
'server_time': 1405516669
}
Activate a milestone
Returns
Returns 200 OK in case of success.
DEFINITION
milestones.activate(milestone_id, params)
$milestones->activate(
integer $milestoneId, array $params );
milestones.activate(milestone_id, params)
milestones.activate(
String milestoneId,
HashMap<String, String> params);
milestones.activate(milestoneId, params, callback);
$milestones->activate($milestone_id, %params);
milestones.Activate(milestoneId, HashMap<String, String> params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import milestones
client = upwork.Client(config)
params = {
'message' => 'Activating second milestone'
}
milestones.Api(client).activate(params)
$milestones = new \Upwork\API\Routers\Hr\Milestones($client);
$milestoneId = 1234;
$params = array(
"message" => "Activating second milestone"
);
$milestones->activate($milestoneId, $params);
milestones = Net::Upwork::API::Routers::Hr::Milestones.new(client)
milestone_id = 1234
params = {
'message' => 'Activating second milestone'
}
milestones.activate(milestone_id, params)
import com.Upwork.api.Routers.Hr.Milestones;
import java.util.HashMap;
Milestones milestones = new Milestones(client);
String milestoneId = "1234";
HashMap<String, String> params = new HashMap<String, String>();
params.put("message", "Activating second milestone");
milestones.activate(milestoneId, params);
var Milestones = require('upwork-api/lib/routers/hr/milestones.js').Milestones;
var milestones = new Milestones(api);
var milestoneId = 1234;
var params = {
'message': 'Activating second milestone'
};
milestones.activate(milestoneId, params, function(error, data) {
console.log(data);
});
my milestones = Net::Upwork::API::Routers::Hr::Milestones->new($api);
my milestone_id = 1234;
my %params = {
'message' => 'Activating second milestone'
};
$milestones->activate($milestone_id, %params);
import ( milestonesUpwork "github.com/upwork/golang-upwork/api/routers/hr/milestones" )
milestones := milestonesUpwork.New(client)
milestoneId = "1234";
params := make(map[string]string)
params["message"] = "Activating second milestone"
milestones.Activate(milestoneId, params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'ok',
'server_time': 1405516669
}
Approve a milestone
Returns
Returns 200 OK in case of success.
DEFINITION
milestones.approve(milestone_id, params)
$milestones->approve(
integer $milestoneId, array $params );
milestones.approve(milestone_id, params)
milestones.approve(
String milestoneId,
HashMap<String, String> params);
milestones.approve(milestoneId, params, callback);
$milestones->approve($milestone_id, %params);
milestones.Approve(milestoneId, HashMap<String, String> params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import milestones
client = upwork.Client(config)
params = {
'amount' => '10',
'bonus' => '5',
'pay_comments' => 'A comment',
'underpayment_reason' => '331',
'note2contractor' => 'A note here'
}
milestones.Api(client).approve('12345', params)
$milestones = new \Upwork\API\Routers\Hr\Milestones($client);
$milestoneId = 1234;
$params = array(
"amount" => "10",
"bonus" => "5",
"pay_comments" => "A comment",
"underpayment_reason" => "331",
"note2contractor" => "A note here"
);
$milestones->approve($milestoneId, $params);
milestones = Net::Upwork::API::Routers::Hr::Milestones.new(client)
milestone_id = 1234
params = {
'amount' => '10',
'bonus' => '5',
'pay_comments' => 'A comment',
'underpayment_reason' => '331',
'note2contractor' => 'A note here'
}
milestones.approve(milestone_id, params)
import com.Upwork.api.Routers.Hr.Milestones;
import java.util.HashMap;
Milestones milestones = new Milestones(client);
String milestoneId = "1234";
HashMap<String, String> params = new HashMap<String, String>();
params.put("amount", "10");
params.put("bonus", "5");
params.put("pay_comments", "A comment");
params.put("underpayment_reason", "331");
params.put("note2contractor", "A note here");
milestones.approve(milestoneId, params);
var Milestones = require('upwork-api/lib/routers/hr/milestones.js').Milestones;
var milestones = new Milestones(api);
var milestoneId = 1234;
var params = {
'amount', '10',
'bonus', '5',
'pay_comments', 'A comment',
'underpayment_reason', '331',
'note2contractor', 'A note here'
};
milestones.approve(milestoneId, params, function(error, data) {
console.log(data);
});
my $milestones = Net::Upwork::API::Routers::Hr::Milestones->new($api);
my $milestone_id = 1234;
my %params = {
'amount' => '10',
'bonus' => '5',
'pay_comments' => 'A comment',
'underpayment_reason' => '331',
'note2contractor' => 'A note here'
};
$milestones->approve($milestone_id, %params);
import ( milestonesUpwork "github.com/upwork/golang-upwork/api/routers/hr/milestones" )
milestones := milestonesUpwork.New(client)
milestoneId = "1234";
params := make(map[string]string)
params["amount"] = "10"
params["bonus"] = "5"
params["pay_comments"] = "A comment"
params["underpayment_reason"] = "331"
params["note2contractor"] = "A note here"
milestones.Approve(milestoneId, params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'ok',
'server_time': 1405516669
}
Delete a milestone
Returns
Returns 200 OK in case of success.
DEFINITION
milestones.delete(milestone_id)
$milestones->delete( integer $milestoneId );
milestones.delete(milestone_id)
milestones.delete(String milestoneId);
milestones.delete(milestoneId, callback);
$milestones->delete($milestone_id);
milestones.Delete(milestoneId)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import milestones
client = upwork.Client(config)
milestone_id = 1234
milestones.Api(client).delete(milestone_id)
$milestones = new \Upwork\API\Routers\Hr\Milestones($client);
$milestoneId = 1234;
$milestones->delete($milestoneId);
milestones = Net::Upwork::API::Routers::Hr::Milestones.new(client)
milestone_id = 1234
milestones.delete(milestone_id)
import com.Upwork.api.Routers.Hr.Milestones;
Milestones milestones = new Milestones(client);
String milestoneId = "1234";
milestones.delete(milestoneId);
var Milestones = require('upwork-api/lib/routers/hr/milestones.js').Milestones;
var milestones = new Milestones(api);
milestoneId = 1234;
milestones.delete(milestoneId, function(error, data) {
console.log(data);
});
my $milestones = Net::Upwork::API::Routers::Hr::Milestones->new($api);
mu $milestone_id = 1234;
$milestones.delete($milestone_id);
import ( milestonesUpwork "github.com/upwork/golang-upwork/api/routers/hr/milestones" )
milestones := milestonesUpwork.New(client)
milestoneId = "1234";
milestones.Delete(milestoneId)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'ok',
'server_time': 1405516669
}
Submit work to a milestone
Returns
Returns 200 OK in case of success.
DEFINITION
submissions.request_approval(params)
$submissions->requestApproval( array $params );
submissions.request_approval(params)
submissions.requestApproval(
HashMap<String, String> params);
submissions.requestApproval(params, callback);
$submissions->request_approval(%params);
submissions.RequestApproval(HashMap<String, String> params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import submissions
client = upwork.Client(config)
params = {
'milestone_id' => '1234',
'note2client' => 'First milestone completed',
'amount' => '15'
}
submissions.Api(client).request_approval(params)
$submissions = new \Upwork\API\Routers\Hr\Submissions($client);
$params = array(
"milestone_id" => "1234",
"note2client" => "First milestone completed",
"amount" => "15"
);
$submissions->requestApproval($params);
submissions = Net::Upwork::API::Routers::Hr::Submissions.new(client)
params = {
'milestone_id' => '1234',
'note2client' => 'First milestone completed',
'amount' => '15'
}
submissions.request_approval(params)
import com.Upwork.api.Routers.Hr.Submissions;
import java.util.HashMap;
Submissions submissions = new Submissions(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("milestone_id", "1234");
params.put("note2client", "First milestone completed");
params.put("amount", "15");
submissions.requestApproval(params);
var Submissions = require('upwork-api/lib/routers/hr/submissions.js').Submissions;
var submissions = new Submissions(api);
var params = {
'milestone_id': '1234',
'note2client': 'First milestone completed',
'amount': '15'
};
submissions.requestApproval(params, function(error, data) {
console.log(data);
});
my $submissions = Net::Upwork::API::Routers::Hr::Submissions->new($api);
my %params = {
'milestone_id' => '1234',
'note2client' => 'First milestone completed',
'amount' => '15'
};
$submissions->request_approval(%params);
import ( submissionsUpwork "github.com/upwork/golang-upwork/api/routers/hr/submissions" )
submissions := submissionsUpwork.New(client)
params := make(map[string]string)
params["milestone_id"] = "1234"
params["note2client"] = "First milestone completed"
params["amount"] = "15"
submissions.RequestApproval(params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'ok',
'server_time': 1405516669
}
Approve a milestone submission
Returns
Returns 200 OK in case of success.
DEFINITION
submissions.approve(submission_id, params)
$submissions->approve(
integer $submissionId, array $params );
submissions.approve(submission_id, params)
submissions.approve(
String submissionId,
HashMap<String, String> params);
submissions.approve(submissionId, params, callback);
$submissions->approve($submission_id, %params);
submissions.Approve(submissionId, HashMap<String, String> params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import submissions
client = upwork.Client(config)
params = {
'amount' => '10',
'bonus' => '3',
'pay_comments' => 'A comment',
'underpayment_reason' => '331',
'note2contractor' => 'Note to freelancer'
}
submissions.Api(client).approve('12345', params)
$submissions = new \Upwork\API\Routers\Hr\Submissions($client);
$submissionId = 1234;
$params = array(
"amount" => "10",
"bonus" => "3",
"pay_comments" => "A comment",
"underpayment_reason" => "331",
"note2contractor" => "Note to freelancer"
);
$submissions->approve($submissionId, $params);
submissions = Net::Upwork::API::Routers::Hr::Submissions.new(client)
submission_id = 1234
params = {
'amount' => '10',
'bonus' => '3',
'pay_comments' => 'A comment',
'underpayment_reason' => '331',
'note2contractor' => 'Note to freelancer'
}
submissions.approve(submission_id, params)
import com.Upwork.api.Routers.Hr.Submissions;
import java.util.HashMap;
Submissions submissions = new Submissions(client);
String submissionId = "1234";
HashMap<String, String> params = new HashMap<String, String>();
params.put("amount", "10");
params.put("bonus", "3");
params.put("pay_comments", "A comment");
params.put("underpayment_reason", "331");
params.put("note2contractor", "Note to freelancer");
submissions.approve(submissionId, params);
var Submissions = require('upwork-api/lib/routers/hr/submissions.js').Submissions;
var submissions = new Submissions(api);
var submissionId = 1234;
var params = {
'amount' => '10',
'bonus' => '3',
'pay_comments' => 'A comment',
'underpayment_reason' => '331',
'note2contractor' => 'Note to freelancer'
};
submissions.approve(submissionId, params, data) {
console.log(data);
});
$submissions = Net::Upwork::API::Routers::Hr::Submissions->new($api);
$submission_id = 1234;
my %params = {
'amount' => '10',
'bonus' => '3',
'pay_comments' => 'A comment',
'underpayment_reason' => '331',
'note2contractor' => 'Note to freelancer'
};
$submissions->approve($submission_id, %params);
import ( submissionsUpwork "github.com/upwork/golang-upwork/api/routers/hr/submissions" )
submissions := submissionsUpwork.New(client)
submissionId = "1234";
params := make(map[string]string)
params["amount"] = "10"
params["bonus"] = "3"
params["pay_comments"] = "A comment"
params["underpayment_reason"] = "331"
params["note2contractor"] = "Note to freelancer"
submissions.Approve(submissionId, params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'ok',
'server_time': 1405516669
}
Reject a milestone submission
Returns
Returns 200 OK in case of success.
DEFINITION
submissions.reject(submission_id, note2contractor)
$submissions->reject(
integer $submissionId, array $params );
submissions.reject(submission_id, params)
submissions.reject(
String submissionId,
HashMap<String, String> params);
submissions.reject(submissionId, params, callback);
$submissions->reject($submission_id, %params);
submissions.Reject(submissionId, HashMap<String, String> params)
EXAMPLE REQUEST
import upwork
from upwork.routers.hr import submissions
client = upwork.Client(config)
params = {
'note2contractor' => 'Note to freelancer'
}
submissions.Api(client).reject('12345', params)
$submissions = new \Upwork\API\Routers\Hr\Submissions($client);
$submissionId = 1234;
$params = array(
"note2contractor" => "Note to freelancer"
);
$submissions->reject($submissionId, $params);
submissions = Net::Upwork::API::Routers::Hr::Submissions.new(client)
submission_id = 1234
params = {
'note2contractor' => 'Note to freelancer'
}
submissions.reject(submission_id, params)
import com.Upwork.api.Routers.Hr.Submissions;
import java.util.HashMap;
Submissions submissions = new Submissions(client);
String submissionId = "1234";
HashMap<String, String> params = new HashMap<String, String>();
params.put("note2contractor", "Note to freelancer");
submissions.reject(submissionId, params);
var Submissions = require('upwork-api/lib/routers/hr/submissions.js').Submissions;
var submissions = new Submissions(api);
var submissionId = 1234;
var params = {
'note2contractor': 'Note to freelancer'
};
submissions.reject(submissionId, params, function(error, data) {
console.log(data);
});
my $submissions = Net::Upwork::API::Routers::Hr::Submissions->new($api);
my $submission_id = 1234;
my %params = {
'note2contractor' => 'Note to freelancer'
};
$submissions->reject($submission_id, %params);
import ( submissionsUpwork "github.com/upwork/golang-upwork/api/routers/hr/submissions" )
submissions := submissionsUpwork.New(client)
submissionId = "1234";
params := make(map[string]string)
params["note2contractor"] = "Note to freelancer"
submissions.Reject(submissionId, params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'ok',
'server_time': 1405516669
}
Payments
This section describes resources that allow you to make custom payments (bonuses) and list payments made.
Make custom payment
Returns
This resource returns the adjustment reference.
DEFINITION
payments.submitBonus(team_reference, params)
$payments->submitBonus( integer $teamReference,
array $params );
payment.submit_bonus(team_reference, params)
payments.submitBonus(
String teamReference,
java.util.HashMap<String,String> params);
payments.submitBonus(
teamReference, params, callback);
$payment->submit_bonus($team_reference, $params);
payments.SubmitBonus(teamReference, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import payments
client = upwork.Client(config)
params = {
'engagement__reference' => 78910,
'comments' => 'Test bonus payment',
'charge_amount' => 20
payments.Api(client).submitBonus(12345, params)
$payments = new \Upwork\API\Routers\Payments($client);
$params = array(
"engagement__reference" => 78910,
"comments" => "Test bonus payment",
"charge_amount" => 20
);
$payments->submitBonus(12345, $params);
payments = Net::Upwork::API::Routers::Payments.new(client)
params = {
'engagement__reference' => 78910,
'comments' => 'Test bonus payment',
'charge_amount' => 20
}
payments.submit_bonus(12345, params)
import com.Upwork.api.Routers.Payments;
import java.util.HashMap;
Payments payments = new Payments(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("engagement__reference", "78910");
params.put("comments", "Test bonus payment");
params.put("charge_amount", "20");
payments.submitBonus("12345", params);
var Payments = require('upwork-api/lib/routers/payments.js').Payments;
var payments = new Payments(api);
teamReference = '12345';
params = {
'engagement__reference': 78910,
'comments': 'Test bonus payment',
'charge_amount': 20
}
payments.submitBonus(teamReference, params, function(error, data) {
console.log(data);
});
my $payments = Net::Upwork::API::Routers::Payments->new($api);
my %params = {
'engagement__reference' => 78910,
'comments' => 'Test bonus payment',
'charge_amount' => 20
};
$payments->submit_bonus(12345, %params);
import ( paymentsUpwork "github.com/upwork/golang-upwork/api/routers/payments" )
payments := paymentsUpwork.New(client)
params := make(map[string]string)
params["engagement__reference"] = "78910"
params["comments"] = "Test bonus payment"
params["charge_amount"] = "20"
payments.SubmitBonus("12345", params)
EXAMPLE RESPONSE
{'reference': '011223344'}
MC to Messages Transition
This section describes API transition from MC to Messages.

Below you can find the details and requirements for each API.
Messages
This section describes resources that allow you to get/update rooms and send messages.
Retrieve rooms information
Returns
Returns the information on the rooms. Details on returned data:
DEFINITION
messages.get_rooms(company, param = {})
$mc->getRooms($company, $params);
mc.get_rooms(company, params);
companies.getRooms(String company);
companies.getRooms(String company, java.util.HashMap<String,String> params);
mc.getRooms(company, params, callback);
$mc->get_rooms($company, $room, %params);
mc.GetRooms(company, room, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
params = {
'type' => 'all'
}
messages.Api(client).get_rooms('company', params)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"type" => "all"
);
$mc->getRooms('companyid', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'type' => 'all'
}
mc.get_rooms('companyid', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("type", "all");
mc.getRooms(company, params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'type': 'all'
};
mc.getRooms(company, params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'type' => 'all'
);
my $company = 'companyid';
$mc->get_rooms($company, %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["type"] = "all"
mc.GetRooms(company, params)
EXAMPLE RESPONSE
{
'auth_user': {
# ..
},
'server_time': 123456790,
'rooms': [
{
'roomId': 'room_12345',
# ..
}
# ..
]
}
Get a specific room information
Returns
Returns the data on the room queried. Details on returned data:
DEFINITION
messages.get_room_details(company, room_id, param = {})
$mc->getRoomDetails($company, $roomId, $params);
mc.get_room_details(company, room_id, params);
companies.getRoomDetails(
String company,
String room,
java.util.HashMap<String,String> params);
mc.getRoomDetails(company, room, params, callback);
$mc->get_room_details($company, $room, %params);
mc.GetRoomDetails(company, room, params)
EXAMPLE RESPONSE
{
'auth_user': {
# ..
},
'server_time': 123456790,
'room': {
'roomId': 'room_12345',
'roomName': 'Room name',
# ..
}
}
Get messages from the room
Returns
Returns the messages (stories) from the specific room. Details on returned data:
DEFINITION
messages.get_room_messages(company, room_id, param = {})
$mc->getRoomMessages($company, $roomId, $params);
mc.get_room_messages(company, room_id, params);
companies.getRoomMessages(
String company,
String room,
java.util.HashMap<String,String> params);
mc.getRoomMessages(company, room, params, callback);
$mc->get_room_messages($company, $room, %params);
mc.GetRoomMessages(company, room, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
params = {
'limit' => '5'
}
messages.Api(client).get_room_messages('company', 'roomid', params)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"limit" => "5"
);
$mc->getRoomMessages('companyid', 'room_id', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'limit' => '5'
}
mc.get_room_messages('companyid', 'room_id', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("limit", "5");
mc.getRoomMessages(company, "room_id", params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'limit': '5'
};
mc.getRoomMessages(company, 'room_id', params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'limit' => '5'
);
my $company = 'companyid';
$mc->get_room_messages($company, 'room_id', %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["limit"] = "5"
mc.GetRoomMessages(company, "room_id", params)
EXAMPLE RESPONSE
{
'auth_user': {
# ..
},
'server_time': 123456790,
'stories_list': {
'stories': [
'roomId': 'room_12345',
'roomName': 'Room name',
],
# ..
}
}
Get a specific room by offer ID
Returns
Returns the information on the offer ID queried. Details on returned data:
DEFINITION
messages.get_room_by_offer(company, offer_id, param = {})
$mc->getRoomByOffer($company, $offer, $params);
mc.get_room_by_offer(company, offer, params);
companies.getRoomByOffer(
String company,
String offerId,
java.util.HashMap<String,String> params);
mc.getRoomByOffer(company, offerId, params, callback);
$mc->get_room_by_offer($company, $offer_id, %params);
mc.GetRoomByOffer(company, offerId, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
params = {
'onlyRoomId' => 'true'
}
messages.Api(client).get_room_by_offer('company', '1234', params)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"onlyRoomId" => "true"
);
$mc->getRoomByOffer('companyid', '1234', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'onlyRoomId' => 'true'
}
mc.get_room_by_offer('companyid', '1234', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("onlyRoomId", "true");
mc.getRoomByOffer(company, "1234", params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'onlyRoomId': 'true'
};
mc.getRoomByOffer(company, '1234', params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'onlyRoomId' => 'true'
);
my $company = 'companyid';
$mc->get_room_by_offer($company, 1234, %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["onlyRoomId"] = "true"
mc.GetRoomByOffer(company, "1234", params)
EXAMPLE RESPONSE
{
'auth_user': {
# ..
},
'server_time': 123456790,
'room': {
'roomId': 'room_12345',
'roomName': 'Room name',
# ..
}
}
Get a specific room by application ID
Returns
Returns the information on the application ID queried. Details on returned data:
DEFINITION
messages.get_room_by_application(company, application_id, param = {})
$mc->getRoomByApplication($company, $applicationId, $params);
mc.get_room_by_application(company, application_id, params);
companies.getRoomByApplication(
String company,
String applicationId,
java.util.HashMap<String,String> params);
mc.getRoomByApplication(company, applicationId, params, callback);
$mc->get_room_by_application($company, $application_id, %params);
mc.GetRoomByApplication(company, applicationId, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
params = {
'onlyRoomId' => 'true'
}
messages.Api(client).get_room_by_application('company', '1234', params)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"onlyRoomId" => "true"
);
$mc->getRoomByApplication('companyid', '1234', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'onlyRoomId' => 'true'
}
mc.get_room_by_application('companyid', '1234', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("onlyRoomId", "true");
mc.getRoomByApplication(company, "1234", params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'onlyRoomId': 'true'
};
mc.getRoomByApplication(company, '1234', params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'onlyRoomId' => 'true'
);
my $company = 'companyid';
$mc->get_room_by_application($company, 1234, %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["onlyRoomId"] = "true"
mc.GetRoomByApplication(company, "1234", params)
EXAMPLE RESPONSE
{
'auth_user': {
# ..
},
'server_time': 123456790,
'room': {
'roomId': 'room_12345',
'roomName': 'Room name',
# ..
}
}
Get a specific room by contract ID
Returns
Returns the information on the contract ID queried. Details on returned data:
DEFINITION
messages.get_room_by_contract(company, contract_id, param = {})
$mc->getRoomByContract($company, $contract, $params);
mc.get_room_by_contract(company, contract_id, params);
companies.getRoomByContract(
String company,
String contractId,
java.util.HashMap<String,String> params);
mc.getRoomByContract(company, contractId, params, callback);
$mc->get_room_by_contract($company, $contract_id, %params);
mc.GetRoomByContract(company, contractId, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
params = {
'onlyRoomId' => 'false'
}
messages.Api(client).get_room_by_contract('company', '1234', params)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"onlyRoomId" => "false"
);
$mc->getRoomByContract('companyid', '1234', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'onlyRoomId' => 'false'
}
mc.get_room_by_contract('companyid', '1234', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("onlyRoomId", "false");
mc.getRoomByContract(company, "1234", params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'onlyRoomId': 'false'
};
mc.getRoomByContract(company, '1234', params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'onlyRoomId' => 'false'
);
my $company = 'companyid';
$mc->get_room_by_contract($company, 1234, %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["onlyRoomId"] = "false"
mc.GetRoomByContract(company, "1234", params)
EXAMPLE RESPONSE
{
'auth_user': {
# ..
},
'server_time': 123456790,
'room': {
'roomId': 'room_12345',
'roomName': 'Room name',
# ..
}
}
Create a new room
Warning
All parameters must be wrapped into json object, e.g. {“roomName”:”Group Project”,”roomType”:”GROUP”, ... }, and sent as a separate parameter called room.
Returns
Returns HTTP code 200 and the data about the created room.
DEFINITION
messages.create_room(company, params = {})
$mc->createRoom($company, $params);
mc.create_room(company, params);
companies.createRoom(
String company,
java.util.HashMap<String,String> params);
mc.createRoom(company, params, callback);
$mc->create_room($company, %params);
mc.CreateRoom(company, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
data['room'] = "{'roomName': 'Test Room'}"
messages.Api(client).create_room('company', data)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"room" => '{"roomName": "Test Room"}'
);
$mc->createRoom('companyid', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'room' => '{"roomName": "Test Room"}'
}
mc.create_room('companyid', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("room", "{\"roomName\": \"Test Room\"}");
mc.createRoom(company, params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'room': '{"roomName": "Test Room"}'
};
mc.createRoom(company, params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'room' => '{"roomName": "Test Room"}'
);
my $company = 'companyid';
$mc->create_room($company, %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["room"] = "{\"roomName\": \"Test Room\"}"
mc.CreateRoom(company, params)
EXAMPLE RESPONSE
200 OK
Send a message to a room
Warning
All parameters must be wrapped into json object, e.g. {“message”: “a message”, ...}, and sent as a separate parameter called story.
Returns
Returns HTTP code 200 and the data about the created room.
DEFINITION
messages.send_message_to_room(company, room_id, params = {})
$mc->sendMessageToRoom($company, $roomId, $params);
mc.send_message_to_room(company, room_id, params);
companies.sendMessageToRoom(
String company,
String room,
java.util.HashMap<String,String> params);
mc.sendMessageToRoom(company, room, params, callback);
$mc->send_message_to_room($company, $room, %params);
mc.SendMessageToRoom(company, room, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
data['story'] = "{'message': 'test message', 'orgId': 'myorgid', 'userId': '~017e2...'}"
messages.Api(client).send_message_to_room('company', 'room_id', data)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"story" => '{"message": "My message", "orgId": "myorgid", "userId": "~017e2..."}'
);
$mc->sendMessageToRoom('companyid', 'room_id', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'story' => '{"message": "My message", "orgId": "myorgid", "userId": "~017e2..."}'
}
mc.send_message_to_room('companyid', 'room_id', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("story", "{\"message\": \"My message\", \"orgId\": \"myorgid\", \"userId\": \"~017e2...\"}");
mc.sendMessageToRoom(company, "room_id", params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'story': '{"message": "My message", "orgId": "myorgid", "userId": "~017e2..."}'
};
mc.sendMessageToRoom(company, 'roomId', params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'story' => '{"message": "My message", "orgId": "myorgid", "userId": "~017e2..."}'
);
my $company = 'companyid';
$mc->send_message_to_room($company, 'room_id', %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["story"] = "{\"message\": \"My message\", \"orgId\": \"myorgid\", \"userId\": \"~017e2...\"}"
mc.SendMessageToRoom(company, "room_id", params)
EXAMPLE RESPONSE
200 OK
Send a message to a batch of rooms
Warning
All parameters (except room_ids) must be wrapped into json object, e.g. {“message”: “a message”, ...}, and sent as a separate parameter called story.
Returns
Returns HTTP code 200 and the data about the created room.
DEFINITION
messages.send_message_to_rooms(company, params = {})
$mc->sendMessageToRooms($company, $params);
mc.send_message_to_rooms(company, params);
companies.sendMessageToRooms(
String company,
java.util.HashMap<String,String> params);
mc.sendMessageToRooms(company, params, callback);
$mc->send_message_to_rooms($company, %params);
mc.SendMessageToRooms(company, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
data['room_ids'] = "room_absd;room_qwer"
data['story'] = "{'message': 'test message', 'orgId': 'myorgid', 'userId': '~017e2...'}"
message.Api(client).send_message_to_rooms('company', data)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"room_ids" => "room_absd;room_qwer",
"story" => '{"message": "My message", "orgId": "myorgid", "userId": "~017e2..."}'
);
$mc->sendMessageToRooms('companyid', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'room_ids' => 'room_absd;room_qwer',
'story' => '{"message": "My message", "orgId": "myorgid", "userId": "~017e2..."}'
}
mc.send_message_to_rooms('companyid', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("room_ids", "room_absd;room_qwer");
params.put("story", "{\"message\": \"My message\", \"orgId\": \"myorgid\", \"userId\": \"~017e2...\"}");
mc.sendMessageToRooms(company, params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'room_ids': 'room_absd;room_qwer',
'story': '{"message": "My message", "orgId": "myorgid", "userId": "~017e2..."}'
};
mc.sendMessageToRooms(company, params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'room_ids' => 'room_absd;room_qwer',
'story' => '{"message": "My message", "orgId": "myorgid", "userId": "~017e2..."}'
);
my $company = 'companyid';
$mc->send_message_to_rooms($company, %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["room_ids"] = "room_absd;room_qwer"
params["story"] = "{\"message\": \"My message\", \"orgId\": \"myorgid\", \"userId\": \"~017e2...\"}"
mc.SendMessageToRooms(company, params)
EXAMPLE RESPONSE
200 OK
Update a room settings
Warning
All parameters must be wrapped into json object, e.g. {“isFavorite”: “true”}, and sent as a separate parameter called update_request.
Returns
Returns HTTP code 200.
DEFINITION
messages.update_room_settings(company, room_id, userid, params = {})
$mc->updateRoomSettings($company, $roomId, $username, $params);
mc.update_room_settings(company, room_id, username, params);
companies.updateRoomSettings(
String company,
String room,
String username,
java.util.HashMap<String,String> params);
mc.updateRoomSettings(company, room, username, params, callback);
$mc->update_room_settings($company, $room, $username, %params);
mc.UpdateRoomSettings(company, room, username, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
data['update_request'] = "{'role': 'admin'}"
messages.Api(client).update_room_settings('company', 'room_id', 'userid', data)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"update_request" => '{"role": "admin"}'
);
$mc->updateRoomSettings('companyid', 'room_id', 'userid', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'update_request' => '{"role": "admin"}'
}
mc.update_room_settings('companyid', 'room_id', 'userid', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("update_request", "{\"role\": \"admin\"}");
mc.updateRoomSettings(company, "room_id", "userid", params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'update_request': '{"role": "admin"}'
};
mc.updateRoomSettings(company, 'room_id', 'userid', params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'update_request' => '{"role": "admin"}'
);
my $company = 'companyid';
$mc->update_room_settings($company, 'room_id', 'userid', %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["update_request"] = "{\"role\": \"admin\"}"
mc.UpdateRoomSettings(company, "room_id", "userid", params)
EXAMPLE RESPONSE
200 OK
Archive or rename a room
Warning
All parameters must be wrapped into json object, e.g. {“isReadOnly”: “true”}, and sent as a separate parameter called metadata.
Returns
Returns HTTP code 200.
DEFINITION
messages.update_room_metadata(company, room_id, params = {})
$mc->updateRoomMetadata($company, $roomId, $params);
mc.update_room_metadata(company, room_id, params);
companies.updateRoomMetadata(
String company,
String room,
java.util.HashMap<String,String> params);
mc.updateRoomMetadata(company, room, params, callback);
$mc->update_room_metadata($company, $room, %params);
mc.UpdateRoomMetadata(company, room, params)
EXAMPLE REQUEST
import upwork
from upwork.routers import messages
client = upwork.Client(config)
data['metadata'] = "{'topic': 'Topic'}"
messages.Api(client).update_room_metadata('company', 'room_id', data)
mc = new \Upwork\API\Routers\Messages($client);
$params = array(
"metadata" => '{"topic": "Topic"}'
);
$mc->updateRoomMetadata('companyid', 'room_id', $params);
mc = Net::Upwork::API::Routers::Messages.new(client)
params = {
'metadata' => '{"topic": "Topic"}'
}
mc.update_room_metadata('companyid', 'room_id', params)
import com.Upwork.api.Routers.Messages;
import java.util.HashMap;
Messages mc = new Messages(client);
String company = "companyid";
HashMap<String, String> params = new HashMap<String, String>();
params.put("metadata", "{\"topic\": \"Topic\"}");
mc.updateRoomMetadata(company, "room_id", params);
var Messages = require('upwork-api/lib/routers/messages.js').Messages;
var mc = new Messages(api);
var company = 'companyid';
var params = {
'metadata': '{"topic": "Topic"}'
};
mc.updateRoomMetadata(company, 'room_id', params, function(error, data) {
console.log(data);
});
my $mc = Net::Upwork::API::Routers::Messages->new($api);
my %params = (
'metadata' => '{"topic": "Topic"}'
);
my $company = 'companyid';
$mc->update_room_metadata($company, 'room_id', %params);
import ( mcUpwork "github.com/upwork/golang-upwork/api/routers/messages" )
mc := mcUpwork.New(client)
company = "companyid";
params := make(map[string]string)
params["metadata"] = "{\"topic\": \"Topic\"}"
mc.UpdateRoomMetadata(company, "room_id", params)
EXAMPLE RESPONSE
200 OK
Activities
This section describes a set of resources that allow you to manage activities – Upwork task management system. The term “activity” is used with the meaning of “task” throughout the following reference documentation.
Activities API resources allow you to assign specific activities to freelancers. These resources require authentication and require the user to be a member of the referenced company or team, and have hiring permissions.
If a company has no teams, use the company_id as the team_id.
You can find company_id via Companies & Teams API, List teams in company. The value you need is returned in the parent_team__id field.
List team activities
Returns
Details on the returned data:
- record_id
- The record ID of the activities. Each activity has a unique ID (users have no control over this number and it should only be used as a reference).
- company_id
- This is the ID of the company.
- user_id
- The Upwork ID of the user.
- code
- This is specified by the user. It could be used to reference a bug ID on a third-party system.
- description
- The text description contained within the activity.
- URL
- This is specified by the user. It can be used to link to a third-party bug tracking system or any related URL.
DEFINITION
team.Api(client).get_list(company_id, team_id)
$activities->getList( string $company, string $team );
activities.get_list(company, team)
activities.getList(
String company, String team);
activities.getList(company, team, callback);
$activities->get_list($company, $team);
activities.GetList(company, team)
EXAMPLE REQUEST
import upwork
from upwork.routers.activities import team
client = upwork.Client(config)
team.Api(client).get_list('123abc', '567def')
$activities = new \Upwork\API\Routers\Activities\Team($client);
$activities->getList("123abc", "567def");
activities = Net::Upwork::API::Routers::Activities::Team.new(client)
activities.get_list('123abc', '567def')
import com.Upwork.api.Routers.Activities.Team;
Team activities = new Team(client);
activities.getList("123abc", "567def");
var Team = require('upwork-api/lib/routers/activities/team.js').Team;
var activities = new Team(api);
activities.getList('123abc', '567def', function(error, data) {
console.log(data);
});
my $activities = Net::Upwork::API::Routers::Activities::Team->new($api);
$activities->get_list('123abc', '567def');
import ( teamUpwork "github.com/upwork/golang-upwork/api/routers/activities/team" )
activities := teamUpwork.New(client)
activities.GetList("123abc", "567def")
EXAMPLE RESPONSE
[
{
'code': 'User task 01',
'company_id': '567def',
'created_time': '2014-07-17 10:54:30',
'description': 'Descr',
'engagements': {
'engagement': '171318'
},
'level': 'team',
'payment_verification_status': 'VERIFIED',
'record_id': '65464',
'status': 'active',
'team_id': '123abc',
'total_engagements': '1',
'url': '',
'user_id': ''
},
{
# Another activity
},
# ...
]
List activities for specific engagement
Returns
Returns the list of activities that are currently assigned to the specified engagement.
DEFINITION
team.Api(client).get_specific(engagement_ref)
$activities->getSpecific( integer $engagementRef );
activities.get_specific(engagemnet_ref)
activities.getSpecific(String engagementRef);
activities.getSpecific(engagementRef, callback);
$activities->get_specific($engagemnet_ref);
activities.GetSpecific(engagementRef)
EXAMPLE REQUEST
import upwork
from upwork.routers.activities import team
client = upwork.Client(config)
auth.Api(client).get_specific('1234')
$activities = new \Upwork\API\Routers\Activities\Engagement($client);
$activities->getSpecific(1234);
activities = Net::Upwork::API::Routers::Activities::Engagement.new(client)
activities.get_specific(1234)
import com.Upwork.api.Routers.Activities.Engagement;
Engagement activities = new Engagement(client);
activities.getSpecific("1234");
activities.getSpecific(engagementRef, callback);
$activities->get_specific($engagemnet_ref);
activities.GetSpecific(engagementRef)
EXAMPLE REQUEST
import upwork
from upwork.routers.activities import engagement
client = upwork.Client(config)
engagement.Api(client).get_specific('1234')
$activities = new \Upwork\API\Routers\Activities\Engagement($client);
$activities->getSpecific(1234);
activities = Net::Upwork::API::Routers::Activities::Engagement.new(client)
activities.get_specific(1234)
import com.Upwork.api.Routers.Activities.Engagement;
Engagement activities = new Engagement(client);
activities.getSpecific("1234");
var Engagement = require('upwork-api/lib/routers/activities/engagement.js').Engagement;
var activities = new Engagement(api);
activities.getSpecific('1234', function(error, data) {
console.log(data);
});
my $activities = Net::Upwork::API::Routers::Activities::Engagement->new($api);
$activities->get_specific(1234);
import ( engagementUpwork "github.com/upwork/golang-upwork/api/routers/activities/engagement" )
activities := engagementUpwork.New(client)
activities.GetSpecific("1234")
EXAMPLE RESPONSE
{
'server_time': '1406027484',
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'task_sets': {
'task_set': {
'required': '1',
'type': 'otask',
'tasks': {
'task': [
{
'description': 'Test task 01',
'url': '',
'code': 'test01',
'id': '{type=otask,cny=mytestcompany:mysecondsubteam,code=test01,team=mytestcompany:mysecondsubteam,level=team}'
},
{
# Another activity
},
# ...
]
},
'hash': '59c31ed3d95d378740fa65218d8de7ae'
}
}
}
Get team activity by code
Returns
In case of multiple activities requested, a list will be returned.
Details on the returned data:
- record_id
- The record ID of the activities. Each activity has a unique ID (users have no control over this number and it should only be used as a reference).
- company_id
- This is the ID of the company.
- user_id
- The Upwork ID of the user.
- code
- This is specified by the user. It could be used to reference a bug ID on a third-party system.
- description
- The text description contained within the activity.
- URL
- This is specified by the user. It can be used to link to a third-party bug tracking system or any related URL.
DEFINITION
team.get_specific_list(
company_id, team_id, task_codes)
$activities->getSpecificList( string $company,
string $team, string $code );
activities.get_specific_list(company, team, code)
activities.getSpecificList(
String company, String team, String code);
activities.getSpecificList(
company, team, code, callback);
$activities->get_specific_list($company, $team, $code);
activities.GetSpecificList(company, team, code)
EXAMPLE REQUEST
import upwork
from upwork.routers.activities import team
client = upwork.Client(config)
team.Api(client).get_specific_list(
'123abc', '678def', ['User task 01'])
$activities = new \Upwork\API\Routers\Activities\Team($client);
$activities->getSpecificList("123abc", "678def",
"User task 01");
activities = Net::Upwork::API::Routers::Activities::Team.new(client)
activities.get_specific_list('123abc', '678def',
'User task 01')
import com.Upwork.api.Routers.Activities.Team;
Team activities = new Team(client);
activities.getSpecificList("123abc", "678def", "User task 01");
var Team = require('upwork-api/lib/routers/activities/team.js').Team;
var activities = new Team(api);
activities.getSpecificList('123abc', '567def', 'User task 01', function(error, data) {
console.log(data);
});
my $activities = Net::Upwork::API::Routers::Activities::Team->new($api);
$activities->get_specific_list('123abc', '678def', 'User task 01');
import ( teamUpwork "github.com/upwork/golang-upwork/api/routers/activities/team" )
activities := teamUpwork.New(client)
activities.GetSpecificList("123abc", "678def", "User task 01")
EXAMPLE RESPONSE
In case of multiple activities requested, a list will be returned.
{
'code': 'User task 01',
'company_id': '123abc',
'created_time': '2014-07-17 10:54:30',
'description': 'Descr',
'engagements': {
'engagement': '171318'
},
'level': 'team',
'payment_verification_status': 'VERIFIED',
'record_id': '65464',
'status': 'active',
'team_id': '678def',
'url': '',
'user_id': ''
}
Create activity at team level
Returns
If the call is successful, the server returns a 200 OK message. If the call fails a 403 error message is returned.
DEFINITION
team.add_activity(
company_id, team_id, code, description, url,
engagements=None, all_in_company=None)
$activities->addActivity( string $company,
string $team, string $params );
activities.add_activity(company, team, params)
activities.addActivity(
String company,
String team,
java.util.HashMap<String,String> params);
activities.addActivity(
company, team, params, callback);
$activities->add_activity($company, $team, %params);
activities.AddActivity(company, team, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.activities import team
client = upwork.Client(config)
team.Api(client).add_activity(
'123abc', '678def', 'Team task 01', 'Desc', '',
all_in_company=1)
$activities = new \Upwork\API\Routers\Activities\Team($client);
$params = array(
"code" => "Team task 01",
"description" => "Desc",
"all_in_company" => "1"
);
$activities->addActivity("123abc", "678def", $params);
activities = Net::Upwork::API::Routers::Activities::Team.new(client)
params = {
'code' => 'Team task 01',
'description' => 'Desc',
'all_in_company' => '1'
}
activities.add_activity('123abc', '678def', params)
import com.Upwork.api.Routers.Activities.Team;
import java.util.HashMap;
Team activities = new Team(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("code", "Team task 01");
params.put("description", "Desc");
params.put("all_in_company", "1");
activities.addActivity("123abc", "678def", params);
var Team = require('upwork-api/lib/routers/activities/team.js').Team;
var activities = new Team(api);
var params = {
'code': 'Team task 01',
'description': 'Desc',
'all_in_company': '1'
};
activities.addActivity('123abc', '678def', params, function(error, data) {
console.log(data);
});
my $activities = Net::Upwork::API::Routers::Activities::Team->new($api);
my %params = {
'code' => 'Team task 01',
'description' => 'Desc',
'all_in_company' => '1'
};
$activities->add_activity('123abc', '678def', %params);
import ( teamUpwork "github.com/upwork/golang-upwork/api/routers/activities/team" )
activities := teamUpwork.New(client)
params := make(map[string]string)
params["code"] = "Team task 01"
params["description"] = "Desc"
params["all_in_company"] = "1"
activities.AddActivity("123abc", "678def", params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'server_time': '1405695093',
'tasks': {
'code': 'Team task 01',
'company__reference': '377329',
'company_id': '123abc',
'created_time': '',
'description': 'Desc',
'engagements': '',
'record_id': '65491',
'reference': '65491',
'status': '',
'team__reference': '377329',
'team_id': '678def',
'url': '',
'user__reference': '',
'user_id': ''
}
}
Update activity at team level
If you want to update an activity for the whole company, just use the company_id as the team_id.
Returns
If the call is successful, the server returns a 200 OK message. If the call fails a 403 error message is returned.
DEFINITION
team.update_activities(
company_id, team_id, code, description, url,
engagements=None, all_in_company=None)
$activities->updateActivity( string $company, string $team,
string $code, string $params );
activities.update_activities(company, team, code, params)
activities.updateActivity(
String company,
String team,
String code,
java.util.HashMap<String,String> params);
activities.updateActivity(
company, team, code, params, callback);
$activities->update_activities($company, $team, $code, %params);
activities.UpdateActivity(company, team, code, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.activities import team
client = upwork.Client(config)
team.Api(client).update_activities(
'123abc', '456def', 'Team task 01',
'Desc updated', '', all_in_company=1)
$activities = new \Upwork\API\Routers\Activities\Team($client);
$params = array(
"description" => "Desc updated",
"all_in_company" => "1"
);
$activities->updateActivity("123abc", "678def",
"Team task 01", $params);
activities = Net::Upwork::API::Routers::Activities::Team.new(client)
params = {
'description' => 'Desc updated',
'all_in_company' => '1'
}
activities.update_activities('123abc', '678def',
'Team task 01', params)
import com.Upwork.api.Routers.Activities.Team;
import java.util.HashMap;
Team activities = new Team(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("description", "Desc updated");
params.put("all_in_company", "1");
activities.updateActivity(
"123abc", "678def", "Team task 01", params);
var Team = require('upwork-api/lib/routers/activities/team.js').Team;
var activities = new Team(api);
var params = {
'description': 'Desc updated',
'all_in_company': '1'
};
activities.updateActivity('123abc', '678def', 'Team task 01', params, function(error, data) {
console.log(data);
});
my $activities = Net::Upwork::API::Routers::Activities::Team->new($api);
my %params = {
'description' => 'Desc updated',
'all_in_company' => '1'
};
$activities->update_activities('123abc', '678def', 'Team task 01', %params);
import ( teamUpwork "github.com/upwork/golang-upwork/api/routers/activities/team" )
activities := teamUpwork.New(client)
params := make(map[string]string)
params["description"] = "Desc updated"
params["all_in_company"] = "1"
activities.UpdateActivity("123abc", "678def", "Team task 01", params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'server_time': '1405746487',
'tasks': {
'message': 'updated'
}
}
Assign engagements to the list of activities
Returns
Returns 200 OK in case of success.
DEFINITION
engagement.assign(
company_id, team_id, engagement, task_codes=None)
$activities->assign( string $company, integer $team,
mixed $engagement, mixed $params );
activities.assign(company, team, engagement, params)
activities.assign(
String company,
String team,
String engagement,
java.util.HashMap<String,String> params);
activities.assign(
company, team, engagementRef,
params, callback);
$activities->assign($company, $team, $engagement, %params);
activities.Assign(company, team, engagement, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.activities import engagement
client = upwork.Client(config)
engagement.Api(client).assign('123abc', '678def, '12345', ['Team task 01'])
$activities = new \Upwork\API\Routers\Activities\Engagement($client);
$params = array(
"tasks" => "Team task 01"
);
$activities->assign("123abc", "678def", 12345, $params);
activities = Net::Upwork::API::Routers::Activities::Engagement.new(client)
params = {
'tasks' => 'Team task 01'
}
activities.assign('123abc', '678def', 12345, params)
import com.Upwork.api.Routers.Activities.Engagement;
import java.util.HashMap;
Engagement activities = new Engagement(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("tasks", "Team task 01");
activities.assign(
"123abc", "678def", "12345", params);
var Engagement = require('upwork-api/lib/routers/activities/engagement.js').Engagement;
var activities = new Engagement(api);
var params = {'tasks': 'Team task 01'};
activities.assign('123abc', '678def', '12345', params, function(error, data) {
console.log(data);
});
my $activities = Net::Upwork::API::Routers::Activities::Engagement->new($api);
my %params = {
'tasks' => 'Team task 01'
};
$activities->assign('123abc', '678def', 12345, %params);
import ( engagementUpwork "github.com/upwork/golang-upwork/api/routers/activities/engagement" )
activities := engagementUpwork.New(client)
params := make(map[string]string)
params["tasks"] = "Team task 01"
activities.Assign("123abc", "678def", "12345", params)
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'server_time': '1405882462',
'tasks': ''
}
Assign to specific engagement the list of activities
Returns
Returns 200 OK in case of success.
DEFINITION
engagement.assign_to_engagement(engagement_ref, task_codes=None)
$activities->assignToEngagement( integer $engagementRef, mixed $params );
activities.assign_to_engagement(engagemnet_ref, params)
activities.assignToEngagement(
String engagementRef,
java.util.HashMap<String,String> params);
activities.assignToEngagement(engagementRef, params, callback);
$activities->assign_to_engagement($engagemnet_ref, %params);
activities.AssignToEngagement(engagementRef, params)
EXAMPLE REQUEST
import upwork
from upwork.routers.activities import engagement
client = upwork.Client(config)
engagement.Api(client).assign_to_engagement('1234', ['Team task 01'])
$activities = new \Upwork\API\Routers\Activities\Engagement($client);
$params = array(
"tasks" => "Team task 01"
);
$activities->assignToEngagement(1234, $params);
activities = Net::Upwork::API::Routers::Activities::Engagement.new(client)
params = {
'tasks' => 'Team task 01'
}
activities.assign_to_engagement(1234, params)
import com.Upwork.api.Routers.Activities.Engagement;
Engagement activities = new Engagement(client);
HashMap<String, String> params = new HashMap<String, String>();
params.put("tasks", "Team task 01");
activities.assignToEngagement("1234", params);
var Engagement = require('upwork-api/lib/routers/activities/engagement.js').Engagement;
var activities = new Engagement(api);
var params = {'tasks': 'Team task 01'};
activities.assignToEngagement('1234', params, function(error, data) {
console.log(data);
});
my $activities = Net::Upwork::API::Routers::Activities::Engagement->new($api);
my %params = {
'tasks' => 'Team task 01'
};
$activities->assign_to_engagement(1234, %params);
import ( engagementUpwork "github.com/upwork/golang-upwork/api/routers/activities/engagement" )
activities := engagementUpwork.New(client)
params := make(map[string]string)
params["tasks"] = "Team task 01"
activities.AssignToEngagement("1234", params)
EXAMPLE RESPONSE
{
'server_time': '1406027484',
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'message': 'assigned'
}
Archive activities
Returns
Returns 200 OK in case of success.
DEFINITION
team.archive_activities(company_id, team_id, task_code)
$activities->archiveActivities( string $company,
string $team, string $code );
activities.archive_activities(company, team, code)
activities.archiveActivity(
String company, String team, String code);
activities.archiveActivity(
company, team, code, callback);
$activities->archive_activities($company, $team, $code);
activities.ArchiveActivity(company, team, code)
EXAMPLE REQUEST
import upwork
from upwork.routers.activities import team
client = upwork.Client(config)
team.Api(client).archive_activities('123abc', '678def', 'Team task 01')
$activities = new \Upwork\API\Routers\Activities\Team($client);
$activities->archiveActivities("123abc", "678def",
"Team task 01");
activities = Net::Upwork::API::Routers::Activities::Team.new(client)
activities.archive_activities('123abc', '678def',
'Team task 01')
import com.Upwork.api.Routers.Activities.Team;
Team activities = new Team(client);
activities.archiveActivity(
"123abc", "678def", "Team task 01");
var Team = require('upwork-api/lib/routers/activities/team.js').Team;
var activities = new Team(api);
activities.archiveActivity('123abc', '678def', 'Team task 01', function(error, data) {
console.log(data);
});
my $activities = Net::Upwork::API::Routers::Activities::Team->new($api);
$activities->archive_activities('123abc', '678def','Team task 01');
import ( teamUpwork "github.com/upwork/golang-upwork/api/routers/activities/team" )
activities := teamUpwork.New(client)
activities.ArchiveActivity("123abc", "678def", "Team task 01")
EXAMPLE RESPONSE
{
'auth_user': {
'first_name': 'John',
'last_name': 'Johnson',
'timezone': 'Asia/Omsk',
'timezone_offset': '25200'
},
'server_time': '1405883808',
'tasks': '1'
}
Unarchive activities
Returns
Returns 200 OK in case of success.
DEFINITION
team.unarchive_activities(company_id, team_id, task_code)
$activities->unarchiveActivities( string $company,
string $team,
string $code );
activities.unarchive_activities(company, team