Table Of Contents

Previous topic

odesk package

Next topic

Changelog

This Page

odesk.routers package

Module contents

Routers package.

All communication with oDesk API is handled by the routers.

When you import odesk package and instantiate odesk.Client class, routers are dynamically attatched to your client object.

Submodules

odesk.routers.finreport module

class odesk.routers.finreport.Finreports(client)

Bases: odesk.namespaces.GdsNamespace

api_url = 'finreports/'
get_buyer_companies_billings(buyer_company_id, query)

Generate Billing Reports for a Specific Buyer’s Company. The authenticated user must be the company owner.

Parameters:
buyer_company_id:
 Buyer’s Company ID
query:The GDS query string
get_buyer_companies_earnings(buyer_company_id, query)

Generate Earning Reports for a Specific Buyer’s Company.

Parameters:
buyer_company_id:
 Buyer’s Team ID
query:The GDS query string
get_buyer_teams_billings(buyer_team_id, query)

Generate Billing Reports for a Specific Buyer’s Team. The authenticated user must be an admin or a staffing manager of the team.

Parameters:
buyer_team_id:Buyer’s Team ID
query:The GDS query string
get_buyer_teams_earnings(buyer_team_id, query)

Generate Earning Reports for a Specific Buyer’s Team.

Parameters:
buyer_team_id:Buyer’s Team ID
query:The GDS query string
get_financial_entities(accounting_id, query)

Generate Financial Reports for a Specific Account.

Parameters:
accounting_id:ID of an Accounting entity
query:The GDS query string
get_financial_entities_provider(provider_id, query)

Generate Financial Reports for an owned Account.

Parameters:
provider_id:Provider ID
query:The GDS query string
get_provider_billings(provider_id, query)

Generate Billing Reports for a Specific Provider.

Parameters:
provider_id:Provider ID
query:The GDS query string
get_provider_companies_billings(provider_company_id, query)

Generate Billing Reports for a Specific Provider’s Company. The authenticated user must be the company owner

Parameters:
provider_company_id:
 Provider’s Company ID
query:The GDS query string
get_provider_companies_earnings(provider_company_id, query)

Generate Earning Reports for a Specific Provider’s Company.

Parameters:
provider_company_id:
 Provider’s Team ID
query:The GDS query string
get_provider_earnings(provider_id, query)

Generate Earning Reports for a Specific Provider

Parameters:
provider_id:Provider ID
query:The GDS query string
get_provider_teams_billings(provider_team_id, query)

Generate Billing Reports for a Specific Provider’s Team. The authenticated user must be an admin or a staffing manager of the team.

Parameters:
provider_team_id:
 Provider’s Team ID
query:The GDS query string
get_provider_teams_earnings(provider_team_id, query)

Generate Earning Reports for a Specific Provider’s Team.

Parameters:
provider_team_id:
 Provider’s Team ID
query:The GDS query string
version = 2

odesk.routers.hr module

class odesk.routers.hr.HR(client)

Bases: odesk.namespaces.Namespace

HR API version 2

CONTRACT_REASON_OPTIONS = ('API_REAS_MISREPRESENTED_SKILLS', 'API_REAS_CONTRACTOR_NOT_RESPONSIVE', 'API_REAS_HIRED_DIFFERENT', 'API_REAS_JOB_COMPLETED_SUCCESSFULLY', 'API_REAS_WORK_NOT_NEEDED', 'API_REAS_UNPROFESSIONAL_CONDUCT')
CONTRACT_WOULD_HIRE_AGAIN_OPTONS = ('yes', 'no')

userrole api

JOB_KEEP_OPEN_OPTIONS = ('yes', 'no')
JOB_STATUSES = ('open', 'filled', 'cancelled')
JOB_TYPES = ('hourly', 'fixed-price')
JOB_VISIBILITY_OPTIONS = ('public', 'private', 'odesk', 'invite-only')
api_url = 'hr/'
delete_job(job_id, reason_code)

Delete a job.

Parameters:
job_id:

Job reference ID

reason_code:

The reason code to cancel the job, e.g. 41. Possible values are:

  • 67 - Accidental opening creation
  • 51 - All positions filled
  • 49 - Filled by alternate source
  • 41 - Project was cancelled
  • 34 - No developer for requested skills
end_contract(contract_reference, reason, would_hire_again, fb_scores=None, fb_comment=None)

Close the referenced contract.

Parameters:
contract_reference:
 

The Contract’s reference ID

reason:

The reason key, e.g. ‘API_REAS_HIRED_DIFFERENT’. Possible values are:

  • ‘API_REAS_MISREPRESENTED_SKILLS’ -

    “Contractor misrepresented his/her skills”

  • ‘API_REAS_CONTRACTOR_NOT_RESPONSIVE’ -

    “Contractor not responsive”

  • ‘API_REAS_HIRED_DIFFERENT’ -

    “Hired a different contractor”

  • ‘API_REAS_JOB_COMPLETED_SUCCESSFULLY’ -

    “Job was completed successfully”

  • ‘API_REAS_WORK_NOT_NEEDED’ -

    “No longer need this work completed”

  • ‘API_REAS_UNPROFESSIONAL_CONDUCT’ -

    “Unprofessional conduct”

would_hire_again:
 

Whether you would hire a contractor again. Required if total charge on the contract is $0. Possible values are: [‘yes’, ‘no’]

fb_scores:

(optional) Estimate, a dictionary of scores, where id is reference to score description (see example below). The feedback scores are optional, but if present they must be complete: all scores. Below are the possible score reference id values.

Feedback on contractor:

  • 3 - “Skills / competency and skills

    for the job, understanding of specifications/instructions”

  • 4 - “Quality / quality of work

    deliveries”

  • 5 - “Availability / online presence

    on a consistent schedule”

  • 6 - “Deadlines / ability to complete

    tasks on time”

  • 7 - “Communication / communication

    skills, frequent progress updates, responsiveness”

  • 8 - “Cooperation / cooperation and

    flexibility, suggestions for improvement”

Feedback on employer:
  • 9 - “Skills / competency and skills

    for the job, understanding of task complexities”

  • 10 - “Quality / quality of

    specifications/instructions”

  • 11 - “Availability / online presence

    on a consistent schedule”

  • 12 - “Deadlines / understanding of

    complexities and trade-offs”

  • 13 - “Communication / communication

    skills and responsiveness, feedback and guidance”

  • 14 - “Cooperation / cooperation and

    flexibility, open to suggestions for improvement”

Example: {‘fb_scores[3]’: 5, ‘fb_scores[4]’: 4, ... ,

‘fb_scores[8]’: 5}

fb_comment:

(optional) Feedback comment, some string message. It is optional but if present, then the fb_scores parameter is also required.

get_companies()

Retrieve the list of companies to which the current authorized user has access.

get_company(company_referece)

Retrieve the company object from the company reference.

Parameters:
company_reference:
 The company reference (can be found using get_companies method)
get_company_teams(company_referece)

