### Get Product Request Example (URL) Source: https://abaninja.ch/apidocs/index This example shows the URL structure for retrieving a specific product. It requires the account UUID and the product UUID as path parameters. ```url https://api.abaninja.ch/accounts/{accountUuid}/products/v2/products/{productUuid} ``` -------------------------------- ### Get Allowed Contract Days - JSON Response Sample Source: https://abaninja.ch/apidocs/index This JSON response sample illustrates the structure of the data returned when querying for allowed contract days for an employee. It includes the earliest possible start date and lists of start and end days. ```json { "earliestDate": "2019-08-24", "startDays": [ "2019-08-24" ], "endDays": [ "2019-08-24" ] } ``` -------------------------------- ### Create Product Source: https://abaninja.ch/apidocs/index Creates a new product within a specified account. ```APIDOC ## POST /accounts/{accountUuid}/products/v2/products ### Description Creates a new product for the specified account. ### Method POST ### Endpoint /accounts/{accountUuid}/products/v2/products ### Parameters #### Path Parameters - **accountUuid** (string) - Required - UUID of the account where the product should be created. #### Request Body [Details of the product creation request body would go here. The input text does not provide this information.] ### Response #### Success Response (200) [Details of the success response would go here.] #### Error Responses [Details of potential error responses would go here.] ``` -------------------------------- ### POST /accounts/{accountUuid}/products/v2/products Source: https://abaninja.ch/apidocs/index Creates a new product within a specified account. Requires detailed product information including keys, pricing, and translations. ```APIDOC ## POST /accounts/{accountUuid}/products/v2/products ### Description Creates a new product within a specified account. Requires detailed product information including keys, pricing, and translations. ### Method POST ### Endpoint https://api.abaninja.ch/accounts/{accountUuid}/products/v2/products ### Parameters #### Path Parameters - **accountUuid** (string) - Required - UUID of the account where the product will be created. #### Request Body - **productKey** (string) - Required - <= 30 characters - **productGroupNumber** (null or number) - Optional - **isService** (boolean) - Required - **tags** (Array of strings) - Optional - **translations** (object) - Required - **de** (object) - Required - **productName** (string) - Required - **productDescription** (string) - Required - **en** (object) - Required - **productName** (string) - Required - **productDescription** (string) - Required - **fr** (object) - Optional - **productName** (string) - Optional - **productDescription** (string) - Optional - **it** (object) - Optional - **productName** (string) - Optional - **productDescription** (string) - Optional - **properties** (Array of objects) - Optional - **type** (string) - Required - **value** (any) - Required - **isocode** (string) - Required - **eanCode** (null or string) - Optional - <= 13 characters - **unitUuid** (string) - Required - - **cost** (number) - Required - **taxRate** (null or number) - Optional - **bookingAccountNumber** (null or string) - Optional ### Request Example ```json { "productKey": "P0123-456", "productGroupNumber": "44", "isService": true, "tags": [ "Lite", "Green", "Round" ], "translations": { "de": { "productName": "Produkt", "productDescription": "Ein tolles Produkt" }, "en": { "productName": "Product", "productDescription": "A great product" }, "fr": { "productName": "", "productDescription": "" }, "it": { "productName": "", "productDescription": "" } }, "properties": [ { "type": "height", "value": 13, "isocode": "MTR" } ], "eanCode": "5234816352132", "unitUuid": "4ea8f502-b003-41e6-a190-c2ae59ac4f26", "cost": 72.5, "taxRate": 7.7, "bookingAccountNumber": 2540 } ``` ### Response #### Success Response (201) - **status** (number) - Status code. - **message** (string) - Response message. - **data** (Array of objects) - Array containing the created product details. - **productId** (number) - ID of the product. - **productUuid** (string) - UUID of the product. - **productKey** (string) - Product key. - **archivedAt** (string) - Date the product was archived. - **isInclusive** (boolean) - Indicates if the product is inclusive. - **isService** (boolean) - Indicates if the product is a service. - **eanCode** (string) - EAN code of the product. - **productUnit** (object) - Product unit details. - **id** (number) - Unit ID. - **uuid** (string) - Unit UUID. - **isocode** (string) - Unit ISO code. - **tags** (Array of strings) - Tags associated with the product. - **properties** (Array of objects) - Properties of the product. - **id** (number) - Property ID. - **type** (string) - Property type. - **value** (string) - Property value. - **isocode** (string) - Property ISO code. - **translations** (object) - Translations for the property. - **de** (object) - German translations. - **description** (string) - Property description in German. - **unit** (string) - Unit in German. - **en** (object) - English translations. - **description** (string) - Property description in English. - **unit** (string) - Unit in English. - **fr** (object) - French translations. - **description** (string) - Property description in French. - **unit** (string) - Unit in French. - **it** (object) - Italian translations. - **description** (string) - Property description in Italian. - **unit** (string) - Unit in Italian. - **cost** (number) - Cost of the product. - **taxRate** (number) - Tax rate of the product. - **bookingAccountNumber** (string) - Booking account number. - **translations** (object) - Translations for the product. - **de** (object) - German translations. - **productName** (string) - Product name in German. - **productDescription** (string) - Product description in German. - **en** (object) - English translations. - **productName** (string) - Product name in English. - **productDescription** (string) - Product description in English. - **fr** (object) - French translations. - **productName** (string) - Product name in French. - **productDescription** (string) - Product description in French. - **it** (object) - Italian translations. - **productName** (string) - Product name in Italian. - **productDescription** (string) - Product description in Italian. - **productGroup** (object) - Product group details. - **productGroupId** (number) - Product group ID. - **productGroupUuid** (string) - Product group UUID. - **productGroupNumber** (number) - Product group number. - **productGroupDescription** (string) - Product group description. - **productGroupBookingAccountNumber** (number) - Product group booking account number. - **productGroupBookingAccountId** (number) - Product group booking account ID. #### Response Example (201) ```json { "status": 0, "message": "string", "data": [ { "productId": 0, "productUuid": "3a88375a-5ea7-4e22-b7fe-b3c10f9367f3", "productKey": "string", "archivedAt": "2019-08-24", "isInclusive": true, "isService": true, "eanCode": "string", "productUnit": { "id": 0, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "isocode": "string" }, "tags": [ "string" ], "properties": [ { "id": 0, "type": "string", "value": "string", "isocode": "string", "translations": { "de": { "description": "string", "unit": "string" }, "en": { "description": "string", "unit": "string" }, "fr": { "description": "string", "unit": "string" }, "it": { "description": "string", "unit": "string" } } } ], "cost": 0, "taxRate": 0, "bookingAccountNumber": "string", "translations": { "de": { "productName": "string", "productDescription": "string" }, "en": { "productName": "string", "productDescription": "string" }, "fr": { "productName": "string", "productDescription": "string" }, "it": { "productName": "string", "productDescription": "string" } }, "productGroup": { "productGroupId": 0, "productGroupUuid": "bc144b55-1275-4824-afc1-781887fb7c1d", "productGroupNumber": 0, "productGroupDescription": "string", "productGroupBookingAccountNumber": 0, "productGroupBookingAccountId": 0 } } ] } ``` ``` -------------------------------- ### Get Employee List API Path Source: https://abaninja.ch/apidocs/index This example shows the API endpoint for retrieving a list of employees associated with an account. It accepts an optional query parameter to filter by active or inactive status. ```http GET /accounts/{accountUuid}/time/v2/employees ``` -------------------------------- ### GET /accounts/{accountUuid}/time/v2/employees/{employeeUuid}/contracts/allowed-days Source: https://abaninja.ch/apidocs/index Retrieves the allowed start and end days for a contract for a given employee within a specified account. This endpoint is useful for validating contract dates. ```APIDOC ## GET /accounts/{accountUuid}/time/v2/employees/{employeeUuid}/contracts/allowed-days ### Description Retrieves the allowed start and end days for a contract for a given employee within a specified account. This endpoint is useful for validating contract dates. ### Method GET ### Endpoint /accounts/{accountUuid}/time/v2/employees/{employeeUuid}/contracts/allowed-days #### Path Parameters - **accountUuid** (string, uuid) - Required - UUID of AbaNinja Account - **employeeUuid** (string, uuid) - Required - UUID of AbaNinja Employee #### Query Parameters - **startDate** (string) - Optional - Year and month of possible start dates - **endDate** (string) - Optional - Year and month of possible end dates - **contractUuid** (string, uuid) - Optional - UUID of existing contract to check ### Response #### Success Response (200) - **earliestDate** (string) - The earliest possible date for a contract. - **startDays** (array of strings) - A list of allowed start dates. - **endDays** (array of strings) - A list of allowed end dates. #### Response Example ```json { "earliestDate": "2019-08-24", "startDays": [ "2019-08-24" ], "endDays": [ "2019-08-24" ] } ``` #### Error Response (400) - Employee not found ``` -------------------------------- ### Create Product Response (201 JSON) Source: https://abaninja.ch/apidocs/index This is a sample success response (HTTP 201) when a product is created. It confirms the creation and includes details of the created product, such as its ID, UUID, key, associated unit, tags, properties, cost, tax rate, and translation information. ```json { "status": 0, "message": "string", "data": [ { "productId": 0, "productUuid": "3a88375a-5ea7-4e22-b7fe-b3c10f9367f3", "productKey": "string", "archivedAt": "2019-08-24", "isInclusive": true, "isService": true, "eanCode": "string", "productUnit": { "id": 0, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "isocode": "string" }, "tags": [ "string" ], "properties": [ { "id": 0, "type": "string", "value": "string", "isocode": "string", "translations": { "de": { "description": "string", "unit": "string" }, "en": { "description": "string", "unit": "string" }, "fr": { "description": "string", "unit": "string" }, "it": { "description": "string", "unit": "string" } } } ], "cost": 0, "taxRate": 0, "bookingAccountNumber": "string", "translations": { "de": { "productName": "string", "productDescription": "string" }, "en": { "productName": "string", "productDescription": "string" }, "fr": { "productName": "string", "productDescription": "string" }, "it": { "productName": "string", "productDescription": "string" } }, "productGroup": { "productGroupId": 0, "productGroupUuid": "bc144b55-1275-4824-afc1-781887fb7c1d", "productGroupNumber": 0, "productGroupDescription": "string", "productGroupBookingAccountNumber": 0, "productGroupBookingAccountId": 0 } } ] } ``` -------------------------------- ### Get Products List Source: https://abaninja.ch/apidocs/index Retrieves a list of products for a specified account, with options for pagination and filtering by archive status. ```APIDOC ## GET /accounts/{accountUuid}/products/v2/products ### Description Retrieves a list of products for a given account. ### Method GET ### Endpoint /accounts/{accountUuid}/products/v2/products ### Parameters #### Path Parameters - **accountUuid** (string) - Required - UUID of the account where the products are located. #### Query Parameters - **limit** (integer) - Optional - The number of products to return per page. - **page** (integer) - Optional - The page number for pagination. - **isArchived** (boolean) - Optional - Filter to get only archived or non-archived products. ### Response #### Success Response (200) - **status** (integer) - Status code. - **message** (string) - A message indicating success. - **data** (array) - A list of products. - **productId** (integer) - The ID of the product. - **productUuid** (string) - The UUID of the product. - **productKey** (string) - The key of the product. - **archivedAt** (string) - The date the product was archived (YYYY-MM-DD). - **isInclusive** (boolean) - Whether the product is inclusive. - **isService** (boolean) - Whether the product is a service. - **eanCode** (string) - The EAN code of the product. - **productUnit** (object) - Details about the product unit. - **id** (integer) - The ID of the unit. - **uuid** (string) - The UUID of the unit. - **isocode** (string) - The ISO code of the unit. - **tags** (array) - A list of tags associated with the product. - (string) - A tag. - **properties** (array) - A list of properties for the product. - **id** (integer) - The ID of the property. - **type** (string) - The type of the property. - **value** (string) - The value of the property. - **isocode** (string) - The ISO code for the property. - **translations** (object) - Translations for the property. - **de** (object) - German translation. - **description** (string) - Description in German. - **unit** (string) - Unit in German. - **en** (object) - English translation. - **description** (string) - Description in English. - **unit** (string) - Unit in English. - **fr** (object) - French translation. - **description** (string) - Description in French. - **unit** (string) - Unit in French. - **it** (object) - Italian translation. - **description** (string) - Description in Italian. - **unit** (string) - Unit in Italian. - **cost** (number) - The cost of the product. - **taxRate** (number) - The tax rate for the product. - **bookingAccountNumber** (string) - The booking account number. - **translations** (object) - Translations for the product name and description. - **de** (object) - German translation. - **productName** (string) - Product name in German. - **productDescription** (string) - Product description in German. - **en** (object) - English translation. - **productName** (string) - Product name in English. - **productDescription** (string) - Product description in English. - **fr** (object) - French translation. - **productName** (string) - Product name in French. - **productDescription** (string) - Product description in French. - **it** (object) - Italian translation. - **productName** (string) - Product name in Italian. - **productDescription** (string) - Product description in Italian. - **productGroup** (object) - Details about the product group. - **productGroupId** (integer) - The ID of the product group. - **productGroupUuid** (string) - The UUID of the product group. - **productGroupNumber** (integer) - The number of the product group. - **productGroupDescription** (string) - The description of the product group. - **productGroupBookingAccountNumber** (string) - The booking account number for the product group. - **productGroupBookingAccountId** (integer) - The booking account ID for the product group. #### Response Example ```json { "status": 0, "message": "Products retrieved successfully.", "data": [ { "productId": 123, "productUuid": "3a88375a-5ea7-4e22-b7fe-b3c10f9367f3", "productKey": "PROD001", "archivedAt": "2019-08-24", "isInclusive": true, "isService": false, "eanCode": "4006381333931", "productUnit": { "id": 1, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "isocode": "PCE" }, "tags": ["example", "tag"], "properties": [ { "id": 1, "type": "color", "value": "Red", "isocode": "COLOR", "translations": { "de": {"description": "Farbe", "unit": "Einheit"}, "en": {"description": "Color", "unit": "Unit"}, "fr": {"description": "Couleur", "unit": "Unité"}, "it": {"description": "Colore", "unit": "Unità"} } } ], "cost": 19.99, "taxRate": 0.077, "bookingAccountNumber": "4500", "translations": { "de": {"productName": "Beispielprodukt", "productDescription": "Dies ist eine Beschreibung."}, "en": {"productName": "Example Product", "productDescription": "This is a description."}, "fr": {"productName": "Produit Exemple", "productDescription": "Ceci est une description."}, "it": {"productName": "Prodotto Esempio", "productDescription": "Questa è una descrizione."} }, "productGroup": { "productGroupId": 1, "productGroupUuid": "bc144b55-1275-4824-afc1-781887fb7c1d", "productGroupNumber": 10, "productGroupDescription": "General Products", "productGroupBookingAccountNumber": "4500", "productGroupBookingAccountId": 1 } } ] } ``` #### Error Responses - **404**: Unknown AccountUuid. ``` -------------------------------- ### Get Single Unit API Path Source: https://abaninja.ch/apidocs/index This example shows the API endpoint for retrieving a single unit by its UUID within a specific account. It requires the account UUID and unit UUID as path parameters. ```http GET /accounts/{accountUuid}/units/v2/units/{unitUuid} ``` -------------------------------- ### Product JSON Response Sample Source: https://abaninja.ch/apidocs/index This is a sample JSON response representing product data. It includes details such as status, message, product information, unit details, tags, properties, cost, tax rate, and translations in multiple languages. ```json { "status": 0, "message": "string", "data": { "productId": 0, "productUuid": "3a88375a-5ea7-4e22-b7fe-b3c10f9367f3", "productKey": "string", "archivedAt": "2019-08-24", "isInclusive": true, "isService": true, "eanCode": "string", "productUnit": { "id": 0, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "isocode": "string" }, "tags": [ "string" ], "properties": [ { "id": 0, "type": "string", "value": "string", "isocode": "string", "translations": { "de": { "description": "string", "unit": "string" }, "en": { "description": "string", "unit": "string" }, "fr": { "description": "string", "unit": "string" }, "it": { "description": "string", "unit": "string" } } } ], "cost": 0, "taxRate": 0, "bookingAccountNumber": "string", "translations": { "de": { "productName": "string", "productDescription": "string" }, "en": { "productName": "string", "productDescription": "string" }, "fr": { "productName": "string", "productDescription": "string" }, "it": { "productName": "string", "productDescription": "string" } }, "productGroup": { "productGroupId": 0, "productGroupUuid": "bc144b55-1275-4824-afc1-781887fb7c1d", "productGroupNumber": 0, "productGroupDescription": "string", "productGroupBookingAccountNumber": 0, "productGroupBookingAccountId": 0 } } } ``` -------------------------------- ### Get Last Closure Date Source: https://abaninja.ch/apidocs/index Retrieves the last closure date for a specific employee. This endpoint requires the account UUID and employee UUID in the path. The response includes the start of the time tracking and the last closure date. ```json { "timeTrackingStart": "2019-08-24", "lastClosureDate": "2019-08-24" } ``` -------------------------------- ### Get Contract Note Actions API Endpoint (GET) Source: https://abaninja.ch/apidocs/index This endpoint retrieves the available actions for a specific contract note. It requires the account UUID and document UUID in the URL path. ```http GET https://api.abaninja.ch/accounts/{accountUuid}/documents/v2/contract-notes/{documentUuid}/actions ``` -------------------------------- ### Request Sample: Create Credit Note (JSON) Source: https://abaninja.ch/apidocs/index This is a sample JSON payload for creating a credit note. It includes details about the document, currency, receiver, invoice date, due date, and payment instructions. Ensure all required fields are populated correctly. ```json { "documents": [ { "documentUrl": "https://example.org/invoice.pdf", "documentData": { "currencyCode": "CHF", "receiver": { "addressUuid": "d48fa622-3ea1-4d2e-a588-d44604ab6b56", "companyUuid": "eb8908b5-a4e2-4538-bbc8-1c11cdb6ee0a", "contactPersonUuid": "736227b7-0093-446b-92d8-c984335b7ca9", "additionalReceivers": [ { "personUuid": "7d2a767e-d0ef-4ac1-8fcf-010dd5c2af04" } ] }, "invoiceDate": "2022-08-10", "dueDate": "2022-09-01", "deliveryDate": "2022-08-12", "paymentInstructions": { "iban": "CH2200784102000123454", "reference": "RF18000000000539007547034" }, "documentTotal": 107.7, "taxPositions": [ { "accountNumber": 1000, "isTaxIncluded": false, "amount": 100, "taxRate": 7.7 } ] } } ] } ``` -------------------------------- ### Employee Response Sample Source: https://abaninja.ch/apidocs/index Example JSON response for a successful employee creation or retrieval. Includes employee details, user information, and account-related identifiers. ```json { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "firstName": "string", "lastName": "string", "employeeNumber": "string", "birthDate": "2023-03-28", "employeeGroup": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "description": "string", "name": "string", "translations": { "de": { "description": "string", "name": "string" }, "en": { "description": "string", "name": "string" }, "fr": { "description": "string", "name": "string" }, "it": { "description": "string", "name": "string" } } }, "isActive": true, "user": { "id": 0, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "firstName": "string", "lastName": "string", "email": "max@mustermann.ch" }, "accountUuid": "0ef9c2ec-a65c-4311-aee8-decdbb35014b", "addressUuid": "ac453eba-e855-4d33-9d8a-d578082d651a", "timeTrackingStartDate": "2020-05-01", "timeTrackingStartDateEditable": true, "isPresent": true } ``` -------------------------------- ### Create Employee In/Out Entry Source: https://abaninja.ch/apidocs/index Creates a new time entry for an employee, marking their start or end time. Requires account and employee UUIDs, along with date and start time. Optionally accepts end time, comment, and device information. ```json { "date": "2020-04-14", "startTime": "14:23", "endTime": "16:55", "comment": "Nothing special" } ``` -------------------------------- ### List template actions Source: https://abaninja.ch/apidocs/index This section describes how to list available template actions, including authorization details and path parameters. ```APIDOC ## List template actions ### Description This endpoint allows listing available template actions. ### Method GET ### Endpoint /list/template/actions ### Parameters #### Path Parameters - **accountUuid** (string) - Required - UUID of the account. - **documentUuid** (string) - Required - UUID of the template document. ### Authorizations - accessCode - bearerAuth ``` -------------------------------- ### API Endpoint: Get Credit Note (GET) Source: https://abaninja.ch/apidocs/index This endpoint retrieves an existing credit note using its account UUID and document UUID. It returns the credit note details upon successful retrieval (200 OK) or a 'Not Found' message (404). ```HTTP GET /accounts/{accountUuid}/documents/v2/credit-notes/{documentUuid} ``` -------------------------------- ### GET /accounts/{accountUuid}/products/v2/{productUuid}/actions Source: https://abaninja.ch/apidocs/index Retrieves available actions for an existing product within a specific account. ```APIDOC ## Available actions for an existing product ### Description Retrieves a list of available actions that can be performed on an existing product within a specific account. ### Method GET ### Endpoint /accounts/{accountUuid}/products/v2/{productUuid}/actions ### Parameters #### Path Parameters - **accountUuid** (string) - Required - UUID of the account where the product is located. - **productUuid** (string) - Required - UUID of the product. ### Responses #### Success Response (200) - **status** (integer) - Indicates the success of the operation (0 for success). - **message** (string) - A message describing the response. - **data** (array of strings) - A list of available actions for the product. #### Error Response (404) - **status** (integer) - Indicates an error. - **message** (string) - A message indicating that the AccountUuid or ProductUuid is unknown. ### Response Example (200) ```json { "status": 0, "message": "string", "data": [ "string" ] } ``` ``` -------------------------------- ### Get Company Addresses List (GET /accounts/{accountUuid}/addresses/v2/companies) Source: https://abaninja.ch/apidocs/index Retrieves a list of company addresses for a given account. Supports pagination and filtering by tags. Responses include a list of addresses on success (200) or various error codes for authentication and not found scenarios. ```json { "openapi": "3.0.0", "info": { "title": "AbaNinja API", "version": "2.0.4" }, "paths": { "/accounts/{accountUuid}/addresses/v2/companies": { "get": { "summary": "Get a list of company addresses for given account", "description": "This return a list of available company addresses for the given account", "parameters": [ { "name": "accountUuid", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "page", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "limit", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "tags[]", "in": "query", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "List of Addresses", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "type": {"type": "string"}, "uuid": {"type": "string", "format": "uuid"}, "customer_number": {"type": "string"}, "name": {"type": "string"}, "id_number": {"type": "string"}, "vat_number": {"type": "string"}, "currency_code": {"type": "string"}, "language": {"type": "string"}, "contact_persons": { "type": "array", "items": { "type": "object", "properties": { "uuid": {"type": "string", "format": "uuid"}, "first_name": {"type": "string"}, "last_name": {"type": "string"}, "salutation": {"type": "string"}, "contacts": { "type": "array", "items": { "type": "object", "properties": { "type": {"type": "string"}, "value": {"type": "string"}, "is_primary": {"type": "boolean"} } } } } } }, "tags": {"type": "array", "items": {"type": "string"}}, "contacts": { "type": "array", "items": { "type": "object", "properties": { "type": {"type": "string"}, "value": {"type": "string"}, "is_primary": {"type": "boolean"} } } }, "addresses": { "type": "array", "items": { "type": "object", "properties": { "uuid": {"type": "string", "format": "uuid"}, "address": {"type": "string"}, "street_number": {"type": "string"}, "extension": {"type": "string"}, "additional_field": {"type": "string"}, "city": {"type": "string"}, "zip_code": {"type": "string"}, "country_code": {"type": "string"}, "state": {"type": "string"} } } }, "private_notes": {"type": "string"}, "automatic_dunning": {"type": "boolean"}, "payment_terms": {"type": "integer"} } } }, "links": { "type": "object", "properties": { "first": {"type": "string"}, "last": {"type": "string"}, "prev": {"type": "string"}, "next": {"type": "string"} } }, "meta": { "type": "object", "properties": { "current_page": {"type": "integer"}, "from": {"type": "integer"}, "last_page": {"type": "integer"}, "path": {"type": "string"}, "per_page": {"type": "integer"}, "to": {"type": "integer"}, "total": {"type": "integer"} } } } } } } }, "400": {"description": "error"}, "401": {"description": "Access Token expired"}, "403": {"description": "Client / Token is not allowed"}, "404": {"description": "Not Found"} } } } } } ``` -------------------------------- ### Get Single Company Details (GET /accounts/{accountUuid}/addresses/v2/companies/{companyUuid}) Source: https://abaninja.ch/apidocs/index Retrieves detailed information for a specific company based on account UUID and company UUID. Returns the company data on success (200) or error codes for authentication, invalid input, or not found scenarios. ```json { "openapi": "3.0.0", "info": { "title": "AbaNinja API", "version": "2.0.4" }, "paths": { "/accounts/{accountUuid}/addresses/v2/companies/{companyUuid}": { "get": { "summary": "Single company", "description": "Returns data for one company only", "parameters": [ { "name": "accountUuid", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "companyUuid", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" }, "description": "The id of the address" } ], "responses": { "200": { "description": "Requested company" }, "400": {"description": "error"}, "401": {"description": "Access Token expired"}, "403": {"description": "Client / Token is not allowed"}, "404": {"description": "Not Found"} } } } } } ``` -------------------------------- ### Request Sample: Create Credit Note (JSON) Source: https://abaninja.ch/apidocs/index This JSON payload demonstrates the structure for creating a credit note. It includes details about the receiver, currency, document totals, terms, and line items (positions). ```JSON { "documents": [ { "isTemplate": false, "receiver": { "addressUuid": "19a97816-85e8-49a2-8be0-a045e10edfbb", "companyUuid": "82b7faf3-a893-4c00-b28d-9a52807926db", "contactPersonUuid": "7b606c4e-9a95-4cb2-b88a-bc565113703c", "additionalReceivers": [ { "personUuid": "aaa61110-04cb-4b61-9463-b6f108d111cf" }, { "personUuid": "cbc205dd-9f13-4066-9e11-a786a14e1875" } ]}, "currencyCode": "CHF", "title": "Custom Invoice Title", "reference": "our reference", "customField1": "custom 1", "customField2": "custom 2", "customField3": "custom 3", "customField4": "custom 4", "creditNoteDate": "2021-11-26", "dueDate": "2021-12-26", "pricesIncludeVat": false, "documentTotal": 50, "documentDiscount": { "amount": 0 }, "cashDiscounts": [ { "days": 5, "percentage": 2 }, { "days": 7, "percentage": 1.5 }, { "days": 9, "percentage": 0.5 } ], "terms": "here you can define terms and conditions in a free text form", "publicNotes": "here you can add notes to your invoice which are public available", "footerText": "My custom invoice footer", "positions": [ { "kind": "subtitle", "positionNumber": 1, "title": "My Product Subtitle" }, { "kind": "product", "positionNumber": 2, "productNumber": "T0001", "productDescription": "A Test product description for a test json", "quantity": 2.5, "singlePrice": 10, "positionTotal": 25, "discount": { "amount": 0 }, "vat": { "percentage": 0, "amount": 0 } }, { "kind": "product", "positionNumber": 3, "productNumber": "T0002", "productDescription": "Another Test product description for a test json", "quantity": 2.5, "singlePrice": 10, "positionTotal": 25, "discount": { "amount": 0 }, "vat": { "percentage": 0, "amount": 0 } }, { "kind": "section_total", "positionNumber": 4 }, { "kind": "divider", "positionNumber": 5 }, { "kind": "product", "positionNumber": 6, "productDescription": "Free Product", "quantity": 1, "singlePrice": 0, "positionTotal": 0, "discount": { "amount": 0 }, "vat": { "percentage": 0, "amount": 0 } } ] } ] } ``` -------------------------------- ### Get Quote Actions Source: https://abaninja.ch/apidocs/index Retrieves the available actions that can be performed on a specific quote. ```APIDOC ## GET /accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions ### Description This endpoint retrieves a list of actions that can be performed on a specific quote, identified by its UUID and the account UUID. ### Method GET ### Endpoint /accounts/{accountUuid}/documents/v2/quotes/{documentUuid}/actions ### Parameters #### Path Parameters - **accountUuid** (string) - Required - UUID of the account. - **documentUuid** (string) - Required - UUID of the quote. ### Responses #### Success Response (200) - **Quote allowed actions results** #### Error Responses - **400**: Validation or Data error - **404**: Quote not found ``` -------------------------------- ### Create Work Model Response Sample (JSON) Source: https://abaninja.ch/apidocs/index This is a sample JSON response after successfully creating a work model. It echoes the details of the created work model, including its UUID, hours, holidays, daily availability, usage status, and translations. This response confirms the creation and provides the new work model's identifier. ```json { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "hoursPerWeek": 0, "holidaysPerYear": 0, "monday": true, "tuesday": true, "wednesday": true, "thursday": true, "friday": true, "saturday": true, "sunday": true, "isUsed": true, "isSystem": true, "description": "string", "name": "string", "translations": { "de": { "description": "string", "name": "string" }, "en": { "description": "string", "name": "string" }, "fr": { "description": "string", "name": "string" }, "it": { "description": "string", "name": "string" } } } ```