The Subscription object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

status string
cancelation_date string
trial_period_start string
trial_period_end string
current_invoice_start string
current_invoice_end string
days_until_due integer

Default: 0

cancel_at_period_end boolean

Default: false

apply_additional_discount string
additional_discount_percentage number
additional_discount_amount number
party_type string required
party string required
sales_tax_template string
purchase_tax_template string
follow_calendar_months boolean

Default: false

generate_new_invoices_past_due_date boolean

Default: false

end_date string
start_date string
cost_center string
company string
submit_invoice boolean

Default: true

generate_invoice_at string

Default: End of the current subscription period

number_of_days integer
The Subscription object
{
  "id": "subscription_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "cancelation_date": "2024-01-15",
  "trial_period_start": "trial_period_start_example",
  "trial_period_end": "trial_period_end_example",
  "current_invoice_start": "current_invoice_start_example",
  "current_invoice_end": "current_invoice_end_example",
  "days_until_due": 0,
  "cancel_at_period_end": false,
  "apply_additional_discount": "apply_additional_discount_example",
  "additional_discount_percentage": 0,
  "additional_discount_amount": 0,
  "party_type": "party_type_example",
  "party": "party_example",
  "sales_tax_template": "sales_tax_template_example",
  "purchase_tax_template": "purchase_tax_template_example",
  "follow_calendar_months": false,
  "generate_new_invoices_past_due_date": false,
  "end_date": "2024-01-15",
  "start_date": "2024-01-15",
  "cost_center": "cost_center_example",
  "company": "Example Corp",
  "submit_invoice": true,
  "generate_invoice_at": "End of the current subscription period",
  "number_of_days": 0
}
GET /api/accounts/subscription/{id}

Retrieve a subscription

Retrieves the details of an existing subscription. Supply the unique subscription ID that was returned from a previous request.

Path parameters

id string required

The identifier of the subscription to retrieve.

Returns

Returns the subscription object if a valid identifier was provided.

GET /api/accounts/subscription/{id}
curl https://api.overplane.dev/api/accounts/subscription/subscription_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "id": "subscription_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "cancelation_date": "2024-01-15",
  "trial_period_start": "trial_period_start_example",
  "trial_period_end": "trial_period_end_example",
  "current_invoice_start": "current_invoice_start_example",
  "current_invoice_end": "current_invoice_end_example",
  "days_until_due": 0,
  "cancel_at_period_end": false,
  "apply_additional_discount": "apply_additional_discount_example",
  "additional_discount_percentage": 0,
  "additional_discount_amount": 0,
  "party_type": "party_type_example",
  "party": "party_example",
  "sales_tax_template": "sales_tax_template_example",
  "purchase_tax_template": "purchase_tax_template_example",
  "follow_calendar_months": false,
  "generate_new_invoices_past_due_date": false,
  "end_date": "2024-01-15",
  "start_date": "2024-01-15",
  "cost_center": "cost_center_example",
  "company": "Example Corp",
  "submit_invoice": true,
  "generate_invoice_at": "End of the current subscription period",
  "number_of_days": 0
}
GET /api/accounts/subscription

List all subscriptions

Returns a list of subscriptions. The results are sorted by creation date, with the most recently created appearing first.

Query parameters

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of subscription objects.

GET /api/accounts/subscription
curl https://api.overplane.dev/api/accounts/subscription \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "data": [
    {
      "id": "subscription_abc123",
      "created_at": "2024-01-15T09: 30: 00Z",
      "updated_at": "2024-01-15T09: 30: 00Z",
      "status": "draft",
      "cancelation_date": "2024-01-15",
      "trial_period_start": "trial_period_start_example",
      "trial_period_end": "trial_period_end_example",
      "current_invoice_start": "current_invoice_start_example",
      "current_invoice_end": "current_invoice_end_example",
      "days_until_due": 0,
      "cancel_at_period_end": false,
      "apply_additional_discount": "apply_additional_discount_example",
      "additional_discount_percentage": 0,
      "additional_discount_amount": 0,
      "party_type": "party_type_example",
      "party": "party_example",
      "sales_tax_template": "sales_tax_template_example",
      "purchase_tax_template": "purchase_tax_template_example",
      "follow_calendar_months": false,
      "generate_new_invoices_past_due_date": false,
      "end_date": "2024-01-15",
      "start_date": "2024-01-15",
      "cost_center": "cost_center_example",
      "company": "Example Corp",
      "submit_invoice": true,
      "generate_invoice_at": "End of the current subscription period",
      "number_of_days": 0
    }
  ],
  "has_more": false,
  "total": 1
}
POST /api/accounts/subscription

