Docs
Products API

Products API

Manage products, pricing, and inventory for your organization.

The Products API provides comprehensive access to your product catalog, including detailed product information, pricing options, and catalog associations.

Product Object

A product represents a medication or service offering with the following structure:

{
  "id": "prod_cmg4x57yp0018r9p7q73eghxb",
  "name": "Injectable Semaglutide",
  "description": "",
  "type": "semaglutide",
  "image": "https://d34xic2nofw0vx.cloudfront.net/assets/images/trimrx-injectable-glp1-gip-in-california-v001.png",
  "active": true,
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:00.000Z",
  "catalogs": [
    {
      "id": "cat_dsf98hasdf8hasdf",
      "name": "GLP-1"
    },
    {
      "id": "cat_asd9f8asdf89adsw",
      "name": "Home Page"
    }
  ],
  "prices": [
    {
      "id": "price_asdf98asdf98as98sdf",
      "type": "recurring",
      "recurring": {
        "interval": "month",
        "interval_count": 1
      },
      "amount": 758,
      "currency": "USD",
      "active": true,
      "bnpl": false
    },
    {
      "id": "price_jgh09erg9f89fd9d",
      "type": "one_time",
      "recurring": null,
      "amount": 1265,
      "currency": "USD",
      "active": true,
      "bnpl": true
    }
  ]
}

Attributes

FieldTypeDescription
idstringUnique identifier for the product
namestringDisplay name of the product
descriptionstring (optional)Detailed description of the product
typeenumProduct type: semaglutide or tirzepatide
imagestring (optional)URL to product image
activebooleanWhether the product is currently available
createdAtstringISO 8601 timestamp of creation
updatedAtstringISO 8601 timestamp of last update
catalogsarrayList of catalogs this product belongs to
pricesarrayAvailable pricing options for this product

Product Types

The API supports two medication types:

  • semaglutide - Semaglutide-based weight loss medication
  • tirzepatide - Tirzepatide-based weight loss medication

List All Products

Retrieve a list of all active products in your organization, including their catalogs and pricing.

GET /api/products

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key for authentication
Content-TypeYesMust be application/json

Response

Status Code: 200 OK

{
  "data": [
    {
      "id": "prod_cmg4x57yp0018r9p7q73eghxb",
      "name": "Injectable Semaglutide",
      "description": "",
      "type": "semaglutide",
      "image": "https://d34xic2nofw0vx.cloudfront.net/assets/images/trimrx-injectable-glp1-gip-in-california-v001.png",
      "active": true,
      "createdAt": "2025-01-15T10:30:00.000Z",
      "updatedAt": "2025-01-15T10:30:00.000Z",
      "catalogs": [
        {
          "id": "cat_dsf98hasdf8hasdf",
          "name": "GLP-1"
        },
        {
          "id": "cat_asd9f8asdf89adsw",
          "name": "Home Page"
        }
      ],
      "prices": [
        {
          "id": "price_asdf98asdf98as98sdf",
          "type": "recurring",
          "recurring": {
            "interval": "month",
            "interval_count": 1
          },
          "amount": 758,
          "currency": "USD",
          "active": true,
          "bnpl": false
        },
        {
          "id": "price_jgh09erg9f89fd9d",
          "type": "one_time",
          "recurring": null,
          "amount": 1265,
          "currency": "USD",
          "active": true,
          "bnpl": true
        }
      ]
    }
  ]
}

Example Request

curl -X GET "https://dev.api.evoncrm.com/api/products" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"

Get a Specific Product

Retrieve detailed information about a specific product, including all associated catalogs and pricing options.

GET /api/products/:product_id

Path Parameters

ParameterTypeRequiredDescription
product_idstringYesThe unique identifier of the product

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key for authentication
Content-TypeYesMust be application/json

Response

Status Code: 200 OK

{
  "data": {
    "id": "prod_cmg4x57yp0018r9p7q73eghxb",
    "name": "Injectable Semaglutide",
    "description": "",
    "type": "semaglutide",
    "image": "https://d34xic2nofw0vx.cloudfront.net/assets/images/trimrx-injectable-glp1-gip-in-california-v001.png",
    "active": true,
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z",
    "catalogs": [
      {
        "id": "cat_dsf98hasdf8hasdf",
        "name": "GLP-1"
      },
      {
        "id": "cat_asd9f8asdf89adsw",
        "name": "Home Page"
      }
    ],
    "prices": [
      {
        "id": "price_asdf98asdf98as98sdf",
        "type": "recurring",
        "recurring": {
          "interval": "month",
          "interval_count": 1
        },
        "amount": 758,
        "currency": "USD",
        "active": true,
        "bnpl": false
      },
      {
        "id": "price_jgh09erg9f89fd9d",
        "type": "one_time",
        "recurring": null,
        "amount": 1265,
        "currency": "USD",
        "active": true,
        "bnpl": true
      }
    ]
  }
}