Retrieve a list of teams within the company being referenced.

User has to have access to the referenced company.

Parameters:
company_reference:
 The company reference (can be found using get_companies method)
get_company_users(company_referece, active=True)

Retrieve a list of all users within the referenced company.

Only available for users with hiring privileges for the company.

Parameters:
company_reference:
 The company reference (can be found using get_companies method)
active:True/False (default True)
get_engagement(engagement_reference)

Retrieve referenced engagement object.

Parameters:
engagement_reference:
 Engagement reference ID
get_engagements(buyer_team_reference=None, include_sub_teams=None, provider_reference=None, profile_key=None, job_reference=None, agency_team_reference=None, status=None, created_time_from=None, created_time_to=None, page_offset=0, page_size=20, order_by=None)

Retrieve engagements.

Parameters:
buyer_team_reference:
 

(optional) The team reference ID

include_sub_teams:
 

(optional) <0|1> - whether to include info about sub-teams

provider_reference:
 

(optional) The provider’s reference ID. Has the override priority over the profile_key if both specified.

profile_key:

(optional) Unique profile key, used if provider_reference is absent

job_reference:

(optional) The Job’s reference ID

agency_team_reference:
 

(optional) The Agency’s reference ID

status:

(optional) Engagement status, e.g. status=active;closed

created_time_from:
 

(optional) timestamp e.g.‘2008-09-09 00:00:01’

created_time_to:
 

(optional) timestamp e.g.‘2008-09-09 00:00:01’

page_offset:

(optional) Number of entries to skip

page_size:

(optional: default 20) Page size in number of entries

order_by:

(optional) Sorting, in format $field_name1;$field_name2;..$field_nameN;AD...A, where A means “Ascending”, D means “Descending”, available fields are:

  • ‘reference’,
  • ‘created_time’,
  • ‘offer__reference’,
  • ‘job__reference’,
  • ‘buyer_team__reference’,
  • ‘provider__reference’,
  • ‘status’,
  • ‘engagement_start_date’,
  • ‘engagement_end_date’
get_job(job_reference)

Retrieve the complete job object for the referenced job. This is only available to users with manage_recruiting permissions within the team that the job is posted in.

Parameters:
job_reference:Job reference
get_jobs(buyer_team_reference, include_sub_teams=False, status=None, created_by=None, created_time_from=None, created_time_to=None, page_offset=0, page_size=20, order_by=None)

Retrieves all jobs that a user has manage_recruiting access to. This API call can be used to find the reference ID of a specific job.

Parameters:
buyer_team_reference:
 The buyer’s team reference ID
include_sub_teams:
 (optional) <1|0> Whether to include sub-teams
status:(optional) Status of a job
created_by:(optional) Creator’s user_id
created_time_from:
 (optional) timestamp, e.g. 2009-01-20T00:00:01
created_time_to:
 (optional) timestamp, e.g. 2009-02-20T11:59:59
page_offset:(optional) Number of entries to skip
page_size:(optional: default 20) Page size in number of entries
order_by:(optional)
get_offer(offer_reference)

Retrieve the referenced offer.

Parameters:
offer_reference:
 Offer reference ID
get_offers(buyer_team_reference, include_sub_teams=None, provider_ref=None, profile_key=None, job_ref=None, agency_ref=None, status=None, created_time_from=None, created_time_to=None, page_offset=0, page_size=20, order_by=None)

Retrieve a list of all the offers on a specific job or within a specific team.

Parameters:
buyer_team_reference:
 The buyer’s team reference ID
include_sub_teams:
 (optional) <1|0> Whether to include sub teams
provider_ref:(optional) The provider’s reference ID
profile_key:(optional) Unique profile key, used if provider_reference is absent
job_ref:(optional) The Job’s reference ID
agency_ref:(optional) The Agency’s reference ID
status:(optional) Engagement status, e.g., status=active;closed
created_time_from:
 (optional) timestamp e.g.‘2008-09-09 00:00:01’
created_time_to:
 (optional) timestamp e.g.‘2008-09-09 00:00:01’
page_offset:(optional) Number of entries to skip
page_size:(optional: default 20) Page size in number of entries
order_by:(optional) Sorting
get_team(team_reference, include_users=False)

Retrieve the team information.

Parameters:
team_reference:The team reference
include_users:Whether to include details of users (default: False)
get_team_users(team_reference, active=True)

Retrieve users of the team.

Parameters:
team_reference:The team reference
active:Status of the users, If True - return active users, if False - return inactive users. Default value is True.
get_teams()

Retrieve a list of all the teams that a user has access to.

This will return teams across all companies the current user has access to.

get_user(user_reference)

Retrieve the user object from the user reference.

Parameters:
user_reference:The user reference
get_user_me()

Retrieve currently authenticated user object.

get_user_roles()

Retrieve UserRoles object.

This is a very important and useful API call, it returns a complete list of privileges the currently authorized user has within all the teams and companies they have access to.

post_job(buyer_team_reference, title, job_type, description, visibility, category=None, subcategory=None, budget=None, duration=None, start_date=None, skills=None, subcategory2=None)

Post a job.

Parameters:
buyer_team_reference:
 

Reference ID of the buyer team that is posting the job, e.g. 34567

title:

Title of the Job

job_type:

Type of posted job, e.g. “hourly” Possible values are:

  • ‘hourly’
  • ‘fixed-price’
description:

The job’s description

visibility:

The job’s visibility, e.g. ‘private’. Possible values are:

  • ‘public’ jobs are available to all users who search jobs
  • ‘private’ job is visible to employer only
  • ‘odesk’ jobs appear in search results only for oDesk users who are logged into the service
  • ‘invite-only’ jobs do not appear in search and are used for jobs where the buyer wants to control the potential applicants
category:

(conditionally optional) The category of job, e.g. ‘Web Development’ (where to get? - see Metadata API)

subcategory:

(conditionally optional) The subcategory of job, e.g. ‘Web Programming’ (where to get? - see Metadata API)

budget:

(conditionally optional) The budget of the Job, e.g. 100. Is used for ‘fixed-price’ jobs only.

duration:

(conditionally optional) The duration of the job in hours, e.g. 90. Used for ‘hourly-jobs’ only.

start_date:

(optional) The start date of the Job, e.g. 06-15-2011. If start_date is not included the job will default to starting immediately.

skills:

(optional) Skills required for the job. Must be a list or tuple even of one item, e.g. ['python']

subcategory2:

(conditionally optional) The subcategory (V2) of job, e.g. ‘Web & Mobile Programming’ (where to get? - see Metadata API, List Categories (V2))

post_offer(job_reference, provider_team_reference=None, provider_reference=None, profile_key=None, message_from_buyer=None, engagement_title=None, attached_doc=None, fixed_charge_amount_agreed=None, fixed_pay_amount_agreed=None, fixed_price_upfront_payment=None, hourly_pay_rate=None, weekly_salary_charge_amount=None, weekly_salary_pay_amount=None, weekly_stipend_hours=None, weekly_hours_limit=None, start_date=None, keep_open=None)

