List offers for an organization
const url = 'https://apisandbox.puurk.com/organizations/example/offers?type=template';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://apisandbox.puurk.com/organizations/example/offers?type=template' \ --header 'Authorization: Bearer <token>'Returns a paginated list of offers for an organization, filterable by date, lead or type.
Client offers and templates are both returned, with or without a date filter, unless type narrows the list. type=template returns offers with no lead_id; type=client returns offers that have one. Combining type=template with lead_id is rejected with 400 invalid_params.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID
Query Parameters
Section titled “Query Parameters”Single day filter (YYYY-MM-DD)
Start date (YYYY-MM-DD)
End date (YYYY-MM-DD)
Filter by lead ID
Filter by plan type: template (no client) or client. Omit for both.
Pagination cursor
Number of results to return
Responses
Section titled “Responses”Successful operation
object
object
Unique identifier for the offer
client — a plan for a specific client; requires lead_id. template — a shareable, client-less plan (the provider app calls these “Templates”); lead_id, lead_name and uid are always null on one.
Null on offers created before the type was recorded, until the backfill stamps them. Newly created offers are never null — an offer created with a lead_id and no type is stored as client.
The client this plan is for. Required when type is client or omitted. On a template it is always null in the response: one sent in the request is ignored rather than rejected.
Always null on a template offer.
Always null on a template offer.
Deprecated
Deprecated
object
Offer these terms belong to
User the terms were generated for
Down payment in cents
Amount financed in cents
Provider’s share of the premium as a fraction between 0 and 1
Plan length in months
Premium charged per month in cents
Provider share of the monthly premium in cents
Puurk share of the monthly premium in cents
Principal per month in cents
Fees included in each monthly payment in cents
Payout fees per month in cents
Provider fees per month in cents
Monthly payment in cents
Monthly opportunity for the provider in cents
Total paid over the plan in cents
Total premium over the plan in cents
Provider share of the total premium in cents
Puurk share of the total premium in cents
Total principal (down payment plus financed amount) in cents
Total fees over the plan in cents
Total payout fees over the plan in cents
Total provider fees over the plan in cents
Total opportunity for the provider in cents
object
User id of the salesperson
object
object
Page size used for this response
Whether more results are available
Cursor for the next page, null when no more results
Example
{ "data": [ { "type": "template", "lead_id": "fLp5zssaLLRcKDbh0DpP", "lead_name": "John Doe", "uid": "l8zcL5Va8ei6QQlmhe8n", "location_id": "g9WWX7DJ0ev6WZ2rOhdQ", "merge_contract_id": null, "oid": "iQyjWJf77rrVUx8HJshp", "organization_name": "Acme Medical", "provider_id": null, "provider_name": null, "providers": [ "4NoHg9a7Yf0QODl1IMcE", "WKVlP1g5arHJdDa2yBir" ], "title": "Plan 1234", "payment_option": "finance", "postpone_reason": "expensive", "status": "pending" } ]}Unauthorized