Outdoorsy Instamatch API

The instamatch API from Outdoorsy — 5 operation(s) for instamatch.

OpenAPI Specification

outdoorsy-instamatch-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: 'The Outdoorsy API (or simply "API") is organized around REST. It uses

    predictable, resource-oriented URLs and implements standard HTTP response

    codes, verbs, authentication mechanisms, and a variety of request encodings.


    ## Versioning


    The API implements semantic versioning.'
  title: Outdoorsy API Documentation Instamatch API
  version: 0.0.1
servers:
- url: /v0
security:
- Bearer:
  - '[]'
- API-Key:
  - '[]'
tags:
- name: instamatch
paths:
  /bids:
    get:
      description: Return list of bids
      tags:
      - instamatch
      operationId: listBids
      parameters:
      - x-go-name: ID
        name: id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: IDs
        name: ids
        in: query
        schema:
          type: string
      - x-go-name: OwnerID
        name: owner_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Open
        name: open
        in: query
        schema:
          type: boolean
      - x-go-name: Limit
        name: limit
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Offset
        name: offset
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Order
        name: order
        in: query
        schema:
          type: string
      - x-go-name: BidMatchOwnerID
        name: bid_match_owner_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: LocationIDs
        name: location_ids
        in: query
        schema:
          type: array
          items:
            type: integer
            format: int64
      - x-go-name: Source
        name: source
        in: query
        schema:
          type: string
      - x-go-name: CreatedGT
        description: Date range filters
        name: created_gt
        in: query
        schema:
          type: string
      - x-go-name: CreatedLT
        name: created_lt
        in: query
        schema:
          type: string
      - x-go-name: FromGT
        name: from_gt
        in: query
        schema:
          type: string
      - x-go-name: FromLT
        name: from_lt
        in: query
        schema:
          type: string
      - x-go-name: ToGT
        name: to_gt
        in: query
        schema:
          type: string
      - x-go-name: ToLT
        name: to_lt
        in: query
        schema:
          type: string
      - x-go-name: MaxDayPriceGT
        description: Price range filters
        name: max_day_price_gt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: MaxDayPriceLT
        name: max_day_price_lt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: MinDayPriceGT
        name: min_day_price_gt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: MinDayPriceLT
        name: min_day_price_lt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: PricePerDayGT
        name: price_per_day_gt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: PricePerDayLT
        name: price_per_day_lt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: CreatedByBookingID
        description: Booking ID filters
        name: created_by_booking_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: ClosedByBookingID
        name: closed_by_booking_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Delivery
        description: Delivery filters
        name: delivery
        in: query
        schema:
          type: boolean
      - x-go-name: StationaryDelivery
        name: stationary_delivery
        in: query
        schema:
          type: boolean
      - x-go-name: Travelers
        description: Travelers filter
        name: travelers
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Make
        description: Vehicle info filters
        name: make
        in: query
        schema:
          type: string
      - x-go-name: Model
        name: model
        in: query
        schema:
          type: string
      - x-go-name: Year
        name: year
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Type
        name: type
        in: query
        schema:
          type: string
      - x-go-name: RenterID
        description: Admin filters - filter bids through bid_matches
        name: renter_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: RentalID
        name: rental_id
        in: query
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/listBidsResponse'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '404':
          $ref: '#/components/responses/notFoundError'
        default:
          $ref: '#/components/responses/genericError'
    post:
      description: Create instamatch request
      tags:
      - instamatch
      operationId: createBid
      responses:
        '200':
          $ref: '#/components/responses/bidResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Bid'
  /bids/available:
    get:
      description: Returns list of available bids for an owner
      tags:
      - instamatch
      operationId: bidsAvailable
      parameters:
      - x-go-name: ID
        name: id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: IDs
        name: ids
        in: query
        schema:
          type: string
      - x-go-name: OwnerID
        name: owner_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Open
        name: open
        in: query
        schema:
          type: boolean
      - x-go-name: Limit
        name: limit
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Offset
        name: offset
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Order
        name: order
        in: query
        schema:
          type: string
      - x-go-name: BidMatchOwnerID
        name: bid_match_owner_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: LocationIDs
        name: location_ids
        in: query
        schema:
          type: array
          items:
            type: integer
            format: int64
      - x-go-name: Source
        name: source
        in: query
        schema:
          type: string
      - x-go-name: CreatedGT
        description: Date range filters
        name: created_gt
        in: query
        schema:
          type: string
      - x-go-name: CreatedLT
        name: created_lt
        in: query
        schema:
          type: string
      - x-go-name: FromGT
        name: from_gt
        in: query
        schema:
          type: string
      - x-go-name: FromLT
        name: from_lt
        in: query
        schema:
          type: string
      - x-go-name: ToGT
        name: to_gt
        in: query
        schema:
          type: string
      - x-go-name: ToLT
        name: to_lt
        in: query
        schema:
          type: string
      - x-go-name: MaxDayPriceGT
        description: Price range filters
        name: max_day_price_gt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: MaxDayPriceLT
        name: max_day_price_lt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: MinDayPriceGT
        name: min_day_price_gt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: MinDayPriceLT
        name: min_day_price_lt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: PricePerDayGT
        name: price_per_day_gt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: PricePerDayLT
        name: price_per_day_lt
        in: query
        schema:
          type: integer
          format: uint64
      - x-go-name: CreatedByBookingID
        description: Booking ID filters
        name: created_by_booking_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: ClosedByBookingID
        name: closed_by_booking_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Delivery
        description: Delivery filters
        name: delivery
        in: query
        schema:
          type: boolean
      - x-go-name: StationaryDelivery
        name: stationary_delivery
        in: query
        schema:
          type: boolean
      - x-go-name: Travelers
        description: Travelers filter
        name: travelers
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Make
        description: Vehicle info filters
        name: make
        in: query
        schema:
          type: string
      - x-go-name: Model
        name: model
        in: query
        schema:
          type: string
      - x-go-name: Year
        name: year
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: Type
        name: type
        in: query
        schema:
          type: string
      - x-go-name: RenterID
        description: Admin filters - filter bids through bid_matches
        name: renter_id
        in: query
        schema:
          type: integer
          format: int64
      - x-go-name: RentalID
        name: rental_id
        in: query
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/listBidsResponse'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '404':
          $ref: '#/components/responses/notFoundError'
        default:
          $ref: '#/components/responses/genericError'
  /bids/{bid_id}/bid-matches/{bid_match_id}/renter-decline:
    post:
      description: Decline a specific bid match as a renter (guest)
      tags:
      - instamatch
      operationId: renterDeclineBidMatch
      responses:
        '204':
          $ref: '#/components/responses/noContentResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
  /bids/{id}:
    get:
      description: Return bid by id
      tags:
      - instamatch
      operationId: getBidById
      parameters:
      - x-go-name: ID
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/bidResponse'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '404':
          $ref: '#/components/responses/notFoundError'
        default:
          $ref: '#/components/responses/genericError'
    delete:
      description: Delete instamatch request
      tags:
      - instamatch
      operationId: deleteBid
      parameters:
      - x-go-name: BidID
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/bidResponse'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '404':
          $ref: '#/components/responses/notFoundError'
        default:
          $ref: '#/components/responses/genericError'
    patch:
      description: Update instamatch bid
      tags:
      - instamatch
      operationId: updateBidById
      parameters:
      - x-go-name: BidID
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/bidResponse'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '404':
          $ref: '#/components/responses/notFoundError'
        default:
          $ref: '#/components/responses/genericError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Bid'
  /bids/{id}/decline:
    post:
      description: Decline instamatch request
      tags:
      - instamatch
      operationId: declineBid
      parameters:
      - x-go-name: BidID
        name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '204':
          $ref: '#/components/responses/noContentResponse'
        '400':
          $ref: '#/components/responses/badRequestError'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '404':
          $ref: '#/components/responses/notFoundError'
        default:
          $ref: '#/components/responses/genericError'