Make an offer to the provider.

Parameters:
job_reference:The Job’s reference ID
provider_team_reference:
 (optional) The reference ID of the provider team. If specified, the check is performed whether user you’re making offer to belongs to the team
provider_reference:
 (conditionally optional) The provider’s reference. Has the override priority over profile_key if both specified.
profile_key:(conditionally optional) Unique profile key, used if provider_reference is absent
message_from_buyer:
 (optional) Text message
engagement_title:
 (optional) The engagement title
attached_doc:(optional) Attachment
fixed_charge_amount_agreed:
 (optional) The amount of agreed charge, required by fixed-price job
fixed_pay_amount_agreed:
 (optional) The amount of agreed pay
fixed_price_upfront_payment:
 (optional) The amount of upfront payment
hourly_pay_rate:
 (optional) Hourly pay rate
weekly_salary_charge_amount:
 (optional) Salary charge amount per week
weekly_salary_pay_amount:
 (optional) Salary pay amount per week, required by fixed-price job
weekly_stipend_hours:
 (optional) Stipend hours per week
weekly_hours_limit:
 (optional) Limit of hours per week
start_date:(optional) The offer start date
keep_open:(optional, default: ‘no’) Leave the job opened. Possible values are: ‘yes’, ‘no’

When just job and provider reference params are provided in the request then an invitation for an interview should be send to the according provider. Provider can either choose to accept the invitation and start the communication with the user or decline it, in which case communication between client and provider stops.

When additionally engagement title and charge amount params are provided in the request, then an actual offer is created for the provider. In this case the provider can either accept the offer and start working or decline the offer.

post_team_adjustment(team_reference, engagement_reference, comments, charge_amount, notes=None)

Add bonus to an engagement.

Parameters:
team_reference:The Team reference ID
engagement_reference:
 The Engagement reference ID
comments:Comments about this adjustment, e.g. “Bonus for a good job”
charge_amount:The amount that will be charged to the employer, e.g. 110
notes:(optional) Notes

Note

You should use either amount parameter or charge_amount, but not both. Make sure that at least one of them is present.

restart_contract(contract_reference, message)

Restart the Contract.

Parameters:
contract_reference:
 The Contract’s reference ID
message:A message/reason for contractor
suspend_contract(contract_reference, message)

Suspend the Contract.

Parameters:
contract_reference:
 The Contract’s reference ID
message:A message/reason for contractor
update_job(job_id, buyer_team_reference, title, description, visibility, category=None, subcategory=None, budget=None, duration=None, start_date=None, status=None)

Update a job.

Parameters:
job_id:

Job reference ID

buyer_team_reference:
 

Reference ID of the buyer team that is posting the job, e.g. 34567

title:

Title of the Job

description:

The job’s description

visibility:

The job’s visibility, e.g. ‘private’. Possible values are:

  • ‘public’ jobs are available to all users who search jobs
  • ‘private’ job is visible to employer only
  • ‘odesk’ jobs appear in search results only for oDesk users who are logged into the service
  • ‘invite-only’ jobs do not appear in search and are used for jobs where the buyer wants to control the potential applicants
category:

(optional) The category of job, e.g. ‘Web Development’ (where to get? - see Metadata API)

subcategory:

(optional) The subcategory of job, e.g. ‘Web Programming’ (where to get? - see Metadata API)

budget:

(conditionally optional) The budget of the Job, e.g. 100. Is used for ‘fixed-price’ jobs only.

duration:

(conditionally optional) The duration of the job in hours, e.g. 90. Used for ‘hourly-jobs’ only.

start_date:

(optional) The start date of the Job, e.g. 06-15-2011. If start_date is not included the job will default to starting immediately.

status:

(required) The status of the job, e.g. ‘filled’. Possible values are: - ‘open’ - ‘filled’ - ‘cancelled’

version = 2
class odesk.routers.hr.HR_V1(client)

Bases: odesk.namespaces.Namespace

HR API version 1

api_url = 'hr/'
invite_to_interview(job_id, cover, profile_key=None, provider_reference=None)

Invite to an interview.

Parameters:
job_id:Job reference ID
cover:Text of the cover letter
profile_key:(optional) Unique contractor’s key, e.g. ~~677961dcd7f65c01
provider_reference:
 (optional) Developer’s unique reference ID, e.g. 12345. Use it if no profile_key available

Either one of the parameters profile_key or provider_reference should be provided, otherwise error will be raised.

version = 1
class odesk.routers.hr.HR_V3(client)

Bases: odesk.namespaces.Namespace

HR API version 3.

activate_milestone(milestone_id, message=None)

Activates a milestone that has not been funded.

Parameters:
milestone_id:Milestone reference.
message:(optional) Message from the client to the freelancer.
api_url = 'hr/'
approve_milestone(milestone_id, amount=None, bonus=None, pay_comments=None, underpayment_reason=None, note2contractor=None)

Approve the milestone.

Parameters:
milestone_id:Milestone reference.
amount:(optional) Amount of money to be paid. If none provided, the full deposit_amount is paid.
bonus:(optional) Amount of money paid as bonus.
pay_comments:(optional) Comments on the payment.
underpayment_reason:
 (optional) Reason for a smaller payment than the one agreed. Valid values: 329, 330, 331, 332
note2contractor:
 (optional) Notes from the client to the freelancer.
approve_submission(submission_id, amount, bonus=None, pay_comments=None, underpayment_reason=None, note2contractor=None)

Approve the submission.

Parameters:
submission_id:Submission reference.
amount:Amount of money to be paid. If none provided, the full deposit_amount is paid.
bonus:(optional) Amount of money paid as bonus.
pay_comments:(optional) Comments on the payment.
underpayment_reason:
 (optional) Reason for a smaller payment than the one agreed. Valid values: 329, 330, 331, 332
note2contractor:
 (optional) Notes from the client to the freelancer.
create_milestone(contract_reference, milestone_description, deposit_amount, due_date=None)

Create a milestone.

Parameters:
contract_reference:
 Contract reference. Contracts info are available in the Engagements API.
milestone_description:
 Name of the milestone.
deposit_amount:Amount to deposit for this milestone.
due_date:(optional) Expected date of finalization. Format mm-dd-yyyy.
delete_milestone(milestone_id)

Delete the milestone.

Parameters:
milestone_id:Milestone reference.
edit_milestone(milestone_id, milestone_description=None, deposit_amount=None, due_date=None, message=None)

Edit an existing milestone.

Parameters:
milestone_id:Milestone reference.
milestone_description:
 (optional) Name of the milestone.
deposit_amount:(optional) Amount to deposit for this milestone.
due_date:(optional) Expected date of finalization. Format mm-dd-yyyy.
message:(optional) Message from the client to the freelancer.
get_active_milestone(contract_reference)

Get active milestone for specific contract.

Parameters:
contract_reference:
 Contract reference. Contracts info are available in the Engagements API.
get_client_application(application_id, buyer_team__reference)

