### Introduction and Authentication Source: https://factomos.docs.apiary.io/reference/profile/a-single-document-template/duplicate-a-document-template Provides an overview of the Factomos API domains and detailed instructions on using OAuth 2.0 for authentication with different token roles and types. Tokens enable secure access to company and firm resources. ```APIDOC # Factomos RESTful API ## Introduction ### Description Factomos is an invoicing tool available at http://factomos.com. The Factomos RESTful API allows the creation, update, and deletion of resources such as invoices, estimates, contacts, and more. ### Domains - **PROD**: https://api.factomos.com - **SANDBOX**: https://api-sandbox.factomos.com ## Authentication ### Description The Factomos API uses OAuth 2.0 for authentication via the Implicit Grant Authorization Code flow to obtain access tokens. To get a token, contact g@factomos.com. There are three levels of tokens (token_role): - **Token Manager (manager)**: For partners operating across multiple companies and firms. Use to get company or firm tokens. Server-side only, with IP restrictions. Secret key type does not expire. - **Token Company (company)**: For actions specific to a company, like creating invoices. - **Token Accounting Firm (firm)**: For firm-specific actions, like listing companies. There are two types of tokens (token_type): - **Secret Token**: Permanent, server-to-server use, never in JavaScript. - **Access Token**: Temporary, suitable for public environments like JavaScript. ``` -------------------------------- ### GET /invoices Source: https://factomos.docs.apiary.io/reference/events-/-webhook/events Lists all invoices with pagination. Supports filtering by status and type. Range must be 1-100, page starts from 1. ```APIDOC ## GET /invoices ### Description Retrieves a paginated list of invoices. Filter by status ('pending', 'late', etc.) and type ('invoice', 'credit-note', etc.). Use started_after or ending_before for cursor-based pagination. ### Method GET ### Endpoint /invoices ### Parameters #### Path Parameters None #### Query Parameters - **range** (integer) - Optional - Number of results per page (1-100) - **page** (integer) - Optional - Page number - **status** (string) - Optional - Filter by status - **invoice_type** (string) - Optional - Filter by type - **started_after** (string) - Optional - Cursor for pagination - **ending_before** (string) - Optional - Cursor for pagination #### Request Body None ### Request Example None ### Response #### Success Response (200) Paginated list of invoices. #### Response Example { "invoices": [ { "id": "invoice_id" } ], "total_pages": 1 } ### Error Responses | Http Status Code | Error code | Error message | Description | |---|---|---|---| | 400 | -6 | Invalid range | The range must be a number between 1 and 100 | | 400 | -7 | Invalid page number | The page number must be a number between 1 and the last page number | | 404 | -80 | No invoices found | There is no results to the list of invoices requested | | 400 | -81 | Status is invalid | The value of the field status must be among 'pending', 'late', 'paid', etc. | | 400 | -82 | invoice_type is invalid | The value of the field invoice_type must be among 'invoice', 'credit-note', etc. | | 400 | -87 | The started_after invoice is not found | The pid of the started_after field doesn't exists | | 400 | -88 | The ending_before invoice is not found | The pid of the ending_before field doesn't exists | ``` -------------------------------- ### List payments response example (JSON) Source: https://factomos.docs.apiary.io/reference/payments/payments-collection/list-all-payments Example of a successful GET request returning a collection of payments. The response includes a count, a search keyword, and an array of payment objects with details such as amount, payment type, and partner. Useful for iterating over payment records in client applications. ```JSON { "count": 3, "keyword": "tel", "results": [ { "href": "/payments/856k789", "payment_pid": "856k789", "invoice_pid": "8548789", "payment_date": "2016-03-15", "payment_type": "card", "payment_partner": "stripe", "amount": 300.6, "reference": "VIR 456" }, { "href": "/payments/856k755", "payment_pid": "856k755", "invoice_pid": "8548789", "payment_date": "2016-06-15", "payment_type": "order", "payment_partner": "gocardless", "amount": 20.4, "reference": "VIR 457" } ] } ``` -------------------------------- ### POST /articles Source: https://factomos.docs.apiary.io/reference/manager/single-sign-on-sso/create-an-auto-logged-in-session-for-the-website-app Create a new article in the system. Requires article_name and article_type parameters. The article_type must be either 'product' or 'service'. ```APIDOC ## POST /articles ### Description Create a new article in the system with the provided details. ### Method POST ### Endpoint /articles ### Request Body - **article_name** (string) - Required - Name of the article - **article_type** (string) - Required - Type of article ('product' or 'service') - **price** (number) - Optional - Price of the article - **description** (string) - Optional - Description of the article ### Request Example { "article_name": "New Product", "article_type": "product", "price": 49.99, "description": "A brand new product" } ### Response #### Success Response (201) - **article_pid** (string) - Unique identifier for the created article - **article_name** (string) - Name of the article - **article_type** (string) - Type of the article - **price** (number) - Price of the article #### Response Example { "article_pid": "ART456", "article_name": "New Product", "article_type": "product", "price": 49.99 } ### Error Codes - **400** (-21) - Missing article_name - The parameter article_name must be present and not empty - **400** (-22) - article_type is invalid - The value of the field article_type must be among 'product', 'service' ``` -------------------------------- ### GET /websites/factomos_apiary_io/users/attributes Source: https://factomos.docs.apiary.io/reference/user/company-users/list-company-users Retrieves a list of user attributes with their current values and descriptions. This endpoint provides insights into user data structure and example values. ```APIDOC ## GET /websites/factomos_apiary_io/users/attributes ### Description Retrieves a list of user attributes with their current values and descriptions. This endpoint provides insights into user data structure and example values. ### Method GET ### Endpoint /websites/factomos_apiary_io/users/attributes ### Parameters #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **count** (number) - Number of users (including the owner) - **results** (array) - An array of user objects, each containing: - **user_type** (string) - Type of user (among : admin, employee, owner, partner, readonly) - **username** (string) - Email/login of the user - **user_errors** (number) - Number of failed logins (the user is blocked if >= 3) - **user_connections** (number) - Number of connections - **last_connection** (string) - Date of the last connection in 'YYYY-MM-DD HH:MM:SS' format #### Response Example ```json { "count": 2, "results": [ { "user_type": "owner", "username": "jean@moulin.fr", "user_errors": "0", "user_connections": "1300", "last_connection": "2021-10-20 10:38:58" }, { "user_type": "employee", "username": "jacques@martin.fr", "user_errors": "0", "user_connections": "0", "last_connection": "2021-10-20 10:38:58" } ] } ``` ``` -------------------------------- ### Factomos RESTful API - Introduction Source: https://factomos.docs.apiary.io/reference/manager/single-sign-on-sso Provides an overview of the Factomos API, its purpose, and available domains for production and sandbox environments. ```APIDOC ## Factomos RESTful API - Introduction The Factomos RESTful API is the service that allows the creation, update, and deletion of resources, such as invoice, estimate, contacts, etc. The API has the following domains: PROD | SANDBOX ---|--- https://api.factomos.com | https://api-sandbox.factomos.com ``` -------------------------------- ### Introduction to Estimates Source: https://factomos.docs.apiary.io/reference/estimates/estimates-collection/list-all-estimates General introduction to the estimates section of the API. ```APIDOC ## Estimates Introduction ### Description An introduction to the estimates functionality within the Factomos API. ``` -------------------------------- ### GET /invoices Source: https://factomos.docs.apiary.io/reference/articles/a-single-article/create-api Lists all invoices with pagination and filtering options. Supports status and invoice_type filters; range limited to 1-100, pagination starts from page 1. ```APIDOC ## GET /invoices ### Description Retrieves a paginated list of all invoices. Filter by status (pending, late, paid, etc.) or invoice_type (invoice, credit-note, etc.). Use started_after or ending_before for cursor-based pagination. ### Method GET ### Endpoint /invoices ### Parameters #### Path Parameters None #### Query Parameters - **range** (integer) - Optional - Number of results per page (1-100). - **page** (integer) - Optional - Page number starting from 1. - **status** (string) - Optional - Filter by status: 'pending', 'late', 'paid', etc. - **invoice_type** (string) - Optional - Filter by type: 'invoice', 'credit-note', etc. - **started_after** (string) - Optional - Cursor: invoice pid to start after. - **ending_before** (string) - Optional - Cursor: invoice pid to end before. #### Request Body None ### Request Example None (query params in URL) ### Response #### Success Response (200) Array of invoice objects with pagination metadata. #### Response Example [ { "invoice_id": "101", "status": "paid" } ] #### Error Responses - **400** (Error code: -6) - Invalid range. Must be between 1 and 100. - **400** (Error code: -7) - Invalid page number. Must be between 1 and last page. - **404** (Error code: -80) - No invoices found. - **400** (Error code: -81) - Status is invalid. - **400** (Error code: -82) - invoice_type is invalid. - **400** (Error code: -87) - started_after invoice not found. - **400** (Error code: -88) - ending_before invoice not found. ``` -------------------------------- ### Factomos RESTful API - Introduction Source: https://factomos.docs.apiary.io/reference/events-/-webhook/webhook/get-a-specific-subscription Introduction to the Factomos API, including its purpose, domains, and authentication methods. ```APIDOC ## Factomos RESTful API ### Description The Factomos RESTful API allows for the creation, update, and deletion of resources such as invoices, estimates, and contacts. It supports both production and sandbox environments. ### Domains * **PROD:** `https://api.factomos.com` * **SANDBOX:** `https://api-sandbox.factomos.com` ### Authentication The Factomos API uses OAuth 2.0 for authentication. To obtain a token, send an email to g@factomos.com. The API supports the Implicit Grant Authorization Code flow for access tokens. #### Token Roles * **Token Manager (manager):** For partners managing multiple companies and accounting firms. Can be used to obtain Token Company or Token Accounting Firm. A permanent 'secret_key' type token is available for server-side use. * **Token Company (company):** For operating actions within a specific company (e.g., creating invoices, quotes). * **Token Accounting Firm (firm):** For operating actions within a specific accounting firm (e.g., listing companies, creating companies). #### Token Types * **Secret Token:** Permanent, for server-to-server communication. Should not be used in JavaScript. * **Access Token:** Temporary, can be used in public environments like JavaScript. ``` -------------------------------- ### Retrieve a Single Estimate (Python) Source: https://factomos.docs.apiary.io/reference/estimates/a-single-estimate/retrieve-an-estimate This Python example utilizes the 'requests' library to retrieve a single estimate. It constructs the URL with the necessary estimate ID and sends a GET request. The retrieved data can then be parsed and used within a Python application. ```python import requests estimate_pid = '82iku7sw' url = f'https://api.factomos.com/estimates/estimate_pid?estimate_pid={estimate_pid}' response = requests.get(url) if response.status_code == 200: print(response.json()) else: print(f'Error: {response.status_code}') ``` -------------------------------- ### Article Management - Search and Create Articles Source: https://factomos.docs.apiary.io/reference/payments Search for existing articles using reference ID or create new articles with service/product details. Search uses GET /articles with 'k' parameter. Creation uses POST /articles with article information including type, pricing, and VAT details. Returns article_pid required for invoice line items. ```http GET /articles?k=978-1-56619-909-4 HTTP Headers: Content-Type: application/json Accept: application/vnd.status+json; version=1 Authorization: Bearer sdfdsfsd8f7sd9f (replace with your token) ``` ```json POST /articles { "article_type": "service", "article_name": "Techniciens", "description": "- Production- Réalisation - Image - Son - Montage - Régie - Décoration costume, maquillage", "unit": "semaine", "price": "1300", "supplier_price": "0", "vat_rate": "20.0", "stock": "0", "reference": "978-1-56619-909-4" } HTTP Headers: Content-Type: application/json Accept: application/vnd.status+json; version=1 Authorization: Bearer sdfdsfsd8f7sd9f (replace with your token) ``` -------------------------------- ### GET /manager/account/{account_pid}/max-users Source: https://factomos.docs.apiary.io/reference/events-/-webhook/webhook/create-api Get company max user. Get the number of additional users authorized. The owner is not counted as an additional user. ```APIDOC ## GET /manager/account/{account_pid}/max-users ### Description Get company max user. Get the number of additional users authorized. The owner is not counted as an additional user. ### Method GET ### Endpoint /manager/account/{account_pid}/max-users ### Parameters #### Path Parameters - **account_pid** (string) - Required - Unique identifier of the company account ### Response #### Success Response (200) - **max_users** (integer) - Number of additional users authorized ### Response Example { "max_users": 10 } ``` -------------------------------- ### Factomos RESTful API Introduction Source: https://factomos.docs.apiary.io/reference/invoices Introduction to the Factomos API, including its purpose, base domains for production and sandbox environments, and authentication mechanisms. ```APIDOC ## Factomos RESTful API ### Description The Factomos RESTful API allows for the creation, update, and deletion of resources such as invoices, estimates, and contacts. ### Domains * **PROD:** `https://api.factomos.com` * **SANDBOX:** `https://api-sandbox.factomos.com` ``` -------------------------------- ### GET /profile/company/logo Source: https://factomos.docs.apiary.io/reference/contacts/create-api Get the company logo. ```APIDOC ## GET /profile/company/logo ### Description Get company logo. ### Method GET ### Endpoint /profile/company/logo ### Response #### Success Response (200) Returns the company logo image ``` -------------------------------- ### Create an article - Factomos API Source: https://factomos.docs.apiary.io/reference/payments/payments-collection/list-all-payments Creates a new article (service or product) with pricing and VAT. Stores an external reference for mapping to external systems (e.g., WooCommerce, Shopify, ISBN). The response includes the article_pid. ```http POST /articles HTTP/1.1 Host: api.factomos.com Content-Type: application/json Accept: application/vnd.status+json; version=1 Authorization: Bearer sdfdsfsd8f7sd9f { "article_type": "service", "article_name": "Techniciens", "description": "- Production- Réalisation - Image - Son - Montage - Régie - Décoration costume, maquillage", "unit": "semaine", "price": "1300", "supplier_price": "0", "vat_rate": "20.0", "stock": "0", "reference": "978-1-56619-909-4" } ``` -------------------------------- ### GET /profile/company/logo Source: https://factomos.docs.apiary.io/reference/accounting-firm/list-all-companies/create-api Get the company logo. ```APIDOC ## GET /profile/company/logo ### Description Get company logo. This endpoint is only available with a Token Company. ### Method GET ### Endpoint /profile/company/logo ### Response #### Success Response (200) - Returns company logo image ``` -------------------------------- ### Create a Factomos article (HTTP) Source: https://factomos.docs.apiary.io/reference/expenses Create a new article (service) with unit price and VAT rate. Stores an external reference for cross-system mapping. The response includes article_pid required for invoices. ```HTTP POST /articles Content-Type: application/json Accept: application/vnd.status+json; version=1 Authorization: Bearer sdfdsfsd8f7sd9f (replace with your token) { "article_type": "service", "article_name": "Techniciens", "description": "- Production- Réalisation - Image - Son - Montage - Régie - Décoration costume, maquillage", "unit": "semaine", "price": "1300", "supplier_price": "0", "vat_rate": "20.0", "stock": "0", "reference": "978-1-56619-909-4" } ``` -------------------------------- ### GET /users/company Source: https://factomos.docs.apiary.io/reference/events-/-webhook/webhook Get all users associated with the company. ```APIDOC ## GET /users/company ### Description Get all company users. ### Method GET ### Endpoint /users/company ### Response #### Success Response (200) Returns list of company users ``` -------------------------------- ### Factomos RESTful API - Introduction Source: https://factomos.docs.apiary.io/reference/articles/a-single-article/duplicate-an-article Overview of the Factomos RESTful API, its purpose, and available domains for production and sandbox environments. ```APIDOC ## Introduction to Factomos RESTful API ### Description Factomos is an invoicing tool that provides a RESTful API for programmatic access to manage resources such as invoices, estimates, and contacts. The API supports operations for creation, updating, and deletion of these resources. ### API Domains * **PROD**: `https://api.factomos.com` * **SANDBOX**: `https://api-sandbox.factomos.com` ``` -------------------------------- ### GET /profile/company/vat Source: https://factomos.docs.apiary.io/reference/events-/-webhook/webhook Get the VAT configuration for the company. ```APIDOC ## GET /profile/company/vat ### Description Get VAT company configuration. ### Method GET ### Endpoint /profile/company/vat ### Response #### Success Response (200) Returns VAT configuration #### Response Example { "vat_declaration": "monthly" } ``` -------------------------------- ### POST /articles Source: https://factomos.docs.apiary.io/reference/articles/articles-collection/create-an-article Creates a new article (service or product) in the system. Requires authentication and accepts article details in JSON format. ```APIDOC ## POST /articles ### Description Creates a new article (service or product) in the system. ### Method POST ### Endpoint /articles ### Parameters #### Path Parameters _None_ #### Query Parameters _None_ #### Request Body - **article_type** (string) - Optional - The type of the article among 'service', 'product'. Default is 'service'. - **article_name** (string) - Required - The name of the article. - **description** (string) - Optional - The description of the article. - **unit** (string) - Optional - Unit of the article (e.g., day, kg). - **price** (number) - Optional - Price of the article, without VAT. - **supplier_price** (number) - Optional - Supplier price of the article. - **vat_rate** (number) - Optional - Percentage of VAT (e.g., 20 for 20%). - **stock** (number) - Optional - Number of items in stock. - **reference** (string) - Optional - Custom reference. - **accountancy_code** (string) - Optional - Accounting code of the article. ### Request Example ``` { "article_type": "service", "article_name": "Techniciens", "description": "- Production- Réalisation - Image - Son - Montage - Régie - Décoration costume, maquillage", "unit": "semaine", "price": 1300, "supplier_price": 0, "vat_rate": 20.0, "stock": 0, "reference": "", "accountancy_code": "70690000" } ``` ### Response #### Success Response (201) - **href** (string) - Resource URL. - **article_pid** (string) - Identifier of the created article. - **article_type** (string) - Type of the article. - **article_name** (string) - Name of the article. - **description** (string) - Description. - **unit** (string) - Unit. - **price** (number) - Price. - **supplier_price** (number) - Supplier price. - **vat_rate** (number) - VAT rate. - **accountancy_code** (string) - Accounting code. - **archived** (string) - Archived flag. - **stock** (number) - Stock quantity. - **reference** (string) - Reference. #### Response Example ``` { "href": "/articles/82iku7sw", "article_pid": "82iku7sw", "article_type": "service", "article_name": "Techniciens", "": "- Production- Réalisation - Image - Son - Montage - Régie - Décoration costume, maquillage", "unit": "semaine", "price": "1300", "supplier_price": "0", "vat_rate": "20.0", "accountancy_code": "70690000", "archived": "0", "stock": "0", "reference": "" } ``` ### Headers - **Content-Type**: application/json - **Accept**: application/vnd.status+json; version=1 - **Authorization**: Bearer {token} ``` -------------------------------- ### GET /profile/company Source: https://factomos.docs.apiary.io/reference/events-/-webhook/webhook Get the company profile information. ```APIDOC ## GET /profile/company ### Description Get company profile information. ### Method GET ### Endpoint /profile/company ### Response #### Success Response (200) Returns company profile information #### Response Example { "company_name": "Example Company", "address": "123 Main St", "phone": "+1234567890" } ``` -------------------------------- ### Factomos RESTful API - Introduction Source: https://factomos.docs.apiary.io/reference/manager/a-single-company-account/list-company-users Introduction to the Factomos RESTful API, its purpose, and available domains for production and sandbox environments. ```APIDOC ## Factomos RESTful API ### Description Factomos is an invoicing tool available at http://factomos.com. The Factomos RESTful API is the service that allows the creation, update, and deletion of resources, such as invoice, estimate, contacts, etc. ### Domains - PROD: https://api.factomos.com - SANDBOX: https://api-sandbox.factomos.com ``` -------------------------------- ### Get company Profile Source: https://factomos.docs.apiary.io/reference/estimates/a-single-estimate/list-estimate-emails Get company Profile. ```APIDOC # Get company Profile ### Description Get company Profile. ### Method GET ### Endpoint /company/profile ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example None ### Response #### Success Response (200) - `profile` (object) - Company profile details #### Response Example { "profile": {"company_name": "Example Corp."} } ``` -------------------------------- ### Factomos RESTful API - Introduction Source: https://factomos.docs.apiary.io/reference/articles/articles-collection/create-an-article Overview of the Factomos API, its purpose, domains, and authentication mechanism. ```APIDOC ## Factomos RESTful API ### Description The Factomos RESTful API is the service that allows the creation, update, and deletion of resources, such as invoices, estimates, contacts, etc. ### Domains * PROD: https://api.factomos.com * SANDBOX: https://api-sandbox.factomos.com ### Authentication ### Method Implicit Grant Authorization Code flow using OAuth 2.0. ### Endpoint Send an email to g@factomos.com to obtain a token. ### Token Roles * **Manager**: For partners operating for multiple companies and accounting firms. Can obtain `Token Company` or `Token Accounting Firm`. * **Company**: For operating actions for a specific company (e.g., create invoice, quotes). * **Accounting Firm**: For operating actions for a specific accounting firm (e.g., list companies, create companies). ### Token Types * **Secret Token**: Permanent, for server-to-server communication. Should not be used in JavaScript. * **Access Token**: Temporary, can be used in public environments like JavaScript. ``` -------------------------------- ### GET /profile/company/vat-config Source: https://factomos.docs.apiary.io/reference/delivery-notes/delivery-note-statuses Get the VAT configuration for the company. ```APIDOC ## GET /profile/company/vat-config ### Description Get VAT company configuration. ### Method GET ### Endpoint /profile/company/vat-config ### Response #### Success Response (200) - Returns VAT configuration settings #### Response Example { "vat_declaration": "monthly" } ``` -------------------------------- ### GET /profile/company/logo Source: https://factomos.docs.apiary.io/reference/delivery-notes/delivery-note-statuses Get the company logo image. ```APIDOC ## GET /profile/company/logo ### Description Get company logo image. ### Method GET ### Endpoint /profile/company/logo ### Response #### Success Response (200) - Returns company logo image data ``` -------------------------------- ### Factomos RESTful API - Introduction Source: https://factomos.docs.apiary.io/reference/profile/company-logo Introduction to the Factomos API, its purpose, and available domains for production and sandbox environments. ```APIDOC ## Factomos RESTful API ### Description Factomos is an invoicing tool. The Factomos RESTful API is the service that allows the creation, update, and deletion of resources, such as invoices, estimates, and contacts. ### Domains * **PROD**: https://api.factomos.com * **SANDBOX**: https://api-sandbox.factomos.com ``` -------------------------------- ### GET /profile/company/vat-config Source: https://factomos.docs.apiary.io/reference/contacts/create-api Get the VAT company configuration. ```APIDOC ## GET /profile/company/vat-config ### Description Get VAT company configuration. ### Method GET ### Endpoint /profile/company/vat-config ### Response #### Success Response (200) Returns VAT configuration information #### Response Example { "vat_declaration": "monthly", "vat_rate": 20.0 } ``` -------------------------------- ### Events / Webhook Source: https://factomos.docs.apiary.io/reference/events-/-webhook/webhook/subscribe-to-event%28s%29 Documentation for handling events and setting up webhooks for real-time notifications from the Factomos API. ```APIDOC ## Events / Webhook ### Description This section covers how to manage events and configure webhooks to receive real-time updates from the Factomos API. ### Endpoints * **GET /events** * Description: Retrieves a list of events. * Method: GET * **POST /webhook** * Description: Configures a webhook endpoint to receive event notifications. * Method: POST * Request Body: * `url` (string) - Required - The URL to which event notifications will be sent. * `event_types` (array) - Optional - A list of specific event types to subscribe to. ``` -------------------------------- ### POST /articles Source: https://factomos.docs.apiary.io/reference/user/company-users Create a new article in the Factomos database with details like pricing and VAT rate. ```APIDOC ## POST /articles ### Description Create a new article entry in Factomos, required for invoice lines. ### Method POST ### Endpoint /articles ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body - **article_type** (string) - Required - Type of article, e.g., "service" - **article_name** (string) - Required - Name of the article - **description** (string) - Optional - Description - **unit** (string) - Optional - Unit of measure, e.g., "semaine" - **price** (string) - Required - Price - **supplier_price** (string) - Optional - Supplier price - **vat_rate** (string) - Required - VAT rate - **stock** (string) - Optional - Stock quantity - **reference** (string) - Optional - Reference identifier ### Request Example { "article_type": "service", "article_name": "Techniciens", "description": "- Production- Réalisation - Image - Son - Montage - Régie - Décoration costume, maquillage", "unit": "semaine", "price": "1300", "supplier_price": "0", "vat_rate": "20.0", "stock": "0", "reference": "978-1-56619-909-4" } ### Response #### Success Response (201) - **article_pid** (string) - Unique identifier for the created article #### Response Example { "article_pid": "236ka4tt" } #### Error Responses - 400 Bad Request - If required fields are missing or invalid - 401 Unauthorized - If token is invalid ``` -------------------------------- ### GET /profile/company Source: https://factomos.docs.apiary.io/reference/contacts/create-api Get the company profile information. ```APIDOC ## GET /profile/company ### Description Get company profile information. ### Method GET ### Endpoint /profile/company ### Response #### Success Response (200) Returns company profile information #### Response Example { "company_name": "Example Company", "address": "123 Main St", "city": "Anytown", "country": "US", "vat_number": "US123456789" } ``` -------------------------------- ### GET /profile/company/logo Source: https://factomos.docs.apiary.io/reference/profile/a-single-document-template/duplicate-a-document-template Get the current company logo image. ```APIDOC ## GET /profile/company/logo ### Description Get the current company logo image. ### Method GET ### Endpoint /profile/company/logo ### Response #### Success Response (200) Returns company logo image ``` -------------------------------- ### POST /articles Source: https://factomos.docs.apiary.io/introduction/use-cases Create a new article in the Factomos system with service or product information ```APIDOC ## POST /articles ### Description Create a new article in the Factomos system when an existing article is not found. The article_pid from the response will be needed for invoice line creation. ### Method POST ### Endpoint /articles ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **article_type** (string) - Required - Type of article (e.g., "service", "product") - **article_name** (string) - Required - Name/title of the article - **description** (string) - Required - Detailed description of the article - **unit** (string) - Required - Unit of measurement (e.g., "semaine", "piece") - **price** (string) - Required - Sale price - **supplier_price** (string) - Optional - Cost/supplier price - **vat_rate** (string) - Required - VAT rate percentage (e.g., "20.0") - **stock** (string) - Optional - Stock quantity - **reference** (string) - Optional - External reference (ISBN, SKU, etc.) ### Request Example ``` { "article_type": "service", "article_name": "Techniciens", "description": "- Production- Réalisation - Image - Son - Montage - Régie - Décoration costume, maquillage", "unit": "semaine", "price": "1300", "supplier_price": "0", "vat_rate": "20.0", "stock": "0", "reference": "978-1-56619-909-4" } ``` ### Response #### Success Response (201) - **article_pid** (string) - Generated article identifier for invoice line creation #### Response Example ``` { "article_pid": "236ka4tt" } ``` ``` -------------------------------- ### GET /profile/company/logo Source: https://factomos.docs.apiary.io/reference/manager/get-firm-access-token Get the company logo image file. ```APIDOC ## GET /profile/company/logo ### Description Get the company logo image file. ### Method GET ### Endpoint /profile/company/logo ### Response #### Success Response (200) Returns company logo image file ``` -------------------------------- ### POST /estimates Source: https://factomos.docs.apiary.io/reference/profile/document-templates-collection/list-all-templates-collection Create a new estimate with articles and optional VAT settings. ```APIDOC ## POST /estimates ### Description Create a new estimate with specified articles and configuration. ### Method POST ### Endpoint /estimates ### Request Body - **articleList** (array) - Required - List of articles in the estimate - **vat_enable** (number) - Optional - Enable VAT (0 or 1) - **several_vat** (number) - Optional - Enable multiple VAT rates (0 or 1) - **document_template_pid** (string) - Optional - Template identifier ### Request Example { "articleList": [ { "article_pid": "123", "quantity": 1 } ], "vat_enable": 1 } ### Response #### Success Response (201) - Returns the created estimate object #### Error Responses - **404** - Article not found in the system ``` -------------------------------- ### Factomos RESTful API Introduction Source: https://factomos.docs.apiary.io/reference/payments Introduction to the Factomos RESTful API, including its purpose, available domains, and authentication mechanism. ```APIDOC ## Factomos RESTful API ### Description Factomos is an invoicing tool available at http://factomos.com. The Factomos RESTful API is the service that allows the creation, update, and deletion of resources, such as invoices, estimates, contacts, etc. ### Domains * Production: `https://api.factomos.com` * Sandbox: `https://api-sandbox.factomos.com` ### Authentication The Factomos API uses OAuth 2.0 for authentication. To obtain a token, send an email to g@factomos.com. The API supports the Implicit Grant Authorization Code flow to acquire access tokens. There are three levels of tokens: * **Token Manager (manager)**: For partners managing multiple companies and accounting firms. Can be used to obtain a Token Company or Token Accounting Firm. * **Token Company (company)**: For performing actions within a specific company (e.g., creating invoices). * **Token Accounting Firm (firm)**: For performing actions related to a specific accounting firm (e.g., listing companies). There are two types of tokens: * **Secret Token**: Permanent, for server-to-server communication, and should not be used in JavaScript. * **Access Token**: Temporary, suitable for public environments like JavaScript. ``` -------------------------------- ### GET /profile/company/vat Source: https://factomos.docs.apiary.io/reference/manager/a-single-company-account/create-api Get the VAT configuration for the authenticated company. ```APIDOC ## GET /profile/company/vat ### Description Get the VAT configuration for the authenticated company. ### Method GET ### Endpoint /profile/company/vat ### Response #### Success Response (200) - Returns VAT configuration #### Response Example { "vat_declaration": "monthly" } ``` -------------------------------- ### Get company Profile Source: https://factomos.docs.apiary.io/reference/expenses/create-api Gets the company profile information. ```APIDOC ## GET /company/profile ### Description Gets the company profile information. ### Method GET ### Endpoint /company/profile ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example None ### Response #### Success Response (200) - Company profile data. #### Response Example { "company_name": "Example Company" } ``` -------------------------------- ### POST /manager/account/link Source: https://factomos.docs.apiary.io/reference/profile/document-templates-collection/list-all-templates-collection Creates a new company account and links it to an existing company, allowing access with the same credentials. ```APIDOC ## POST /manager/account/link ### Description Creates a company and links it to an existing company so the user can access both with the same credentials. ### Method POST ### Endpoint /manager/account/link ### Parameters #### Request Body - **company_name** (string) - Required - Name of the company to be created ### Error Handling - **400** - company_name is missing ### Request Example { "company_name": "New Company LLC" } ``` -------------------------------- ### GET /company/logo Source: https://factomos.docs.apiary.io/reference/articles Gets the current company logo image. ```APIDOC ## GET /company/logo ### Description Retrieves the company logo as a Base64‑encoded image. ### Method GET ### Endpoint /company/logo ### Parameters _None_ ### Request Example GET https://api.factomos.com/company/logo ### Response #### Success Response (200) - **company_logo** (string) - Base64 data URI of the logo image. ### Response Example { "company_logo": "data:image/png;base64,iVBORw0KGgoAAA..." } ``` -------------------------------- ### Factomos RESTful API Introduction Source: https://factomos.docs.apiary.io/reference/events-/-webhook/webhook/subscribe-to-event%28s%29 Overview of the Factomos RESTful API, its purpose, and available domains for production and sandbox environments. ```APIDOC ## Factomos RESTful API ### Description The Factomos RESTful API is a service that allows the creation, update, and deletion of resources like invoices, estimates, and contacts. It provides programmatic access to the Factomos invoicing tool. ### Domains * **PROD:** `https://api.factomos.com` * **SANDBOX:** `https://api-sandbox.factomos.com` ``` -------------------------------- ### GET /company/vat Source: https://factomos.docs.apiary.io/reference/articles/articles-collection/create-an-article Get the current VAT configuration for the company. ```APIDOC ## GET /company/vat ### Description Returns VAT configuration. ### Method GET ### Endpoint /company/vat ### Parameters None ### Request Example GET /company/vat ### Response #### Success Response (200) - **vat_declaration** (string) - One of: '', 'monthly', 'quarterly' ``` -------------------------------- ### Factomos RESTful API Introduction Source: https://factomos.docs.apiary.io/reference/delivery-notes/a-single-delivery-note-status/create-api Details about the Factomos API, its domains, and authentication methods. ```APIDOC ## Factomos RESTful API ### Description The Factomos RESTful API is a service that allows for the creation, update, and deletion of resources such as invoices, estimates, and contacts. ### Domains * PROD: https://api.factomos.com * SANDBOX: https://api-sandbox.factomos.com ### Authentication The Factomos API uses OAuth 2.0 for authentication. To obtain a token, send an email to g@factomos.com. There are three levels of tokens: * **Token Manager (manager)**: For partners operating for multiple companies and accounting firms. Can be used to obtain a Token Company or Token Accounting Firm. A permanent 'secret_key' type token is available for server-side use. * **Token Company (company)**: For operating actions for a specific company (e.g., creating invoices). * **Token Accounting Firm (firm)**: For operating actions for a specific accounting firm (e.g., listing companies). There are two types of tokens: * **Secret Token**: Permanent, for server-to-server communication, and should not be used in JavaScript. * **Access Token**: Temporary, can be used in public environments like JavaScript. ``` -------------------------------- ### GET /profile/company/vat Source: https://factomos.docs.apiary.io/reference/accounting-firm/list-all-companies/create-api Get VAT company configuration settings. ```APIDOC ## GET /profile/company/vat ### Description Get VAT company configuration. This endpoint is only available with a Token Company. ### Method GET ### Endpoint /profile/company/vat ### Response #### Success Response (200) - Returns VAT configuration settings #### Response Example { "vat_declaration": "monthly" } ``` -------------------------------- ### Factomos RESTful API - Introduction Source: https://factomos.docs.apiary.io/reference/estimates/a-single-estimate/list-linked-invoices Provides an overview of the Factomos RESTful API, its purpose, and available domains for production and sandbox environments. ```APIDOC ## Factomos RESTful API ### Description Factomos is an invoicing tool available at http://factomos.com. The Factomos RESTful API is the service that allows the creation, update, and deletion of resources, such as invoices, estimates, contacts, etc. ### Domains * **PROD**: https://api.factomos.com * **SANDBOX**: https://api-sandbox.factomos.com ``` -------------------------------- ### Factomos RESTful API Introduction Source: https://factomos.docs.apiary.io/reference/payments/payments-collection/add-a-payment Introduction to the Factomos RESTful API, its purpose, and available domains for production and sandbox environments. ```APIDOC ## Factomos RESTful API ### Description Factomos is an invoicing tool available at http://factomos.com. The Factomos RESTful API is the service that allows the creation, update, and deletion of resources, such as invoices, estimates, contacts, etc. ### Domains * **PROD**: `https://api.factomos.com` * **SANDBOX**: `https://api-sandbox.factomos.com` ``` -------------------------------- ### GET /expenses/{expense_id}/attachment Source: https://factomos.docs.apiary.io/reference/user/company-users/list-company-users Get the attachment for a specific expense. ```APIDOC ## GET /expenses/{expense_id}/attachment ### Description Get the attachment for a specific expense. ### Method GET ### Endpoint /expenses/{expense_id}/attachment ### Parameters #### Path Parameters - **expense_id** (string) - Required - The ID of the expense ### Response #### Error Response (404) - **error_code** (integer) - -113 - **error_message** (string) - No attachment found - **description** (string) - There is no attachment for this expense ``` -------------------------------- ### Factomos RESTful API Introduction Source: https://factomos.docs.apiary.io/reference/expenses/a-single-expense/retrieve-an-expense Introduction to the Factomos RESTful API, its purpose, and the available API domains for production and sandbox environments. ```APIDOC ## Introduction to Factomos RESTful API Factomos is an invoicing tool that provides a RESTful API for creating, updating, and deleting resources such as invoices, estimates, and contacts. The API is available in two domains: * **PROD:** `https://api.factomos.com` * **SANDBOX:** `https://api-sandbox.factomos.com` ``` -------------------------------- ### GET /users/company Source: https://factomos.docs.apiary.io/reference/profile/a-single-document-template/duplicate-a-document-template Get list of all users associated with the company account. ```APIDOC ## GET /users/company ### Description Get list of all users associated with the company account. ### Method GET ### Endpoint /users/company ### Response #### Success Response (200) Returns array of company users ``` -------------------------------- ### POST /manager/account Source: https://factomos.docs.apiary.io/reference/articles/articles-collection/list-all-articles Creates a new company account and links it to an existing company for shared credentials. ```APIDOC ## POST /manager/account ### Description Creates a new company account and links it to an existing company for shared credentials. ### Method POST ### Endpoint /manager/account ### Parameters #### Request Body - **company_name** (string) - Required - The name of the company ### Error Handling - **400** - company_name is missing ### Request Example { "company_name": "Example Corp" } ```