BidOnMyJob

POST: /api/v1/users

            
            {
          "user": {
          "username": "jondoe",
          "password": "!QAZzaq1",
          "email": "jondoe@example.com",
          "role": "poster",
          "tos": "true"
          },
          "client_id" : "9fa5b3554fecf87e92b850135f73ace798395c1932d7a1a40e282ad3efac9c9a"
          }
           
          

Response:

            
        

{ "user": { "id": 5, "username": "jondoe", "email": "jondoe@example.com", "role": "poster", "access_token": { "resource_owner_id": 14, "scopes": [], "expires_in_seconds": null, "application": { "uid": "9fa5b3554fecf87e92b850135f73ace798395c1932d7a1a40e282ad3efac9c9a" }, "created_at": 1442370220 } } }

POST /api/v1/user_profiles

         
        Request:
          "user_profile": {
          "first_name": "Nathan",
          "last_name": "Gibson",
          "address1": "1234 Main St",
          "address2": "",
          "city": "Anytown",
          "state": "IA",
          "zip": "12345",
          "phone1": "555-555-5555",
          "phone2": "666-666-6666",
          "phone_type_1": "home",
          "phone_type_2": "office",
          "referer": "Friend"
          }
          }

          
        Response: {
          "user_profile": {
          "first_name": "Nathan",
          "last_name": "Gibson",
          "address1": "1234 Main St",
          "address2": "",
          "city": "Anytown",
          "state": "IA",
          "zip": "12345",
          "phone1": "555-555-5555",
          "phone2": "666-666-6666",
          "phone_type_1": "home",
          "phone_type_2": "office",
          "referer": "Friend"
          }
          }
          }

GET /api/v1/jobs

         
        Response:
        {"job": {
          "title" : "I need my lawn mowed",
          "industry_id" : 5,
          "address_1" : "6013 NW 97th St",
          "address_2" : "",
          "city" : "Johnston",
          "state" : "IA",
          "zip" : "50131",
          "job_details" : "I have a big yard. 6 acres",
          "status" : "Active",
          "bidding_close_date" : "2015-08-26 00:00:00"
          }
          }

POST /api/v1/jobs

         
        Request:
        {"job": {
          "title" : "I need my lawn mowed",
          "industry_id" : 5,
          "address_1" : "6013 NW 97th St",
          "address_2" : "",
          "city" : "Johnston",
          "state" : "IA",
          "zip" : "50131",
          "job_details" : "I have a big yard. 6 acres",
          "status" : "Active",
          "bidding_close_date" : "2015-08-26 00:00:00"
          }
          }
         
        Response:
        {"job": {
          "title" : "I need my lawn mowed",
          "industry_id" : 5,
          "address_1" : "6013 NW 97th St",
          "address_2" : "",
          "city" : "Johnston",
          "state" : "IA",
          "zip" : "50131",
          "job_details" : "I have a big yard. 6 acres",
          "status" : "Active",
          "bidding_close_date" : "2015-08-26 00:00:00"
          }
          }

POST /api/v1/bids/award

         
        Request:
          {"bid": {
          "id": "1",
          "job_id" : "1"
          }
          }
         
        Response:
        {
          "bids": [
          {
          "id": 1,
          "bidder_first": "Joe",
          "bidder_last": "Bidder",
          "title": "Test",
          "price": "999.99",
          "notes": "Test Bid",
          "job_id": 1,
          "awarded": true
          }
          ]
          }

GET /api/v1/bids

         
        Request: {}
           
            
         
        Response:
        {
          "bids": [
          {
          "id": 1,
          "bidder_first": "Nathan",
          "bidder_last": "Gibson",
          "title": "I will mow your lawn",
          "price": "9999.99",
          "notes": "I am ready to mow your lawn",
          "job_id": 1
          },
          {
          "id": 6,
          "bidder_first": "Nathan",
          "bidder_last": "Gibson",
          "title": "Fix Sink",
          "price": "999.55",
          "notes": "I can fix your sink",
          "job_id": 3
          }
          ]
          }