# Billing

## Gets the usage of a workspace

> Get the usage data for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/workspace-usage":{"get":{"tags":["billing"],"summary":"Gets the usage of a workspace","description":"Get the usage data for a workspace","operationId":"get_workspace_usage_full_billing__workspace_id__workspace_usage_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to get usage data for"},"description":"The ID of the workspace to get usage data for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_workspace_usage_full_billing__workspace_id__workspace_usage_get"}}}},"responses":{"200":{"description":"The usage of the workspace","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FullWorkspaceUsageDTO"},{"type":"null"}],"title":"Response Get Workspace Usage Full Billing  Workspace Id  Workspace Usage Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_workspace_usage_full_billing__workspace_id__workspace_usage_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_workspace_usage_full_billing__workspace_id__workspace_usage_get"},"FullWorkspaceUsageDTO":{"properties":{"seats":{"$ref":"#/components/schemas/UsageMetric"},"guests":{"$ref":"#/components/schemas/UsageMetric"},"has_payment_method":{"type":"boolean","title":"Has Payment Method"},"cloud_storage":{"$ref":"#/components/schemas/StorageMetric"},"byo_storage":{"$ref":"#/components/schemas/StorageMetric"},"vault_storage":{"$ref":"#/components/schemas/StorageMetric"},"vault_byo_storage":{"$ref":"#/components/schemas/StorageMetric"},"high_speed_storage":{"$ref":"#/components/schemas/StorageMetric"},"drives":{"$ref":"#/components/schemas/UsageMetric"},"ai_indexed_items":{"$ref":"#/components/schemas/UsageMetric"},"cloud_drives":{"items":{"$ref":"#/components/schemas/DriveWithStorage"},"type":"array","title":"Cloud Drives"},"byo_drives":{"items":{"$ref":"#/components/schemas/DriveWithStorage"},"type":"array","title":"Byo Drives"},"vault_drives":{"items":{"$ref":"#/components/schemas/DriveWithStorage"},"type":"array","title":"Vault Drives"},"vault_byo_drives":{"items":{"$ref":"#/components/schemas/DriveWithStorage"},"type":"array","title":"Vault Byo Drives"},"high_speed_drives":{"items":{"$ref":"#/components/schemas/DriveWithStorage"},"type":"array","title":"High Speed Drives"},"monthly_subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monthly Subscription Status"},"annual_subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Annual Subscription Status"},"credits":{"type":"integer","title":"Credits"}},"type":"object","required":["seats","guests","has_payment_method","cloud_storage","byo_storage","vault_storage","vault_byo_storage","high_speed_storage","drives","ai_indexed_items","cloud_drives","byo_drives","vault_drives","vault_byo_drives","high_speed_drives","monthly_subscription_status","annual_subscription_status","credits"],"title":"FullWorkspaceUsageDTO"},"UsageMetric":{"properties":{"used":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Used"},"included":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Included"},"enforced":{"type":"boolean","title":"Enforced","default":true}},"type":"object","required":["used","included"],"title":"UsageMetric"},"StorageMetric":{"properties":{"free":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Free"},"paid":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Paid"},"used":{"anyOf":[{"type":"integer"},{"type":"number"}],"title":"Used"}},"type":"object","required":["free","paid","used"],"title":"StorageMetric"},"DriveWithStorage":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"usage":{"type":"number","title":"Usage"}},"type":"object","required":["id","name","usage"],"title":"DriveWithStorage"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Gets the usage of a drive

