POST
/
subscriptions
/
{id}
/
activate
curl --request POST \
  --url https://api.alguna.io/subscriptions/{id}/activate \
  --header 'Authorization: Bearer <token>'
{
  "id": "sub_8Np7AWxL4QvkprmjmloXuT",
  "customerId": "cus_0000000000000000000000",
  "name": "Waystar Royco - 2024",
  "description": "Initial contract for Waystar Royco",
  "purchaseOrderNumber": "WRO-2024-001",
  "contractStartDate": "2024-02-01T00:00:00Z",
  "currency": "USD",
  "status": "draft",
  "activationMode": "manual",
  "currentVersion": {
    "id": "subv_9Ak3BwqR7TzvlsqnkmpYvU",
    "effectiveStartDate": "2024-02-01T00:00:00Z",
    "effectiveEndDate": null,
    "status": "draft",
    "items": [
      {
        "priceId": "price_0000000000000000000000",
        "type": "unit",
        "unitAmount": "199.99"
      },
      {
        "priceId": "price_0000000000000001111111",
        "type": "unit",
        "unitAmount": "99.99"
      },
      {
        "priceId": "price_0000000000000002222222",
        "type": "tiered",
        "tiers": [
          {
            "minUnits": 1,
            "maxUnits": 100,
            "unitAmount": "0.10",
            "fixedAmount": "0.00"
          },
          {
            "minUnits": 100,
            "maxUnits": 200,
            "unitAmount": "0.09",
            "fixedAmount": "0.00"
          },
          {
            "minUnits": 200,
            "maxUnits": 300,
            "unitAmount": "0.08",
            "fixedAmount": "0.00"
          },
          {
            "minUnits": 300,
            "maxUnits": null,
            "unitAmount": "0.07",
            "fixedAmount": "0.00"
          }
        ]
      },
      {
        "priceId": "price_0000000000000003333333",
        "type": "fixed",
        "unitAmount": "24.99",
        "quantity": "2"
      },
      {
        "bundleId": "bundle_0000000000000001111111",
        "prices": [
          {
            "priceId": "price_0000000000000004444444",
            "type": "unit",
            "unitAmount": "49.99"
          },
          {
            "priceId": "price_0000000000000005555555",
            "type": "unit",
            "unitAmount": "29.99"
          }
        ]
      }
    ],
    "thresholds": [
      {
	      "id": "subt_0000000000000001111111",
        "type": "max",
        "value": "10000.00",
        "interval": "month",
        "scope": {
          "type": "global"
        }
      },
      {
	      "id": "subt_0000000000000002222222",
        "type": "min",
        "value": "1000.00",
        "interval": "month",
        "scope": {
          "type": "items",
          "ids": ["bundle_0000000000000001111111"]
        }
      }
    ],
    "discounts": [
      {
	      "id": "subd_0000000000000001111111",
        "type": "percentage",
        "value": "10",
        "scope": {
          "type": "items",
          "ids": ["price_0000000000000000000000", "price_0000000000000001111111"]
        }
      }
    ]
  },
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z",
  "canceledAt": null,
  "completedAt": null
}
{
  "id": "sub_8Np7AWxL4QvkprmjmloXuT",
  "customerId": "cus_0000000000000000000000",
  "name": "Waystar Royco - 2024",
  "description": "Initial contract for Waystar Royco",
  "purchaseOrderNumber": "WRO-2024-001",
  "contractStartDate": "2024-02-01T00:00:00Z",
  "currency": "USD",
  "status": "draft",
  "activationMode": "manual",
  "currentVersion": {
    "id": "subv_9Ak3BwqR7TzvlsqnkmpYvU",
    "effectiveStartDate": "2024-02-01T00:00:00Z",
    "effectiveEndDate": null,
    "status": "draft",
    "items": [
      {
        "priceId": "price_0000000000000000000000",
        "type": "unit",
        "unitAmount": "199.99"
      },
      {
        "priceId": "price_0000000000000001111111",
        "type": "unit",
        "unitAmount": "99.99"
      },
      {
        "priceId": "price_0000000000000002222222",
        "type": "tiered",
        "tiers": [
          {
            "minUnits": 1,
            "maxUnits": 100,
            "unitAmount": "0.10",
            "fixedAmount": "0.00"
          },
          {
            "minUnits": 100,
            "maxUnits": 200,
            "unitAmount": "0.09",
            "fixedAmount": "0.00"
          },
          {
            "minUnits": 200,
            "maxUnits": 300,
            "unitAmount": "0.08",
            "fixedAmount": "0.00"
          },
          {
            "minUnits": 300,
            "maxUnits": null,
            "unitAmount": "0.07",
            "fixedAmount": "0.00"
          }
        ]
      },
      {
        "priceId": "price_0000000000000003333333",
        "type": "fixed",
        "unitAmount": "24.99",
        "quantity": "2"
      },
      {
        "bundleId": "bundle_0000000000000001111111",
        "prices": [
          {
            "priceId": "price_0000000000000004444444",
            "type": "unit",
            "unitAmount": "49.99"
          },
          {
            "priceId": "price_0000000000000005555555",
            "type": "unit",
            "unitAmount": "29.99"
          }
        ]
      }
    ],
    "thresholds": [
      {
	      "id": "subt_0000000000000001111111",
        "type": "max",
        "value": "10000.00",
        "interval": "month",
        "scope": {
          "type": "global"
        }
      },
      {
	      "id": "subt_0000000000000002222222",
        "type": "min",
        "value": "1000.00",
        "interval": "month",
        "scope": {
          "type": "items",
          "ids": ["bundle_0000000000000001111111"]
        }
      }
    ],
    "discounts": [
      {
	      "id": "subd_0000000000000001111111",
        "type": "percentage",
        "value": "10",
        "scope": {
          "type": "items",
          "ids": ["price_0000000000000000000000", "price_0000000000000001111111"]
        }
      }
    ]
  },
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z",
  "canceledAt": null,
  "completedAt": null
}
id
string

The unique identifier for the subscription.

accountId
string

The identifier of the customer associated with the subscription.

name
string

The name of the subscription, e.g., "Waystar Royco - 2024".

description
string

A brief description of the subscription, such as "Initial contract for Waystar Royco".

purchaseOrderNumber
string

The purchase order number associated with this subscription.

contractStartDate
datetime

The effective start date and time of the contract in ISO 8601 format.

currency
string

The currency used for billing, e.g., "USD".

status
string

The current status of the subscription (e.g., draft, active).

activationMode
string

The activation mode for the subscription, such as manual or automatic.

currentVersion
object

Details regarding the current version of the subscription.

createdAt
datetime

The timestamp when the subscription was created.

updatedAt
datetime

The timestamp when the subscription was last updated.

canceledAt
datetime

The timestamp when the subscription was canceled. If the subscription is active, this field is null.

completedAt
datetime

The timestamp when the subscription was completed. If the subscription is still in progress, this field is null.