The pay/getTimesheetsForBid method is an Elance Developer API Pay method that returns all of the timesheets currently recorded for a project in progress.

Large result sets are returned in pages, with one page returned per response, and a default of 10 records per page. Client applications can use the rpp query string parameter to increase or decrease the number of records per page. By default, the first page of results is returned with an initial request; additional pages are requested by issuing subsequent requests on the same search with the page query string parameter.

pay/getTimesheetsForBid is an authenticated method. It requires a Developer API key and an OAuth Consumer Secret, both issued by Elance. It is invoked using an HTTP or HTTPS GET request. For more details on the OAuth authentication protocol, see Using OAuth with Authenticated Methods.

This method does not support the JSONP response format.

For more information on the format of an Elance Developer API request, see Getting Started.

tableofcontents_number_textRequired Query String Parameters

Parameter Description
bidId The Workroom for which timesheet objects are retrieved.

tableofcontents_number_textOptional Query String Parameters

Parameter Description
rpp The number of results requested per page. The default is 10. If more than 25 are requested, only 25 results are included in the response.
page The page number of results to return, numbered beginning from 1. The default is 1. If this number is greater than the number of total pages (as expressed in the response by totalPages), the response contains zero results.

tableofcontents_number_textResponse Data Description

For JSON responses, unless otherwise specified, all parameters are returned as JSON string types. The value in the Data Type column denotes the type to which the property can safely be cast.

Property Data Type Description
totalResults integer The total number of results available from the query.
totalPages integer The total number of pages available.
page integer The current page of results.
numResults integer The number of results returned on this page.
bidDetails BidData object The details for the bid associated with this status report.
timesheets array of TimesheetData objects A zero-based array of timesheets.

tableofcontents_number_textRequest/Response Examples in JSON

tableofcontents_number_textRetrieving Timesheets for a Job

The following HTTP GET request demonstrates retrieving all timesheets for the specified job. The HTTP headers for the GET request are shown below. (NOTE: Elance recommends that developers access OAuth APIs using one of the many publicly available libraries.)


GET /api/pay/getTimesheetsForBid?bidId=21011220 HTTP/1.1
User-Agent: anyMeta/OAuth 1.0 - ($LastChangedRevision: 134 $)
Accept: */*
Authorization: OAuth realm="",oauth_signature_method="HMAC-SHA1",oauth_signature="YHpUKkLbUI6B%2B%2BUwY54rFpml2wk%3D",oauth_nonce="4c8bba92d8a91",oauth_timestamp="1284225682",oauth_token="988078256-1425962-1425962-76.99.193-fd76b324028bef6-%2B",oauth_consumer_key="8cfc475b57fee5b7dc08cc0f1d5a0fcdab409b3c",oauth_version="1.0"


  "api": "pay\/getTimesheetsForBid",
  "apiVersion": 1,
  "rcode": 1,
  "data": {
    "totalResults": 35,
    "totalPages": 4,
    "page": 1,
    "numResults": 10,
    "bidDetails" :  {
        "bidId" : "21011220",
        "jobId" : "22743189",
        "jobName" : "360Logica",
        "userType" : "CLIENT",
        "clientUserId" : "2022964",
        "clientName" : "Enzo Designs",
        "clientImageURL" : "https : \/\/\/media\/images\/4.0\/no-photo-featured-icon.jpg",
        "clientCountry" : "United States",
        "clientCountryCode" : "US",
        "providerUserId" : "1976925",
        "providerName" : "John Smith",
        "providerImageURL" : "https:     \/\/\/php\/files\/main\/download.php?crypted=Y3R4JTNEc2VhcmNoX3RodW1ibmFpbCUyNmZpZCUzRDI0NTA5NjA2JTI2cmlkJTNELTElMjZwaWQlM0QxOTc2OTI1",
        "providerCountry" : "United States",
        "providerCountryCode" : "US",
        "providerCity" : "Mountain View",
        "phase" : "5",
        "status" : "Working",
        "isHourly" : false,
        "isSponsored" : false,
        "isPreBid" : false,
        "bidAmount" : "109.59",
        "hoursPerWeek" : "0",
        "duration" : "",
        "submissionDate" : 1295845200
    "timesheets": {
      "0": {
        "id": "914520",
        "week": "22-MAY-11",
        "bidId": "21011220",
        "client": "enzodesigns",
        "provider": "johnsmithinc",
        "clientUserId": "2022964",
        "providerUserId": "1976925",
        "status": "Draft",
        "projectStatus": "OK",
        "projectStatusChangedBy": "PROVIDER",
        "startDate": "16-MAY-11",
        "endDate": "22-MAY-11",
        "nextEndDate": "29-MAY-11",
        "totalHours": "1.3",
        "adjustedHours": "0.0",
        "authorizedHours": "10.0",
        "billedHours": "1.3",
        "autoPayHours": "1.3",
        "nextAuthorizedHours": "10.0",
        "rate": "30.00",
        "overdue": false,
        "seenByClient": false
      "1": {
        "id": "902983",
        "week": "15-MAY-11",
        "bidId": "21011220",
        "client": "enzodesigns",
        "provider": "johnsmithinc",
        "clientUserId": "2022964",
        "providerUserId": "1976925",
        "status": "Sent",
        "projectStatus": "OK",
        "projectStatusChangedBy": "PROVIDER",
        "startDate": "09-MAY-11",
        "endDate": "15-MAY-11",
        "nextEndDate": "22-MAY-11",
        "submitDate": "15-MAY-11",
        "sentDate": "15-MAY-11",
        "approveByDate": "20-MAY-11",
        "autoPayDate": "21-MAY-11",
        "totalHours": "3.7",
        "adjustedHours": "0.0",
        "authorizedHours": "10.0",
        "billedHours": "3.7",
        "autoPayHours": "3.7",
        "nextAuthorizedHours": "10.0",
        "rate": "30.00",
        "overdue": false,
        "seenByClient": false,
        "invoiceId": "6767531"
      // eight additional records omitted

tableofcontents_number_textError Codes

For a list of other common errors that can be thrown by this method, see Common API Error Codes.