Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/harshalw2003/BidAuc/llms.txt

Use this file to discover all available pages before exploring further.

When a Seeker posts a job, Providers submit bids with their price and a description of their services. This endpoint lets you retrieve all bids for a given job so you can compare offers side by side. Each bid is returned with the full Provider profile and job details populated, giving you everything you need to make an informed hiring decision.

Endpoint

POST /bid/getOneJobBids

Authentication

Requires a valid JWT session cookie.

Request parameters

job
string
required
The ID of the job whose bids you want to retrieve.

Example request

curl --request POST \
  --url https://api.bidauc.com/bid/getOneJobBids \
  --header 'Content-Type: application/json' \
  --cookie 'token=<your_jwt_token>' \
  --data '{
    "job": "64a1f2c3b4e5d6f7a8b9c0d1"
  }'

Success response — bids found

{
  "success": true,
  "message": "Bids Fetched successfully",
  "bids": [
    {
      "_id": "64b2e3d4c5f6a7b8c9d0e1f2",
      "offerPrice": 250,
      "description": "I have 8 years of residential plumbing experience and can complete the work within one day.",
      "status": "unaccepted",
      "timePosted": "2024-07-15T10:30:00.000Z",
      "job": {
        "_id": "64a1f2c3b4e5d6f7a8b9c0d1",
        "jobName": "Leaking pipe under kitchen sink",
        "category": "Plumbing",
        "description": "The pipe under my kitchen sink has been leaking for two days."
      },
      "postedBy": {
        "_id": "64c3f4e5d6a7b8c9d0e1f2a3",
        "userName": "johnplumber",
        "email": "john@example.com",
        "phoneNumber": "+1-555-0102",
        "businessName": "John's Plumbing Co.",
        "role": "provider"
      }
    }
  ]
}

Success response — no bids yet

{
  "success": true,
  "message": "No Bids posted for this job",
  "bids": []
}

Error response

{
  "success": false,
  "message": "Error Fetching Bids",
  "error": "Cast to ObjectId failed for value \"invalid-id\" at path \"job\""
}

Response fields

success
boolean
required
true when the request was processed successfully (including the no-bids case), false on error.
message
string
required
A human-readable status message.
bids
object[]
Array of bid objects for the requested job. Empty array [] when no bids have been submitted yet.

Build docs developers (and LLMs) love