> Get the usage data for a drive

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{drive_id}/drive-usage":{"get":{"tags":["billing"],"summary":"Gets the usage of a drive","description":"Get the usage data for a drive","operationId":"get_drive_full_usage_billing__drive_id__drive_usage_get","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Drive ID","description":"The ID of the drive to get usage data for"},"description":"The ID of the drive to get usage data for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_drive_full_usage_billing__drive_id__drive_usage_get"}}}},"responses":{"200":{"description":"The usage of the drive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveUsage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_drive_full_usage_billing__drive_id__drive_usage_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_drive_full_usage_billing__drive_id__drive_usage_get"},"DriveUsage":{"properties":{"types":{"items":{"$ref":"#/components/schemas/AssetTypeUsage"},"type":"array","title":"Types"},"usage":{"type":"number","title":"Usage"},"total_storage":{"type":"number","title":"Total Storage"},"total_items":{"type":"integer","title":"Total Items"}},"type":"object","required":["types","usage","total_storage","total_items"],"title":"DriveUsage"},"AssetTypeUsage":{"properties":{"type":{"$ref":"#/components/schemas/AssetType"},"count":{"type":"integer","title":"Count"},"size":{"type":"number","title":"Size"}},"type":"object","required":["type","count","size"],"title":"AssetTypeUsage"},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Gets the usage of a workspace

> Get the usage data for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/usage":{"get":{"tags":["billing"],"summary":"Gets the usage of a workspace","description":"Get the usage data for a workspace","operationId":"get_workspace_usage_billing__workspace_id__usage_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to get usage data for"},"description":"The ID of the workspace to get usage data for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_workspace_usage_billing__workspace_id__usage_get"}}}},"responses":{"200":{"description":"The usage of the workspace","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceUsageDTO"},{"type":"null"}],"title":"Response Get Workspace Usage Billing  Workspace Id  Usage Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_workspace_usage_billing__workspace_id__usage_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_workspace_usage_billing__workspace_id__usage_get"},"WorkspaceUsageDTO":{"properties":{"billing":{"$ref":"#/components/schemas/WorkspaceBillingDTO"},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"plan_name":{"type":"string","title":"Plan Name"},"seats_annual":{"type":"boolean","title":"Seats Annual"},"is_trial":{"type":"boolean","title":"Is Trial"},"seats":{"type":"integer","title":"Seats"}},"type":"object","required":["billing","plan","plan_name","seats_annual","is_trial","seats"],"title":"WorkspaceUsageDTO"},"WorkspaceBillingDTO":{"properties":{"start_time":{"type":"integer","title":"Start Time"},"end_time":{"type":"integer","title":"End Time"},"total_cloud_paid":{"type":"number","title":"Total Cloud Paid"},"total_vault_paid":{"type":"number","title":"Total Vault Paid"},"total_byo_paid":{"type":"number","title":"Total Byo Paid"},"total_vault_byo_paid":{"type":"number","title":"Total Vault Byo Paid"},"total_high_speed_paid":{"type":"number","title":"Total High Speed Paid"},"total_cloud_free":{"type":"number","title":"Total Cloud Free"},"total_vault_free":{"type":"number","title":"Total Vault Free"},"total_byo_free":{"type":"number","title":"Total Byo Free"},"cloud_overage":{"type":"number","title":"Cloud Overage"},"byo_overage":{"type":"number","title":"Byo Overage"},"vault_storage_overage":{"type":"number","title":"Vault Storage Overage"},"vault_byo_storage_overage":{"type":"number","title":"Vault Byo Storage Overage"},"high_speed_storage_overage":{"type":"number","title":"High Speed Storage Overage"}},"type":"object","required":["start_time","end_time","total_cloud_paid","total_vault_paid","total_byo_paid","total_vault_byo_paid","total_high_speed_paid","total_cloud_free","total_vault_free","total_byo_free","cloud_overage","byo_overage","vault_storage_overage","vault_byo_storage_overage","high_speed_storage_overage"],"title":"WorkspaceBillingDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Gets the invoices for a workspace

