# Apacta API

> API for a tool to craftsmen used to register working hours, material usage and quality assurance. # Endpoint The endpoint `https://app.apacta.com/api/v1` should be used to communicate with the API. API access is only allowed with SSL encrypted connection (https). # Authentication URL query authentication with an API key is used, so appending `?api_key={api_key}` to the URL where `{api_key}` is found within Apacta settings is used for authentication # Pagination If the endpoint returns a `pagination` object it means the endpoint supports pagination - currently it's only possible to change pages with `?page={page_number}` but implementing custom page sizes are on the road map. # Search/filter Is experimental but implemented in some cases - see the individual endpoints' docs for further explanation. # Ordering Is currently experimental, but on some endpoints it's implemented on URL querys so eg. to order Invoices by `invoice_number` appending `?sort=Invoices.invoice_number&direction=desc` would sort the list descending by the value of `invoice_number`. # Associations Is currently implemented on an experimental basis where you can append eg. `?include=Contacts,Projects` to the `/api/v1/invoices/` endpoint to embed `Contact` and `Project` objects directly. # Project Files Currently project files can be retrieved from two endpoints. `/projects/{project_id}/files` handles files uploaded from wall posts or forms. `/projects/{project_id}/project_files` allows uploading and showing files, not belonging to specific form or wall post. # Errors/Exceptions ## 422 (Validation) Write something about how the `errors` object contains keys with the properties that failes validation like: ``` { "success": false, "data": { "code": 422, "url": "/api/v1/contacts?api_key=5523be3b-30ef-425d-8203-04df7caaa93a", "message": "A validation error occurred", "errorCount": 1, "errors": { "contact_types": [ ## Property name that failed validation "Contacts must have at least one contact type" ## Message with further explanation ] } } } ``` ## Code examples Running examples of how to retrieve the 5 most recent forms registered and embed the details of the User that made the form, and eventual products contained in the form ### Swift ``` ``` ### Java #### OkHttp ``` OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://app.apacta.com/api/v1/forms?extended=true&sort=Forms.created&direction=DESC&include=Products%2CCreatedBy&limit=5") .get() .addHeader("x-auth-token", "{INSERT_YOUR_TOKEN}") .addHeader("accept", "application/json") .build(); Response response = client.newCall(request).execute(); ``` #### Unirest ``` HttpResponse<String> response = Unirest.get("https://app.apacta.com/api/v1/forms?extended=true&sort=Forms.created&direction=DESC&include=Products%2CCreatedBy&limit=5") .header("x-auth-token", "{INSERT_YOUR_TOKEN}") .header("accept", "application/json") .asString(); ``` ### Javascript #### Native ``` var data = null; var xhr = new XMLHttpRequest(); xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open("GET", "https://app.apacta.com/api/v1/forms?extended=true&sort=Forms.created&direction=DESC&include=Products%2CCreatedBy&limit=5"); xhr.setRequestHeader("x-auth-token", "{INSERT_YOUR_TOKEN}"); xhr.setRequestHeader("accept", "application/json"); xhr.send(data); ``` #### jQuery ``` var settings = { "async": true, "crossDomain": true, "url": "https://app.apacta.com/api/v1/forms?extended=true&sort=Forms.created&direction=DESC&include=Products%2CCreatedBy&limit=5", "method": "GET", "headers": { "x-auth-token": "{INSERT_YOUR_TOKEN}", "accept": "application/json", } } $.ajax(settings).done(function (response) { console.log(response); }); ``` #### NodeJS (Request) ``` var request = require("request"); var options = { method: 'GET', url: 'https://app.apacta.com/api/v1/forms', qs: { extended: 'true', sort: 'Forms.created', direction: 'DESC', include:.

Apacta is a calendar API from apacta.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 290 endpoints.

## At a glance

