GET
/
companies
/
{company_id}
/
subscriptions
/
{id}
curl --request GET \
  --url https://api.maplebilling.com/api/v1/companies/{company_id}/subscriptions/{id} \
  --header 'Authorization: Bearer <token>'
{
  "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_'.

id
string
required

resource id

Response

200 - application/json

OK

arr
object

The amount which has value in cents and a currency

auto_charges
boolean

Whether the subscription is set up to automatically charge the card attached to the subscription or the default payment method on the customer

auto_renews
boolean

Whether the subscription is set up to automatically renew

billing_anchor_date
string

The billing anchor date for this subscription, typically the same as the start date

cancel_config
object
cancel_date
string | null

The date this subscription was cancelled. The end date represents the date that the subscription will actually cancel

change_config
object
change_date
string | null

The date this subscription is due to change to a different plan

company_id
string

The company ID of the subscription

computed_entitlements
object[] | null

Computed entitlements attached to this subscription

config_items
object[] | null

The mapping of the quantities and the product metric pricings

created_at
string

The date the subscription was created

customer_id
string

The customer to which this subscription belongs

end_date
string | null

The end date of the subscription, if there is one

id
string

The ID of the subscription in Maple

invoice_additional_display_fields
object[] | null

Any additional invoice key-value pairs that attached to the invoices for this subscription

invoice_due_date_from_creation
integer

The number of days between the invoice date and the due date

Required range: x >= 0
metadata
object

Any additional data as key-value pairs attached to the subscription

minimum_spend
object

The amount which has value in cents and a currency

mrr
object

The amount which has value in cents and a currency

next_invoice_date
string | null

The date the next invoice for this subscription will be available

override_entitlements
object[] | null

Any entitlements attached to this subscription

pause_config
object
pause_date
string | null

The date this subscription was paused for collection

payment_method_id
string | null

The payment method for this subscription, if available

product_pricing_ids
string[] | null

The list of plans that are part of this subscription along with the quantities and minimum purchased units per metric under the plan

renewal_date
string | null

The renewal date of the subscription, if there is one

start_date
string

The start date of the subscription

status
string

The subscription status which can be one of active, cancelled or unpaid

term
object

The term which includes a frequency interval and a count for number of intervals

trial
boolean

Whether the subscription is a trial

trial_conversion_date
string | null

The date the trial converted to an active subscription, remains null if trial does not convert

updated_at
string

The date the subscription was last updated