@orchesty/connector-fapi
v2.0.3
Published
Downloads
235
Readme
Fapi Connector
An Orchesty connector for Fapi, a Czech platform for simple online sales — invoicing, orders, and digital product delivery.
Application Type
Basic
This connector authenticates using a username and password encoded as HTTP Basic auth (user:password Base64-encoded in the Authorization header).
| Field | Description |
|---|---|
| user | Your Fapi username |
| password | Your Fapi API password |
Components
| Class | Type | Description |
|---|---|---|
| FapiGetInvoiceConnector | Connector | Retrieves a single invoice by ID via GET /invoices/{id} |
| FapiPostInvoiceLabelConnector | Connector | Assigns labels to an invoice via POST /invoice-labels/{id} |
| FapiGetItemTemplateListBatch | Batch | Paginated list of item templates via GET /item_templates |
| FapiGetLabelListBatch | Batch | Paginated list of invoice labels via GET /labels |
| FapiGetProjectListBatch | Batch | Paginated list of projects via GET /projects |
| FapiGetShippingMethodListBatch | Batch | Paginated list of shipping methods via GET /shipping-methods |
| FapiSubscribeWebhooksBatch | Batch | Subscribes webhooks by creating connection entries via POST /connections |
| FapiUnsubscribeWebhooksBatch | Batch | Unsubscribes webhooks by deleting connection entries via DELETE /connections/{webhookId} |
Setup
Credentials
- Log in to your Fapi account.
- Navigate to My Account → API Keys.
- Create a new API key (name it after your integration for easy reference).
- Use your Fapi username and the generated API key as the password in Orchesty.
API Documentation
Fapi API Reference: https://web.fapi.cz/api-doc/
Installation & Usage
Install the package:
npm install @orchesty/connector-fapi @orchesty/nodejs-sdk
# or
pnpm add @orchesty/connector-fapi @orchesty/nodejs-sdkRegister the application and nodes in your Orchesty DI container:
import { container } from '@orchesty/nodejs-sdk';
import FapiApplication from '@orchesty/connector-fapi/dist/FapiApplication';
import FapiGetInvoiceConnector from '@orchesty/connector-fapi/dist/Connector/FapiGetInvoiceConnector';
import FapiPostInvoiceLabelConnector from '@orchesty/connector-fapi/dist/Connector/FapiPostInvoiceLabelConnector';
import FapiGetItemTemplateListBatch from '@orchesty/connector-fapi/dist/Batch/FapiGetItemTemplateListBatch';
import FapiGetLabelListBatch from '@orchesty/connector-fapi/dist/Batch/FapiGetLabelListBatch';
import FapiGetProjectListBatch from '@orchesty/connector-fapi/dist/Batch/FapiGetProjectListBatch';
import FapiGetShippingMethodListBatch from '@orchesty/connector-fapi/dist/Batch/FapiGetShippingMethodListBatch';
import FapiSubscribeWebhooksBatch from '@orchesty/connector-fapi/dist/Batch/FapiSubscribeWebhooksBatch';
import FapiUnsubscribeWebhooksBatch from '@orchesty/connector-fapi/dist/Batch/FapiUnsubscribeWebhooksBatch';
const app = new FapiApplication();
container.setApplication(app);
container.setNode(new FapiGetInvoiceConnector(), app);
container.setNode(new FapiPostInvoiceLabelConnector(), app);
container.setNode(new FapiGetItemTemplateListBatch(), app);
container.setNode(new FapiGetLabelListBatch(), app);
container.setNode(new FapiGetProjectListBatch(), app);
container.setNode(new FapiGetShippingMethodListBatch(), app);
container.setNode(new FapiSubscribeWebhooksBatch(), app);
container.setNode(new FapiUnsubscribeWebhooksBatch(), app);License
This connector is released under the Apache License 2.0. See the LICENSE file for the full license text.
Contributing
Contributions are welcome! This connector is part of the open-source Orchesty Node.js Connectors monorepo.
For guidelines on how to create or update connectors — including project setup, coding conventions, and how to write tests — please refer to the Contributing to Connectors guide.
All contributions should include:
- Source code in
src/following the existing connector structure - Tests in
src/**/__tests__/withinput.json,mock.json, andoutput.jsonfixtures - An updated
CHANGELOG.mdentry