Example Request

curl -X GET "https://dev.api.evoncrm.com/api/products/prod_cmg4x57yp0018r9p7q73eghxb" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"

Product Prices

Price Object

Each product can have multiple pricing options with the new flexible recurring model:

{
  "id": "price_asdf98asdf98as98sdf",
  "productId": "prod_cmg4x57yp0018r9p7q73eghxb",
  "stripeId": "price_1OqX2J2eZvKYlo2C0hXcWnH7",
  "type": "RECURRING",
  "amount": 758,
  "currency": "USD",
  "recurringInterval": "MONTH",
  "recurringIntervalCount": 1,
  "label": "Monthly Subscription",
  "careValidateBundleId": "bundle_123",
  "startDate": null,
  "endDate": null,
  "isActive": true,
  "bnpl": false,
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:00.000Z"
}

Price Attributes

FieldTypeDescription
idstringUnique identifier for the price
productIdstringThe product this price belongs to
stripeIdstring | nullStripe price ID if synced with Stripe
typeenumPrice type: RECURRING or ONE_TIME
amountnumberPrice in dollars (e.g., 758 = $758.00)
currencystringThree-letter ISO currency code (e.g., USD)
recurringIntervalenum | nullFor recurring prices: DAY, WEEK, MONTH, or YEAR
recurringIntervalCountnumber | nullNumber of intervals between billings (e.g., 3 with MONTH = quarterly)
labelstring | nullOptional display label for the price
careValidateBundleIdstring | nullCareValidate bundle identifier for validation
startDatestring | nullOptional start date for the price validity
endDatestring | nullOptional end date for the price validity
isActivebooleanWhether this price is currently available
bnplbooleanWhether Buy Now Pay Later is available for this price
createdAtstringISO 8601 timestamp of creation
updatedAtstringISO 8601 timestamp of last update

List All Product Prices

Get all product prices across your organization with optional filters.

GET /api/products/prices

Query Parameters

ParameterTypeRequiredDescription
productIdstringNoFilter by specific product ID
typeenumNoFilter by price type: ONE_TIME or RECURRING
isActivebooleanNoFilter by active status: true or false
currencystringNoFilter by currency code (e.g., USD, EUR)

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key for authentication
Content-TypeYesMust be application/json

Response

Status Code: 200 OK

{
  "success": true,
  "count": 2,
  "data": [
    {
      "id": "price_asdf98asdf98as98sdf",
      "productId": "prod_cmg4x57yp0018r9p7q73eghxb",
      "product": {
        "id": "prod_cmg4x57yp0018r9p7q73eghxb",
        "name": "Injectable Semaglutide",
        "description": "",
        "type": "SEMAGLUTIDE",
        "isActive": true
      },
      "stripeId": "price_1OqX2J2eZvKYlo2C0hXcWnH7",
      "amount": 758,
      "currency": "USD",
      "type": "RECURRING",
      "recurringInterval": "MONTH",
      "recurringIntervalCount": 1,
      "label": "Monthly Subscription",
      "careValidateBundleId": "bundle_123",
      "startDate": null,
      "endDate": null,
      "isActive": true,
      "bnpl": false,
      "createdAt": "2025-01-15T10:30:00.000Z",
      "updatedAt": "2025-01-15T10:30:00.000Z"
    },
    {
      "id": "price_jgh09erg9f89fd9d",
      "productId": "prod_cmg4x57yp0018r9p7q73eghxb",
      "product": {
        "id": "prod_cmg4x57yp0018r9p7q73eghxb",
        "name": "Injectable Semaglutide",
        "description": "",
        "type": "SEMAGLUTIDE",
        "isActive": true
      },
      "stripeId": null,
      "amount": 1265,
      "currency": "USD",
      "type": "ONE_TIME",
      "recurringInterval": null,
      "recurringIntervalCount": null,
      "label": "One-Time Purchase",
      "careValidateBundleId": null,
      "startDate": null,
      "endDate": null,
      "isActive": true,
      "bnpl": true,
      "createdAt": "2025-01-15T10:30:00.000Z",
      "updatedAt": "2025-01-15T10:30:00.000Z"
    }
  ]
}

Example Request

# Get all prices
curl -X GET "https://api.evon.com/api/products/prices" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"
 
# Get recurring prices only
curl -X GET "https://api.evon.com/api/products/prices?type=RECURRING" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"
 
# Get prices for a specific product
curl -X GET "https://api.evon.com/api/products/prices?productId=prod_cmg4x57yp0018r9p7q73eghxb" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"

List Product Prices

Get all pricing options for a specific product.

GET /api/products/:product_id/prices

Path Parameters

ParameterTypeRequiredDescription
product_idstringYesThe unique identifier of the product

Query Parameters

ParameterTypeRequiredDescription
typeenumNoFilter by price type: ONE_TIME or RECURRING
isActivebooleanNoFilter by active status: true or false

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key for authentication
Content-TypeYesMust be application/json

