All URIs are relative to https://localhost:8080/api/v9
Method | HTTP request | Description |
---|---|---|
delete_organization_subscription | DELETE /organizations/{organization_id}/subscription | Subscription |
delete_workspace_subscription | DELETE /workspaces/{workspace_id}/subscription/{subscription_id} | Subscription |
get_currencies | GET /currencies | Currencies |
get_organization_invoice | GET /organizations/{organization_id}/invoices/{invoice_uid}.pdf | InvoicePdf |
get_organization_invoice_summary | GET /organizations/{organization_id}/subscription/invoice_summary | Invoice Summary |
get_organization_subscription | GET /organizations/{organization_id}/subscription | Subscription |
get_public_subscription_plans | GET /workspaces/plans | Public Subscription Plans |
get_workspace_currencies | GET /workspaces/{workspace_id}/currencies | Get workspace currencies |
get_workspace_customer | GET /workspaces/{workspace_id}/customer | Customer |
get_workspace_features | GET /workspaces/{workspace_id}/subscription/features | Features |
get_workspace_features_selected | GET /workspaces/{workspace_id}/subscription/selected_features | SelectedFeatures |
get_workspace_invoices | GET /workspaces/{workspace_id}/invoices/{invoice_id}.pdf | InvoicePdf |
get_workspace_payment_receipts | GET /workspaces/{workspace_id}/payment_receipts/{payment_id}.pdf | PaymentReceipts |
get_workspace_payment_records | GET /workspaces/{workspace_id}/payment_records | PaymentRecords |
get_workspace_plans | GET /workspaces/{workspace_id}/plans | WorkspacePlans |
get_workspace_plans_pricing | GET /workspaces/{workspace_id}/plans/{plan_id} | WorkspacePlan |
get_workspace_purchase_order_pdf | GET /workspaces/{workspace_id}/subscription/purchase_orders/{purchase_order_id}.pdf | PurchaseOrderPdf |
get_workspace_subscription | GET /workspaces/{workspace_id}/subscription | Subscription |
post_organization_plans_pricing_feedback | POST /organizations/{organization_id}/pricing_plans/{pricing_plan_id}/feedback | Feedback |
post_organization_purchase_order | POST /organizations/{organization_id}/subscription/purchase_orders | PurchaseOrders |
post_organization_subscription | POST /organizations/{organization_id}/subscription | Subscription |
post_organization_subscription_0 | POST /organizations/{organization_id}/subscription/trial | Subscription |
post_workspace_customer | POST /workspaces/{workspace_id}/customer/contact_detail | ContactDetails |
post_workspace_plans_pricing_feedback | POST /workspaces/{workspace_id}/pricing_plans/{pricing_plan_id}/feedback | Feedback |
post_workspace_purchase_order | POST /workspaces/{workspace_id}/subscription/purchase_orders | PurchaseOrders |
post_workspace_subscription | POST /workspaces/{workspace_id}/subscription | Subscription |
post_workspace_subscription_calculate | POST /workspaces/{workspace_id}/subscription/calculate | SubscriptionCalculation |
post_workspace_subscription_inc_accept | POST /workspaces/{workspace_id}/subscription/inc_accept | IncAccept |
put_organization_subscription | PUT /organizations/{organization_id}/subscription | Subscription |
put_workspace_profile | PUT /workspaces/{workspace_id}/profile/{profile_id} | Profile |
str delete_organization_subscription(organization_id, immediate_cancel)
Subscription
Cancels an existing subscription.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
immediate_cancel = 'immediate_cancel_example' # str | If true, the subscription is canceled immediately otherwise canceled at period end
try:
# Subscription
api_response = api_instance.delete_organization_subscription(organization_id, immediate_cancel)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->delete_organization_subscription: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
immediate_cancel | str | If true, the subscription is canceled immediately otherwise canceled at period end |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str delete_workspace_subscription(workspace_id, subscription_id, feedback_data)
Subscription
Cancels the subscription and saves feedback if present.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
subscription_id = 56 # int | Numeric ID of the subscription.
feedback_data = toggl.ModelsPlanChangeFeedback() # ModelsPlanChangeFeedback | Feedback data.
try:
# Subscription
api_response = api_instance.delete_workspace_subscription(workspace_id, subscription_id, feedback_data)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->delete_workspace_subscription: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. | |
subscription_id | int | Numeric ID of the subscription. | |
feedback_data | ModelsPlanChangeFeedback | Feedback data. |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ModelsCurrency] get_currencies()
Currencies
Returns a list of available currencies.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = toggl.SubscriptionApi()
try:
# Currencies
api_response = api_instance.get_currencies()
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_currencies: %s\n" % e)
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str get_organization_invoice(organization_id, invoice_uid)
InvoicePdf
Returns a Invoice document in PDF form.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
invoice_uid = 'invoice_uid_example' # str | Numeric ID or string ID of the invoice.
try:
# InvoicePdf
api_response = api_instance.get_organization_invoice(organization_id, invoice_uid)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_organization_invoice: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
invoice_uid | str | Numeric ID or string ID of the invoice. |
str
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str get_organization_invoice_summary(organization_id, quantity=quantity, pricing_plan_tag=pricing_plan_tag)
Invoice Summary
Returns a summary of the next invoice for an Organization
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
quantity = 56 # int | Quantity of the subscription (optional)
pricing_plan_tag = 'pricing_plan_tag_example' # str | Pricing plan tag (optional)
try:
# Invoice Summary
api_response = api_instance.get_organization_invoice_summary(organization_id, quantity=quantity, pricing_plan_tag=pricing_plan_tag)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_organization_invoice_summary: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
quantity | int | Quantity of the subscription | [optional] |
pricing_plan_tag | str | Pricing plan tag | [optional] |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionOutData get_organization_subscription(organization_id)
Subscription
Returns subscription data.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
try:
# Subscription
api_response = api_instance.get_organization_subscription(organization_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_organization_subscription: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[BillingFancyPlan] get_public_subscription_plans()
Public Subscription Plans
Lists Public subscription plans.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = toggl.SubscriptionApi()
try:
# Public Subscription Plans
api_response = api_instance.get_public_subscription_plans()
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_public_subscription_plans: %s\n" % e)
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[str] get_workspace_currencies(workspace_id)
Get workspace currencies
Get the currencies for a given workspace.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace
try:
# Get workspace currencies
api_response = api_instance.get_workspace_currencies(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_currencies: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace |
list[str]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelsCustomer get_workspace_customer(workspace_id)
Customer
Allows to fetch customer data.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace
try:
# Customer
api_response = api_instance.get_workspace_customer(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_customer: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionFeatureReturn get_workspace_features(workspace_id)
Features
Returns list of the features available for a workspace
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
try:
# Features
api_response = api_instance.get_workspace_features(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_features: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionFeatureReturn get_workspace_features_selected(workspace_id)
SelectedFeatures
Returns list of the features assigned to the workspace
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
try:
# SelectedFeatures
api_response = api_instance.get_workspace_features_selected(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_features_selected: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str get_workspace_invoices(workspace_id, invoice_id)
InvoicePdf
Returns an Invoice document in PDF form.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
invoice_id = 56 # int | Numeric ID of the invoice.
try:
# InvoicePdf
api_response = api_instance.get_workspace_invoices(workspace_id, invoice_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_invoices: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. | |
invoice_id | int | Numeric ID of the invoice. |
str
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str get_workspace_payment_receipts(workspace_id, payment_id)
PaymentReceipts
Returns payment receipt pdf file.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace
payment_id = 56 # int | Numeric ID of the receipt
try:
# PaymentReceipts
api_response = api_instance.get_workspace_payment_receipts(workspace_id, payment_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_payment_receipts: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace | |
payment_id | int | Numeric ID of the receipt |
str
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ModelsPaymentRecord] get_workspace_payment_records(workspace_id)
PaymentRecords
Returns payment records.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace
try:
# PaymentRecords
api_response = api_instance.get_workspace_payment_records(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_payment_records: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str get_workspace_plans(workspace_id)
WorkspacePlans
Returns pricing plans for a workspace.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace
try:
# WorkspacePlans
api_response = api_instance.get_workspace_plans(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_plans: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[BillingFancyPlan] get_workspace_plans_pricing(workspace_id, plan_id)
WorkspacePlan
Returns plans fitered by plan ID.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace
plan_id = 56 # int | Numeric ID of the plan to get
try:
# WorkspacePlan
api_response = api_instance.get_workspace_plans_pricing(workspace_id, plan_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_plans_pricing: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace | |
plan_id | int | Numeric ID of the plan to get |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str get_workspace_purchase_order_pdf(workspace_id, purchase_order_id)
PurchaseOrderPdf
Returns a Purchase Order document in PDF form.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
purchase_order_id = 56 # int | Numeric ID of the purchase order.
try:
# PurchaseOrderPdf
api_response = api_instance.get_workspace_purchase_order_pdf(workspace_id, purchase_order_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_purchase_order_pdf: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. | |
purchase_order_id | int | Numeric ID of the purchase order. |
str
- Content-Type: Not defined
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionOutData get_workspace_subscription(workspace_id)
Subscription
Returns subscription data.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
try:
# Subscription
api_response = api_instance.get_workspace_subscription(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->get_workspace_subscription: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str post_organization_plans_pricing_feedback(organization_id, pricing_plan_id, comment=comment)
Feedback
Endpoint for client's feedback on change of a pricing plan. It triggers an e-mail message with comment content to support.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization
pricing_plan_id = 56 # int | Numeric ID of the old pricing_plan_id
comment = toggl.ModelsPlanChangeFeedback() # ModelsPlanChangeFeedback | Comment from the client on the pricing plan change (optional)
try:
# Feedback
api_response = api_instance.post_organization_plans_pricing_feedback(organization_id, pricing_plan_id, comment=comment)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_organization_plans_pricing_feedback: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization | |
pricing_plan_id | int | Numeric ID of the old pricing_plan_id | |
comment | ModelsPlanChangeFeedback | Comment from the client on the pricing plan change | [optional] |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountingPurchaseOrderListItem post_organization_purchase_order(organization_id, organization_purchase_order_request)
PurchaseOrders
Create a Purchase Order document for an organization and send an email to the customer with a reference to the document.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
organization_purchase_order_request = toggl.PurchaseordersPayload() # PurchaseordersPayload | Input data for purchase order creation.
try:
# PurchaseOrders
api_response = api_instance.post_organization_purchase_order(organization_id, organization_purchase_order_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_organization_purchase_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
organization_purchase_order_request | PurchaseordersPayload | Input data for purchase order creation. |
AccountingPurchaseOrderListItem
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
post_organization_subscription(organization_id, organization_subscription_request)
Subscription
Allows to create a new unified subscription for an organization.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
organization_subscription_request = toggl.SubscriptionCreateUnifiedSubsRequest() # SubscriptionCreateUnifiedSubsRequest | Input data for subscription creation.
try:
# Subscription
api_instance.post_organization_subscription(organization_id, organization_subscription_request)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_organization_subscription: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
organization_subscription_request | SubscriptionCreateUnifiedSubsRequest | Input data for subscription creation. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
post_organization_subscription_0(organization_id)
Subscription
Allows to create a new unified subscription on initial 30-day trial for an organization.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
try:
# Subscription
api_instance.post_organization_subscription_0(organization_id)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_organization_subscription_0: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelsContactDetail post_workspace_customer(workspace_id, contact_detail_request)
ContactDetails
Allows to save contact details.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
contact_detail_request = toggl.SubscriptionContactDetailRequest() # SubscriptionContactDetailRequest | Input data for contact details.
try:
# ContactDetails
api_response = api_instance.post_workspace_customer(workspace_id, contact_detail_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_workspace_customer: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. | |
contact_detail_request | SubscriptionContactDetailRequest | Input data for contact details. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str post_workspace_plans_pricing_feedback(workspace_id, pricing_plan_id, comment=comment)
Feedback
Endpoint for client's feedback on change of a pricing plan. It triggers an e-mail message with comment content to support.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace
pricing_plan_id = 56 # int | Numeric ID of the old pricing_plan_id
comment = toggl.ModelsPlanChangeFeedback() # ModelsPlanChangeFeedback | Comment from the client on the pricing plan change (optional)
try:
# Feedback
api_response = api_instance.post_workspace_plans_pricing_feedback(workspace_id, pricing_plan_id, comment=comment)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_workspace_plans_pricing_feedback: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace | |
pricing_plan_id | int | Numeric ID of the old pricing_plan_id | |
comment | ModelsPlanChangeFeedback | Comment from the client on the pricing plan change | [optional] |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AccountingPurchaseOrderListItem post_workspace_purchase_order(workspace_id, workspace_purchase_order_request)
PurchaseOrders
Create a Purchase Order document for a workspace and send an email to the customer with a reference to the document.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
workspace_purchase_order_request = toggl.PurchaseordersPayload() # PurchaseordersPayload | Input data for purchase order creation.
try:
# PurchaseOrders
api_response = api_instance.post_workspace_purchase_order(workspace_id, workspace_purchase_order_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_workspace_purchase_order: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. | |
workspace_purchase_order_request | PurchaseordersPayload | Input data for purchase order creation. |
AccountingPurchaseOrderListItem
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModelsSubscription post_workspace_subscription(workspace_id, workspace_subscription_request)
Subscription
Allows to create a new subscription, cancel existing one or change the pricing plan.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
workspace_subscription_request = toggl.SubscriptionPayload() # SubscriptionPayload | Input data for purchase order creation.
try:
# Subscription
api_response = api_instance.post_workspace_subscription(workspace_id, workspace_subscription_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_workspace_subscription: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. | |
workspace_subscription_request | SubscriptionPayload | Input data for purchase order creation. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SubscriptionCalculatedData post_workspace_subscription_calculate(workspace_id, calculation_data_request)
SubscriptionCalculation
Returns calculation of the subscription price for given pricing plan, period count, user count, currency, taxes etc.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
calculation_data_request = toggl.SubscriptionCalculateRequest() # SubscriptionCalculateRequest | Input data for calculation.
try:
# SubscriptionCalculation
api_response = api_instance.post_workspace_subscription_calculate(workspace_id, calculation_data_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_workspace_subscription_calculate: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. | |
calculation_data_request | SubscriptionCalculateRequest | Input data for calculation. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str post_workspace_subscription_inc_accept(workspace_id)
IncAccept
Records user acceptance of Terms of Service.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
try:
# IncAccept
api_response = api_instance.post_workspace_subscription_inc_accept(workspace_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->post_workspace_subscription_inc_accept: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
put_organization_subscription(organization_id, organization_subscription_request)
Subscription
Allows to update existing unified subscription for an organization.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
organization_id = 56 # int | Numeric ID of the organization.
organization_subscription_request = toggl.SubscriptionUpdateUnifiedSubsRequest() # SubscriptionUpdateUnifiedSubsRequest | Input data for updating subscription.
try:
# Subscription
api_instance.put_organization_subscription(organization_id, organization_subscription_request)
except ApiException as e:
print("Exception when calling SubscriptionApi->put_organization_subscription: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_id | int | Numeric ID of the organization. | |
organization_subscription_request | SubscriptionUpdateUnifiedSubsRequest | Input data for updating subscription. |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str put_workspace_profile(workspace_id, profile_id, feedback_data=feedback_data)
Profile
Allows to change profile (subscription). This endpoint will be deprecated.
from __future__ import print_function
import time
import toggl
from toggl.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
configuration = toggl.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = toggl.SubscriptionApi(toggl.ApiClient(configuration))
workspace_id = 56 # int | Numeric ID of the workspace.
profile_id = 56 # int | Numeric ID of the profile (pricing plan).
feedback_data = toggl.ModelsPlanChangeFeedback() # ModelsPlanChangeFeedback | Feedback data. (optional)
try:
# Profile
api_response = api_instance.put_workspace_profile(workspace_id, profile_id, feedback_data=feedback_data)
pprint(api_response)
except ApiException as e:
print("Exception when calling SubscriptionApi->put_workspace_profile: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
workspace_id | int | Numeric ID of the workspace. | |
profile_id | int | Numeric ID of the profile (pricing plan). | |
feedback_data | ModelsPlanChangeFeedback | Feedback data. | [optional] |
str
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]