Mavenlink

Workspace Invoice Preference

WorkspaceInvoicePreference stores the invoice customization data for a specific Workspace. It is only meant for workspace that have financials enabled.

WorkspaceInvoicePreference objects have the following readable attributes:

  • workspace_id - The ID of the associated Workspace
  • project_code - Project code
  • purchase_order - Purchase code
  • client_invoice_name - The client name as it will appear on the invoice
  • client_invoice_address - The client address as it will appear on the invoice
  • consultant_invoice_name - The provider name as it will appear on the invoice
  • consultant_invoice_address - The provider address as it will appear on the invoice

Fetching a WorkspaceInvoicePreference

You can access an instance of a WorkspaceInvoicePreference through the API as follows:

curl "https://api.mavenlink.com/api/v1/workspace_invoice_preferences/1"

Creating a new WorkspaceInvoicePreference

You can create a workspace with the follow parameters:

  • workspace_id - (required) The Workspace this record will belong to
  • project_code - (optional) Project code
  • purchase_order - (optional) Purchase code
  • client_invoice_name - (optional) The client name as it will appear on the invoice
  • client_invoice_address - (optional) The client address as it will appear on the invoice
  • consultant_invoice_name - (optional) The provider name as it will appear on the invoice
  • consultant_invoice_address - (optional) The provider address as it will appear on the invoice

You can create a WorkspaceInvoicePreference through the API as follows:

curl  -d "workspace_invoice_preference[workspace_id]=1" "https://api.mavenlink.com/api/v1/workspace_invoice_preferences.json"

or

curl  -d "workspace_invoice_preference[workspace_id]=1" -d "workspace_invoice_preference[client_invoice_name]=Jimmy" "https://api.mavenlink.com/api/v1/workspace_invoice_preferences.json"

The response will contain a JSON representation of the newly created workspace_invoice_preference or an error message indicating which arguments are missing or erroneous.

Updating a new WorkspaceInvoicePreference

You can edit a WorkspaceInvoicePreference as follows:

curl -X PUT -d "workspace_invoice_preference[project_code]=new project code" "https://api.mavenlink.com/api/v1/workspace_invoice_preferences/2.json"

When updating a WorkspaceInvoicePreference you can modify the following attributes:

  • project_code - (optional) Project code
  • purchase_order - (optional) Purchase code
  • client_invoice_name - (optional) The client name as it will appear on the invoice
  • client_invoice_address - (optional) The client address as it will appear on the invoice
  • consultant_invoice_name - (optional) The provider name as it will appear on the invoice
  • consultant_invoice_address - (optional) The provider address as it will appear on the invoice

Permissions

Certain attributes can only be modified by certain users or under specific circumstances, the permissions object each workspace provides information on what can be changed.

  • can_manage_invoice_preferences - whether you can manage invoice preferences