API Reference

transactions

3 endpoints

  • /api/v1/transactions
GET/api/v1/transactions

List Transactions

List all transactions across all wallets owned by the caller.

Ordered by most recent first, across every wallet the caller holds — a transaction between two of their own wallets appears once.

Both filters take the same words the response reports in status and transaction_type, and both are applied before paging: total_items counts what matched, not what exists, so a filtered page is a full page and the page count is the one to walk.

Query parameters

statusenum[] | null

Match any of these statuses. Repeat the parameter to widen: `?status=pending&status=failed`. Omit to match every status.

transaction_typeenum | null

Match one type. Omit to match every type.

default_backendstring

default: "primary"

pageinteger

default: 1 · ≥ 1

page_sizeinteger

default: 20 · ≥ 1 · ≤ 100

sort_bystring | null
sort_orderstring

default: "asc"

Responses

200Successful Response
FieldTypeDescription
total_items*integer

Total number of items available

total_pages*integer

Total number of pages available

current_page*integer

Current page number

items*Transaction[]

List of items on the current page

array items · Transaction

FieldTypeDescription
id*string

Transaction ID (CUID2)

from_address*string

Sender wallet address

to_address*string

Receiver wallet address

amount*number

Transaction amount

transaction_type*string

Type of transaction

status*string

Status of the transaction

transaction_hash*string

Hash of the transaction

previous_hash*string

Hash of the previous transaction

signature*string

Digital signature of the transaction

public_key*string

Public key in PEM format

encrypted_data*string

Encrypted transaction data

data_hash*string

Hash of the transaction data

description*string

Description of the transaction

reference_id*string

Reference ID for the transaction

original_transaction_id*string

Original transaction ID for reversals/refunds (CUID2)

failure_reason*string

Reason for failure, if any

reversal_reason*string

Reason for reversal, if any

failed_at*string (date-time) | null

Timestamp when the transaction failed

created_at*string (date-time)

Timestamp when the transaction was created

confirmed_at*string (date-time) | null

Timestamp when the transaction was confirmed

tagsstring[]

Tags attached to the transaction at creation time

401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

Example request

curl -X GET "https://api.davi.social/api/v1/transactions" \
  -H "Authorization: Bearer <token>"
GET/api/v1/transactions/{transaction_id}

Get Transaction

Get one of the caller's transactions by id.

A transaction is readable by the wallets on either end of it. The id alone does not authorize the read: it is unguessable, but unguessable is not a permission, and on a third-party surface it would let any token holding wallet:transactions:read fetch a transaction that came into its possession by any means.

Path parameters

transaction_id*string

Query parameters

default_backendstring

default: "primary"

Responses

200Successful Response
FieldTypeDescription
id*string

Transaction ID (CUID2)

from_address*string

Sender wallet address

to_address*string

Receiver wallet address

amount*number

Transaction amount

transaction_type*string

Type of transaction

status*string

Status of the transaction

transaction_hash*string

Hash of the transaction

previous_hash*string

Hash of the previous transaction

signature*string

Digital signature of the transaction

public_key*string

Public key in PEM format

encrypted_data*string

Encrypted transaction data

data_hash*string

Hash of the transaction data

description*string

Description of the transaction

reference_id*string

Reference ID for the transaction

original_transaction_id*string

Original transaction ID for reversals/refunds (CUID2)

failure_reason*string

Reason for failure, if any

reversal_reason*string

Reason for reversal, if any

failed_at*string (date-time) | null

Timestamp when the transaction failed

created_at*string (date-time)

Timestamp when the transaction was created

confirmed_at*string (date-time) | null

Timestamp when the transaction was confirmed

tagsstring[]

Tags attached to the transaction at creation time

401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

404Resource not found
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

Example request

curl -X GET "https://api.davi.social/api/v1/transactions/{transaction_id}" \
  -H "Authorization: Bearer <token>"
POST/api/v1/transactions/{transaction_id}/decrypt

Decrypt Transaction Data

Decrypt a transaction's data payload.

The caller names which of their wallets to decrypt with; ownership of that wallet is what authorizes the read.

Path parameters

transaction_id*string

Request body*application/json

FieldTypeDescription
wallet_address*string

Address of a wallet the caller owns that took part in the transaction. Its key is what decrypts the payload.

Responses

200Successful Response
FieldTypeDescription
manifest_url*string

The URL of the reward manifest

content_hashstring | null

The hash of the reward content. Used for integrity checking

expires_atstring (date-time) | null

The expiration date of the reward manifest

access_keystring | null

The access key for the reward manifest

access_key_typeenum

The type of access key for the reward manifest

default: "none"

additional_data*object

Additional transaction-specific custom data

400Invalid request
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

401Authentication failed
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

403Insufficient permissions
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

409Resource already exists
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

422Validation error
FieldTypeDescription
errors*object

Map of field names to error messages. Use '_root' for form-level errors.

message*string

Human-readable error summary

codestring | null

Machine-readable error code

detailsobject | null

What the refusal is about, where it is something you can act on — the amount and currency owed on a `402`, the entitlement a tier did not grant on a `403`. Values are typed as the error carries them, so read a figure from here rather than from `errors`, whose values are always the copy a form shows against a field.

Example request

curl -X POST "https://api.davi.social/api/v1/transactions/{transaction_id}/decrypt" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{ /* request body */ }'