> Get the invoices for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/invoices":{"get":{"tags":["billing"],"summary":"Gets the invoices for a workspace","description":"Get the invoices for a workspace","operationId":"get_workspace_invoices_billing__workspace_id__invoices_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to get invoices for"},"description":"The ID of the workspace to get invoices for"},{"name":"upcoming","in":"query","required":false,"schema":{"type":"boolean","title":"Upcoming","description":"Whether to get the upcoming invoice","default":false},"description":"Whether to get the upcoming invoice"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_workspace_invoices_billing__workspace_id__invoices_get"}}}},"responses":{"200":{"description":"The invoices of the workspace","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceInvoiceDTO"}},{"type":"null"}],"title":"Response Get Workspace Invoices Billing  Workspace Id  Invoices Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_workspace_invoices_billing__workspace_id__invoices_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_workspace_invoices_billing__workspace_id__invoices_get"},"WorkspaceInvoiceDTO":{"properties":{"total_amount_due":{"type":"number","title":"Total Amount Due"},"period_start":{"type":"integer","title":"Period Start"},"period_end":{"type":"integer","title":"Period End"},"invoice_date":{"type":"integer","title":"Invoice Date"},"paid":{"type":"boolean","title":"Paid"},"invoice_pdf":{"type":"string","title":"Invoice Pdf"},"hosted_invoice_url":{"type":"string","title":"Hosted Invoice Url"},"tax":{"type":"number","title":"Tax"},"subtotal":{"type":"number","title":"Subtotal"},"lines":{"items":{"$ref":"#/components/schemas/LineItemDTO"},"type":"array","title":"Lines"},"status":{"type":"string","title":"Status"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["total_amount_due","period_start","period_end","invoice_date","paid","invoice_pdf","hosted_invoice_url","tax","subtotal","lines","status","currency"],"title":"WorkspaceInvoiceDTO"},"LineItemDTO":{"properties":{"description":{"type":"string","title":"Description"},"amount":{"type":"number","title":"Amount"},"quantity":{"type":"number","title":"Quantity"},"unit_type":{"type":"string","title":"Unit Type"},"unit_amount":{"type":"number","title":"Unit Amount"}},"type":"object","required":["description","amount","quantity","unit_type","unit_amount"],"title":"LineItemDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Update Payment Method

> Update the payment method for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/payment-method":{"put":{"tags":["billing"],"summary":"Update Payment Method","description":"Update the payment method for a workspace","operationId":"update_payment_method_billing__workspace_id__payment_method_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to update the payment method for"},"description":"The ID of the workspace to update the payment method for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_payment_method_billing__workspace_id__payment_method_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}],"title":"Response Update Payment Method Billing  Workspace Id  Payment Method Put"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_update_payment_method_billing__workspace_id__payment_method_put":{"properties":{"payment_method_id":{"type":"string","title":"Payment Method ID","description":"The ID of the payment method to update to"},"is_first":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"The first added payment method","description":"Whether this is the first added payment method (not updated later on)","default":false},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["payment_method_id"],"title":"Body_update_payment_method_billing__workspace_id__payment_method_put"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Update Billing Address

> Update the billing address for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/billing-address":{"put":{"tags":["billing"],"summary":"Update Billing Address","description":"Update the billing address for a workspace","operationId":"update_billing_address_billing__workspace_id__billing_address_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to update the billing address for"},"description":"The ID of the workspace to update the billing address for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_billing_address_billing__workspace_id__billing_address_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_update_billing_address_billing__workspace_id__billing_address_put":{"properties":{"address":{"$ref":"#/components/schemas/AddressDTO","title":"Address","description":"The address to update the billing address to"},"payment_method_id":{"type":"string","title":"Payment Method ID","description":"The ID of the payment method to update to"},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["address","payment_method_id"],"title":"Body_update_billing_address_billing__workspace_id__billing_address_put"},"AddressDTO":{"properties":{"name":{"type":"string","title":"Name"},"phone":{"type":"string","title":"Phone"},"address":{"$ref":"#/components/schemas/Address"}},"type":"object","required":["name","phone","address"],"title":"AddressDTO"},"Address":{"properties":{"line1":{"type":"string","title":"Line1"},"line2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line2"},"city":{"type":"string","title":"City"},"state":{"type":"string","title":"State"},"postal_code":{"type":"string","title":"Postal Code"},"country":{"type":"string","title":"Country"}},"type":"object","required":["line1","line2","city","state","postal_code","country"],"title":"Address"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Payment Methods

> Get the payment methods for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/payment-methods":{"get":{"tags":["billing"],"summary":"Get Payment Methods","description":"Get the payment methods for a workspace","operationId":"get_payment_methods_billing__workspace_id__payment_methods_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to get the payment methods for"},"description":"The ID of the workspace to get the payment methods for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_payment_methods_billing__workspace_id__payment_methods_get"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodDTO"},"title":"Response Get Payment Methods Billing  Workspace Id  Payment Methods Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_payment_methods_billing__workspace_id__payment_methods_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_payment_methods_billing__workspace_id__payment_methods_get"},"PaymentMethodDTO":{"properties":{"id":{"type":"string","title":"Id"},"brand":{"type":"string","title":"Brand"},"type":{"type":"string","title":"Type"},"last4":{"type":"string","title":"Last4"},"exp_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Month"},"exp_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exp Year"},"funding":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Funding"},"country":{"type":"string","title":"Country"},"address":{"type":"string","title":"Address"},"city":{"type":"string","title":"City"},"state":{"type":"string","title":"State"},"zip":{"type":"string","title":"Zip"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","brand","type","last4","exp_month","exp_year","funding","country","address","city","state","zip","name"],"title":"PaymentMethodDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Update Plan

