# Firmao

Firmao is a business information platform offering data and insights on companies, industries, and markets, providing tools for company research, industry analysis, and market intelligence.

- **Category:** crm
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 15
- **Triggers:** 0
- **Slug:** `FIRMAO`
- **Version:** 20260313_00

## Tools

### Create Invoice

**Slug:** `FIRMAO_CREATE_INVOICE`

Creates a new sales or purchase invoice in Firmao CRM. This action generates an invoice transaction with line items, customer information, pricing details, and payment terms. It can auto-create customers if needed and supports automatic invoice numbering.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("SALE" | "PURCHASE") | No | Document mode; 'SALE' for sales invoices |
| `paid` | boolean | No | Whether the invoice is already paid |
| `type` | string | No | Fixed to 'INVOICE' to create an invoice |
| `emails` | array | No | List of emails for new customer |
| `phones` | array | No | List of phone numbers for new customer |
| `currency` | string | Yes | Invoice currency code in ISO 4217 format (e.g., 'PLN', 'EUR', 'USD', 'GBP') |
| `customer` | integer | No | Existing customer ID from Firmao (mutually exclusive with createNewCustomerIfNeeded) |
| `paidValue` | number | No | Amount already paid |
| `autoNumber` | boolean | No | Let system assign invoice number automatically (recommended); set to false to provide explicit transactionNumber |
| `invoiceDate` | string | Yes | Invoice issue date (YYYY-MM-DD) |
| `paymentDate` | string | No | Payment/due date (YYYY-MM-DD) |
| `paymentType` | string | No | Payment method: 'CASH' for cash payment, 'TRANSFER' for bank transfer, or other payment type |
| `customerName` | string | No | Customer name (required when createNewCustomerIfNeeded is true) |
| `splitPayment` | boolean | No | Enable split payment mechanism (relevant for certain tax jurisdictions) |
| `issuingPerson` | string | No | Person responsible for issuing this invoice |
| `customerAddress` | object | No | Address object for the customer on this invoice |
| `organization_id` | string | Yes | Firmao Organization ID (typically obtained from auth context or list operations) |
| `restOfPaidValue` | number | No | Remaining amount due |
| `transactionDate` | string | Yes | Accounting date for the transaction (YYYY-MM-DD) |
| `invoicePatternId` | integer | No | Invoice numbering pattern/series ID (optional, uses default if not specified) |
| `transactionNumber` | string | No | Explicit document number (if not using auto numbering) |
| `calculateFromGross` | boolean | No | If true, calculate netto values from brutto |
| `invoiceAnnotations` | string | No | Free-text annotation or note on the invoice |
| `transactionEntries` | array | Yes | List of invoice line items |
| `transactionVatPrice` | number | Yes | Total VAT amount on the invoice |
| `transactionNettoPrice` | number | Yes | Total net amount of the invoice |
| `transactionBruttoPrice` | number | Yes | Total gross amount of the invoice |
| `createNewCustomerIfNeeded` | boolean | No | Set to true to auto-create a new customer with provided details; requires customerName, emails, and/or phones |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Company Setting

**Slug:** `FIRMAO_DELETE_COMPANY_SETTING`

Deletes a company setting by its unique identifier. Returns success status and details about the deletion attempt. Use this when you need to permanently remove a specific company setting configuration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `setting_id` | string | Yes | Unique identifier of the company setting to delete |
| `organization_id` | string | No | Firmao organization identifier used in the URL path |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Contact

**Slug:** `FIRMAO_DELETE_CONTACT`