Get specific job application as a client.

Parameters:
application_id:Job application reference ID.
buyer_team__reference:
 The reference ID of the client’s team. It allows getting applications for a specific team. Example: 34567. Use ‘List Teams’ API call to get it.
get_freelancer_application(application_id)

Get specific job application as a freelancer.

Parameters:
application_id:Job application reference ID.
get_milestone_submissions(milestone_id)

Get all submissions for specific milestone.

Parameters:
milestone_id:Milestone reference ID.
list_client_applications(buyer_team__reference, job_key, status=None, profile_key=None, agency_team__reference=None, order_by=None, page_offset=None, page_size=None)

List job applications as a client.

Parameters:
buyer_team__reference:
 The reference ID of the client’s team. It allows getting applications for a specific team. Example: 34567. Use ‘List Teams’ API call to get it.
job_key:The job key. It allows getting applications for a specific job. Example: ~01d54a7xxxxx125731.
status:(optional) The current status of the job application. Valid values: shortlisted, messaged, hired, offered, declined, hidden.
profile_key:(optional) Filters by a specific freelancer’s profile key.
agency_team__reference:
 (optional) The reference ID of the agency.
order_by:(optional) Sorts results in format $field_name1;$field_name2;..$field_nameN;AD...A. Here A resebles ascending order, D - descending order. Example: order_by=created_time;D.
page_offset:(optional) Number of entries to skip
page_size:(optional: default 20) Page size in number of entries
list_freelancer_applications(status=None)

List job applications as a freelancer.

Parameters:
status:(optional) The current status of the job application. Valid values: interviews, invites, active.
reject_submission(submission_id, note2contractor)

Reject the submission.

Parameters:
submission_id:Submission reference.
note2contractor:
 Notes from the client to the freelancer.
request_submission_approval(milestone_id, note2client, amount)

Freelancer submits work for the client to approve.

Parameters:
milestone_id:Milestone reference.
note2client:Notes from freelancer to client about work that was done.
amount:Amount requested by the freelancer.
version = 3

odesk.routers.job module

class odesk.routers.job.Job(client)

Bases: odesk.namespaces.Namespace

api_url = 'profiles/'
get_job_profile(job_key)

Returns detailed profile information about job(s).

Documented at https://developers.odesk.com/?lang=python#jobs_get-job-profile

Parameters:
job_key:The job key or a list of keys, separated by ”;”, number of keys per request is limited by 20. You can access job profile by job reference number, in that case you can’t specify a list of jobs, only one profile per request is available.
version = 1

odesk.routers.mc module

class odesk.routers.mc.MC(client)

Bases: odesk.namespaces.Namespace

api_url = 'mc/'
get_thread_by_context(username, job_key, application_id, context='Interviews', last_posts=False)

List details on a thread given a specific context, job key and application ID.

Parameters:
username:User name
job_key:The context job key
application_id:The context application ID.
context:Name of the context. Valid values: Interviews. Default: Interviews
last_posts:If set to True, return the list of the threads for the given context with the content of the last message for each of the threads listed.
get_thread_content(username, thread_id, paging_offset=0, paging_count=20)

List details of a specific thread.

Parameters:
username:User name
thread_id:Thread ID
paging_offset:Start of page (number of results to skip)
paging_count:Page size (number of results)
get_tray_content(username, tray, paging_offset=None, paging_count=None)

Retrieve message tray contents.

Parameters:
username:User name
tray:Tray
paging_offset:Start of page (number of results to skip)
paging_count:Page size (number of results)
get_trays(username=None, paging_offset=0, paging_count=20)

Retrieve a list of all active trays and a message count for each.

Parameters:
username:User name
post_message(username, recipients, subject, body, thread_id=None, bcc=None, attachment_key=None)

Send a new message (creating a new thread) or reply to an existing thread.

Parameters:
username:User name (of sender)
recipients:Recipient(s) (a single string or a list/tuple)
subject:Message subject
body:Message text
thread_id:(optional) The thread id if replying to an existing thread
bcc:(optional) List of BCC recipients, use comma (”,”) to separate ids in list
attachment_key:(optional) The unique private key of any attachment associated with the thread
put_threads_deleted(username, thread_ids)

Marks threads as deleted.

Parameters:
username:User name
thread_ids:must be a list, even of 1 item
put_threads_deleted_or_undeleted(username, thread_ids, deleted=True)

Marks threads as deleted/not deleted.

Parameters:
username:User name
thread_ids:must be a list, even of 1 item
deleted:True/False (optional: default True)
put_threads_read(username, thread_ids)

Marks threads as read.

Parameters:
username:User name
thread_ids:must be a list, even of 1 item
put_threads_read_unread(username, thread_ids, read=True)

Marks threads as read/unread.

Parameters:
username:User name
thread_ids:must be a list, even of 1 item
read:True/False (optional: default True)
put_threads_starred(username, thread_ids)

Marks threads as starred.

Parameters:
username:User name
thread_ids:must be a list, even of 1 item
put_threads_starred_or_unstarred(username, thread_ids, starred=True)

Marks threads as starred/not starred.

Parameters:
username:User name
thread_ids:must be a list, even of 1 item
starred:True/False (optional: default True)
put_threads_undeleted(username, thread_ids)

Marks threads as not deleted

Parameters:
username:User name
thread_ids:must be a list, even of 1 item
put_threads_unread(username, thread_ids)

Marks threads as unread.

Parameters:
username:User name
thread_ids:must be a list, even of 1 item
put_threads_unstarred(username, thread_ids)

Marks threads as unstarred.

Parameters:
username:User name
thread_ids:must be a list, even of 1 item
version = 1

odesk.routers.offers module

class odesk.routers.offers.Offers(client)

Bases: odesk.namespaces.Namespace

Offers API version 1

accept_or_decline(offer_id, action_name)

Get specific offer as freelancer.

Parameters:
offer_id:Offer reference ID.
action_name:The name of the action to run.
api_url = 'offers/'
get_client_offer(offer_id, company_id=None, job__reference=None)

Get offer as client.

Parameters:
offer_id:Offer reference ID.
company_id:(optional) The client’s company reference ID. Example: 34567. Get it using ‘List companies’ API call. If company_id is not specified, the API will infer it from job’s data relying on the provided job__reference parameter. Either company_id or job__reference parameter must be specified.
job__reference:(optional) The job reference ID. Get it using ‘List jobs’ API call.
get_freelancer_offer(offer_id)

Get specific offer as freelancer.

Parameters:
offer_id:Offer reference ID.
list_client_offers(company_id=None, team__reference=None, job__reference=None, status=None, page_offset=None, page_size=None)

List client offers.

Parameters:
company_id:(optional) The client’s company reference ID. Example: 34567. Get it using ‘List companies’ API call. If company_id is not specified, the API will infer it from job’s data relying on the provided job__reference parameter. Either company_id or job__reference parameter must be specified.
team__reference:
 (optional) The client’s team reference ID. Example: 34567. Get it using ‘List teams’ API call. Please note, that if team__reference is not specified, the API will infer it from job’s data relying on the provided.
