agentlyleads docs
Quotes API

API Reference

The reference below covers every endpoint in the Quotes API. Code examples are generated automatically; the live playground is disabled to prevent accidental writes to production from the docs site.

GET/api/v1/quotes

Authorization

BearerAuth
AuthorizationBearer <token>

Pass an API key issued from the agentlyleads workspace settings. Example: Authorization: Bearer alk_live_xxxxxxxxxxxx

In: header

Query Parameters

status?string

DRAFT, SENT, ACCEPTED or DECLINED.

Value in

  • "DRAFT"
  • "SENT"
  • "ACCEPTED"
  • "DECLINED"
dealId?string

Only quotes on this deal.

contactId?string

Only quotes for this contact.

companyId?string

Only quotes for this company.

offeringId?string

Only quotes with a line on this product.

q?string

Title text, or the quote number (12 or #12).

updatedSince?string

Only records updated at or after this moment.

Formatdate-time
limit?integer
Range1 <= value <= 1000
Default100
cursor?string

The nextCursor from the previous page.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/quotes"
{  "quotes": [    {      "id": "string",      "number": 0,      "title": "string",      "status": "DRAFT",      "total": 0,      "validUntil": "2019-08-24T14:15:22Z",      "notes": "string",      "deal": {        "id": "cmq2comp0alk34567890",        "name": "Acme Corp"      },      "contact": {        "id": "cmq2comp0alk34567890",        "name": "Acme Corp"      },      "company": {        "id": "cmq2comp0alk34567890",        "name": "Acme Corp"      },      "lineItems": [        {          "id": "string",          "name": "string",          "offering": {            "id": "cmq2comp0alk34567890",            "name": "Acme Corp"          },          "quantity": 0,          "unitPrice": 0,          "total": 0        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}
{  "error": "status must be one of: DRAFT, SENT, ACCEPTED, DECLINED."}
{  "error": "Invalid or missing API key."}
{  "error": "API key missing required scope: read:quotes."}
{  "error": "Rate limit exceeded."}
POST/api/v1/quotes

Authorization

BearerAuth
AuthorizationBearer <token>

Pass an API key issued from the agentlyleads workspace settings. Example: Authorization: Bearer alk_live_xxxxxxxxxxxx

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/quotes" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "lineItems": [      {        "name": "string",        "quantity": 0,        "unitPrice": 0      }    ]  }'
{  "quote": {    "id": "string",    "number": 0,    "title": "string",    "status": "DRAFT",    "total": 0,    "validUntil": "2019-08-24T14:15:22Z",    "notes": "string",    "deal": {      "id": "cmq2comp0alk34567890",      "name": "Acme Corp"    },    "contact": {      "id": "cmq2comp0alk34567890",      "name": "Acme Corp"    },    "company": {      "id": "cmq2comp0alk34567890",      "name": "Acme Corp"    },    "lineItems": [      {        "id": "string",        "name": "string",        "offering": {          "id": "cmq2comp0alk34567890",          "name": "Acme Corp"        },        "quantity": 0,        "unitPrice": 0,        "total": 0      }    ],    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}
{  "error": "Add at least one line item to the quote."}
{  "error": "Invalid or missing API key."}
{  "error": "API key missing required scope: write:quotes."}
{  "error": "Deal not found."}
{  "error": "Rate limit exceeded."}
GET/api/v1/quotes/{id}

Authorization

BearerAuth
AuthorizationBearer <token>

Pass an API key issued from the agentlyleads workspace settings. Example: Authorization: Bearer alk_live_xxxxxxxxxxxx

In: header

Path Parameters

id*string

The agentlyleads ID.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/quotes/string"
{  "quote": {    "id": "string",    "number": 0,    "title": "string",    "status": "DRAFT",    "total": 0,    "validUntil": "2019-08-24T14:15:22Z",    "notes": "string",    "deal": {      "id": "cmq2comp0alk34567890",      "name": "Acme Corp"    },    "contact": {      "id": "cmq2comp0alk34567890",      "name": "Acme Corp"    },    "company": {      "id": "cmq2comp0alk34567890",      "name": "Acme Corp"    },    "lineItems": [      {        "id": "string",        "name": "string",        "offering": {          "id": "cmq2comp0alk34567890",          "name": "Acme Corp"        },        "quantity": 0,        "unitPrice": 0,        "total": 0      }    ],    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}
{  "error": "Invalid or missing API key."}
{  "error": "API key missing required scope: read:quotes."}
{  "error": "Quote not found."}
{  "error": "Rate limit exceeded."}
POST/api/v1/quotes/{id}/status

Authorization

BearerAuth
AuthorizationBearer <token>

Pass an API key issued from the agentlyleads workspace settings. Example: Authorization: Bearer alk_live_xxxxxxxxxxxx

In: header

Path Parameters

id*string

The agentlyleads ID.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/quotes/string/status" \  -H "Content-Type: application/json" \  -d '{    "status": "DRAFT"  }'
{  "quote": {    "id": "string",    "number": 0,    "title": "string",    "status": "DRAFT",    "total": 0,    "validUntil": "2019-08-24T14:15:22Z",    "notes": "string",    "deal": {      "id": "cmq2comp0alk34567890",      "name": "Acme Corp"    },    "contact": {      "id": "cmq2comp0alk34567890",      "name": "Acme Corp"    },    "company": {      "id": "cmq2comp0alk34567890",      "name": "Acme Corp"    },    "lineItems": [      {        "id": "string",        "name": "string",        "offering": {          "id": "cmq2comp0alk34567890",          "name": "Acme Corp"        },        "quantity": 0,        "unitPrice": 0,        "total": 0      }    ],    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}
{  "error": "status must be one of: DRAFT, SENT, ACCEPTED, DECLINED."}
{  "error": "Invalid or missing API key."}
{  "error": "API key missing required scope: write:quotes."}
{  "error": "Quote not found."}
{  "error": "Rate limit exceeded."}