# Pricing & Charges

Manage pricing rules, execute charges, track transactions, and view ledger entries. Transportial's financial system supports configurable rate structures, automated pricing, and full financial reporting.

## Pricing Rules

Pricing rules define how transport costs are calculated — per kilometer, per hour, per pallet, or custom formulas.

### Create a Pricing Rule


```bash
curl -X POST https://api.otms.transportial.com/api/pricing \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Standard road rate - NL",
    "type": "distance",
    "rate": 1.25,
    "currency": "EUR",
    "unit": "km"
  }'
```

### Get a Pricing Rule


```bash
curl -X GET "https://api.otms.transportial.com/api/pricing/{id}" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### List Pricing Rules


```bash
curl -X GET "https://api.otms.transportial.com/api/pricings/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### Search Pricing Rules


```bash
curl -X POST "https://api.otms.transportial.com/api/pricings/search/0/20" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "type": "distance"
  }'
```

## Pricing Variable Indexes

Variable indexes allow dynamic pricing based on fuel surcharges, seasonal rates, or other variable factors.

### Create a Variable Index


```bash
curl -X POST https://api.otms.transportial.com/api/pricingVariableIndex \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Fuel surcharge index Q1 2026",
    "value": 1.15
  }'
```

### List Variable Indexes


```bash
curl -X GET "https://api.otms.transportial.com/api/pricingVariableIndexes/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Charges

Charges are one-time or recurring financial events linked to transport operations.

### Create a Charge


```bash
curl -X POST https://api.otms.transportial.com/api/charge \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Waiting time surcharge",
    "amount": 75.00,
    "currency": "EUR"
  }'
```

### Execute a Charge

Process a charge against a transport entity:


```bash
curl -X POST https://api.otms.transportial.com/api/charge/execute \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "chargeId": "charge-uuid",
    "entityId": "transport-order-uuid"
  }'
```

## Payouts

Track payouts to carriers, subcontractors, or drivers.

### Create a Payout


```bash
curl -X POST https://api.otms.transportial.com/api/payout \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "name": "Weekly payout - Carrier XYZ",
    "amount": 3500.00,
    "currency": "EUR"
  }'
```

### List Payouts


```bash
curl -X GET "https://api.otms.transportial.com/api/payouts/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Transactions

View all financial transactions on your platform.

### Get a Transaction


```bash
curl -X GET "https://api.otms.transportial.com/api/transaction/{id}" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### List Transactions


```bash
# All transactions
curl -X GET "https://api.otms.transportial.com/api/transactions/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

# By user
curl -X GET "https://api.otms.transportial.com/api/transactions/user/{userId}/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

# By business
curl -X GET "https://api.otms.transportial.com/api/transactions/business/{businessId}/0/20" \
  -H "Authorization: Bearer YOUR_TOKEN"

# By date range
curl -X GET "https://api.otms.transportial.com/api/transactions/date/2026-03-01/2026-03-31" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Ledger Entries

Ledger entries provide a detailed financial audit trail.

### By Entity


```bash
curl -X POST https://api.otms.transportial.com/api/ledgerEntriesByEntity \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "entityId": "transport-order-uuid",
    "entityType": "transportOrder"
  }'
```

### By Date Range


```bash
curl -X POST https://api.otms.transportial.com/api/ledgerEntriesByDateRange \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "startDate": "2026-03-01",
    "endDate": "2026-03-31"
  }'
```

### By Category and Date Range


```bash
curl -X POST https://api.otms.transportial.com/api/ledgerEntriesByCategoryAndDateRange \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "category": "revenue",
    "startDate": "2026-03-01",
    "endDate": "2026-03-31"
  }'
```

## Financial Insights

### Financial Overview


```bash
curl -X GET "https://api.otms.transportial.com/api/management/financial/{administrationId}/2026-03-01/2026-03-31" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### Operational Overview


```bash
curl -X GET "https://api.otms.transportial.com/api/management/operational/2026-03-01/2026-03-31" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

### Trips Per Day


```bash
curl -X GET "https://api.otms.transportial.com/api/management/operational/tripsPerDay/2026-03-01/2026-03-31" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Pricing Categories

Get and update the pricing categories used across your platform:


```bash
# Get categories
curl -X GET https://api.otms.transportial.com/api/pricingCategories \
  -H "Authorization: Bearer YOUR_TOKEN"

# Update categories
curl -X PUT https://api.otms.transportial.com/api/pricingCategories \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '[
    { "name": "Base rate" },
    { "name": "Fuel surcharge" },
    { "name": "Waiting time" },
    { "name": "Loading/unloading" }
  ]'
```

## Next Steps

- Generate invoices from pricing data in [Invoicing & Finance](/guides/invoicing-and-finance)
- Apply pricing to transport orders in the [Quickstart guide](/guides/quickstart)
- See the full [API Reference](/apis) for all pricing endpoints