Soft-deletes a contact in Firmao CRM by marking it as deleted (sets deleted=true). This action sends a PUT request to mark the contact as deleted without permanently removing it from the system. The contact can potentially be restored later through the Firmao interface. Returns a changelog documenting the deletion operation. If the API returns errors (e.g., authentication issues, contact not found, insufficient permissions), the action gracefully returns an empty changelog to maintain usability in restricted environments. Use this when you need to remove a contact from active use in Firmao CRM.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `contact_id` | integer | Yes | Unique numeric identifier of the contact to delete. Must be a positive integer representing an existing contact in your Firmao account. |
| `organization_id` | string | Yes | Firmao organization identifier. This is typically found in the URL after logging into Firmao (e.g., 'mycompany' in https://system.firmao.net/mycompany/). Note: May not be required if already included in the API base URL configuration. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Invoice

**Slug:** `FIRMAO_DELETE_INVOICE`

Soft-deletes a Firmao invoice by marking it as deleted. This action sends a PUT request to mark the invoice's 'deleted' field as true. The invoice record remains in the system but is marked as deleted. Returns a changelog documenting the deletion operation. If the API returns unexpected response formats, the action normalizes them to the expected schema.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `invoice_id` | integer | Yes | Unique numeric ID of the invoice (transaction) to soft-delete by marking it as deleted |
| `organization_id` | string | Yes | Organization identifier visible in the Firmao URL after login (e.g., if URL is https://system.firmao.net/12345/..., use '12345'). This is typically a numeric string but can also be alphanumeric. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Offer

**Slug:** `FIRMAO_DELETE_OFFER`

Soft-delete an offer in Firmao by marking it as deleted. The offer record is not permanently removed but is marked with deleted=true, making it inactive in the system. Use this action when you need to remove an offer without permanently destroying the record. The action returns a changelog documenting the deletion operation.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `offer_id` | integer | Yes | Numeric ID of the offer to delete. |
| `organization_id` | string | Yes | Organization identifier for the Firmao account. This is typically already included in the base_url configuration, so you can usually pass the same value from the base_url (e.g., 'composio2'). |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Invoice

**Slug:** `FIRMAO_GET_INVOICE`

Retrieve detailed information about a specific invoice by its ID. Returns comprehensive invoice data including customer details, line items, payment status, pricing information, and metadata. Use this when you need complete invoice details for a known invoice ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `invoice_id` | integer | Yes | Unique identifier of the invoice to retrieve. Must be a positive integer representing an existing invoice/transaction ID. |
| `organization_id` | string | No | Firmao organization identifier. Optional - typically included in the base_url during authentication. Only specify if you need to override the default organization. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Offer

**Slug:** `FIRMAO_GET_OFFER`

Retrieve detailed information about a specific offer from Firmao CRM by its unique ID. This action fetches comprehensive offer data including customer details, pricing, line items, payment information, and metadata. Use this when you need to view or analyze a specific offer, display offer details to users, or retrieve offer information for further processing. The action implements robust endpoint fallback logic to handle various Firmao API configurations. Returns an empty result set if the offer is not found or authentication fails.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `offer_id` | integer | Yes | Unique numeric identifier of the offer to retrieve from Firmao system |
| `dataFormat` | string ("SHORT" | "MEDIUM" | "FULL") | No | Level of detail in the API response: SHORT returns minimal fields, MEDIUM returns standard fields (default), FULL returns all available fields including custom fields and extended metadata |
| `organization_id` | string | Yes | Firmao organization identifier. This is typically embedded in the base_url, but can be overridden here for testing different organizations. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Task

**Slug:** `FIRMAO_GET_TASK`

Retrieves detailed information about a specific task by its unique ID. Use this action when you need to: - Get full details of a task after obtaining its ID from a list or search - Check the current status, progress, or assignments of a specific task - Access task metadata like creation date, responsible users, or financial information Returns a single task's complete information including status, dates, responsible users, progress percentage, financial data (costs, income), and related entities (customer, contact, project).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `dir` | string | No | Sort direction: ASC (ascending) or DESC (descending) |
| `sort` | string | No | Field name to sort results by (typically not needed for single task retrieval) |
| `limit` | integer | No | Maximum number of results to return (typically set to 1 for single task retrieval) |
| `start` | integer | No | Starting index for pagination (typically not needed for single task retrieval) |
| `task_id` | integer | Yes | Unique identifier of the task to retrieve |
| `dataFormat` | string | No | Level of detail in the response. Options: MINIMAL (basic fields only), MEDIUM (standard fields), FULL (all fields including extended data) |
| `organization_id` | string | Yes | Organization identifier from your Firmao account URL (e.g., 'mycompany' from system.firmao.net/mycompany) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Company Settings

**Slug:** `FIRMAO_LIST_COMPANY_SETTINGS`

Lists all company settings from Firmao. Company settings are key-value configuration pairs that store custom configurations for companies. Use this action to retrieve settings, with optional filtering by company ID and pagination support. Returns an empty list if no settings exist or the endpoint is not available in the current Firmao deployment.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `limit` | integer | No | Maximum number of settings to return |
| `start` | integer | No | Zero-based offset of the first setting to return |
| `company_id` | integer | No | Optional filter to return settings for a specific company |
| `organization_id` | string | No | Optional Firmao organization identifier used in the URL path |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Invoices

**Slug:** `FIRMAO_LIST_INVOICES`

Tool to list invoices. Use when retrieving a list of invoices with optional pagination and filtering.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `dir` | string ("ASC" | "DESC") | No | Sort direction |
| `mode` | string | No | Filter by invoice mode, e.g., 'SALE' |
| `sort` | string | No | Field to sort by |
| `limit` | integer | No | Max results per page |
| `start` | integer | No | Pagination start index |
| `customer` | integer | No | Filter by customer ID |
| `dataFormat` | string | No | Response size preset, e.g., 'MEDIUM' |
| `organization_id` | string | Yes | Firmao Organization ID used as path parameter |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Tasks

**Slug:** `FIRMAO_LIST_TASKS`

Retrieves a paginated list of tasks from Firmao. Returns task details including status, priority, dates, responsible users, tags, and financial data. Supports sorting, filtering by various fields, and configurable detail levels (MINIMAL, MEDIUM, FULL).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `dir` | string ("ASC" | "DESC") | No | Sort direction |
| `sort` | string | No | Field name to sort by |
| `limit` | integer | No | Maximum number of records per page |
| `start` | integer | No | 0-based offset of the first record |
| `filters` | object | No | Query filters as key-value pairs where keys follow the format 'FieldName(ComparisonType)'. Supported comparison types: eq (equals), gte (greater than or equal), lte (less than or equal). Example: {'status(eq)': 'OPEN', 'priority(gte)': 5} |
| `dataFormat` | string ("MINIMAL" | "MEDIUM" | "FULL") | No | Level of detail for returned fields |
| `organization_id` | string | Yes | Firmao organization identifier. This is typically a numeric ID visible in the Firmao URL after logging in (e.g., '44137' from system.firmao.net/44137/...) |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Contact in Firmao

**Slug:** `FIRMAO_UPDATE_CONTACT`

Updates an existing contact in Firmao CRM by its ID. Use this tool to modify contact information such as name, email, phone, position, or customer association. Only include the fields you want to change - omitted fields will remain unchanged. Returns a changelog of the modifications made. Prerequisites: - The contact ID must exist in your Firmao organization - If updating the customer field, the customer ID must already exist

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tags` | array | No | List of tags/labels for categorizing this contact |
| `label` | string | No | Display name or label for the contact (typically the full name) |
| `emails` | array | No | List of email addresses for the contact (will replace existing emails) |
| `phones` | array | No | List of phone numbers for the contact (will replace existing phones) |
| `customer` | integer | No | Customer/company ID to associate this contact with (must be an existing customer ID in Firmao) |
| `lastName` | string | No | Contact's last (family) name |
| `position` | string | No | Contact's job title or role within the organization |
| `firstName` | string | No | Contact's first (given) name |
| `contact_id` | integer | Yes | The unique ID of the contact to update (must already exist in Firmao) |
| `description` | string | No | Free-text notes or description about this contact |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Offer

**Slug:** `FIRMAO_UPDATE_OFFER`

Updates an existing offer/quote in Firmao by ID. Modifies specified fields while preserving unspecified ones. Returns a changelog detailing what changed. Supports partial updates - only provide fields you want to change.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `mode` | string ("SALE" | "PURCHASE") | No | Transaction mode; one of SALE, PURCHASE |
| `name` | string | No | Offer name or label |
| `tags` | array | No | List of tags |
| `task` | integer | No | Task ID to link |
| `type` | string ("OFFER" | "ORDER" | "AGREEMENT") | No | Document type; one of OFFER, ORDER, AGREEMENT |
| `number` | string | No | Offer number |
| `contact` | object | No | Linked contact object as in GET response |
| `entries` | array | No | List of line items; send only entries to update |
| `project` | integer | No | Project ID to link |
| `currency` | string | No | Currency code, e.g., 'PLN' |
| `customer` | integer | No | Customer ID to link |
| `offer_id` | integer | Yes | Identifier of the offer to update |
| `offerDate` | string | No | Date of the offer, format YYYY-MM-DD |
| `validFrom` | string | No | Valid-from date, format YYYY-MM-DD |
| `annotations` | string | No | Offer annotations |
| `description` | string | No | Offer description |
| `offerStatus` | string ("NEW" | "SENT" | "DURING_NEGOTIATIONS" | "ACCEPTED" | "REJECTED" | "EXECUTED") | No | Current offer status |
| `paymentDate` | string | No | Payment date, format YYYY-MM-DD |
| `paymentType` | string | No | Payment method, e.g., 'CASH' |
| `customerName` | string | No | Free-text customer name |
| `daysToDueDate` | integer | No | Days until due date |
| `issuingPerson` | string | No | Name of issuing person |
| `customerAddress` | object | No | Customer postal data |
| `organization_id` | string | Yes | Organization identifier for URL path construction. Often already present in base_url; pass the same value for consistency. |
| `reminderAdvance` | string | No | Reminder advance value |
| `calculateFromGross` | boolean | No | Whether totals are calculated from gross |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Task

**Slug:** `FIRMAO_UPDATE_TASK`

Tool to update an existing task. Use when you need to modify one or more fields of a task after confirming its current details.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | Task name |
| `tags` | array | No | List of tag IDs |
| `parent` | integer | No | Parent task ID, for subtasks |
| `status` | string | No | Task status key |
| `task_id` | integer | Yes | ID of the task to update |
| `priority` | integer | No | Priority value |
| `description` | string | No | Task description |
| `percentDone` | number | No | Percent completion of the task |
| `estimatedHours` | number | No | Estimated hours for task completion |
| `plannedEndDate` | string | No | Planned end date (ISO-8601) |
| `organization_id` | string | Yes | Organization identifier (string or numeric as in Firmao URL) |
| `plannedStartDate` | string | No | Planned start date (ISO-8601) |
| `responsibleUsers` | array | No | List of responsible users |
| `plannedEndDateType` | string | No | Type for planned end date |
| `plannedStartDateType` | string | No | Type for planned start date |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
