WibiClick icon

WibiClick

Interact with WibiClick API

Actions92

Overview

This node integrates with the WibiClick API to manage invoices within a website's ecosystem. Specifically, the "Add or Update Invoice" operation allows users to create a new invoice or update an existing one by sending detailed invoice data and associated line items to the API. This is useful for automating billing processes, syncing invoice data from other systems, or managing invoices programmatically in workflows.

Practical examples include:

  • Automatically generating invoices when a job is completed.
  • Updating invoice details based on changes in customer orders.
  • Adding line items dynamically to invoices as part of a sales process.

Properties

Name Meaning
Website ID The unique identifier of the website where the invoice belongs.
Invoice Data Collection of fields describing the invoice:
- Customer ID: Identifier of the customer.
- Deposit: Amount deposited towards the invoice.
- Due At: Due date of the invoice (date-time).
- Employee ID: Identifier of the employee related to the invoice.
- ID: Identifier of the invoice (used for updates).
- Issued At: Date when the invoice was issued (date-time).
- Job ID: Identifier of the associated job.
- Name: Name/title of the invoice.
- Notes: Additional notes for the invoice.
- Number: Invoice number.
- Reason: Reason or description for the invoice.
- Sales: Sales amount related to the invoice.
Line Items Multiple line items associated with the invoice, each containing:
- ID: Identifier of the line item (for updates).
- Name: Name of the item.
- Description: Description of the item.
- Amount: Monetary amount for the item.
- Quantity: Quantity of the item (default 1).

Output

The output JSON contains the response from the WibiClick API after adding or updating the invoice. It typically includes the full invoice object with all its properties and the list of line items as stored or updated in the system.

Example structure of output JSON:

{
  "id": "invoice-id",
  "customerId": "customer-id",
  "deposit": 100,
  "dueAt": "2024-06-30T00:00:00Z",
  "employeeId": "employee-id",
  "issuedAt": "2024-06-01T00:00:00Z",
  "jobId": "job-id",
  "name": "Invoice Name",
  "notes": "Some notes",
  "number": "INV-12345",
  "reason": "Service rendered",
  "sales": 500,
  "items": [
    {
      "id": "line-item-id",
      "name": "Item 1",
      "description": "Description of item 1",
      "amount": 200,
      "quantity": 2
    },
    {
      "id": "line-item-id-2",
      "name": "Item 2",
      "description": "Description of item 2",
      "amount": 100,
      "quantity": 1
    }
  ]
}

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the WibiClick API via an API key credential.
  • The node expects the API URL and API key to be configured in the credentials.
  • Network access to the WibiClick API endpoint is necessary.

Troubleshooting

  • Missing Required Fields: Ensure that the "Website ID" and at least the minimal required invoice data are provided; otherwise, the API may reject the request.
  • Invalid IDs: Using incorrect or non-existent IDs for invoice, customer, job, or employee will cause errors.
  • API Authentication Errors: If the API key is invalid or missing, requests will fail with authorization errors.
  • Malformed Line Items: Each line item should have valid numeric amounts and quantities; invalid values might cause the API to reject the request.
  • Network Issues: Connectivity problems to the API endpoint will result in request failures.
  • Error Messages: The node throws errors with messages returned from the API or generic messages like "Failed to create note" (in other operations). For invoice operations, errors will typically reflect API response messages.

To resolve issues:

  • Verify all required parameters are correctly set.
  • Check API key validity and permissions.
  • Confirm network connectivity.
  • Review API documentation for correct field formats.

Links and References

Discussion