job__reference:(optional) The job reference ID. Get it using ‘List jobs’ API call.
status:(optional) The current status of the Offer. By default only offers in status new are returned. Valid values: accepted, new, declined, expired, withdrawn, cancelled, changed.
page_offset:(optional) Number of entries to skip
page_size:(optional: default 20) Page size in number of entries
list_freelancer_offers(status=None, page_offset=None, page_size=None)

List freelancer’s offers.

Parameters:
status:(optional) The current status of the Offer. By default only offers in status new are returned. Valid values: accepted, new, declined, expired, withdrawn, cancelled, changed.
page_offset:(optional) Number of entries to skip
page_size:(optional: default 20) Page size in number of entries
send_client_offer(title, job_type, charge_rate, message_to_contractor, team__reference=None, client_team_ref=None, contractor_username=None, contractor_reference=None, contractor_key=None, contractor_org=None, context=None, charge_upfront_percent=None, weekly_limit=None, weekly_stipend=None, expires_on=None, close_on_accept=None, related_jobcategory=None, milestone=None)

Send client offer to the freelancer.

Parameters:
title:The title of the offer/contract.
job_type:The type of the job. Valid values: hourly, fixed-price.
charge_rate:The budget amount for fixed-price jobs or the hourly charge rate for hourly jobs.
message_to_contractor:
 Instructions and other job details for the freelancer.
team__reference:
 The client’s team reference ID. Example: 34567. Use ‘List teams’ API call to get it.
client_team_ref:
 The client’s team reference. Example: mytestcompany:myteam. Use ‘List teams’ API call to get it.
contractor_username:
 The freelancer’s username. Example: contractoruid. It can be ignored if contractor_reference or contractor_key parameter is set.
contractor_reference:
 The freelancer’s reference ID. It will be ignored if contractor_username or contractor_key is specified. Example: 1234. You can use ‘Search freelancers’ API call to get the freelancer’s reference ID.
contractor_key:The unique profile key, used if contractor_username is absent. Example: ~~677961dcd7f65c01.
contractor_org:The freelancer’s team reference, required for sending offers to agency freelancers.
context:Additional data about the offer. Valid array keys are: previous_offer_ref, job_posting_ref, job_application_ref, contract_ref. Example: context[job_posting_ref] = {{ opening_id }} & context[job_application_ref] = {{ application_id }} where job_posting_ref is a job key, for example ~01c8e0xxxxxxxx05255.
charge_upfront_percent:
 (deprecated) This parameter remains for compatibility reasons and will be removed in next releases those come after February 6th 2015. The percentage of the budget amount that the freelancer is paid on acceptance of the offer (for fixed price jobs only).
weekly_limit:The maximum number of hours per week the freelancer can bill for.
weekly_stipend:An additional payment to be issued to the freelancer each week.
expires_on:(deprecated) This parameter remains for compatibility reasons and will be removed in next releases those come after February 6th 2015. Time when the offer expires. This should be a UNIX UTC timestamp. For example: 1400785324.
close_on_accept:
 If the value is 1, it automatically closes the related job post if this offer is accepted. The default value is 1. Valid values: 0, 1.
related_jobcategory:
 Related job category. For example: 9.
milestones:(required after February 6th 2015) Array of milestones for fixed-priced jobs in the following format: milestones[0][$key], ..., milestones[N][$key], where key is one of the following - milestone_description (string), deposit_amount (float), due_date (string in format mm-dd-yyyy)
version = 1

odesk.routers.provider module

class odesk.routers.provider.Provider(client)

Bases: odesk.namespaces.Namespace

api_url = 'profiles/'
get_categories_metadata()

Returns list of all categories available for job/contractor profiles.

get_provider(provider_ciphertext)

Retrieve an exhaustive list of attributes associated with the referenced provider.

Parameters:
provider_ciphertext:
 The provider’s cipher text (key)
get_provider_brief(provider_ciphertext)

Retrieve an brief list of attributes associated with the referenced provider.

Parameters:
provider_ciphertext:
 The provider’s cipher text (key)
get_reasons_metadata(reason_type)

Returns a list of reasons by specified type.

Parameters:
type:Requested type of the reason. Valid values: EmployerEndsNoStartContract, CloseOpening, RejectCandidate, RejectInterviewInvite, CancelCandidacy, EndProviderContract, EndCustomerContract, EndAssignment
get_regions_metadata()

Returns list of all region choices available for job/contractor profiles.

get_skills_metadata()

Returns list of all skills available for job/contractor profiles.

get_tests_metadata()

Returns list of all available tests at oDesk.

search_jobs(data=None, page_offset=0, page_size=20, order_by=None)

Search oDesk jobs. NOTE: This call will be deprecated in favor to API V2 search_jobs()

Parameters:
data:
A dict of the following parameters

(all parameters are optional):

q:

Query, e.g. “python”, search the text of the job’s description.

c1:

Category name. Use Metadata API to get the list of currently valid categories

c2:

Subcategory, which is related to category (c1), please use c2[] to specify a couple subcategories

qs:

Skill required, single value or comma-separated list

fb:

Feedback (adjusted score). Limit your search to buyers with at least a score of the number passed in this parameter. Use the following values to filter by score:

  • none = ‘0’
  • 1 - 4 Scores = ‘10’
  • 4 - 4.5 Scores = ‘40’
  • 4.5 - 5 Scores = ‘45’
  • 5.0 Scores = ‘50’
min:

Minimum budget

max:

Maximum budget

t:

Job type. Possible values are: * ‘Hourly’ * ‘Fixed’

wl:

Hours per week. This parameter can only be used when searching Hourly jobs. These numbers are a little arbitrary, so follow the following parameters in order to successfully use this parameter:

  • As Needed < 10 Hours/Week = ‘0’
  • Part Time: 10-30 hrs/week = ‘20’
  • Full Time: 30+ hrs/week = ‘40’
dur:

Engagement duration. This parameter can only be used when searching Hourly jobs. These numbers are a little arbitrary, so follow the following parameters in order to successfully use this parameter:

  • Ongoing / More than 6 months = ‘26’
  • 3 to 6 months = ‘13’
  • 1 to 3 months = ‘4’
  • Less than 1 month = ‘1’
  • Less than 1 week = ‘0’
dp:

Date posted. Search jobs posted according to timeframe. Use the following parameters to specify a timeframe:

  • Any Timeframe = empty
  • Last 24 hours = ‘0’
  • Last 24 hours - 3 Days = ‘1’
  • Last 3-7 Days = ‘3’
  • Last 7-14 Days - ‘7’
  • Last 14-30 Days - ‘14’
  • > 30 Days - ‘30’
st:

Job status. Search for Canceled jobs, In Progress Jobs and Completed Jobs. Defaults to Open Jobs. Possible values:

  • Open Jobs = ‘Open’
  • Jobs in Progress = ‘In Progress’
  • Completed Jobs = ‘Completed’
  • Canceled Jobs = ‘Cancelled’