Create a subscription

Creates a new subscription object.

Body parameters

status string
cancelation_date string
trial_period_start string
trial_period_end string
current_invoice_start string
current_invoice_end string
days_until_due integer

Default: 0

cancel_at_period_end boolean

Default: false

apply_additional_discount string
additional_discount_percentage number
additional_discount_amount number
party_type string required
party string required
sales_tax_template string
purchase_tax_template string
follow_calendar_months boolean

Default: false

generate_new_invoices_past_due_date boolean

Default: false

end_date string
start_date string
cost_center string
company string
submit_invoice boolean

Default: true

generate_invoice_at string

Default: End of the current subscription period

number_of_days integer

Returns

Returns the newly created subscription object if the call succeeded.

POST /api/accounts/subscription
curl https://api.overplane.dev/api/accounts/subscription \
  -H "Authorization: Bearer sk_test_..." \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"party_type":"party_type_example","party":"party_example"}'
Response
{
  "id": "subscription_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "cancelation_date": "2024-01-15",
  "trial_period_start": "trial_period_start_example",
  "trial_period_end": "trial_period_end_example",
  "current_invoice_start": "current_invoice_start_example",
  "current_invoice_end": "current_invoice_end_example",
  "days_until_due": 0,
  "cancel_at_period_end": false,
  "apply_additional_discount": "apply_additional_discount_example",
  "additional_discount_percentage": 0,
  "additional_discount_amount": 0,
  "party_type": "party_type_example",
  "party": "party_example",
  "sales_tax_template": "sales_tax_template_example",
  "purchase_tax_template": "purchase_tax_template_example",
  "follow_calendar_months": false,
  "generate_new_invoices_past_due_date": false,
  "end_date": "2024-01-15",
  "start_date": "2024-01-15",
  "cost_center": "cost_center_example",
  "company": "Example Corp",
  "submit_invoice": true,
  "generate_invoice_at": "End of the current subscription period",
  "number_of_days": 0
}
PATCH /api/accounts/subscription/{id}

Update a subscription

Updates the specified subscription by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Path parameters

id string required

The identifier of the subscription to update.

Body parameters

status string
cancelation_date string
trial_period_start string
trial_period_end string
current_invoice_start string
current_invoice_end string
days_until_due integer

Default: 0

cancel_at_period_end boolean

Default: false

apply_additional_discount string
additional_discount_percentage number
additional_discount_amount number
party_type string
party string
sales_tax_template string
purchase_tax_template string
follow_calendar_months boolean

Default: false

generate_new_invoices_past_due_date boolean

Default: false

end_date string
start_date string
cost_center string
company string
submit_invoice boolean

Default: true

generate_invoice_at string

Default: End of the current subscription period

number_of_days integer

Returns

Returns the updated subscription object.

PATCH /api/accounts/subscription/{id}
curl https://api.overplane.dev/api/accounts/subscription/subscription_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{"status":"draft","cancelation_date":"2024-01-15"}'
Response
{
  "id": "subscription_abc123",
  "created_at": "2024-01-15T09: 30: 00Z",
  "updated_at": "2024-01-15T09: 30: 00Z",
  "status": "draft",
  "cancelation_date": "2024-01-15",
  "trial_period_start": "trial_period_start_example",
  "trial_period_end": "trial_period_end_example",
  "current_invoice_start": "current_invoice_start_example",
  "current_invoice_end": "current_invoice_end_example",
  "days_until_due": 0,
  "cancel_at_period_end": false,
  "apply_additional_discount": "apply_additional_discount_example",
  "additional_discount_percentage": 0,
  "additional_discount_amount": 0,
  "party_type": "party_type_example",
  "party": "party_example",
  "sales_tax_template": "sales_tax_template_example",
  "purchase_tax_template": "purchase_tax_template_example",
  "follow_calendar_months": false,
  "generate_new_invoices_past_due_date": false,
  "end_date": "2024-01-15",
  "start_date": "2024-01-15",
  "cost_center": "cost_center_example",
  "company": "Example Corp",
  "submit_invoice": true,
  "generate_invoice_at": "End of the current subscription period",
  "number_of_days": 0
}
DELETE /api/accounts/subscription/{id}

Delete a subscription

Permanently deletes a subscription. This cannot be undone.

Path parameters

id string required

The identifier of the subscription to delete.

Returns

Returns a confirmation that the subscription has been deleted.

DELETE /api/accounts/subscription/{id}
curl https://api.overplane.dev/api/accounts/subscription/subscription_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "id": "subscription_abc123",
  "deleted": true
}