> Update the plan for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/plan":{"put":{"tags":["billing"],"summary":"Update Plan","description":"Update the plan for a workspace","operationId":"update_plan_billing__workspace_id__plan_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to update the plan for"},"description":"The ID of the workspace to update the plan for"},{"name":"price_id","in":"query","required":true,"schema":{"type":"string","title":"Price ID","description":"The ID of the price plan to update to"},"description":"The ID of the price plan to update to"},{"name":"seats","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seats","description":"The number of seats to update to"},"description":"The number of seats to update to"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_plan_billing__workspace_id__plan_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_update_plan_billing__workspace_id__plan_put":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_update_plan_billing__workspace_id__plan_put"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Current Invoice

> Get the current invoice for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/current-invoice":{"get":{"tags":["billing"],"summary":"Get Current Invoice","description":"Get the current invoice for a workspace","operationId":"get_current_invoice_billing__workspace_id__current_invoice_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to get the current invoice for"},"description":"The ID of the workspace to get the current invoice for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_current_invoice_billing__workspace_id__current_invoice_get"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceInvoiceDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_current_invoice_billing__workspace_id__current_invoice_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_current_invoice_billing__workspace_id__current_invoice_get"},"WorkspaceInvoiceDTO":{"properties":{"total_amount_due":{"type":"number","title":"Total Amount Due"},"period_start":{"type":"integer","title":"Period Start"},"period_end":{"type":"integer","title":"Period End"},"invoice_date":{"type":"integer","title":"Invoice Date"},"paid":{"type":"boolean","title":"Paid"},"invoice_pdf":{"type":"string","title":"Invoice Pdf"},"hosted_invoice_url":{"type":"string","title":"Hosted Invoice Url"},"tax":{"type":"number","title":"Tax"},"subtotal":{"type":"number","title":"Subtotal"},"lines":{"items":{"$ref":"#/components/schemas/LineItemDTO"},"type":"array","title":"Lines"},"status":{"type":"string","title":"Status"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["total_amount_due","period_start","period_end","invoice_date","paid","invoice_pdf","hosted_invoice_url","tax","subtotal","lines","status","currency"],"title":"WorkspaceInvoiceDTO"},"LineItemDTO":{"properties":{"description":{"type":"string","title":"Description"},"amount":{"type":"number","title":"Amount"},"quantity":{"type":"number","title":"Quantity"},"unit_type":{"type":"string","title":"Unit Type"},"unit_amount":{"type":"number","title":"Unit Amount"}},"type":"object","required":["description","amount","quantity","unit_type","unit_amount"],"title":"LineItemDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Upcoming Monthly Invoice

> Get the upcoming monthly invoice for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/upcoming-monthly-invoice":{"get":{"tags":["billing"],"summary":"Get Upcoming Monthly Invoice","description":"Get the upcoming monthly invoice for a workspace","operationId":"get_upcoming_monthly_invoice_billing__workspace_id__upcoming_monthly_invoice_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to get the upcoming monthly invoice for"},"description":"The ID of the workspace to get the upcoming monthly invoice for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_upcoming_monthly_invoice_billing__workspace_id__upcoming_monthly_invoice_get"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkspaceInvoiceDTO"},{"type":"null"}],"title":"Response Get Upcoming Monthly Invoice Billing  Workspace Id  Upcoming Monthly Invoice Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_upcoming_monthly_invoice_billing__workspace_id__upcoming_monthly_invoice_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_upcoming_monthly_invoice_billing__workspace_id__upcoming_monthly_invoice_get"},"WorkspaceInvoiceDTO":{"properties":{"total_amount_due":{"type":"number","title":"Total Amount Due"},"period_start":{"type":"integer","title":"Period Start"},"period_end":{"type":"integer","title":"Period End"},"invoice_date":{"type":"integer","title":"Invoice Date"},"paid":{"type":"boolean","title":"Paid"},"invoice_pdf":{"type":"string","title":"Invoice Pdf"},"hosted_invoice_url":{"type":"string","title":"Hosted Invoice Url"},"tax":{"type":"number","title":"Tax"},"subtotal":{"type":"number","title":"Subtotal"},"lines":{"items":{"$ref":"#/components/schemas/LineItemDTO"},"type":"array","title":"Lines"},"status":{"type":"string","title":"Status"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["total_amount_due","period_start","period_end","invoice_date","paid","invoice_pdf","hosted_invoice_url","tax","subtotal","lines","status","currency"],"title":"WorkspaceInvoiceDTO"},"LineItemDTO":{"properties":{"description":{"type":"string","title":"Description"},"amount":{"type":"number","title":"Amount"},"quantity":{"type":"number","title":"Quantity"},"unit_type":{"type":"string","title":"Unit Type"},"unit_amount":{"type":"number","title":"Unit Amount"}},"type":"object","required":["description","amount","quantity","unit_type","unit_amount"],"title":"LineItemDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Get Annual Subscriptions

> Get the annual subscriptions for a workspace

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/annual-subscriptions":{"get":{"tags":["billing"],"summary":"Get Annual Subscriptions","description":"Get the annual subscriptions for a workspace","operationId":"get_annual_subscriptions_billing__workspace_id__annual_subscriptions_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to get the annual subscriptions for"},"description":"The ID of the workspace to get the annual subscriptions for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_get_annual_subscriptions_billing__workspace_id__annual_subscriptions_get"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_get_annual_subscriptions_billing__workspace_id__annual_subscriptions_get":{"properties":{"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","title":"Body_get_annual_subscriptions_billing__workspace_id__annual_subscriptions_get"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## Update Billing Email

> Update the billing email for a workspace on stripe

```json
{"openapi":"3.1.0","info":{"title":"shade","version":"dev"},"paths":{"/billing/{workspace_id}/billing-email":{"put":{"tags":["billing"],"summary":"Update Billing Email","description":"Update the billing email for a workspace on stripe","operationId":"update_billing_email_billing__workspace_id__billing_email_put","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace ID","description":"The ID of the workspace to update the billing email for"},"description":"The ID of the workspace to update the billing email for"},{"name":"password","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"The password","description":"The password header to use to fetch the preview"},"description":"The password header to use to fetch the preview"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_billing_email_billing__workspace_id__billing_email_put"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_update_billing_email_billing__workspace_id__billing_email_put":{"properties":{"email":{"type":"string","title":"Email","description":"The email to update the billing email to"},"body":{"additionalProperties":true,"type":"object","title":"Body","default":{}}},"type":"object","required":["email"],"title":"Body_update_billing_email_billing__workspace_id__billing_email_put"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```
