The pay/getStatusReportsForBid method is an Elance Developer API Pay method that returns all of the status reports currently recorded for a project in progress. The method returns both submitted status reports, as well as status reports still 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/getStatusReportsForBid 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.

I. Required Query String Parameters

Parameter Description
bidId The Workroom for which status report objects are retrieved.

II. Optional 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.

III. Response Data Description

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.
statusReports array of StatusReportData objects A zero-based numeric array containing all of the status reports associated with this fixed price bid.

IV. Request/Response Examples in JSON

1. Retrieving Status Reports for a Job

The following HTTP GET request demonstrates retrieving status reports for a 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.)

A. Request

GET /api/pay/getStatusReportsForBid?bidId=21011220 HTTP/1.1
User-Agent: anyMeta/OAuth 1.0 - ($LastChangedRevision: 134 $)
Host: api.elance.com
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"

B. Response

{
    "api" : "pay\/getStatusReportsForBid",
    "apiVersion" : 1,
    "rcode" : 1,
    "data" :  {
        "totalResults" : 1,
        "totalPages" : 1,
        "page" : 1,
        "numResults" : 1,
        "bidDetails" :  {
            "bidId" : "21011220",
            "jobId" : "22743189",
            "jobName" : "360Logica",
            "userType" : "CLIENT",
            "clientUserId" : "2022964",
            "clientName" : "Enzo Designs",
            "clientImageURL" : "https : \/\/navws.elance.com\/media\/images\/4.0\/no-photo-featured-icon.jpg",
            "clientCountry" : "United States",
            "clientCountryCode" : "US",
            "providerUserId" : "1976925",
            "providerName" : "John Smith",
            "providerImageURL" : "https:     \/\/www.elance.com\/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" : "800.00",
            "hoursPerWeek" : "0",
            "duration" : "",
            "submissionDate" : 1295845200
        },
        "statusReports" :  {
            "0" :  {
            "id" : 901506,
            "week" : "29-MAY-11",
            "bidId" : 24169013,
            "client" : "enzodesigns",
            "provider" : "johnsmithinc",
            "clientUserId" : 2022964,
            "providerUserId" : 1976925,
            "status" : "Sent",
            "projectStatus" : "OK",
            "projectStatusChangedBy" : "PROVIDER",
            "planComment" : "First milestone completed.",
            "startDate" : 1306123200,
            "endDate" : 1306641600,
            "nextEndDate" : 1307246400,
            "submitDate" : 1306382400,
            "sentDate" : 1306382400,
            "approveByDate" : 1307073600,
            "totalHours" : 0,
            "overdue" : false,
            "seenByClient" : true,
            "invoiceIds" : [6727018]
        }
    }
}

V. Error Codes

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