We are using cookies to improve your experience!

By clicking "Allow all", you agree to use of all cookies. Visit our Privacy Policy to learn more.

Retrieve a Quote

Overview

The Retrieve a Quote endpoint fetches a single quote by its ID. This includes all details such as items, discounts, taxes, and customer information. Useful for displaying quote details in your app or preparing for conversion to an invoice.

HTTP Method

GET

Endpoint URL

https://koteshen.com/api/v1/quotes/{id}

Path Parameters

Parameter Type Required Description
id Integer Yes The unique ID of the quote.

Query Parameters

None.

Request Headers

  • Authorization: Bearer <your_oauth2_token> (handled separately)
  • Content-Type: application/json
  • Accept: application/json

Request Body

None.

Success Response

Status Code

200 OK

Response Body

A single quote resource in JSON format.

{
  "data": {
    "id": 13,
    "number": "QOT-A7B4-8453",
    "expires_at": "2025-08-30T00:00:00.000Z",
    "issue_date": null,
    "currency": "USD",
    "business_id": 1,
    "customer_id": 7,
    "notes": "",
    "summary": "ngirozi",
    "subtotal": {
      "cents": 32300,
      "currency_iso": "USD"
    },
    "total": {
      "cents": 32300,
      "currency_iso": "USD"
    },
    "discount_type": "percent",
    "discount_value": null,
    "status": "declined",
    "emailed_at": "2025-08-29T23:32:34.495Z",
    "accepted_at": "2025-08-29T22:45:01.541Z",
    "rejected_at": "2025-08-29T23:32:09.591Z",
    "viewd_at": null,
    "invoiced_at": null,
    "issued_at": "2025-08-30T00:00:00.000Z",
    "created_at": "2025-08-29T22:43:58.676Z",
    "updated_at": "2025-08-29T23:33:04.819Z",
    "url": "http://localhost:3000/api/v1/quotes/13.json",
    "items": [
      {
        "id": 83,
        "name": "Design and development",
        "unit_price": "323.0",
        "quantity": 1,
        "total": "323.0",
        "created_at": "2025-08-29T22:43:58.708Z",
        "updated_at": "2025-08-29T22:43:58.708Z"
      }
    ],
    "business": {
      "id": 1,
      "user_id": 1,
      "name": "Flixtechs",
      "slug": "flixtechs",
      "phone": "+27675711214",
      "phone_country": null,
      "discarded_at": null,
      "created_at": "2025-08-17T09:26:59.612Z",
      "updated_at": "2025-08-29T13:30:08.427Z",
      "address": {
        "id": 9,
        "line": "1 Mahem Place",
        "line2": "",
        "post_code": "5256",
        "city": "East London",
        "country": "ZA",
        "created_at": "2025-08-29T13:30:08.441Z",
        "updated_at": "2025-08-29T13:30:08.441Z"
      },
      "logo": "<download_url>"
    },
    "customer": {
      "id": 7,
      "name": "Randall Rodrigo",
      "company": "Softbank",
      "customer_type": "individual",
      "phone": "+27675711214",
      "phone_country": "za",
      "currency": "USD",
      "email": "given@unspik.com",
      "website": "https://weldoge.co.zw",
      "business_id": 1,
      "notes": "",
      "created_at": "2025-08-27T20:34:43.872Z",
      "updated_at": "2025-09-24T22:35:10.418Z",
      "address": {
        "id": 8,
        "line": "1 Mahem Pl",
        "line2": "",
        "post_code": "5256",
        "city": "East London",
        "country": "ZA",
        "created_at": "2025-08-27T20:34:43.883Z",
        "updated_at": "2025-08-27T20:34:43.883Z"
      },
      "url": "http://localhost:3000/api/v1/customers/7.json"
    }
  }
}

Response Headers

  • Content-Type: application/json
  • ETag: Entity tag for conditional requests

Error Responses

401 Unauthorized

If the token is invalid or expired.

{}

404 Not Found

If the quote ID does not exist.

{
  "error": "Not Found",
  "message": "Quote not found"
}

Example Request (cURL)

curl -X GET "https://koteshen.com/api/v1/quotes/1" \
  -H "Authorization: Bearer <your_oauth2_token>" \
  -H "Accept: application/json"

Example Response (cURL)

See Success Response above.

Usage Notes

  • Use the downlaod_url to generate and download a PDF version of the quote.
  • The status field indicates lifecycle: draft (editable), sent (shared), accepted (ready for invoicing), expired (no longer valid).