Response

Status Code: 200 OK

{
  "data": [
    {
      "id": "price_asdf98asdf98as98sdf",
      "type": "recurring",
      "recurring": {
        "interval": "month",
        "interval_count": 1
      },
      "amount": 758,
      "currency": "USD",
      "active": true,
      "bnpl": false
    },
    {
      "id": "price_jgh09erg9f89fd9d",
      "type": "one_time",
      "recurring": null,
      "amount": 1265,
      "currency": "USD",
      "active": true,
      "bnpl": true
    }
  ]
}

Example Request

curl -X GET "https://api.evon.com/api/products/prod_cmg4x57yp0018r9p7q73eghxb/prices" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"

Get a Specific Price

Retrieve detailed information about a specific price.

GET /api/products/prices/:price_id

Path Parameters

ParameterTypeRequiredDescription
price_idstringYesThe unique identifier of the price

Headers

HeaderRequiredDescription
X-API-KeyYesYour API key for authentication
Content-TypeYesMust be application/json

Response

Status Code: 200 OK

{
  "success": true,
  "data": {
    "id": "price_asdf98asdf98as98sdf",
    "productId": "prod_cmg4x57yp0018r9p7q73eghxb",
    "product": {
      "id": "prod_cmg4x57yp0018r9p7q73eghxb",
      "name": "Injectable Semaglutide",
      "description": "",
      "type": "SEMAGLUTIDE",
      "isActive": true
    },
    "stripeId": "price_1OqX2J2eZvKYlo2C0hXcWnH7",
    "amount": 758,
    "currency": "USD",
    "type": "RECURRING",
    "recurringInterval": "MONTH",
    "recurringIntervalCount": 1,
    "label": "Monthly Subscription",
    "careValidateBundleId": "bundle_123",
    "startDate": null,
    "endDate": null,
    "isActive": true,
    "bnpl": false,
    "createdAt": "2025-01-15T10:30:00.000Z",
    "updatedAt": "2025-01-15T10:30:00.000Z"
  }
}

Example Request

curl -X GET "https://api.evon.com/api/products/prices/price_asdf98asdf98as98sdf" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"

Pricing Types and Intervals

The new pricing model supports flexible recurring intervals:

Price Types

  • ONE_TIME - Single payment, no recurring charges
  • RECURRING - Subscription-based pricing with configurable intervals

Recurring Intervals

For recurring prices, you can configure:

  • recurringInterval: The unit of time (DAY, WEEK, MONTH, YEAR)
  • recurringIntervalCount: The number of units between charges

Common Configurations:

  • Monthly: interval=MONTH, count=1
  • Quarterly: interval=MONTH, count=3
  • Bi-annual: interval=MONTH, count=6
  • Annual: interval=YEAR, count=1
  • Weekly: interval=WEEK, count=1
  • Every 2 weeks: interval=WEEK, count=2

Error Responses

Product Not Found

{
  "error": "Product not found"
}

Status Code: 404 Not Found

This error occurs when the requested product ID doesn't exist or doesn't belong to your organization.

Price Not Found

{
  "error": "Product price not found"
}

Status Code: 404 Not Found

This error occurs when the requested price ID doesn't exist or doesn't belong to your organization.

Invalid Product ID

{
  "error": "Invalid product ID",
  "details": {
    "productId": ["Invalid CUID"]
  }
}

Status Code: 400 Bad Request

This error occurs when the product ID format is invalid.

Invalid Query Parameters

{
  "error": "Invalid query parameters",
  "details": {
    "type": ["Invalid enum value. Expected 'ONE_TIME' | 'RECURRING'"]
  }
}

Status Code: 400 Bad Request

This error occurs when query parameters have invalid values.

Unauthorized

{
  "error": "Invalid API key"
}

Status Code: 401 Unauthorized

This error occurs when the API key is missing or invalid.

Notes

  • All products are scoped to your organization via the API key
  • Only active products with at least one active price are typically displayed to customers
  • The amount field in prices is in dollars (e.g., 758 = $758.00)
  • Products can belong to multiple catalogs simultaneously
  • The careValidateBundleId field on prices is used for CareValidate integration
  • Recurring prices support flexible intervals with the combination of recurringInterval and recurringIntervalCount
  • The bnpl field indicates Buy Now Pay Later availability for a specific price
  • One-time prices have recurringInterval and recurringIntervalCount set to null
  • When displaying prices in the simplified format (used in product listings), the API converts the database format to lowercase strings

Migration Notes

If you're migrating from the old schema:

  • Old: frequency field with values: ONCE, MONTHLY, QUARTERLY, BIANNUAL, ANNUAL
  • New: type field (ONE_TIME/RECURRING) with recurringInterval and recurringIntervalCount
  • The careValidateBundleId has moved from Product to ProductPrice level