### SuperFaktura Client Initialization Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Demonstrates how to initialize the main SuperFaktura client class with necessary credentials. ```APIDOC ## SuperFaktura Client Initialization ### Description Initializes the main `SuperFaktura` client class, which handles API calls, request serialization, and response deserialization. It enforces a delay of at least 1 second between API calls. ### Constructor `SuperFaktura(string email, string apiKey, string apptitle = null, string module = "API", int? companyId = null)` ### Parameters - **email** (string) - Required - The email address associated with your SuperFaktura account. - **apiKey** (string) - Required - Your SuperFaktura API key. - **apptitle** (string) - Optional - A title for your application. - **module** (string) - Optional - The API module to use (defaults to "API"). - **companyId** (int?) - Optional - The ID of the company to interact with. ``` -------------------------------- ### Initialize SuperFaktura Client Source: https://context7.com/birko/superfakturaapi.net/llms.txt Configure the client for specific regions or environments using credentials from your SuperFaktura account. ```csharp using Birko.SuperFaktura; // Initialize client for Slovakia var client = new SuperFaktura( email: "your@email.com", apiKey: "your-api-key", apptitle: "MyApp", module: "API", companyId: 12345 ); // Configure client options client.EnsureSuccessStatusCode = true; // Throw on HTTP errors client.TimeoutSeconds = 30; // Request timeout // For Czech Republic var clientCZ = new SuperFakturaCZ("your@email.com", "your-api-key"); // For Austria var clientAT = new SuperFakturaAT("your@email.com", "your-api-key"); // For sandbox/testing environment var sandboxClient = new SuperFakturaSandbox("your@email.com", "your-api-key"); ``` -------------------------------- ### Access Other API Utilities in C# Source: https://context7.com/birko/superfakturaapi.net/llms.txt Demonstrates how to use the Other client to access features like user accounts, SMS sending, bank movements, and activity logs. Ensure you have the necessary using directives for Birko.SuperFaktura and Birko.SuperFaktura.Request.Other. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Other; var client = new SuperFaktura("your@email.com", "your-api-key"); // List user accounts var accounts = await client.Other.ListAccounts(); Console.WriteLine($"Accounts: {accounts}"); // List user companies var companies = await client.Other.ListUserCompanies(all: true); foreach (var company in companies) { Console.WriteLine($"Company: {company}"); } // Send SMS notification var sms = new SMS { InvoiceID = 12345, Message = "Your invoice #12345 is ready. Amount due: 500 EUR" }; var sentSms = await client.Other.SendSMS(sms); Console.WriteLine($"SMS sent"); // List bank account movements var filter = new BankMovementFilter { Page = 1, PerPage = 50 }; var movements = await client.Other.ListBankAccountMovements(filter); foreach (var movement in movements.Items) { Console.WriteLine($"Movement: {movement}"); } // Get activity logs for a document var logs = await client.Other.ListActivityLogs( documentType: "invoice", documentId: 12345, limit: 10 ); foreach (var log in logs) { Console.WriteLine($"Activity: {log}"); } ``` -------------------------------- ### Manage Clients: Create, List, Update, View, Delete Source: https://context7.com/birko/superfakturaapi.net/llms.txt Perform CRUD operations on client records. Includes creating a new client with detailed address and billing information, listing clients with filtering options, updating existing clients, viewing a single client's details, and deleting a client. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Client; var client = new SuperFaktura("your@email.com", "your-api-key"); // Create a new client var newClient = new Client { Name = "Tech Solutions Ltd", Address = "456 Innovation Avenue", City = "Prague", ZIP = "11000", CountryID = 57, // Czech Republic Email = "contact@techsolutions.com", Phone = "+420 123 456 789", ICO = "87654321", DIC = "CZ87654321", IBAN = "CZ6508000000192000145399", SWIFT = "GIBACZPX", Currency = "CZK", DueDate = 30 }; var createdClient = await client.Clients.Add(newClient, tags: new[] { 1, 3 }); Console.WriteLine($"Client created: {createdClient.ID}"); // List clients with filter var filter = new Filter { Search = "Tech", Page = 1, PerPage = 20 }; var clients = await client.Clients.List(filter); foreach (var item in clients.Items) { Console.WriteLine($"Client: {item.Client.Name} ({item.Client.Email})"); } // Update client newClient.Phone = "+420 987 654 321"; await client.Clients.Edit(createdClient.ID.Value, newClient); // View single client var clientDetail = await client.Clients.View(createdClient.ID.Value); Console.WriteLine($"Client stats: {clientDetail.ClientStat}"); // Delete client await client.Clients.Delete(createdClient.ID.Value); ``` -------------------------------- ### Export Data with SuperFaktura API Source: https://context7.com/birko/superfakturaapi.net/llms.txt Shows how to initiate a bulk export, poll for status, and download the resulting file once completed. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Export; using Birko.SuperFaktura.Request.ValueLists; var client = new SuperFaktura("your@email.com", "your-api-key"); // Create export request var exportRequest = new ExportData { InvoiceIds = new[] { 1, 2, 3, 4, 5 }, Type = "pdf" }; var export = await client.Exports.Export(exportRequest); Console.WriteLine($"Export initiated: {export.ID}"); // Check export status Response.Export.Export status; do { await Task.Delay(2000); // Wait 2 seconds status = await client.Exports.Status(export.ID.Value); Console.WriteLine($"Export status: {status.Status}"); } while (status.Status == ExportStatus.InProgress || status.Status == ExportStatus.Scheduled); // Download completed export if (status.Status == ExportStatus.Completed) { byte[] exportData = await client.Exports.Download(export.ID.Value); await File.WriteAllBytesAsync("export.zip", exportData); Console.WriteLine($"Export downloaded: {exportData.Length} bytes"); } ``` -------------------------------- ### Check API Rate Limits in C# Source: https://context7.com/birko/superfakturaapi.net/llms.txt Shows how to monitor API rate limit status after making a request. The client's RateLimit property will be populated if the API response includes rate limit information. ```csharp using Birko.SuperFaktura; var client = new SuperFaktura("your@email.com", "your-api-key"); // Make any API call await client.Invoices.List(new Request.Invoice.Filter { Page = 1 }); // Check rate limits after the call if (client.RateLimit != null) { Console.WriteLine($"Daily Limit: {client.RateLimit.Daily?.Limit}"); Console.WriteLine($"Daily Remaining: {client.RateLimit.Daily?.Remaining}"); Console.WriteLine($"Daily Reset: {client.RateLimit.Daily?.Reset}"); Console.WriteLine($"Monthly Limit: {client.RateLimit.Monthly?.Limit}"); Console.WriteLine($"Monthly Remaining: {client.RateLimit.Monthly?.Remaining}"); Console.WriteLine($"Monthly Reset: {client.RateLimit.Monthly?.Reset}"); if (!string.IsNullOrEmpty(client.RateLimit.Message)) { Console.WriteLine($"Rate Limit Message: {client.RateLimit.Message}"); } } ``` -------------------------------- ### Download Invoice PDF with Options Source: https://context7.com/birko/superfakturaapi.net/llms.txt Download an invoice as a PDF byte array. Supports options for signature, QR code, and PayPal button. Requires an invoice token obtained by viewing the invoice first. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.ValueLists; var client = new SuperFaktura("your@email.com", "your-api-key"); // Get invoice to retrieve token var invoice = await client.Invoices.View(12345); // Download PDF with options byte[] pdfBytes = await client.Invoices.Download( invoiceId: 12345, token: invoice.Invoice.Token, language: LanguageType.English, signature: true, bySquare: true, paypal: false ); // Save to file await File.WriteAllBytesAsync("invoice_12345.pdf", pdfBytes); Console.WriteLine($"PDF saved: {pdfBytes.Length} bytes"); // Download receipt byte[] receiptBytes = await client.Invoices.DownloadReceipt(12345); await File.WriteAllBytesAsync("receipt_12345.pdf", receiptBytes); ``` -------------------------------- ### Create an Invoice Source: https://context7.com/birko/superfakturaapi.net/llms.txt Construct invoice, client, and item objects to add a new invoice via the Invoices API. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Client; using Birko.SuperFaktura.Request.Invoice; var client = new SuperFaktura("your@email.com", "your-api-key"); // Create invoice with client and items var invoice = new Invoice { Name = "Invoice 2024-001", InvoiceType = ValueLists.InvoiceType.Regular, InvoiceCurrency = "EUR", PaymentType = ValueLists.PaymentType.BankTransfer, DueDate = DateTime.Now.AddDays(14), Delivery = DateTime.Now, Comment = "Thank you for your business" }; var invoiceClient = new Client { Name = "ACME Corporation", Address = "123 Business Street", City = "Bratislava", ZIP = "81101", Email = "billing@acme.com", ICO = "12345678", DIC = "SK2012345678" }; var items = new Item[] { new Item { Name = "Web Development Services", Description = "Frontend development - 40 hours", Quantity = 40, Unit = "hour", UnitPrice = 50.00m, Tax = 20 }, new Item { Name = "Server Hosting", Description = "Monthly hosting fee", Quantity = 1, Unit = "month", UnitPrice = 29.99m, Tax = 20 } }; var result = await client.Invoices.Add( invoice: invoice, client: invoiceClient, items: items, tags: new int[] { 1, 2 } ); Console.WriteLine($"Invoice created: {result.Invoice.ID}"); Console.WriteLine($"Invoice number: {result.Invoice.InvoiceNoFormatted}"); ``` -------------------------------- ### Manage Tags with SuperFaktura API Source: https://context7.com/birko/superfakturaapi.net/llms.txt Demonstrates creating, listing, updating, and deleting tags used for organizing invoices, expenses, and clients. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Tags; var client = new SuperFaktura("your@email.com", "your-api-key"); // Create tag var tag = new Tag { Name = "Priority Client" }; var created = await client.Tags.Add(tag); Console.WriteLine($"Tag created: {created.Tag.ID}"); // List all tags var tags = await client.Tags.List(); foreach (var kvp in tags) { Console.WriteLine($"Tag {kvp.Key}: {kvp.Value}"); } // Update tag tag.Name = "VIP Client"; await client.Tags.Edit(created.Tag.ID.Value, tag); // Delete tag await client.Tags.Delete(created.Tag.ID.Value); ``` -------------------------------- ### Retrieve Value Lists and Reference Data Source: https://context7.com/birko/superfakturaapi.net/llms.txt Provides methods to fetch system reference data such as countries, expense categories, logos, and invoice sequences. ```csharp using Birko.SuperFaktura; var client = new SuperFaktura("your@email.com", "your-api-key"); // Get countries list var countries = await client.ValueLists.ListCountries(); foreach (var country in countries) { Console.WriteLine($"Country {country.Key}: {country.Value}"); } // Get full country details var countriesFull = await client.ValueLists.ListCountriesFull(); foreach (var country in countriesFull) { Console.WriteLine($"{country.Name} (ISO: {country.IsoShort})"); } // Get expense categories var categories = await client.ValueLists.ListExpenseCategories(); foreach (var category in categories) { Console.WriteLine($"Category: {category.Name}"); } // Get available logos var logos = await client.ValueLists.ListLogos(); foreach (var logo in logos) { Console.WriteLine($"Logo: {logo.ID}"); } // Get invoice sequences var sequences = await client.ValueLists.ListSequences(); foreach (var seqType in sequences) { Console.WriteLine($"Sequence type: {seqType.Key}"); foreach (var seq in seqType.Value) { Console.WriteLine($" - {seq.Name}: {seq.Value}"); } } ``` -------------------------------- ### Clients API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Provides methods for managing clients. ```APIDOC ## Clients API ### Description This class wraps the SuperFaktura API calls for managing clients. ### Methods #### List - **Description**: Returns a list of clients based on filter criteria. - **Method**: POST (assumed) - **Endpoint**: /clients/list (assumed) - **Parameters**: - **filter** (`Request.Client.Filter`) - Required - Filter criteria for clients. - **listInfo** (bool) - Optional - Whether to include additional information (defaults to true). #### Add - **Description**: Adds a new client. - **Method**: POST (assumed) - **Endpoint**: /clients (assumed) - **Request Body**: `Request.Client.Client client` - The client data to add. - **Parameters**: - **tags** (int[]) - Optional - An array of tag IDs to associate with the client. #### Edit - **Description**: Edits an existing client. - **Method**: PUT (assumed) - **Endpoint**: /clients/{id} (assumed) - **Parameters**: - **id** (int) - Required - The ID of the client to edit. - **Request Body**: `Request.Client.Client client` - The updated client data. - **Parameters**: - **tags** (int[]) - Optional - An array of tag IDs to associate with the client. #### View - **Description**: Retrieves the details of a specific client. - **Method**: GET (assumed) - **Endpoint**: /clients/{id} (assumed) - **Parameters**: - **id** (int) - Required - The ID of the client to view. #### Delete - **Description**: Deletes a client. - **Method**: DELETE (assumed) - **Endpoint**: /clients/{id} (assumed) - **Parameters**: - **id** (int) - Required - The ID of the client to delete. ``` -------------------------------- ### Add Payment to Invoice Source: https://context7.com/birko/superfakturaapi.net/llms.txt Record a payment against an invoice. Supports various payment methods, currencies, and includes options to set the document number and date. Also shows how to delete a payment. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Invoice; using Birko.SuperFaktura.Request.ValueLists; var client = new SuperFaktura("your@email.com", "your-api-key"); var payment = new Payment { InvoiceID = 12345, Amount = 500.00m, Currency = "EUR", PaymentType = PaymentType.BankTransfer, Date = DateTime.Now, DocumentNumber = "PAY-2024-001" }; var result = await client.Invoices.AddPayment(payment); Console.WriteLine($"Payment recorded successfully"); Console.WriteLine($"Invoice status: {result.Invoice.Status}"); // Delete payment if needed var deleteResult = await client.Invoices.DeletePayment(paymentId: 9876); ``` -------------------------------- ### Manage Business Expenses Source: https://context7.com/birko/superfakturaapi.net/llms.txt Create, list, and manage payments for business expenses. Requires the Birko.SuperFaktura namespace. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Expense; using Birko.SuperFaktura.Request.ValueLists; var client = new SuperFaktura("your@email.com", "your-api-key"); // Create new expense var expense = new Expense { Name = "Office Supplies", Amount = 150.00m, VAT = 20, Currency = "EUR", ExpenseType = ExpenseType.Invoice, PaymentType = PaymentType.Card, Created = DateTime.Now, Delivery = DateTime.Now, Due = DateTime.Now.AddDays(14), Comment = "Monthly office supplies purchase", Variable = "VS123456" }; var created = await client.Expenses.Add(expense); Console.WriteLine($"Expense created: {created.Expense.ID}"); // List expenses with filter var filter = new Filter { Created = TimeFilterConstants.ThisMonth, Status = ExpenseStatus.New, Page = 1 }; var expenses = await client.Expenses.List(filter); foreach (var item in expenses.Items) { Console.WriteLine($"Expense: {item.Expense.Name} - {item.Expense.Amount} {item.Expense.Currency}"); } // Add payment to expense var payment = new Payment { ExpenseID = created.Expense.ID.Value, Amount = 150.00m, Currency = "EUR", PaymentType = PaymentType.BankTransfer }; await client.Expenses.AddPayment(payment); // Download expense attachments byte[] attachment = await client.Expenses.DownloadAttachments(created.Expense.ID.Value); ``` -------------------------------- ### Manage Bank Accounts Source: https://context7.com/birko/superfakturaapi.net/llms.txt Configure and manage bank account details for invoices. Requires the Birko.SuperFaktura.Request.BankAccounts namespace. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.BankAccounts; var client = new SuperFaktura("your@email.com", "your-api-key"); // Add bank account var bankAccount = new BankAccount { BankName = "Tatra Banka", Account = "2629477091", BankCode = "1100", IBAN = "SK3111000000002629477091", SWIFT = "TATRSKBX", Currency = "EUR", CountryID = 191, // Slovakia Default = true, Show = true, ShowAccount = true }; var created = await client.BankAccounts.Add(bankAccount); Console.WriteLine($"Bank account added: {created.ID}"); // List all bank accounts var accounts = await client.BankAccounts.List(); foreach (var account in accounts) { Console.WriteLine($"Account: {account.BankName} - {account.IBAN}"); } // Update bank account bankAccount.Default = false; await client.BankAccounts.Edit(created.ID.Value, bankAccount); // Delete bank account await client.BankAccounts.Delete(created.ID.Value); ``` -------------------------------- ### Manage Contact Persons: Add, List, Delete Source: https://context7.com/birko/superfakturaapi.net/llms.txt Add and manage contact persons associated with clients. This includes adding a new contact person to an existing client, listing all contact persons for a specific client, and deleting a contact person. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.ContactPersons; var client = new SuperFaktura("your@email.com", "your-api-key"); // Add contact person to existing client var contactPerson = new ContactPerson { ClientID = 12345, Name = "John Smith", Email = "john.smith@company.com", Phone = "+421 900 123 456" }; var created = await client.ContactPersons.Add(contactPerson); Console.WriteLine($"Contact person added: {created.ID}"); // List all contact persons for a client var contacts = await client.ContactPersons.List(clientId: 12345); foreach (var contact in contacts) { Console.WriteLine($"Contact: {contact.Name} - {contact.Email}"); } // Delete contact person await client.ContactPersons.Delete(created.ID.Value); ``` -------------------------------- ### Manage Stock Items Source: https://context7.com/birko/superfakturaapi.net/llms.txt Perform inventory tracking, stock movements, and item updates. Requires the Birko.SuperFaktura.Request.Stock namespace. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Stock; var client = new SuperFaktura("your@email.com", "your-api-key"); // Create stock item var stockItem = new Item { Name = "USB-C Cable 2m", Description = "High-quality USB-C to USB-C cable, 2 meters", SKU = "CABLE-USBC-2M", Unit = "pcs", UnitPrice = 12.99m, PurchaseUnitPrice = 5.50f, VAT = 20, Stock = 100, WatchStock = true }; var created = await client.Stock.Add(stockItem); Console.WriteLine($"Stock item created: {created.StockItem.ID}"); // List stock items var filter = new Filter { Search = "USB", Page = 1, PerPage = 50 }; var stockItems = await client.Stock.List(filter); foreach (var item in stockItems.Items) { Console.WriteLine($"Item: {item.StockItem.Name} - Qty: {item.StockItem.Stock}"); } // Add stock movement (receiving goods) var stockLog = new Log { StockItemID = created.StockItem.ID.Value, Quantity = 50, Note = "Received from supplier" }; var movements = await client.Stock.AddStockMovement(stockLog); Console.WriteLine($"Stock updated, new movements recorded: {movements.Count()}"); // View stock movements history var movementHistory = await client.Stock.ListStockMovements( id: created.StockItem.ID.Value, filter: new PagedParameters { Page = 1 } ); foreach (var movement in movementHistory.Items) { Console.WriteLine($"Movement: {movement.StockLog.Quantity} - {movement.StockLog.Note}"); } // Update stock item stockItem.UnitPrice = 14.99m; await client.Stock.Edit(created.StockItem.ID.Value, stockItem); // Delete stock item await client.Stock.Delete(created.StockItem.ID.Value); ``` -------------------------------- ### ValueLists API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Endpoints for retrieving system-defined value lists and constants. ```APIDOC ## GET /ValueLists/ListCountries ### Description Gets country names and IDs as a dictionary. ### Method GET ## GET /ValueLists/ListCountriesFull ### Description Gets the full country list. ### Method GET ## GET /ValueLists/ListExpenseCategories ### Description Gets a list of expense categories. ### Method GET ## GET /ValueLists/ListLogos ### Description Gets a list of uploaded logos. ### Method GET ## GET /ValueLists/ListSequences ### Description Gets available sequences as a dictionary. ### Method GET ``` -------------------------------- ### Manage Cash Registers with SuperFaktura API Source: https://context7.com/birko/superfakturaapi.net/llms.txt Covers listing registers, adding items, retrieving item lists, downloading receipts, and deleting register entries. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.CashRegister; var client = new SuperFaktura("your@email.com", "your-api-key"); // List cash registers var registers = await client.CashRegisters.List(); foreach (var register in registers) { Console.WriteLine($"Register: {register.Name} - Balance: {register.CashCurrent}"); } // View specific cash register var registerDetail = await client.CashRegisters.View(1); // Add cash register item var item = new CashRegisterItem { CashRegisterID = 1, Amount = 50.00m, Currency = "EUR", Description = "Cash sale - misc items" }; var addedItem = await client.CashRegisters.AddItem(item); // List items in cash register var filter = new Filter { CashRegisterID = 1, Page = 1 }; var items = await client.CashRegisters.ListItems(filter); foreach (var cashItem in items.Items) { Console.WriteLine($"Item: {cashItem.CashRegisterItem.Amount}"); } // Download receipt PDF byte[] receipt = await client.CashRegisters.Download(addedItem.CashRegisterItem.ID.Value); await File.WriteAllBytesAsync("receipt.pdf", receipt); // Delete cash register item await client.CashRegisters.DeleteItem(addedItem.CashRegisterItem.ID.Value); ``` -------------------------------- ### List and Filter Invoices Source: https://context7.com/birko/superfakturaapi.net/llms.txt Retrieve paginated invoice lists using filter criteria or fetch details for a specific invoice by ID. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Invoice; using Birko.SuperFaktura.Request.ValueLists; var client = new SuperFaktura("your@email.com", "your-api-key"); // Create filter for listing invoices var filter = new Filter { Type = InvoiceType.Regular, Status = InvoiceStatus.Issued, Created = TimeFilterConstants.ThisMonth, PaymentType = PaymentType.BankTransfer, Page = 1, PerPage = 50, Sort = "created", Direction = "DESC" }; // Get paginated list of invoices var response = await client.Invoices.List(filter, listInfo: true); Console.WriteLine($"Total invoices: {response.ItemCount}"); Console.WriteLine($"Pages: {response.PageCount}"); foreach (var invoice in response.Items) { Console.WriteLine($"Invoice {invoice.Invoice.InvoiceNoFormatted}: {invoice.Invoice.Total} EUR"); } // Get specific invoice details var invoiceDetail = await client.Invoices.View(12345); Console.WriteLine($"Invoice: {invoiceDetail.Invoice.Name}"); Console.WriteLine($"Client: {invoiceDetail.Client.Name}"); ``` -------------------------------- ### Expenses API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Provides methods for handling expenses. ```APIDOC ## Expenses API ### Description This class wraps all API calls for expenses handling in SuperFaktura. ### Methods (Specific methods for Expenses API are not detailed in the provided text, but the class is available for use.) ``` -------------------------------- ### Export API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Endpoints for handling data exports. ```APIDOC ## POST /Exports/Export ### Description Creates an export request. ### Method POST ### Request Body - **export** (Request.Export.ExportData) - Required - Export data ## GET /Exports/Status ### Description Shows export status by ID. ### Method GET ### Parameters #### Query Parameters - **id** (int) - Required - Export ID ``` -------------------------------- ### Stock Items API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Endpoints for managing stock items and their movement logs. ```APIDOC ## GET /Stock/List ### Description Gets a list of stock items based on the provided filter. ### Method GET ### Parameters #### Query Parameters - **filter** (Filter) - Required - Filter criteria for stock items - **listInfo** (bool) - Optional - Flag to include list information ## POST /Stock/Add ### Description Adds a new stock item. ### Method POST ### Request Body - **item** (Request.Stock.Item) - Required - The stock item details ## PUT /Stock/Edit ### Description Edits an existing stock item. ### Method PUT ### Parameters #### Path Parameters - **id** (int) - Required - The ID of the stock item #### Request Body - **item** (Request.Stock.Item) - Required - The updated stock item details ## GET /Stock/View ### Description Gets the details of a specific stock item. ### Method GET ### Parameters #### Query Parameters - **id** (int) - Required - The ID of the stock item ## DELETE /Stock/Delete ### Description Deletes a stock item. ### Method DELETE ### Parameters #### Query Parameters - **id** (int) - Required - The ID of the stock item ## POST /Stock/AddStockMovement ### Description Adds stock movement logs to a stock item. ### Method POST ### Request Body - **items** (IEnumerable) - Required - Collection of movement logs ## GET /Stock/ListStockMovements ### Description Gets stock movements for a specific item. ### Method GET ### Parameters #### Query Parameters - **id** (int) - Required - The ID of the stock item - **filter** (Request.PagedParameters) - Required - Pagination and filter parameters - **listInfo** (bool) - Optional - Flag to include list information ``` -------------------------------- ### Tags API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Endpoints for managing stored tags. ```APIDOC ## GET /Tags/List ### Description Gets a list of stored tags. ### Method GET ## POST /Tags/Add ### Description Adds a new tag. ### Method POST ### Request Body - **tag** (Request.Tags.Tag) - Required - The tag details ## PUT /Tags/Edit ### Description Edits an existing tag. ### Method PUT ### Parameters #### Path Parameters - **id** (int) - Required - The ID of the tag #### Request Body - **tag** (Request.Tags.Tag) - Required - The updated tag details ## DELETE /Tags/Delete ### Description Deletes a tag. ### Method DELETE ### Parameters #### Query Parameters - **id** (int) - Required - The ID of the tag ``` -------------------------------- ### Cash Registers API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Provides methods for managing cash registers and their items. ```APIDOC ## Cash Registers API ### Description This class wraps the SuperFaktura API calls for cash registers. ### Methods #### List - **Description**: Returns a list of cash registers. - **Method**: GET (assumed) - **Endpoint**: /cash_registers (assumed) #### View - **Description**: Retrieves the details of a specific cash register. - **Method**: GET (assumed) - **Endpoint**: /cash_registers/{id} (assumed) - **Parameters**: - **id** (int) - Required - The ID of the cash register to view. #### ListItems - **Description**: Retrieves all items within a cash register based on filter criteria. - **Method**: POST (assumed) - **Endpoint**: /cash_registers/items/list (assumed) - **Request Body**: `Request.CashRegister.Filter filter` #### AddItem - **Description**: Adds a new item to a cash register. - **Method**: POST (assumed) - **Endpoint**: /cash_registers/items (assumed) - **Request Body**: `Request.CashRegister.CashRegisterItem item` #### DeleteItem (single) - **Description**: Deletes a cash register item by its ID. - **Method**: DELETE (assumed) - **Endpoint**: /cash_registers/items/{id} (assumed) - **Parameters**: - **id** (int) - Required - The ID of the item to delete. #### DeleteItem (multiple) - **Description**: Deletes multiple cash register items by their IDs. - **Method**: DELETE (assumed) - **Endpoint**: /cash_registers/items (assumed) - **Request Body**: `int[] ids` - An array of item IDs to delete. #### Download - **Description**: Downloads a PDF receipt for a cash register item. - **Method**: GET (assumed) - **Endpoint**: /cash_registers/items/{id}/download (assumed) - **Parameters**: - **id** (int) - Required - The ID of the cash register item for which to download the receipt. - **Returns**: Byte array representing the PDF file. ``` -------------------------------- ### Bank Accounts API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Provides methods for managing bank accounts via the SuperFaktura API. ```APIDOC ## Bank Accounts API ### Description This class wraps the SuperFaktura API calls related to bank accounts. ### Methods #### List - **Description**: Returns a list of bank accounts. - **Method**: GET (assumed) - **Endpoint**: /bank_accounts (assumed) #### Add - **Description**: Adds a new bank account. - **Method**: POST (assumed) - **Endpoint**: /bank_accounts (assumed) - **Request Body**: `Request.BankAccounts.BankAccount account` #### Edit - **Description**: Edits an existing bank account. - **Method**: PUT (assumed) - **Endpoint**: /bank_accounts/{id} (assumed) - **Parameters**: - **id** (int) - Required - The ID of the bank account to edit. - **Request Body**: `Request.BankAccounts.BankAccount account` #### Delete - **Description**: Deletes a bank account. - **Method**: DELETE (assumed) - **Endpoint**: /bank_accounts/{id} (assumed) - **Parameters**: - **id** (int) - Required - The ID of the bank account to delete. ``` -------------------------------- ### Contact Persons API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Provides methods for managing contact persons associated with clients. ```APIDOC ## Contact Persons API ### Description This class wraps the SuperFaktura API calls for managing contact persons. ### Methods #### List - **Description**: Returns a list of contact persons for a given client. - **Method**: GET (assumed) - **Endpoint**: /clients/{id}/contact_persons (assumed) - **Parameters**: - **id** (int) - Required - The ID of the client whose contact persons to list. #### Add - **Description**: Adds a new contact person. - **Method**: POST (assumed) - **Endpoint**: /contact_persons (assumed) - **Request Body**: `Request.ContactPersons.ContactPerson contactPerson` - The contact person data to add. #### Delete - **Description**: Deletes a contact person. - **Method**: DELETE (assumed) - **Endpoint**: /contact_persons/{id} (assumed) - **Parameters**: - **id** (int) - Required - The ID of the contact person to delete. ``` -------------------------------- ### Send Invoice via Email Source: https://context7.com/birko/superfakturaapi.net/llms.txt Send an invoice directly to a client's email address. Allows customization of the subject, message, CC/BCC recipients, and PDF language. Includes an option to mark an invoice as sent without actual email transmission. ```csharp using Birko.SuperFaktura; using Birko.SuperFaktura.Request.Invoice; var client = new SuperFaktura("your@email.com", "your-api-key"); var email = new Email { InvoiceID = 12345, To = "customer@example.com", Subject = "Invoice #2024-001 from ACME Corp", Message = "Please find attached your invoice. Payment is due within 14 days.", Cc = new[] { "accounting@acme.com" }, Bcc = new[] { "archive@acme.com" }, PdfLanguage = "eng" }; var result = await client.Invoices.SendEmail(email); Console.WriteLine($"Email sent to: {result.Email}"); // Mark invoice as sent without actually sending await client.Invoices.MarkAsSent(12345); ``` -------------------------------- ### Expense Management API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Endpoints for managing expense entries, payments, and related items. ```APIDOC ## GET /Expense/List ### Description Gets a list of expenses based on a filter. ### Method GET ### Parameters #### Query Parameters - **filter** (Request.Expense.Filter) - Required - Filter criteria - **listInfo** (bool) - Required - Flag for list information ## POST /Expense/Add ### Description Adds a new expense entry. ### Method POST ### Request Body - **expense** (Request.Expense.Expense) - Required - Expense data - **items** (Request.Expense.ExpenseItem[]) - Optional - List of items - **client** (Request.Client.Client) - Optional - Client data - **extra** (Request.Expense.Extra) - Optional - Extra details - **tags** (int[]) - Optional - List of tag IDs ## GET /Expense/View ### Description Gets expense detail by ID. ### Method GET ### Parameters #### Query Parameters - **id** (int) - Required - Expense ID ## DELETE /Expense/Delete ### Description Deletes an expense by ID. ### Method DELETE ### Parameters #### Query Parameters - **id** (int) - Required - Expense ID ``` -------------------------------- ### Invoice Management API Source: https://github.com/birko/superfakturaapi.net/blob/master/README.md Endpoints for creating, updating, and managing invoices, including payments and email delivery. ```APIDOC ## GET /Invoices/List ### Description Gets a list of invoices based on a filter. ### Method GET ### Parameters #### Query Parameters - **filter** (Request.Invoice.Filter) - Required - Filter criteria - **listInfo** (bool) - Optional - Flag for list information ## POST /Invoices/Add ### Description Creates a new invoice. ### Method POST ### Request Body - **invoice** (Request.Invoice.Invoice) - Required - Invoice data - **client** (Client) - Required - Client data - **items** (Request.Invoice.Item[]) - Required - Invoice items - **tags** (int[]) - Optional - Tags - **setting** (Request.Invoice.InvoiceSettings) - Optional - Invoice settings - **extra** (Request.Invoice.Extra) - Optional - Extra details - **myData** (Request.Invoice.MyData) - Optional - My data ## GET /Invoices/View ### Description Gets invoice detail by ID. ### Method GET ### Parameters #### Query Parameters - **id** (int) - Required - Invoice ID ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.