Skip to main content
POST
/
subscriptions
/
lineitems
/
search
Search subscription line items
curl --request POST \
  --url https://us.api.flexprice.io/v1/subscriptions/lineitems/search \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "active_filter": true,
  "addon_association_ids": [
    "<string>"
  ],
  "billing_periods": [
    "<string>"
  ],
  "currencies": [
    "<string>"
  ],
  "current_period_start": "2023-11-07T05:31:56Z",
  "customer_ids": [
    "<string>"
  ],
  "end_time": "2023-11-07T05:31:56Z",
  "entity_ids": [
    "<string>"
  ],
  "entity_type": "plan",
  "expand": "<string>",
  "filters": [
    {
      "data_type": "string",
      "field": "<string>",
      "operator": "eq",
      "value": {
        "array": [
          "<string>"
        ],
        "boolean": true,
        "date": "<string>",
        "number": 123,
        "string": "<string>"
      }
    }
  ],
  "limit": 500,
  "meter_ids": [
    "<string>"
  ],
  "offset": 1,
  "order": "asc",
  "price_ids": [
    "<string>"
  ],
  "sort": [
    {
      "direction": "asc",
      "field": "<string>"
    }
  ],
  "start_time": "2023-11-07T05:31:56Z",
  "status": "published",
  "subscription_ids": [
    "<string>"
  ]
}
'
{
  "items": [
    {
      "addon_association_id": "<string>",
      "billing_period": "MONTHLY",
      "billing_period_count": 123,
      "commitment_amount": "<string>",
      "commitment_duration": "MONTHLY",
      "commitment_overage_factor": "<string>",
      "commitment_quantity": "<string>",
      "commitment_true_up_enabled": true,
      "commitment_type": "amount",
      "commitment_windowed": true,
      "created_at": "2023-11-07T05:31:56Z",
      "created_by": "<string>",
      "currency": "<string>",
      "customer_id": "<string>",
      "display_name": "<string>",
      "end_date": "2023-11-07T05:31:56Z",
      "entity_id": "<string>",
      "entity_type": "plan",
      "environment_id": "<string>",
      "id": "<string>",
      "invoice_cadence": "ARREAR",
      "metadata": {},
      "meter_display_name": "<string>",
      "meter_id": "<string>",
      "plan_display_name": "<string>",
      "price": {
        "addon": {
          "created_at": "2023-11-07T05:31:56Z",
          "created_by": "<string>",
          "description": "<string>",
          "entitlements": [
            {
              "addon": "<unknown>",
              "created_at": "2023-11-07T05:31:56Z",
              "created_by": "<string>",
              "display_order": 123,
              "end_date": "2023-11-07T05:31:56Z",
              "entity_id": "<string>",
              "entity_type": "PLAN",
              "environment_id": "<string>",
              "feature": {
                "alert_settings": {
                  "alert_enabled": true,
                  "critical": {
                    "condition": "above",
                    "threshold": 123
                  },
                  "info": {
                    "condition": "above",
                    "threshold": 123
                  },
                  "warning": {
                    "condition": "above",
                    "threshold": 123
                  }
                },
                "created_at": "2023-11-07T05:31:56Z",
                "created_by": "<string>",
                "description": "<string>",
                "environment_id": "<string>",
                "group": {
                  "created_at": "2023-11-07T05:31:56Z",
                  "entity_ids": [
                    "<string>"
                  ],
                  "entity_type": "<string>",
                  "id": "<string>",
                  "lookup_key": "<string>",
                  "metadata": {},
                  "name": "<string>",
                  "status": "<string>",
                  "updated_at": "2023-11-07T05:31:56Z"
                },
                "group_id": "<string>",
                "id": "<string>",
                "lookup_key": "<string>",
                "metadata": {},
                "meter": {
                  "aggregation": {
                    "bucket_size": "MONTH",
                    "expression": "<string>",
                    "field": "<string>",
                    "group_by": "<string>",
                    "multiplier": "<string>",
                    "type": "COUNT"
                  },
                  "created_at": "2024-03-20T15:04:05Z",
                  "event_name": "api_request",
                  "filters": [
                    {
                      "key": "<string>",
                      "values": [
                        "<string>"
                      ]
                    }
                  ],
                  "id": "550e8400-e29b-41d4-a716-446655440000",
                  "name": "API Usage Meter",
                  "reset_usage": "BILLING_PERIOD",
                  "status": "published",
                  "tenant_id": "tenant123",
                  "updated_at": "2024-03-20T15:04:05Z"
                },
                "meter_id": "<string>",
                "name": "<string>",
                "reporting_unit": {
                  "conversion_rate": 123,
                  "unit_plural": "<string>",
                  "unit_singular": "<string>"
                },
                "status": "published",
                "tenant_id": "<string>",
                "type": "metered",
                "unit_plural": "<string>",
                "unit_singular": "<string>",
                "updated_at": "2023-11-07T05:31:56Z",
                "updated_by": "<string>"
              },
              "feature_id": "<string>",
              "feature_type": "metered",
              "id": "<string>",
              "is_enabled": true,
              "is_soft_limit": true,
              "parent_entitlement_id": "<string>",
              "plan": {
                "created_at": "2023-11-07T05:31:56Z",
                "created_by": "<string>",
                "credit_grants": [
                  {
                    "cadence": "ONETIME",
                    "conversion_rate": "<string>",
                    "created_at": "2023-11-07T05:31:56Z",
                    "created_by": "<string>",
                    "credit_grant_anchor": "2023-11-07T05:31:56Z",
                    "credits": "<string>",
                    "end_date": "2023-11-07T05:31:56Z",
                    "environment_id": "<string>",
                    "expiration_duration": 123,
                    "expiration_duration_unit": "DAY",
                    "expiration_type": "NEVER",
                    "id": "<string>",
                    "metadata": {},
                    "name": "<string>",
                    "period": "DAILY",
                    "period_count": 123,
                    "plan_id": "<string>",
                    "priority": 123,
                    "scope": "PLAN",
                    "start_date": "2023-11-07T05:31:56Z",
                    "status": "published",
                    "subscription_id": "<string>",
                    "tenant_id": "<string>",
                    "topup_conversion_rate": "<string>",
                    "updated_at": "2023-11-07T05:31:56Z",
                    "updated_by": "<string>"
                  }
                ],
                "description": "<string>",
                "display_order": 123,
                "entitlements": "<array>",
                "environment_id": "<string>",
                "id": "<string>",
                "lookup_key": "<string>",
                "metadata": {},
                "name": "<string>",
                "prices": "<array>",
                "status": "published",
                "tenant_id": "<string>",
                "updated_at": "2023-11-07T05:31:56Z",
                "updated_by": "<string>"
              },
              "plan_id": "<string>",
              "start_date": "2023-11-07T05:31:56Z",
              "static_value": "<string>",
              "status": "published",
              "tenant_id": "<string>",
              "updated_at": "2023-11-07T05:31:56Z",
              "updated_by": "<string>",
              "usage_limit": 123,
              "usage_reset_period": "MONTHLY"
            }
          ],
          "environment_id": "<string>",
          "id": "<string>",
          "lookup_key": "<string>",
          "metadata": {},
          "name": "<string>",
          "prices": "<array>",
          "status": "published",
          "tenant_id": "<string>",
          "updated_at": "2023-11-07T05:31:56Z",
          "updated_by": "<string>"
        },
        "amount": "<string>",
        "billing_cadence": "RECURRING",
        "billing_model": "FLAT_FEE",
        "billing_period": "MONTHLY",
        "billing_period_count": 123,
        "conversion_rate": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "created_by": "<string>",
        "currency": "<string>",
        "description": "<string>",
        "display_amount": "<string>",
        "display_name": "<string>",
        "display_price_unit_amount": "<string>",
        "end_date": "2023-11-07T05:31:56Z",
        "entity_id": "<string>",
        "entity_type": "PLAN",
        "environment_id": "<string>",
        "group": {
          "created_at": "2023-11-07T05:31:56Z",
          "entity_ids": [
            "<string>"
          ],
          "entity_type": "<string>",
          "id": "<string>",
          "lookup_key": "<string>",
          "metadata": {},
          "name": "<string>",
          "status": "<string>",
          "updated_at": "2023-11-07T05:31:56Z"
        },
        "group_id": "<string>",
        "id": "<string>",
        "invoice_cadence": "ARREAR",
        "lookup_key": "<string>",
        "metadata": {},
        "meter": {
          "aggregation": {
            "bucket_size": "MONTH",
            "expression": "<string>",
            "field": "<string>",
            "group_by": "<string>",
            "multiplier": "<string>",
            "type": "COUNT"
          },
          "created_at": "2024-03-20T15:04:05Z",
          "event_name": "api_request",
          "filters": [
            {
              "key": "<string>",
              "values": [
                "<string>"
              ]
            }
          ],
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "name": "API Usage Meter",
          "reset_usage": "BILLING_PERIOD",
          "status": "published",
          "tenant_id": "tenant123",
          "updated_at": "2024-03-20T15:04:05Z"
        },
        "meter_id": "<string>",
        "min_quantity": "<string>",
        "parent_price_id": "<string>",
        "plan": {
          "created_at": "2023-11-07T05:31:56Z",
          "created_by": "<string>",
          "credit_grants": [
            {
              "cadence": "ONETIME",
              "conversion_rate": "<string>",
              "created_at": "2023-11-07T05:31:56Z",
              "created_by": "<string>",
              "credit_grant_anchor": "2023-11-07T05:31:56Z",
              "credits": "<string>",
              "end_date": "2023-11-07T05:31:56Z",
              "environment_id": "<string>",
              "expiration_duration": 123,
              "expiration_duration_unit": "DAY",
              "expiration_type": "NEVER",
              "id": "<string>",
              "metadata": {},
              "name": "<string>",
              "period": "DAILY",
              "period_count": 123,
              "plan_id": "<string>",
              "priority": 123,
              "scope": "PLAN",
              "start_date": "2023-11-07T05:31:56Z",
              "status": "published",
              "subscription_id": "<string>",
              "tenant_id": "<string>",
              "topup_conversion_rate": "<string>",
              "updated_at": "2023-11-07T05:31:56Z",
              "updated_by": "<string>"
            }
          ],
          "description": "<string>",
          "display_order": 123,
          "entitlements": "<array>",
          "environment_id": "<string>",
          "id": "<string>",
          "lookup_key": "<string>",
          "metadata": {},
          "name": "<string>",
          "prices": "<array>",
          "status": "published",
          "tenant_id": "<string>",
          "updated_at": "2023-11-07T05:31:56Z",
          "updated_by": "<string>"
        },
        "price_unit": "<string>",
        "price_unit_amount": "<string>",
        "price_unit_id": "<string>",
        "price_unit_tiers": [
          {
            "flat_amount": "<string>",
            "unit_amount": "<string>",
            "up_to": 123
          }
        ],
        "price_unit_type": "FIAT",
        "pricing_unit": {
          "base_currency": "<string>",
          "code": "<string>",
          "conversion_rate": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "created_by": "<string>",
          "environment_id": "<string>",
          "id": "<string>",
          "metadata": {},
          "name": "<string>",
          "status": "published",
          "symbol": "<string>",
          "tenant_id": "<string>",
          "updated_at": "2023-11-07T05:31:56Z",
          "updated_by": "<string>"
        },
        "start_date": "2023-11-07T05:31:56Z",
        "status": "published",
        "tenant_id": "<string>",
        "tier_mode": "VOLUME",
        "tiers": [
          {
            "flat_amount": "<string>",
            "unit_amount": "<string>",
            "up_to": 123
          }
        ],
        "transform_quantity": {
          "divide_by": 123,
          "round": "up"
        },
        "trial_period_days": 123,
        "type": "USAGE",
        "updated_at": "2023-11-07T05:31:56Z",
        "updated_by": "<string>"
      },
      "price_id": "<string>",
      "price_type": "USAGE",
      "price_unit": "<string>",
      "price_unit_id": "<string>",
      "quantity": "<string>",
      "start_date": "2023-11-07T05:31:56Z",
      "status": "published",
      "subscription_id": "<string>",
      "subscription_phase_id": "<string>",
      "tenant_id": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "updated_by": "<string>"
    }
  ],
  "pagination": {
    "limit": 123,
    "offset": 123,
    "total": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.flexprice.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

application/json

Filter

active_filter
boolean
default:true
addon_association_ids
string[]
billing_periods
string[]
currencies
string[]
current_period_start
string<date-time>
customer_ids
string[]
end_time
string<date-time>
entity_ids
string[]
entity_type
enum<string>
Available options:
plan,
addon,
subscription
expand
string
filters
object[]
limit
integer
Required range: 1 <= x <= 1000
meter_ids
string[]
offset
integer
Required range: x >= 0
order
enum<string>
Available options:
asc,
desc
price_ids
string[]
sort
object[]
start_time
string<date-time>
status
enum<string>
Available options:
published,
deleted,
archived
subscription_ids
string[]

Specific filters

Response

OK

items
object[]
pagination
object