Organizze API

repository·master·Indexed 41 days ago

https://github.com/organizze/api-doc

API for interacting with Organizze financial management accounts. Provides endpoints for managing users, bank accounts, categories, credit cards, budgets, and financial transactions. Supports JSON data format, HTTP Basic authentication, and pagination via start_date and end_date parameters. Base URL: https://api.organizze.com.br/rest/v2.

Tokens
3.4K
Snippets
26
Records
29
Agent score
2%

What's inside Organizze

  1. Understand the Organizze API data format and pagination

    master

    Data Format

    The API exclusively supports JSON. Even if you do not explicitly set the Content-Type: application/json; charset=utf-8 header, all responses will be returned in JSON with utf-8 encoding.

    Pagination

    Transactions (movimentações) and credit card invoices (faturas de cartão de crédito) are paginated by period. Use the start_date and end_date parameters to define the range.

    Parameters:

    • start_date: Format YYYY-MM-DD (e.g., 2015-09-01)
    • end_date: Format YYYY-MM-DD (e.g., 2015-09-30)

    Default Behavior:

    • If no period is provided, transactions default to the current month.
    • If no period is provided, credit card invoices default to the current year.
  2. Authenticate and make requests to the Organizze API

    master

    All requests to the Organizze API require HTTP Basic authentication.

    Credentials:

    • Username: Your Organizze account email.
    • Password: Your access token. You can generate this at https://app.organizze.com.br/configuracoes/api-keys.

    Requirements:

    • HTTPS Only: The API does not accept plain HTTP requests. The base URL is https://api.organizze.com.br/rest/v2.
    • User-Agent Header: You must include a User-Agent header identifying your application and a contact email. Failure to provide this header will result in a 400 Bad Request error.

    Example User-Agent headers:

    • User-Agent: Esdras (esdras@organizze.com.br)
    • User-Agent: Alex (alex@gmail.com)
    User-Agent: Esdras (esdras@organizze.com.br)
  3. Handle Organizze API errors

    master

    The API uses standard HTTP status codes to indicate success or failure. Common error scenarios include:

    • 401 Unauthorized: Occurs when the email or password is incorrect, or the user is not authenticated.
    • 400 Bad Request: Occurs if the User-Agent header is missing.
    • 422 Unprocessable Entity: Occurs when attempting to create or update a record with invalid data (e.g., a bank account missing a required name).

    Example 422 Error Body:

    {
        "id": null,
        "name": null,
        "description": "Minha conta corrente",
        "archived": false,
        "created_at": null,
        "updated_at": null,
        "default": false,
        "errors": {
            "name": [
                "não pode estar em branco"
            ]
        },
        "type": "checking"
    }
    {
        "error": "Não autorizado"
    }
  4. Create a bank account

    master

    Create a new bank account by providing the name, type, description, and whether it is the default account.

    Endpoint: POST /accounts

    Request Body Example:

    {
        "name": "Itaú CC",
        "type": "checking",
        "description": "Minha conta corrente",
        "default": true
    }
  5. Delete a category with a replacement

    master

    When deleting a category, you can specify a replacement_id to ensure existing transactions are moved to a new category instead of being orphaned or moved to the default.

    Endpoint: DELETE /categories/{id}

    Request Body Example:

    {
        "replacement_id": 18
    }
  6. Delete a transaction

    master

    Delete a transaction.

    For recurring or installment transactions, use these attributes to define the scope:

    • update_future: true: Deletes the transaction and all future occurrences.
    • update_all: true: Deletes all occurrences, including previous ones. Warning: This may change the account balance if previous transactions were already marked as paid/received.
    ```json
    {
        "update_future": true
    }

    DELETE /transactions/101

  7. Manage categories

    master

    Manage transaction categories (categories) used for organization.

    MethodEndpointDescription
    GET/categoriesList all categories
    GET/categories/{id}Get details for a specific category
    POST/categoriesCreate a new category
    PUT/categories/{id}Update a category
    DELETE/categories/{id}Delete a category

    Deleting a Category: When deleting a category, you can provide a replacement_id in the request body. All transactions associated with the deleted category will be transferred to the replacement category. If no replacement is provided, the system's default category will be used.

  8. Get credit card invoice details

    master

    Retrieve detailed information for a specific invoice, including its associated transactions and payments.

    Endpoint: GET /credit_cards/{id}/invoices/{invoice_id}

    Response includes:

    • transactions: A list of transactions that make up the invoice.
    • payments: A list of payments applied to this invoice.
    GET /credit_cards/3/invoices/186