- Category: [Calendar](https://www.openparable.com/apis/category/calendar)
- Provider: apacta.com
- Authentication: API key
- HTTPS: Yes
- CORS: Not stated
- Base URL: https://app.apacta.com/api/v1
- Documentation: https://apacta.com/
- OpenAPI description: https://api.apis.guru/v2/specs/apacta.com/0.0.42/openapi.json
- Version: 0.0.42
- Specification updated: 2023-03-06

## Example request

```bash
curl -X GET "https://app.apacta.com/api/v1/activities" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
```

## Endpoints

- `GET /activities` — Get a list of activities
- `POST /activities` — Create an activity
- `DELETE /activities/bulkDelete` — Bulk delete activities
- `PUT /activities/{activity_id}` — Edit an activity
- `DELETE /activities/{activity_id}` — Delete an activity
- `GET /cities` — Get list of cities supported in Apacta
- `GET /cities/{city_id}` — Get details about one city
- `GET /clocking_records` — Get a list of clocking records
- `POST /clocking_records` — Create clocking record for authenticated user
- `POST /clocking_records/checkout` — Checkout active clocking record for authenticated user
- `GET /clocking_records/{clocking_record_id}` — Details of 1 clocking_record
- `PUT /clocking_records/{clocking_record_id}` — Edit a clocking record
- `DELETE /clocking_records/{clocking_record_id}` — Delete a clocking record
- `GET /companies` — Get a list of companies
- `GET /companies/subscription_self_service` — URL for subscription selfservice
- `GET /companies/{company_id}` — Details of 1 company
- `GET /companies/{company_id}/companies_integration_feature_settings` — List a company integration feature settings
- `POST /companies/{company_id}/companies_integration_feature_settings` — Add a company integration feature setting
- `GET /companies/{company_id}/companies_integration_feature_settings/{c_integration_feature_setting_id}` — View a company integration feature setting
- `PUT /companies/{company_id}/companies_integration_feature_settings/{c_integration_feature_setting_id}` — Edit a company integration feature setting
- `GET /companies/{company_id}/form_templates/` — Get a list of company form templates
- `GET /companies/{company_id}/form_templates/{form_template_id}` — Get a company form template
- `DELETE /companies/{company_id}/form_templates/{form_template_id}` — Delete a form template company
- `GET /companies/{company_id}/integration_feature_settings` — Get a list of integration feature settings
- `GET /companies/{company_id}/integration_feature_settings/{integration_feature_setting_id}` — Show details of 1 integration feature setting
- `GET /companies/{company_id}/integration_settings` — Get a list of company integration settings
- `POST /companies/{company_id}/integration_settings` — Add a company integration setting
- `GET /companies/{company_id}/integration_settings/{companies_integration_setting_id}` — Get a company integration setting
- `PUT /companies/{company_id}/integration_settings/{companies_integration_setting_id}` — Edit a company integration setting
- `DELETE /companies/{company_id}/integration_settings/{companies_integration_setting_id}` — Delete a company integration setting
- `GET /companies/{company_id}/price_margins/{price_margins_id}` — Get a list of company price margins
- `POST /companies/{company_id}/price_margins/{price_margins_id}` — Add a company price margin
- `DELETE /companies/{company_id}/price_margins/{price_margins_id}` — Delete a company price margin
- `GET /companies_vendors` — Get a list of companies vendors
- `POST /companies_vendors` — Add a new companies vendor
- `DELETE /companies_vendors/bulkDelete` — Bulk delete companies vendors
- `GET /companies_vendors/{companies_vendor_id}` — Get a companies vendor
- `PUT /companies_vendors/{companies_vendor_id}` — Edit a companies vendor
- `DELETE /companies_vendors/{companies_vendor_id}` — Delete a companies vendor
- `GET /companies_vendors/{companies_vendor_id}/expense_statistics` — Get companies vendor expense statistics
- `GET /company_settings` — Get a list of company settings
- `GET /contact_custom_field_attributes` — Get a list of contact custom field attributes
- `GET /contact_custom_field_attributes/{contact_custom_field_attribute_id}` — Details of 1 contact custom field attribute
- `GET /contact_types` — Get list of contact types supported in Apacta
- `GET /contact_types/{contact_type_id}` — Get details about one contact type
- `GET /contacts` — Get a list of contacts
- `POST /contacts` — Add a new contact
- `DELETE /contacts/bulkDelete` — Bulk delete contacts
- `GET /contacts/{contact_id}` — Details of 1 contact
- `PUT /contacts/{contact_id}` — Edit a contact
- `DELETE /contacts/{contact_id}` — Delete a contact
- `GET /contacts/{contact_id}/contact_custom_field_values` — Get a list of contact custom field values
- `GET /contacts/{contact_id}/contact_persons` — Get a list of contact people
- `POST /contacts/{contact_id}/contact_persons` — Add a new contact person to a contact
- `GET /contacts/{contact_id}/contact_persons/{contact_person_id}` — Get a contact person
- `PUT /contacts/{contact_id}/contact_persons/{contact_person_id}` — Edit a contact person
- `DELETE /contacts/{contact_id}/contact_persons/{contact_person_id}` — Delete a contact person
- `GET /countries` — Get list of countries supported in Apacta
- `GET /countries/{country_id}` — Get details about one country
- `GET /currencies` — Get list of currencies supported in Apacta
- `GET /currencies/{currency_id}` — Get details about one currency
- `GET /driving_types` — List the driving types of the company
- `POST /driving_types` — Create driving type
- `DELETE /driving_types/bulkDelete` — Bulk delete driving types
- `GET /driving_types/{driving_type_id}` — View driving type
- `PUT /driving_types/{driving_type_id}` — Edit driving type
- `DELETE /driving_types/{driving_type_id}` — Delete driving type
- `GET /employee_hours` — Used to retrieve details about the logged in user's hours
- `GET /events` — Show list of events
- `POST /events` — Create event
- `GET /events/is_user_free` — Check if user is available at given datetime range
- `GET /events/{event_id}` — Show event
- `PUT /events/{event_id}` — Edit event
- `DELETE /events/{event_id}` — Delete event
- `GET /expense_files` — Show list of expense files
- `POST /expense_files` — Add file to expense
- `GET /expense_files/{expense_file_id}` — Show file
- `PUT /expense_files/{expense_file_id}` — Edit file
- `DELETE /expense_files/{expense_file_id}` — Delete file
- `GET /expense_lines` — Show list of expense lines
- `POST /expense_lines` — Add line to expense
- `GET /expense_lines/{expense_line_id}` — Show expense line
- `PUT /expense_lines/{expense_line_id}` — Edit expense line
- `DELETE /expense_lines/{expense_line_id}` — Delete expense line
- `GET /expenses` — Show list of expenses
- `POST /expenses` — Add line to expense
- `DELETE /expenses/bulkDelete` — Bulk delete expenses
- `GET /expenses/highest_amount` — Show highest Expense amount(`total_selling_price`)
- `DELETE /expenses/sendEmails` — Bulk delete expenses
- `GET /expenses/{expense_id}` — Show expense
- `PUT /expenses/{expense_id}` — Edit expense
- `DELETE /expenses/{expense_id}` — Delete expense
- `GET /expenses/{expense_id}/original_files` — Show list of all OIOUBL files for the expense
- `GET /expenses/{expense_id}/original_files/{file_id}` — Show OIOUBL file
- `GET /financial_statistics` — Get general statistics
- `GET /financial_statistics/expensesSalesPrice` — Get expenses sales price
- `GET /financial_statistics/invoicedAmount` — Get invoiced amount
- `GET /financial_statistics/margin` — Get margin
- `GET /financial_statistics/materialRentalsCostPrice` — Get products material rentals cost price
- `GET /financial_statistics/overview` — Get statistics overview

## Questions

### Does the Apacta API need an API key?

Yes. The Apacta API uses API key authentication; the documentation explains how to get credentials.

### Does the Apacta API support HTTPS?

Yes, the Apacta API is served over HTTPS.

### How many endpoints does the Apacta API have?

Its OpenAPI description lists 290 endpoints in version 0.0.42. The first 100 are shown on this page.

### What are alternatives to the Apacta API?

Other Calendar APIs include Google Calendar, UK Bank Holidays, Hebrew Calendar, Non-Working Days, Holidays.

## Similar calendar APIs

- [Google Calendar](https://www.openparable.com/apis/google-calendar): Display, create and modify Google calendar events
- [UK Bank Holidays](https://www.openparable.com/apis/uk-bank-holidays): Bank holidays in England and Wales, Scotland and Northern Ireland
- [Hebrew Calendar](https://www.openparable.com/apis/hebrew-calendar): Convert between Gregorian and Hebrew, fetch Shabbat and Holiday times, etc
- [Non-Working Days](https://www.openparable.com/apis/non-working-days-isdayoff): Simple REST API for checking working, non-working or short days for Russia, CIS, USA and other
- [Holidays](https://www.openparable.com/apis/holidays): Historical data regarding holidays
- [Namedays Calendar](https://www.openparable.com/apis/namedays-calendar): Provides namedays for multiple countries
- [Non-Working Days](https://www.openparable.com/apis/non-working-days): Database of ICS files for non working days
- [Russian Calendar](https://www.openparable.com/apis/russian-calendar): Check if a date is a Russian holiday or not
- [Calendarific](https://www.openparable.com/apis/calendarific): Explore comprehensive holiday data worldwide with Calendarific. Access national holidays, local observances, and religious events with customizable API solutions for your needs.
- [caldays](https://www.openparable.com/apis/caldays): Public holidays for 195+ countries
- [Church Calendar](https://www.openparable.com/apis/church-calendar): Catholic liturgical calendar
- [Intellibook](https://www.openparable.com/apis/intellibook): Appointment booking and availability API for salons and clinics

Listed from: APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/apacta (OpenParable). Cite the canonical URL above.
