Skip to main content
PUT
/
v1
/
customers
/
{id}
/
transactions
/
{transactionId}
Update a transaction for a customer
curl --request PUT \
  --url https://dev.flextell.ai/api/v1/customers/{id}/transactions/{transactionId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Tenant: <x-tenant>' \
  --data '
{
  "debit": 1,
  "credit": 1,
  "currency_id": 123,
  "exchange_rate": 1,
  "transaction_date": "2023-11-07T05:31:56Z",
  "due_date": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "invoice_number": "<string>"
}
'
{
  "success": "<string>",
  "data": {
    "id": 123,
    "tenant_id": 123,
    "batch_uuid": "<string>",
    "customer_id": 123,
    "account_id": 123,
    "sale_id": 123,
    "currency_id": 123,
    "exchange_rate": 123,
    "debit": "<string>",
    "credit": "<string>",
    "amount": "<string>",
    "transaction_date": "2023-11-07T05:31:56Z",
    "type": "<string>",
    "description": "<string>",
    "invoice_number": "<string>",
    "is_installment": true,
    "due_date": "2023-11-07T05:31:56Z",
    "installment_number": 123,
    "total_installments": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "account": {
      "id": 123,
      "name": "<string>"
    },
    "currency": {
      "id": 123,
      "code": "<string>",
      "symbol": "<string>",
      "name": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Tenant
number
required

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Path Parameters

id
integer
required

The customer identifier

transactionId
integer
required

The transaction identifier

Body

application/json
type
enum<string>

The type.

Available options:
sale_invoice,
sale,
collection,
purchase_invoice,
payment,
opening_balance
debit
number

Debit amount.

Required range: x >= 0
credit
number

Credit amount.

Required range: x >= 0
currency_id
integer

The currency ID.

exchange_rate
number

Currency exchange rate.

Required range: x >= 0
transaction_date
string<date-time>

Transaction date (YYYY-MM-DD).

due_date
string<date-time> | null

Due date (YYYY-MM-DD).

description
string | null

The description.

Maximum string length: 65535
invoice_number
string | null

Invoice number.

Maximum string length: 255

Response

success
string
required
data
CustomerTransactionResource · object
required