curl -X POST https://api.helvcore.ch/v1/opening-balance-sets \
-H "Authorization: Bearer $HELVCORE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"currency": "CHF",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"fiscal_year_id": "string",
"legal_entity_id": "string",
"lines": [
{
"account_class": "string",
"account_id": "string",
"account_mapping_id": "string",
"credit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"debit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"line_memo": "string",
"source_snapshot": {}
}
],
"opening_date": "2026-03-31",
"provenance": {
"preparer": {},
"source_closing_date": "2026-03-31",
"source_hash": "string",
"source_reference": "string",
"source_system": "string",
"evidence_links": [
{}
],
"notes": "string",
"reviewer": {}
},
"description": "string",
"migration_notes": "string"
}'const res = await fetch("https://api.helvcore.ch/v1/opening-balance-sets", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.HELVCORE_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json"
},
body: JSON.stringify({
"currency": "CHF",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"fiscal_year_id": "string",
"legal_entity_id": "string",
"lines": [
{
"account_class": "string",
"account_id": "string",
"account_mapping_id": "string",
"credit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"debit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"line_memo": "string",
"source_snapshot": {}
}
],
"opening_date": "2026-03-31",
"provenance": {
"preparer": {},
"source_closing_date": "2026-03-31",
"source_hash": "string",
"source_reference": "string",
"source_system": "string",
"evidence_links": [
{}
],
"notes": "string",
"reviewer": {}
},
"description": "string",
"migration_notes": "string"
})
});
const data = await res.json();import os, requests, uuid
headers = {"Authorization": f"Bearer {os.environ['HELVCORE_API_KEY']}"}
headers["Idempotency-Key"] = str(uuid.uuid4())
headers["Content-Type"] = "application/json"
res = requests.post("https://api.helvcore.ch/v1/opening-balance-sets", headers=headers, json={
"currency": "CHF",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"fiscal_year_id": "string",
"legal_entity_id": "string",
"lines": [
{
"account_class": "string",
"account_id": "string",
"account_mapping_id": "string",
"credit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"debit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"line_memo": "string",
"source_snapshot": {}
}
],
"opening_date": "2026-03-31",
"provenance": {
"preparer": {},
"source_closing_date": "2026-03-31",
"source_hash": "string",
"source_reference": "string",
"source_system": "string",
"evidence_links": [
{}
],
"notes": "string",
"reviewer": {}
},
"description": "string",
"migration_notes": "string"
})
data = res.json()
curl -X POST https://api.helvcore.ch/v1/opening-balance-sets \
-H "Authorization: Bearer $HELVCORE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"currency": "CHF",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"fiscal_year_id": "string",
"legal_entity_id": "string",
"lines": [
{
"account_class": "string",
"account_id": "string",
"account_mapping_id": "string",
"credit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"debit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"line_memo": "string",
"source_snapshot": {}
}
],
"opening_date": "2026-03-31",
"provenance": {
"preparer": {},
"source_closing_date": "2026-03-31",
"source_hash": "string",
"source_reference": "string",
"source_system": "string",
"evidence_links": [
{}
],
"notes": "string",
"reviewer": {}
},
"description": "string",
"migration_notes": "string"
}'
201
{
"currency": "CHF",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"fiscal_year_id": "string",
"legal_entity_id": "string",
"lines": [
{
"account_class": "string",
"account_id": "string",
"account_mapping_id": "string",
"credit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"debit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"line_memo": "string",
"source_snapshot": {}
}
],
"opening_date": "2026-03-31",
"provenance": {
"preparer": {},
"source_closing_date": "2026-03-31",
"source_hash": "string",
"source_reference": "string",
"source_system": "string",
"evidence_links": [
{}
],
"notes": "string",
"reviewer": {}
},
"description": "string",
"migration_notes": "string"
}
{
"created_at": "2026-03-31T12:00:00Z",
"currency": "CHF",
"description": "string",
"discard_reason": "string",
"discarded_at": "2026-03-31T12:00:00Z",
"discarded_by": "string",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"fiscal_year_id": "string",
"id": "string",
"journal_entry_id": "string",
"legal_entity_id": "string",
"lines": [
{
"account_class": "string",
"account_code": "string",
"account_id": "string",
"account_mapping_id": "string",
"account_name": "string",
"credit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"debit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"line_id": "string",
"line_memo": "string",
"line_number": 123,
"source_snapshot": {}
}
]
}
{
"currency": "CHF",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"fiscal_year_id": "string",
"legal_entity_id": "string",
"lines": [
{
"account_class": "string",
"account_id": "string",
"account_mapping_id": "string",
"credit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"debit_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"line_memo": "string",
"source_snapshot": {}
}
],
"opening_date": "2026-03-31",
"provenance": {
"preparer": {},
"source_closing_date": "2026-03-31",
"source_hash": "string",
"source_reference": "string",
"source_system": "string",
"evidence_links": [
{}
],
"notes": "string",
"reviewer": {}
},
"description": "string",
"migration_notes": "string"
}