Skip to content

/admin/addresses/:id/accounting_transactions

Path: /admin/addresses/:id/accounting_transactions

Namespace: admin

Parent Resource: addresses

Overview

Accounting transactions represent accounting entries associated with an address. This nested resource provides read-only access to accounting transactions linked to a specific address.

Available Operations

List Accounting Transactions (GET)

Endpoint: GET /admin/addresses/:id/accounting_transactions.json

Description: Retrieve all accounting transactions for a specific address.

Request Example:

bash
GET /admin/addresses/123/accounting_transactions.json

Response (200 OK):

json
{
  "accounting_transactions": [
    {
      "id": 1,
      "address_id": 123,
      "debit_account_id": 1000,
      "credit_account_id": 4000,
      "amount_cents": 100000,
      "description": "Invoice transaction"
    }
  ]
}

Show Accounting Transaction (GET /:id)

Endpoint: GET /admin/addresses/:id/accounting_transactions/:id.json

Description: Retrieve a specific accounting transaction.

Request Example:

bash
GET /admin/addresses/123/accounting_transactions/1.json

Response (200 OK):

json
{
  "accounting_transaction": {
    "id": 1,
    "address_id": 123,
    "debit_account_id": 1000,
    "credit_account_id": 4000,
    "amount_cents": 100000
  }
}

Batch Actions (POST /batch_action)

Endpoint: POST /admin/addresses/:id/accounting_transactions/batch_action.json

Description: Perform batch operations on selected accounting transactions.

Request Example:

bash
POST /admin/addresses/123/accounting_transactions/batch_action.json
Content-Type: application/json

{
  "batch_action": "export",
  "collection_selection": [1, 2, 3]
}

Response (200 OK):

json
{
  "message": "Batch action completed",
  "affected_count": 3
}

Released under an open source license.