{
  "openapi": "3.0.3",
  "info": {
    "title": "Black Diamond Limo & Party Bus quote API",
    "version": "1.0.0",
    "description": "Prices one limo or party bus trip in Oklahoma City, the same price our website gives. It only quotes: nothing is booked, held or reserved, and no one is contacted. Send the customer to bookUrl to get the website's price and book. Confirm the price and availability on our website. Questions about a trip: call (405) 550-4062.",
    "contact": {
      "name": "Black Diamond Limo & Party Bus",
      "email": "info@okclimopartybus.com",
      "url": "https://okclimopartybus.com/developers/quote-api"
    }
  },
  "externalDocs": {
    "description": "Developer page",
    "url": "https://okclimopartybus.com/developers/quote-api"
  },
  "servers": [
    {
      "url": "https://okclimopartybus.com"
    }
  ],
  "paths": {
    "/api/agentQuote": {
      "post": {
        "operationId": "quoteTrip",
        "summary": "Price one trip",
        "description": "No key: 10 price checks a day per network address. Partner key: 10 a minute and 200 a day across the partner's keys; with customerReference, 3 a minute and 10 a day per customer. Every call is counted, refusals included. For a partner key, email info@okclimopartybus.com.",
        "security": [
          {},
          {
            "partnerKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              },
              "example": {
                "pickupAt": "2026-11-14T18:00:00-06:00",
                "dropoffAt": "2026-11-14T23:00:00-06:00",
                "pickupZip": "73102",
                "dropoffZip": "73102",
                "vehicle": "30",
                "occasion": "Birthday Party",
                "passengers": 24
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The trip's price. Nothing is held or reserved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricedQuote"
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid (details say which field).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The API key is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "This key's partner or this address is blocked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "The body is larger than 8 KiB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "The body is not application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "We cannot price this trip online; refusal.reason and refusal.nextStep say why and what to do.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefusedQuote"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests; wait for the Retry-After header (seconds).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "503": {
            "description": "The API is closed or unavailable for a moment; the error code says which.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "partnerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A partner key issued by us; email info@okclimopartybus.com. Keep it on your server."
      }
    },
    "schemas": {
      "QuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "pickupAt",
          "dropoffAt",
          "pickupZip",
          "dropoffZip",
          "vehicle",
          "occasion"
        ],
        "properties": {
          "pickupAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO-8601 with an offset, on the quarter hour. Read in Oklahoma City time (America/Chicago)."
          },
          "dropoffAt": {
            "type": "string",
            "format": "date-time",
            "description": "After pickupAt, at most 12 hours later, on the quarter hour."
          },
          "pickupZip": {
            "type": "string",
            "pattern": "^\\d{5}$"
          },
          "dropoffZip": {
            "type": "string",
            "pattern": "^\\d{5}$"
          },
          "vehicle": {
            "type": "string",
            "enum": [
              "limo",
              "16",
              "20",
              "25",
              "30",
              "premium30"
            ],
            "description": "limo: 10 Passenger Stretch Limo; 16: 16 Passenger Party Bus; 20: 20 Passenger Party Bus; 25: 25 Passenger Party Bus; 30: 30 Passenger Party Bus; premium30: 30 Passenger Premium Party Bus"
          },
          "occasion": {
            "type": "string",
            "enum": [
              "Birthday Party",
              "Wedding",
              "Prom",
              "Quinceañera",
              "Kid's Birthday Party",
              "Christmas Light Tour",
              "Christmas Party",
              "Concert",
              "Night Out",
              "Bar Hop",
              "Scavenger Hunt",
              "School Dance",
              "Graduation",
              "Bachelor Party",
              "Bachelorette Party",
              "Fraternity Party",
              "Sorority Party",
              "Shuttle Service",
              "Long Distance Trip",
              "Split Service",
              "Hourly Service",
              "Wine Tour",
              "Pub Crawl",
              "Corporate Event",
              "Sporting Event",
              "Other"
            ]
          },
          "passengers": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional: the group's size; refused when larger than the vehicle carries."
          },
          "customerReference": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,64}$",
            "description": "Partner keys only, optional: your own opaque id for the customer (never a name, phone or email)."
          }
        }
      },
      "PricedQuote": {
        "type": "object",
        "required": [
          "apiVersion",
          "status",
          "trip",
          "price",
          "priceHeld",
          "vehicleReserved",
          "calculatedAt",
          "pricingRuleVersion",
          "bookUrl",
          "instruction",
          "contact"
        ],
        "properties": {
          "apiVersion": {
            "type": "string",
            "enum": [
              "1"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "priced"
            ]
          },
          "trip": {
            "type": "object",
            "description": "The trip as priced, in Oklahoma City time."
          },
          "price": {
            "type": "object",
            "description": "USD. serviceTotal is the trip price; dueAtBooking is what the customer pays to book (it includes the card fee); balance is due later.",
            "properties": {
              "currency": {
                "type": "string",
                "enum": [
                  "USD"
                ]
              },
              "serviceTotal": {
                "type": "number"
              },
              "lineItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    }
                  }
                }
              },
              "dueAtBooking": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "deposit",
                      "full_payment"
                    ]
                  },
                  "amount": {
                    "type": "number"
                  },
                  "note": {
                    "type": "string"
                  }
                }
              },
              "cardFee": {
                "type": "string"
              },
              "balance": {
                "type": "object",
                "nullable": true
              },
              "gratuity": {
                "type": "string"
              }
            }
          },
          "policies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "policiesUrl": {
            "type": "string"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Only when one applies: a December or April evening minimum price, with any cheaper times on the same date; why the full price is due to book."
          },
          "availability": {
            "type": "string",
            "enum": [
              "available"
            ]
          },
          "priceHeld": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "vehicleReserved": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "calculatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "pricingRuleVersion": {
            "type": "string"
          },
          "bookUrl": {
            "type": "string",
            "description": "Our booking page with the trip filled in; the customer gets the website's price there."
          },
          "instruction": {
            "type": "string",
            "enum": [
              "Confirm the price and availability on our website."
            ]
          },
          "contact": {
            "type": "object",
            "required": [
              "phone",
              "website"
            ],
            "properties": {
              "phone": {
                "type": "string"
              },
              "website": {
                "type": "string"
              }
            }
          }
        }
      },
      "RefusedQuote": {
        "type": "object",
        "required": [
          "apiVersion",
          "status",
          "refusal",
          "priceHeld",
          "vehicleReserved",
          "contact"
        ],
        "properties": {
          "apiVersion": {
            "type": "string",
            "enum": [
              "1"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "refused"
            ]
          },
          "refusal": {
            "type": "object",
            "required": [
              "code",
              "reason",
              "nextStep"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "UNKNOWN_ZIP",
                  "VEHICLE_NOT_OFFERED",
                  "TOO_MANY_PASSENGERS",
                  "OVER_12_HOURS",
                  "PAST_DATE",
                  "INSIDE_24_HOURS",
                  "NOT_AVAILABLE",
                  "CUSTOM_PRICE_REQUIRED"
                ],
                "description": "UNKNOWN_ZIP: A pickup or drop-off ZIP code we do not serve. VEHICLE_NOT_OFFERED: A vehicle not offered for online booking. TOO_MANY_PASSENGERS: More passengers than the vehicle carries. OVER_12_HOURS: A trip longer than 12 hours (custom price). PAST_DATE: A pickup time that has passed. INSIDE_24_HOURS: A pickup within 24 hours (online prices close 24 hours before pickup). NOT_AVAILABLE: The vehicle is not available at that time. CUSTOM_PRICE_REQUIRED: A trip that needs a custom price."
              },
              "reason": {
                "type": "string"
              },
              "nextStep": {
                "type": "string"
              },
              "field": {
                "type": "string",
                "enum": [
                  "pickupZip",
                  "dropoffZip"
                ]
              }
            }
          },
          "priceHeld": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "vehicleReserved": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "contact": {
            "type": "object",
            "required": [
              "phone",
              "website"
            ],
            "properties": {
              "phone": {
                "type": "string"
              },
              "website": {
                "type": "string"
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "apiVersion",
          "status",
          "error",
          "contact"
        ],
        "properties": {
          "apiVersion": {
            "type": "string",
            "enum": [
              "1"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "INVALID_REQUEST",
                  "UNAUTHORIZED",
                  "FORBIDDEN",
                  "NOT_FOUND",
                  "METHOD_NOT_ALLOWED",
                  "PAYLOAD_TOO_LARGE",
                  "UNSUPPORTED_MEDIA_TYPE",
                  "RATE_LIMITED",
                  "API_CLOSED",
                  "TEMPORARILY_UNAVAILABLE"
                ]
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "contact": {
            "type": "object",
            "required": [
              "phone",
              "website"
            ],
            "properties": {
              "phone": {
                "type": "string"
              },
              "website": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}