components:
  schemas:
    Bid:
      type: object
      properties:
        bid_matches:
          $ref: '#/components/schemas/BidMatches'
        close_reason:
          type: string
          x-go-name: CloseReason
        closed:
          type: string
          x-go-name: Closed
          x-go-type: github.com/outdoorsy/api/clocks.RfcTime
        closed_by_booking_id:
          type: integer
          format: int64
          x-go-name: ClosedByBookingID
        comments:
          type: string
          x-go-name: Comments
        created:
          type: string
          x-go-name: Created
          x-go-type: github.com/outdoorsy/api/clocks.RfcTime
        created_by_booking_id:
          type:
          - integer
          - 'null'
          format: int64
        delivery:
          type:
          - boolean
          - 'null'
        dest_lat:
          type: number
          format: double
          x-go-name: DestLat
        dest_lng:
          type: number
          format: double
          x-go-name: DestLng
        destination:
          type: string
          x-go-name: Destination
        email:
          type: string
          x-go-name: Email
        festival_friendly:
          type: boolean
          x-go-name: FestivalFriendly
        from:
          type: string
        id:
          type: integer
          format: int64
          x-go-name: ID
        ip_lookup:
          type: boolean
          x-go-name: IPLookup
        make:
          description: storage for display to owner receiving bid
          type: string
          x-go-name: Make
        max_budget:
          type: integer
          format: uint64
          x-go-name: MaxBudget
        max_day_price:
          type: integer
          format: uint64
          x-go-name: MaxDayPrice
        message_sent:
          type: boolean
          x-go-name: MessageSent
        min_budget:
          type: integer
          format: uint64
          x-go-name: MinBudget
        min_day_price:
          type: integer
          format: uint64
          x-go-name: MinDayPrice
        model:
          type: string
          x-go-name: Model
        name:
          type: string
          x-go-name: Name
        offer_delivery:
          type: boolean
          x-go-name: OfferDelivery
        open:
          type: boolean
          x-go-name: Open
        owner_id:
          type: integer
          format: int64
        owner_read:
          type: boolean
          x-go-name: OwnerRead
        pet_friendly:
          type: boolean
          x-go-name: PetFriendly
        pickup_lat:
          type: number
          format: double
          x-go-name: PickupLat
        pickup_lng:
          type: number
          format: double
          x-go-name: PickupLng
        pickup_location:
          type: string
          x-go-name: PickupLocation
        price_per_day:
          type: integer
          format: uint64
          x-go-name: PricePerDay
        quality:
          $ref: '#/components/schemas/NullFloat64'
        rental_id:
          type: integer
          format: int64
          x-go-name: RentalID
        seatbelts:
          type: integer
          format: int64
          x-go-name: Seatbelts
        sent:
          description: Sent is populated dynamically for the requesting owner
          type: boolean
          x-go-name: Sent
        smoking_allowed:
          type: boolean
          x-go-name: SmokingAllowed
        source:
          type: string
          x-go-name: Source
        stationary_delivery:
          type:
          - boolean
          - 'null'
        tailgate_friendly:
          type: boolean
          x-go-name: TailgateFriendly
        to:
          type: string
        travelers:
          type: integer
          format: int64
          x-go-name: Travelers
        type:
          type: string
          x-go-name: Type
        updated:
          type: string
          x-go-name: Updated
          x-go-type: github.com/outdoorsy/api/clocks.RfcTime
        year:
          type: integer
          format: int64
          x-go-name: Year
      x-go-package: github.com/outdoorsy/api/internal/instamatch
    NullFloat64:
      description: 'NullFloat64 implements the [Scanner] interface so

        it can be used as a scan destination, similar to [NullString].'
      type: object
      title: NullFloat64 represents a float64 that may be null.
      properties:
        Float64:
          type: number
          format: double
        Valid:
          type: boolean
      x-go-package: database/sql
    BidMatch:
      type: object
      properties:
        bid_id:
          $ref: '#/components/schemas/Bid'
        booking_id:
          type: integer
          format: int64
        conversation_id:
          type: integer
          format: int64
        created:
          type: string
          x-go-name: Created
          x-go-type: github.com/outdoorsy/api/clocks.RfcTime
        id:
          type: integer
          format: int64
          x-go-name: ID
        match_location_type:
          type:
          - string
          - 'null'
        message_sent:
          type: boolean
          x-go-name: MessageSent
        owner_id:
          type: integer
          format: int64
        owner_read:
          type: boolean
          x-go-name: OwnerRead
        rental_id:
          type: integer
          format: int64
        renter_id:
          type: integer
          format: int64
        score:
          type:
          - integer
          - 'null'
          format: int64
        status:
          type: string
          x-go-name: Status
        updated:
          type: string
          x-go-name: Updated
          x-go-type: github.com/outdoorsy/api/clocks.RfcTime
      x-go-package: github.com/outdoorsy/api/internal/instamatch
    BidMatches:
      type: array
      items:
        $ref: '#/components/schemas/BidMatch'
      x-go-package: github.com/outdoorsy/api/internal/instamatch
  responses:
    notFoundError:
      description: Not found error
    bidResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Bid'
    badRequestError:
      description: Invalid input or state means you're bad
      headers:
        Error:
          schema:
            type: string
    noContentResponse:
      description: Everything went as planned
    listBidsResponse:
      description: HTTP status code 200 and array of bid models
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Bid'
    forbiddenError:
      description: Forbidden error
    unauthorizedError:
      description: Unauthorized error
    genericError:
      description: An unknown, unexpected error.
  securitySchemes:
    API-Key:
      type: apiKey
      name: API-Key
      in: header
    Bearer:
      type: apiKey
      name: Authorization
      in: header