tba:

Total billed assignments. Limit your search to buyers who completed at least this number of paid assignments. Possible values:

  • none = ‘0’
  • has 1-5 billed assignments = ‘1’
  • has 5-10 billed assignments = ‘5’
  • has >10 billed assignments = ‘10’
gr:

Preferred group. Limits your search to buyers in a particular group

to:

Search the provider profile title text only. Possible values: ‘yes’|’no’, by default ‘no’.

page_offset:

Start of page (number of results to skip) (optional)

page_size:

Page size (number of results) (optional: default 20)

order_by:

Sorting, in format $field_name1;$field_name2;..$field_nameN;AD...A, where A means ‘Ascending’, D means ‘Descending’, e.g. date_posted;A

search_providers(data=None, page_offset=0, page_size=20, order_by=None)

Search oDesk providers. NOTE: This call will be deprecated in favor to API V2 search_providers()

Parameters:
data:
A dict of the following parameters

(all parameters are optional):

q:

Search query, e.g. “python”. Any text that appears in a provider’s profile

c1:

Category name. Use get_categories_metadata() to get the list of currently valid categories

c2:

Subcategory, which is related to category (c1), please use c2[] to specify a couple subcategories. Use get_categories_metadata() to get available subcategories.

fb:

Feedback (adjusted score), e.g. fb='2.0 - 2.9 Stars' This searches for providers who have an adjusted feedback score equal or greater (up to 5) than the number passed in this parameter (decimals are okay).

hrs:

(Total hours) This searches for providers who have a total number of hours equal or greater to the number passed in this parameter.

ir:

This boolean parameter is used in combination with the total hours worked parameter, and searches providers who have worked within the last six months. “Yes” or “No” are the only valid searches. Omitting this will default to ‘No’.

min:

The provider’s minimum rate they have charged in the past. Excludes providers with a public rate less than this amount.

max:

The provider’s maximum rate they have charged in the past. Excludes providers with a public rate greater than this amount.

loc:

Country region. Limit your searches to a specific country region. Possible values:

  • ‘Australasia’
  • ‘East Asia’
  • ‘Eastern Europe’
  • ‘North America’
  • ‘South Asia’
  • ‘Western Europe’
  • ‘Misc’
pt:

Provider type. Limit your search to independent or affiliate providers. Possible values:

  • ‘Individual’
  • ‘Affiliated’

By default both types are returned.

last:

Limit your search to providers who were active after the date passed in this parameter. Dates should be formatted like: 07-13-2009

test:

Limit your search to providers who have passed a specific test (based on the test id). You can get available tests using get_tests_metadata() Only singe value is allowed.

port:

Limit your search to providers who have at least this number of portfolio items.

rdy:

Only return oDesk ready providers.

eng:

Limit your results to providers who have at least the rating passed in the parameter. Only the following English levels are available (no decimals): [1,2,3,4,5]

ag:

Agency reference. Limit your search to a specific agency.

to:

Search the provider profile title text only. Possible values: ‘yes’|’no’, by default ‘no’.

g:

Limit your search to a specific group.

skills:

Required skills. A name of the skill. Multiple values are allowed as a comma-separated string

page_offset:

Start of page (number of results to skip) (optional)

page_size:

Page size (number of results) (optional: default 20)

order_by:

Sorting, in format $field_name1;$field_name2;..$field_nameN;AD...A, where ‘A’ means ascending, ‘D’ means descending, the only available sort field as of now is “Date Created”

version = 1
class odesk.routers.provider.Provider_V2(client)

Bases: odesk.namespaces.Namespace

api_url = 'profiles/'
get_categories_metadata()

Returns list of all categories (v2) available for job/contractor profiles.

search_jobs(data=None, page_offset=0, page_size=20)

Search jobs.

The Job search API allows to third party applications to search for any public job on oDesk. The search parameters mirror the options available on the site plus options to configure the format of your results.

Parameters:

data:
(optional) A dict of the following parameters

(all parameters are optional):

q:

The search query. With API v2 we support a subset of the lucene query syntax. In particular we support AND, OR, NOT and additionally fields exposed are the ones indicated below, e.g q=title:php AND category:web_development

title:

Search in title of job profile

skills:

Search in skills of job profile

groups:

Search in groups of job profile

tests:

Search in tests of job profile Use get_tests_metadata() to get available tests

tests_top_10:

Search for jobs that require provider to be in top 10 for test

tests_top_30:

Search for jobs that require provider to be in top 30 for test

category:

Search for category of job profile See full list here: https://developers.odesk.com/?lang=python#metadata_list-categories

subcategory:

Search for subcategory of job profile See full list here: https://developers.odesk.com/?lang=python#metadata_list-categories in the table “Changes”

job_type:

Type of job. Acceptable values are:

  • hourly
  • fixed
duration:

Indicates job duration. Acceptable values are:

  • week
  • month
  • quarter
  • semester
  • ongoing
workload:

Indicates workload for the job. Acceptable values are:

  • as_needed
  • part_time
  • full_time
client_feedback:
 

Constrains the search to jobs posted by clients with rating within a range:

  • If the value is None, then jobs from clients without rating are returned.
  • single params like 1 or 2,3 are acceptable (comma separated values result to OR queries)
  • ranges like [2 TO 4] are acceptable
client_hires:

Constrains the search to jobs from clients with range within the given number of past hires:

  • single params like 1 or 2,3 are acceptable (comma separated values result to OR queries)
  • ranges like [10 TO 20] are acceptable
budget:

Constrains the search to jobs having the budget within the range given

  • ranges like [100 TO 1000] are acceptable
job_status:

The status that the job is currently in Acceptable values are:

  • open
  • completed
  • cancelled
posted_since:

Number of days since the job was posted.

sort:

Field and direction sorting search results. create_time descending is used by default. Allowed sorting fields are:

  • create_time
  • client_rating
  • client_total_charge
  • client_total_hours
  • score
  • workload
  • duration

Example: sort=create_time%20desc

page_offset:

(optional) Start of page (number of results to skip)

page_size:

(optional: default 20) Page size (number of results)

search_providers(data=None, page_offset=0, page_size=20)

Search providers.

The contractor search API allows to third party applications to search for any public contractor on oDesk. The search parameters mirror the options available on the site plus options to configure the format of your results.

Parameters:

data:
(optional) A dict of the following parameters

(all parameters are optional):

q:

The search query. With v2 API we support a subset of the lucene query syntax. In particular we support AND, OR, NOT and additionally fields exposed are the ones indicated below, e.g q=title:php AND category:"Web Development"

title:

Search in title of contractor profile

skills:

Search in skills of contractor profile

groups:

Search in groups of contractor profile

tests:

Search in tests of contractor profile Use get_tests_metadata() to get available tests

tests_top_10:

Search for contractors that are in top 10 for test

tests_top_30:

Search for contractors that are in top 30 for test

category:

