POST
/
companies
/
{company_id}
/
subscriptions
/
find
curl --request POST \
  --url https://api.maplebilling.com/api/v1/companies/{company_id}/subscriptions/find \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "include_meta": true,
  "pagination": {
    "from_key": "<string>",
    "limit": 20
  },
  "query": {
    "auto_charges": true,
    "auto_renews": true,
    "bundle_pricing_id": "<string>",
    "customer_id": "<string>",
    "end_date": {
      "eq": "2023-11-07T05:31:56Z",
      "gte": "2023-11-07T05:31:56Z",
      "lte": "2023-11-07T05:31:56Z"
    },
    "exclude_from_metrics": true,
    "mrr": {
      "eq": 123,
      "gte": 123,
      "lte": 123
    },
    "next_invoice_date": {
      "eq": "2023-11-07T05:31:56Z",
      "gte": "2023-11-07T05:31:56Z",
      "lte": "2023-11-07T05:31:56Z"
    },
    "owner_id": "<string>",
    "parent_billed": true,
    "parent_customer_id": "<string>",
    "payment_method_id": "<string>",
    "product_ids": {
      "condition": "AND",
      "values": [
        "<string>"
      ]
    },
    "product_pricing_id": "<string>",
    "product_pricing_ids": {
      "condition": "AND",
      "values": [
        "<string>"
      ]
    },
    "product_pricing_tags": {
      "condition": "AND",
      "values": [
        "<string>"
      ]
    },
    "product_tags": {
      "condition": "AND",
      "values": [
        "<string>"
      ]
    },
    "renewal_date": {
      "eq": "2023-11-07T05:31:56Z",
      "gte": "2023-11-07T05:31:56Z",
      "lte": "2023-11-07T05:31:56Z"
    },
    "search": "<string>",
    "start_date": {
      "eq": "2023-11-07T05:31:56Z",
      "gte": "2023-11-07T05:31:56Z",
      "lte": "2023-11-07T05:31:56Z"
    },
    "status": "ACTIVE",
    "statuses": [
      "<string>"
    ],
    "trial": true
  },
  "sort_key": "createdAtDesc"
}'
{
  "pagination": {
    "from_key": "<string>",
    "limit": 123
  },
  "results": [
    {
      "arr": {
        "currency": "<string>",
        "value_in_cents": 123
      },
      "auto_charges": true,
      "auto_renews": true,
      "billing_anchor_date": "2023-11-07T05:31:56Z",
      "cancel_config": {
        "campaign_id": "<string>",
        "campaign_step_id": "<string>",
        "charge_remaining_balance": true,
        "custom_end_date": "2023-11-07T05:31:56Z",
        "custom_refund_amount": {
          "currency": "<string>",
          "value_in_cents": 123
        },
        "reason": "<string>",
        "refund_type": "<string>",
        "send_customer_receipt": true,
        "timing": "<string>"
      },
      "cancel_date": "2023-11-07T05:31:56Z",
      "change_config": {
        "actual_change_time": "2023-11-07T05:31:56Z",
        "auto_charges": true,
        "bundle_pricing": {
          "bundle_product_pricings": [
            {
              "bundle_pricing_id": "<string>",
              "company_id": "<string>",
              "created_at": "2023-11-07T05:31:56Z",
              "deleted_at": {},
              "id": "<string>",
              "product_id": "<string>",
              "product_pricing_id": "<string>",
              "updated_at": "2023-11-07T05:31:56Z"
            }
          ],
          "company_id": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "currency": "<string>",
          "default_term": {
            "count": 2,
            "frequency": "HOUR"
          },
          "deleted_at": {},
          "description": "<string>",
          "id": "<string>",
          "image_url": "<string>",
          "import_created_at_ref": "2023-11-07T05:31:56Z",
          "import_ref": "<string>",
          "imported_from": "<string>",
          "is_auto_generated": true,
          "key": "<string>",
          "metadata": {},
          "name": "<string>",
          "num_subs": 1,
          "state": "<string>",
          "updated_at": "2023-11-07T05:31:56Z"
        },
        "bundle_pricing_id": "<string>",
        "config_items": [
          {
            "minimum_units": 1,
            "num_licenses": 1,
            "product_metric_pricing_id": "<string>",
            "product_pricing_id": "<string>",
            "quantity_config": {
              "allow_custom_quantity": true,
              "max_quantity": 123,
              "min_quantity": 123
            },
            "upsell_product_metric_pricing_id": "<string>"
          }
        ],
        "custom_change_date": "2023-11-07T05:31:56Z",
        "discounts": [
          {
            "amount": {
              "currency": "<string>",
              "value_in_cents": 123
            },
            "cap": {
              "currency": "<string>",
              "value_in_cents": 123
            },
            "coupon_id": "<string>",
            "customer_id": "<string>",
            "expiration_date": "2023-11-07T05:31:56Z",
            "import_created_at_ref": "2023-11-07T05:31:56Z",
            "import_ref": "<string>",
            "imported_from": "<string>",
            "item_pricing_id": "<string>",
            "name": "<string>",
            "onetime_billable_id": "<string>",
            "percent": 1,
            "product_id": "<string>",
            "product_pricing_id": "<string>",
            "proposal_id": "<string>",
            "state": "ACTIVE",
            "subscription_id": "<string>",
            "type": "DISCOUNT_AMOUNT"
          }
        ],
        "metadata": {},
        "minimum_spend": {
          "currency": "<string>",
          "value_in_cents": 123
        },
        "onetime_items": [
          {
            "aggregate": 2,
            "custom_price": {
              "amount": {
                "currency": "<string>",
                "value_in_cents": 123
              },
              "description": "<string>",
              "product_id": "<string>"
            },
            "product_pricing_id": "<string>",
            "quantity_config": {
              "allow_custom_quantity": true,
              "max_quantity": 123,
              "min_quantity": 123
            }
          }
        ],
        "payment_method_id": "<string>",
        "product_pricing_ids": [
          "<string>"
        ],
        "proration_type": "NEXT",
        "relative_term": {
          "count": 2,
          "frequency": "HOUR"
        },
        "reset_billing_anchor": true,
        "term": {
          "count": 2,
          "frequency": "HOUR"
        },
        "timing": "IMMEDIATE",
        "trial": true,
        "trial_term": {
          "count": 2,
          "frequency": "HOUR"
        }
      },
      "change_date": "2023-11-07T05:31:56Z",
      "company_id": "<string>",
      "computed_entitlements": [
        {
          "entitlement_id": "<string>",
          "inherited_from_id": "<string>",
          "inherited_from_type": "<string>",
          "key": "<string>",
          "name": "<string>",
          "original_value": "<any>",
          "overridden": true,
          "type": "<string>",
          "value": "<any>"
        }
      ],
      "config_items": [
        {
          "minimum_units": 1,
          "num_licenses": 1,
          "product_metric_pricing_id": "<string>",
          "product_pricing_id": "<string>",
          "quantity_config": {
            "allow_custom_quantity": true,
            "max_quantity": 123,
            "min_quantity": 123
          },
          "upsell_product_metric_pricing_id": "<string>"
        }
      ],
      "created_at": "2023-11-07T05:31:56Z",
      "customer_id": "<string>",
      "end_date": "2023-11-07T05:31:56Z",
      "id": "<string>",
      "invoice_additional_display_fields": [
        {
          "name": "<string>",
          "value": "<string>"
        }
      ],
      "invoice_due_date_from_creation": 1,
      "metadata": {},
      "minimum_spend": {
        "currency": "<string>",
        "value_in_cents": 123
      },
      "mrr": {
        "currency": "<string>",
        "value_in_cents": 123
      },
      "next_invoice_date": "2023-11-07T05:31:56Z",
      "override_entitlements": [
        {
          "entitlement_id": "<string>",
          "inherited_from_id": "<string>",
          "inherited_from_type": "<string>",
          "key": "<string>",
          "name": "<string>",
          "original_value": "<any>",
          "overridden": true,
          "type": "<string>",
          "value": "<any>"
        }
      ],
      "pause_config": {
        "behavior": "<string>",
        "resume_date": "2023-11-07T05:31:56Z"
      },
      "pause_date": "2023-11-07T05:31:56Z",
      "payment_method_id": "<string>",
      "product_pricing_ids": [
        "<string>"
      ],
      "renewal_date": "2023-11-07T05:31:56Z",
      "start_date": "2023-11-07T05:31:56Z",
      "status": "<string>",
      "term": {
        "count": 2,
        "frequency": "HOUR"
      },
      "trial": true,
      "trial_conversion_date": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

The idempotency key that will be used to ensure the request is only performed once

Path Parameters

company_id
string
required

Company ID. It should have a prefix 'cmp_'.

Body

application/json

Response

200 - application/json

OK

The response is of type object.