canonical: https://jentic.com/apis/apacta.com/apacta

# Apacta

Apacta is a field service platform for craftsmen and trades businesses (electricians, plumbers, builders) to register working hours, material usage, project files, and quality assurance forms. The HTTP API exposes 290 endpoints across companies, contacts, projects, time entries, clocking records, invoices, forms, and project files so back-office tools and field apps can push and pull operational data. Authentication is an API key passed either as the X-Auth-Token header or as the api_token query parameter. The API supports pagination via ?page= on list endpoints and ordering on selected resources.

## For AI agents

Register working hours, material usage, project files, and invoices for trades businesses across 290 endpoints, authenticated with an X-Auth-Token API key.

## Scope

Does not handle payroll calculation, accounting ledgers, or card payment acceptance - use for trades-business field operations (time, materials, forms, projects, invoices) only.

## Capabilities

- Register clock-in and clock-out events for craftsmen against a project, including bulk delete
- Create and update time entries linked to a specific activity and project
- Manage contacts, contact persons, and companies in the trades business CRM
- Generate, email, and attach files to invoices issued from the field service workflow
- Upload project files and form-template responses tied to a specific project id
- Track activities and clocking records to feed payroll and customer billing

## Use cases

### Daily payroll-ready timesheets

Aggregate the day's clock-in and clock-out events from craftsmen into payroll-ready timesheets. The agent calls /clocking_records and /time_entries scoped to a date range, applies project and activity codes, and writes the result into a payroll system. This replaces manual timesheet capture at the end of the week.

Example prompt: GET /clocking_records and /time_entries filtered to today's date, group by employee and project, and POST a daily summary to the payroll system

### Project-to-invoice automation

Convert logged time and materials on a project into a draft invoice and email it to the customer. The agent uses /projects to find the project context, /time_entries and /activities to gather billable lines, then creates an invoice and posts the email via /invoices and /invoice_emails. Invoice files (PDF) can be attached via /invoice_files.

Example prompt: Read time entries and activities for a closed project, create a draft invoice, attach the PDF via /invoice_files, and send it via /invoice_emails to the project contact

### Quality assurance form capture

Capture quality assurance form submissions from the field and tie them to projects. The agent retrieves form templates via /companies/{company_id}/form_templates and posts responses against the relevant project. Photos and attachments uploaded to /projects/{project_id}/files form the audit trail required by the customer.

Example prompt: Fetch the form template for a company, submit a completed response tied to a project id, and upload photos via /projects/{project_id}/files

### Contact and company sync to a CRM

Mirror Apacta contacts, contact persons, and companies into a separate CRM (HubSpot, Salesforce) so the sales team sees the same customer records as the field team. The agent pages through /contacts and /companies, applying ?page= and the search filters on supported endpoints, and upserts each record into the destination CRM.

Example prompt: Page /contacts and /companies, dedupe by email and company name, and upsert each into the destination CRM

### AI agent integration via Jentic

An agent supporting an Apacta-using business can search Jentic for 'create a time entry' and Jentic returns the matching Apacta operation and schema. Jentic stores the X-Auth-Token API key, so the agent does not handle the secret or wire up the api_token query fallback.

Example prompt: Search Jentic for 'create a time entry in Apacta', load the /time_entries schema, and POST a new entry for the user-named project and activity

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /clocking_records | List clock-in and clock-out events |
| POST | /clocking_records/checkout | Register a checkout for an active clocking record |
| GET | /time_entries | List logged time entries |
| POST | /activities | Create a new activity classification |
| GET | /contacts | List contacts in the trades business CRM |
| GET | /companies | List companies in the CRM |
| POST | /invoices | Create an invoice |
| POST | /invoice_emails | Email an invoice to a customer |

## Key resources

- **Activities** — Activity records that classify time entries and clocking events
- **Time Entries** — Logged work intervals tied to a project, activity, and employee
- **Clocking Records** — Field clock-in and clock-out events with checkout helpers
- **Contacts and Contact Persons** — CRM-style records for companies and the people inside them
- **Invoices** — Invoice creation, file attachment, and email delivery
- **Projects and Project Files** — Project context plus file uploads from forms or wall posts
- **Form Templates** — Quality assurance form templates per company and their submissions

## Why Jentic

- **Setup:** Wiring Apacta by hand means handling its X-Auth-Token API key, finding the right routes among nearly 290 field-operations endpoints, and building your own retry handling. Through Jentic you install once, import Apacta from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** For the collection routes here Apacta addresses work through the request body rather than resource ids in the URL path, so you limit the agent to the operations it needs, such as listing time entries or creating an invoice. Actions like invoice emailing are separate operations that are only available if you include them in the allowed set.
- **Credential handling:** Your Apacta API key is stored once, encrypted, by your own Jentic One instance and injected as the X-Auth-Token header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'register a clock-in' or 'create an invoice', and Jentic returns the matching Apacta operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Clockify API** — Time tracking for service businesses with simpler clock-in semantics.
- **Toggl Track API** — Project-based time tracking with a strong reporting API.
- **Stripe API** — Accept card payments against Apacta-generated invoices.

## FAQ

### What authentication does the Apacta API use?

API key auth with two transport options: X-Auth-Token in the request header (preferred) or api_token as a URL query parameter. Through Jentic the key is held in the encrypted Jentic One instance and attached as the X-Auth-Token header server-side, so the secret never appears in URLs or logs.

### Can I create invoices from logged hours through the Apacta API?

Yes. Pull /time_entries and /activities for the project, POST to /invoices to create the draft, attach the PDF via /invoice_files, and send it through /invoice_emails. This is the project-to-invoice path the API was designed for.

### How do I register a clock-in through Jentic?

Search Jentic for 'register a clock-in for a craftsman', load the schema for /clocking_records (POST), and execute it with the employee, project, and start time. Use /clocking_records/checkout to close the same record at end of shift.

### What are the rate limits for the Apacta API?

Apacta does not document specific per-minute limits in the OpenAPI spec; in practice the platform applies plan-based throttling. Use ?page= for paginated reads to keep request volumes bounded.

### Does the API support search and ordering on list endpoints?

Search is experimental on selected endpoints (see the per-endpoint docs). Ordering is also experimental and follows the pattern ?sort=ResourceName.field&direction=desc, for example sorting invoices by invoice number descending.

### How do I upload a file to a project?

There are two paths: /projects/{project_id}/files for files coming from wall posts or form submissions, and /projects/{project_id}/project_files for general project files not tied to a form. Pick based on whether the file is form-attached or free-standing.

### Can I limit what my agent is allowed to do with the Apacta API?

Yes. Because Jentic One is self-hosted, your own rules decide which Apacta operations and credentials the agent can use, so you grant only the endpoints it needs, such as listing time entries with GET /time_entries or creating a draft with POST /invoices. Apacta's collection routes take their work through the request body rather than resource ids in the path, which keeps each allowed operation tightly scoped. Separate actions like emailing an invoice through /invoice_emails are reachable only when you include them in the allowed set, so the agent cannot send mail unless you permit it.