Search for category of contractor profile. Use get_categories_metadata() to get available categories

subcategory:

Search for subcategory of contractor profile. Use get_categories_metadata() to get available categories

region:

Search for contractor profile in a region Acceptable values are titles from Metadata Regions API get_regions(), e.g. Latin America

feedback:

Search for contractor with feedback score: - single params like 3 or 3,4 are acceptable

(comma - separated values result to OR queries)

  • also ranges like [3 TO 4] are acceptable
rate:

Search for contractor profile with rate: - single params like 20 or 20,30

are acceptable (comma - separated values result to OR queries)

  • ranges like [20 TO 40] are acceptable
hours:

Search for contractor profile that has worked this many hours

  • single params like 20 or 20,30 are acceptable (comma separated values result to OR queries)
  • ranges like [20 TO 40] are acceptable
recent_hours:

Search for contractor profile that has worked this many hours recently:

  • single params like 20 or 20,30 are acceptable (comma separated values result to OR queries)
  • ranges like [20 TO 40] are acceptable
last_activity:

Date of last time contractor worked - last_activity is searched with ISO 8601

Date syntax with hours always set at 00:00:00.000 (i.e. 2013-01-04T00:00:00.000Z)

english_skill:

Assessment of contractor on his/her english skills. Value can be set to one of 0 | 1 | 2 | 3 | 4 | 5

is_odesk_ready:

Whether contractor is odesk ready. Value can be set to 1 or 0

profile_type:

Whether contractor is an AC or an IC. Possible values:

  • Independent
  • Agency
include_entities:
 

Parameter can be set to 0 or 1 If 1: data in response will contain only profile ids array.

page_offset:

(optional) Start of page (number of results to skip)

page_size:

(optional: default 20) Page size (number of results)

version = 2

odesk.routers.task module

class odesk.routers.task.Task(client)

Bases: odesk.namespaces.Namespace

api_url = 'otask/'
archive_company_task(company_id, task_code)

Archive single activity within a company.

This call is identical to archive_team_task, so that team_id is the same as company_id.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
task_code:A single Activity ID as a string or a list or tuple of IDs.
archive_team_task(company_id, team_id, task_code)

Archive single activity within a team.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
team_id:Team ID. Use the ‘id’ value from hr.get_team() API call.
task_code:A single Activity ID as a string or a list or tuple of IDs.
assign_engagement(company_id, team_id, engagement, task_codes=None)

Assign an existing engagement to the list of activities.

Note that activity will appear in contractor’s team client only if his engagement is assigned to the activity and activities are activated for the ongoing contract.

This will override assigned engagements for the given activities. For example, if you pass empty task_codes or just omit this parameter, contractor engagement will be unassigned from all Activities.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
team_id:Team ID. Use the ‘id’ value from hr.get_team() API call.
engagement:Engagement ID that will be assigned/unassigned to the given list of Activities.
task_codes:Task codes (must be a list, even of 1 item)
get_company_specific_tasks(company_id, task_codes)

Return a specific activities within a company. This is identical to get_team_specific_tasks, so that team_id is the same as company_id.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
task_codes:Task codes (must be a list, even of 1 item)
get_company_tasks(company_id)

Retrieve a list of all activities within a company. It is equivalent to the get_team_tasks so that team_id is equal to company_id which is parent team ID.

This call returns both archived and active activities.

The user authenticated must have been granted the appropriate hiring manager permissions.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
get_team_specific_tasks(company_id, team_id, task_codes)

Return a specific activities within a team.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
team_id:Team ID. Use the ‘id’ value from hr.get_team() API call.
task_codes:Task codes (must be a list, even of 1 item)
get_team_tasks(company_id, team_id)

Retrieve a list of all activities in the given team.

This call returns both archived and active activities.

The user authenticated must have been granted the appropriate hiring manager permissions.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
team_id:Team ID. Use the ‘id’ value from hr.get_team() API call.
post_company_task(company_id, code, description, url, engagements=None, all_in_company=None)

Create an activity within a company. This call is identical to post_team_task so that team_id is equal to company_id.

The authenticated user needs to have hiring manager privileges.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
code:Activity ID
description:Activity description
url:Activity URL
engagements:(optional) A list of engagements that are to be assigned to the created activity. It can be a single engagement ID, or an iterable of IDs.
all_in_company:(optional) If True, assign the created activity to all engagements that are exist in the company at the moment.

If both engagements and all_in_company are provided, engagements list will override the all_in_company setting.

post_team_task(company_id, team_id, code, description, url, engagements=None, all_in_company=None)

Create an activity within a team.

The authenticated user needs to have hiring manager privileges

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
team_id:Team ID. Use the ‘id’ value from hr.get_team() API call.
code:Task code
description:Task description
url:Task URL
engagements:(optional) A list of engagements that are to be assigned to the created activity. It can be a single engagement ID, or an iterable of IDs.
all_in_company:(optional) If True, assign the created activity to all engagements that are exist in the company at the moment.

If both engagements and all_in_company are provided, engagements list will override the all_in_company setting.

put_company_task(company_id, code, description, url, engagements=None, all_in_company=None)

Update an activity within a company. This call is identical to put_team_task so that team_id is equal to company_id.

The authenticated user needs to have hiring manager privileges.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
code:Task code
description:Task description
url:Task URL
engagements:(optional) A list of engagements that are to be assigned to the created activity. It can be a single engagement ID, or an iterable of IDs.
all_in_company:(optional) If True, assign the created activity to all engagements that are exist in the company at the moment.

If both engagements and all_in_company are provided, engagements list will override the all_in_company setting.

put_team_task(company_id, team_id, code, description, url, engagements=None, all_in_company=None)

Update an activity within a team.

The authenticated user needs to have hiring manager privileges.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
team_id:Team ID. Use the ‘id’ value from hr.get_team() API call.
code:Task code
description:Task description
url:Task URL
engagements:(optional) A list of engagements that are to be assigned to the created activity. It can be a single engagement ID, or an iterable of IDs.
all_in_company:(optional) If True, assign the updated activity to all engagements that are exist in the company at the moment.

If both engagements and all_in_company are provided, engagements list will override the all_in_company setting.

unarchive_company_task(company_id, task_code)

Unarchive single activity within a company.

This call is identical to unarchive_team_task, so that team_id is the same as company_id.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
task_code:A single Activity ID as a string or a list or tuple of IDs.
unarchive_team_task(company_id, team_id, task_code)

Unarchive single activity within a team.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
team_id:Team ID. Use the ‘id’ value from hr.get_team() API call.
task_code:A single Activity ID as a string or a list or tuple of IDs.
update_batch_tasks(company_id, csv_data)

Batch update Activities using csv file contents.

This call is experimental, use it on your own risk.

Parameters:
company_id:Company ID. Use the parent_team__id value from hr.get_team() API call.
csv_data:Task records in csv format but with “<br>” as line separator - “companyid”,”teamid”,”userid”,”taskid”,”description”,”url” Example: “acmeinc”,””,””,”T1”,”A Task”,”http://example.com“<br> “acmeinc”,”acmeinc:dev”,”b42”,”T2”,”Task 2”,”“
version = 1
class odesk.routers.task.Task_V2(client)

