Update Card Transaction
Updates editable fields on a credit card transaction, identified by transactionId.
Use this endpoint to enrich expenses in your reconciliation flow or ERP — for example, by recording purchase context, reconciling the transaction, or classifying it by category.
Editable fields today:
notes— transaction notes (max 1000 characters). Send an empty string ("") to clear.isConciled— marks the transaction as reconciled (true) or unreconciled (false).categoryId— numeric category ID.costCenterId— UUID of the cost center (use theidfield from GET /cost-centers/v1/cost-centers).
Rules:
transactionIdmust be the transactionidfrom the statement (GET /statements/v1/credit-card) — a ULID (e.g.01JB4M8WQ2YX5KN7RT9HF3DE6C), not a UUID.- At least one field must be provided in the body.
- On success, the API returns 204 No Content (no body).
curl -X PATCH "https://api-sandbox.contasimples.com/statements/v1/credit-card/01JB4M8WQ2YX5KN7RT9HF3DE6C" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"notes": "Lunch with Acme client — sales meeting 2025-05-25",
"isConciled": true,
"categoryId": 1146,
"costCenterId": "a02f8f63-8b1b-4328-9d7d-0d2e351b8118"
}'
import requests
import json
url = "https://api-sandbox.contasimples.com/statements/v1/credit-card/01JB4M8WQ2YX5KN7RT9HF3DE6C"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"notes": "Lunch with Acme client — sales meeting 2025-05-25",
"isConciled": true,
"categoryId": 1146,
"costCenterId": "a02f8f63-8b1b-4328-9d7d-0d2e351b8118"
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api-sandbox.contasimples.com/statements/v1/credit-card/01JB4M8WQ2YX5KN7RT9HF3DE6C", {
method: "PATCH",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"notes": "Lunch with Acme client — sales meeting 2025-05-25",
"isConciled": true,
"categoryId": 1146,
"costCenterId": "a02f8f63-8b1b-4328-9d7d-0d2e351b8118"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"notes": "Lunch with Acme client — sales meeting 2025-05-25",
"isConciled": true,
"categoryId": 1146,
"costCenterId": "a02f8f63-8b1b-4328-9d7d-0d2e351b8118"
}`)
req, err := http.NewRequest("PATCH", "https://api-sandbox.contasimples.com/statements/v1/credit-card/01JB4M8WQ2YX5KN7RT9HF3DE6C", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api-sandbox.contasimples.com/statements/v1/credit-card/01JB4M8WQ2YX5KN7RT9HF3DE6C')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"notes": "Lunch with Acme client — sales meeting 2025-05-25",
"isConciled": true,
"categoryId": 1146,
"costCenterId": "a02f8f63-8b1b-4328-9d7d-0d2e351b8118"
}'
response = http.request(request)
puts response.body
{}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
/statements/v1/credit-card/{transactionId}Target server for requests. Edit to use your own host.
Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}
Bearer {token}Transaction ID on the statement (ULID) — use the id field from GET /statements/v1/credit-card (e.g. 01JB4M8WQ2YX5KN7RT9HF3DE6C).
The media type of the request body
Transaction notes. Send an empty string ("") to clear.
Marks the transaction as reviewed (true) or pending (false).
Category ID — use the id field from GET /categories/v1/categories.
UUID of the cost center — use the id field from GET /cost-centers/v1/cost-centers.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. Bearer token from OAuth 2.0 client credentials. Format: Bearer {token}
Path Parameters
Transaction ID on the statement (ULID) — use the id field from GET /statements/v1/credit-card (e.g. 01JB4M8WQ2YX5KN7RT9HF3DE6C).
Body
Transaction notes. Send an empty string ("") to clear.
Marks the transaction as reviewed (true) or pending (false).
Category ID — use the id field from GET /categories/v1/categories.
UUID of the cost center — use the id field from GET /cost-centers/v1/cost-centers.
Responses
Transaction updated successfully. No response body (No Content).
Invalid request. Check the request body fields and data types.
Unauthorized. Token missing, invalid, or expired.
Forbidden. The token is authenticated but lacks permission to edit this transaction.
Transaction not found.
Unprocessable Entity. The request body is syntactically valid but semantically invalid (e.g. category not found, notes exceeds 1000 characters).
Internal server error. Retry with exponential backoff.