Bases: odesk.namespaces.Namespace

api_url = 'tasks/'
list_engagement_activities(engagement_ref)

Retrieve list of all activities assigned to the specific engagement.

The user authenticated must have been granted the appropriate hiring manager permissions.

Parameters:
engagement_ref:Engagement reference ID. You can get it using ‘List engagemnets’ API call. Example: 1234.
version = 2

odesk.routers.team module

class odesk.routers.team.Team(client)

Bases: odesk.namespaces.Namespace

TZ_CHOICES = ('mine', 'user', 'gmt')
api_url = 'team/'
delete_snapshot(company_id, user_id, datetime=None)

Delete a company’s user snapshot memo at given time or ‘now’.

Parameters:
company_id:

The Company ID

user_id:

The User ID

datetime:

(optional)(default ‘now’) Timestamp either a datetime object or a string in ISO 8601 format (in UTC) yyyymmddTHHMMSSZ or a string with UNIX timestamp (number of seconds after epoch)

More than one timestamps can be specified either as a range or as a list of values:

  • range: use the comma character (,) e.g. 20081205T090351Z,20081205T091853Z
  • list: use the semicolon character (;) e.g. 20081205T090351Z;20081405T090851Z;20081705T091853Z
get_snapshot(company_id, user_id, datetime=None)

Retrieve a company’s user snapshots during given time or ‘now’.

Parameters:
company_id:The Company ID
user_id:The User ID
datetime:(optional)(default: ‘now’) Timestamp either a datetime object or a string in ISO 8601 format (in UTC) yyyymmddTHHMMSSZ or a string with UNIX timestamp (number of seconds after epoch)
get_workdiaries(team_id, username, date=None, tz=None)

Retrieve a team member’s workdiaries for given date or today.

Parameters:

team_id:The Team ID
username:The Team Member’s username
date:(optional) A datetime object or a string in yyyymmdd format
tz:(optional) Time zone to use. Possible values: * ‘mine’ (default) * ‘user’ * ‘gmt’
update_snapshot(company_id, user_id, memo, datetime=None)

Update a company’s user snapshot memo at given time or ‘now’.

Parameters:
company_id:

The Company ID

user_id:

The User ID

memo:

The Memo text

datetime:

(optoinal)(default ‘now’) Timestamp either a datetime object or a string in ISO 8601 format (in UTC) yyyymmddTHHMMSSZ or a string with UNIX timestamp (number of seconds after epoch)

More than one timestamps can be specified either as a range or as a list of values:

  • range: use the comma character (,) e.g. 20081205T090351Z,20081205T091853Z
  • list: use the semicolon character (;) e.g. 20081205T090351Z;20081405T090851Z;20081705T091853Z
version = 1
class odesk.routers.team.Team_V2(client)

Bases: odesk.namespaces.Namespace

DISABLED_CHOICES = ('yes', 'no')
ONLINE_CHOICES = ('now', 'last_24h', 'all')
api_url = 'team/'
delete_snapshot_by_contract(contract_id, datetime=None)

Delete a company’s user snapshot by contract ID at given time or ‘now’.

Parameters:
contract_id:

The Contract ID

datetime:

(optional)(default ‘now’) Timestamp either a datetime object or a string in ISO 8601 format (in UTC) yyyymmddTHHMMSSZ or a string with UNIX timestamp (number of seconds after epoch)

More than one timestamps can be specified either as a range or as a list of values:

  • range: use the comma character (,) e.g. 20081205T090351Z,20081205T091853Z
  • list: use the semicolon character (;) e.g. 20081205T090351Z;20081405T090851Z;20081705T091853Z
get_snapshot_by_contract(contract_id, datetime=None)

Retrieve a company’s user snapshots by contract ID during given time or ‘now’.

Parameters:
contract_id:The Contract ID
datetime:(optional)(default: ‘now’) Timestamp either a datetime object or a string in ISO 8601 format (in UTC) yyyymmddTHHMMSSZ or a string with UNIX timestamp (number of seconds after epoch)
get_snapshots(company_or_team_id, online=None, disabled=None)

Retrieve team member snapshots.

Parameters:
company_or_team_id:
 

The Company ID or Team ID

online:

(optional) Filter user by work hours. Possible values are (default):

  • ‘now’ (default)
  • ‘last_24h’
  • ‘all’
disabled:

(optional) Whether disabled users need to be returned in response. Possible values are (default):

  • ‘no’ (default)
  • ‘yes’
get_teamrooms()

Retrieve all teamrooms accessible to the authenticated user.

get_workdiaries_by_contract(contract_id, date, tz=None)

Retrieve workdiary snapshots by contract

Parameters:
contract_id:The Contract ID.
date:The target date in yyyymmdd format.
tz:(optional) Time zone to use. Possible values: * ‘mine’ (default) * ‘user’ * ‘gmt’
update_snapshot_by_contract(contract_id, memo, datetime=None)

Update a company’s user snapshot memo by contract ID at given time or ‘now’.

Parameters:
contract_id:

The Contract ID

memo:

The Memo text

datetime:

(optoinal)(default ‘now’) Timestamp either a datetime object or a string in ISO 8601 format (in UTC) yyyymmddTHHMMSSZ or a string with UNIX timestamp (number of seconds after epoch)

More than one timestamps can be specified either as a range or as a list of values:

  • range: use the comma character (,) e.g. 20081205T090351Z,20081205T091853Z
  • list: use the semicolon character (;) e.g. 20081205T090351Z;20081405T090851Z;20081705T091853Z
version = 2

odesk.routers.timereport module

class odesk.routers.timereport.TimeReport(client)

Bases: odesk.namespaces.GdsNamespace

api_url = 'timereports/'
get_agency_report(company_id, agency_id, query, hours=False)

Generate agency specific time reports.

Parameters:
company_id:The Company ID
agency_id:The Agency ID
query:The GDS query string
hours:(optional) Limits the query to hour specific elements and hides all financial details Default: False
get_company_report(company_id, query, hours=False)

Generate company wide time reports.

All reporting fields available except earnings related fields. In order to access this API the authorized user needs either hiring or finance permissions to all teams within the company.

Parameters:
company_id:Company ID
query:The GDS query string
hours:(optional) Limits the query to hour specific elements and hides all financial details Default: False
get_provider_report(provider_id, query, hours=False)

Get caller’s specific time report.

The caller of this API must be the provider himself.

Parameters:
provider_id:The provider_id of the caller
query:The GDS query string
hours:(optional) Limits the query to hour specific elements and hides all financial details Default: False
get_team_report(company_id, team_id, query, hours=False)

Generate team specific time reports.

Parameters:
company_id:The Company ID
team_id:The Team ID
query:The GDS query string
hours:(optional) Limits the query to hour specific elements and hides all financial details Default: False
version = 1