curl -X POST https://api.helvcore.ch/v1/source-facts/expense-lines \
-H "Authorization: Bearer $HELVCORE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"business_date": "2026-03-31",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"external_reference": "string",
"idempotency_key": "string",
"source_hash": "string",
"source_payload_hash": "string",
"source_system": "string",
"evidence_links": [
{
"sha256": "string",
"type": "source_export",
"label": "string",
"media_type": "string",
"uri": "string"
}
],
"replay_policy": "idempotent_replay",
"fact_type": "expense_line",
"payload": {
"description": "string",
"expense_document_external_reference": "string",
"gross_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"net_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"rounding_basis": "line",
"vat_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"vat_relevance": "vat_relevant",
"edge_case_flags": [
"string"
],
"tax_code_id": "string",
"tax_snapshot": {
"document_vat_amount": {
"amount_minor": {},
"currency": {}
},
"jurisdiction_source": "CH_ESTV",
"rate_basis_points": 123,
"rate_version": "string",
"tax_code_id": "string",
"chf_vat_mirror": {
"amount_minor": {},
"currency": {}
},
"conversion_rate": "string",
"conversion_rate_date": "2026-03-31",
"conversion_rate_source": "string"
},
"treatment_reason": "string"
}
}'const res = await fetch("https://api.helvcore.ch/v1/source-facts/expense-lines", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.HELVCORE_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json"
},
body: JSON.stringify({
"business_date": "2026-03-31",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"external_reference": "string",
"idempotency_key": "string",
"source_hash": "string",
"source_payload_hash": "string",
"source_system": "string",
"evidence_links": [
{
"sha256": "string",
"type": "source_export",
"label": "string",
"media_type": "string",
"uri": "string"
}
],
"replay_policy": "idempotent_replay",
"fact_type": "expense_line",
"payload": {
"description": "string",
"expense_document_external_reference": "string",
"gross_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"net_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"rounding_basis": "line",
"vat_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"vat_relevance": "vat_relevant",
"edge_case_flags": [
"string"
],
"tax_code_id": "string",
"tax_snapshot": {
"document_vat_amount": {
"amount_minor": {},
"currency": {}
},
"jurisdiction_source": "CH_ESTV",
"rate_basis_points": 123,
"rate_version": "string",
"tax_code_id": "string",
"chf_vat_mirror": {
"amount_minor": {},
"currency": {}
},
"conversion_rate": "string",
"conversion_rate_date": "2026-03-31",
"conversion_rate_source": "string"
},
"treatment_reason": "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/source-facts/expense-lines", headers=headers, json={
"business_date": "2026-03-31",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"external_reference": "string",
"idempotency_key": "string",
"source_hash": "string",
"source_payload_hash": "string",
"source_system": "string",
"evidence_links": [
{
"sha256": "string",
"type": "source_export",
"label": "string",
"media_type": "string",
"uri": "string"
}
],
"replay_policy": "idempotent_replay",
"fact_type": "expense_line",
"payload": {
"description": "string",
"expense_document_external_reference": "string",
"gross_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"net_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"rounding_basis": "line",
"vat_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"vat_relevance": "vat_relevant",
"edge_case_flags": [
"string"
],
"tax_code_id": "string",
"tax_snapshot": {
"document_vat_amount": {
"amount_minor": {},
"currency": {}
},
"jurisdiction_source": "CH_ESTV",
"rate_basis_points": 123,
"rate_version": "string",
"tax_code_id": "string",
"chf_vat_mirror": {
"amount_minor": {},
"currency": {}
},
"conversion_rate": "string",
"conversion_rate_date": "2026-03-31",
"conversion_rate_source": "string"
},
"treatment_reason": "string"
}
})
data = res.json()
curl -X POST https://api.helvcore.ch/v1/source-facts/expense-lines \
-H "Authorization: Bearer $HELVCORE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"business_date": "2026-03-31",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"external_reference": "string",
"idempotency_key": "string",
"source_hash": "string",
"source_payload_hash": "string",
"source_system": "string",
"evidence_links": [
{
"sha256": "string",
"type": "source_export",
"label": "string",
"media_type": "string",
"uri": "string"
}
],
"replay_policy": "idempotent_replay",
"fact_type": "expense_line",
"payload": {
"description": "string",
"expense_document_external_reference": "string",
"gross_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"net_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"rounding_basis": "line",
"vat_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"vat_relevance": "vat_relevant",
"edge_case_flags": [
"string"
],
"tax_code_id": "string",
"tax_snapshot": {
"document_vat_amount": {
"amount_minor": {},
"currency": {}
},
"jurisdiction_source": "CH_ESTV",
"rate_basis_points": 123,
"rate_version": "string",
"tax_code_id": "string",
"chf_vat_mirror": {
"amount_minor": {},
"currency": {}
},
"conversion_rate": "string",
"conversion_rate_date": "2026-03-31",
"conversion_rate_source": "string"
},
"treatment_reason": "string"
}
}'
202
{
"business_date": "2026-03-31",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"external_reference": "string",
"idempotency_key": "string",
"source_hash": "string",
"source_payload_hash": "string",
"source_system": "string",
"evidence_links": [
{
"sha256": "string",
"type": "source_export",
"label": "string",
"media_type": "string",
"uri": "string"
}
],
"replay_policy": "idempotent_replay",
"fact_type": "expense_line",
"payload": {
"description": "string",
"expense_document_external_reference": "string",
"gross_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"net_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"rounding_basis": "line",
"vat_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"vat_relevance": "vat_relevant",
"edge_case_flags": [
"string"
],
"tax_code_id": "string",
"tax_snapshot": {
"document_vat_amount": {
"amount_minor": {},
"currency": {}
},
"jurisdiction_source": "CH_ESTV",
"rate_basis_points": 123,
"rate_version": "string",
"tax_code_id": "string",
"chf_vat_mirror": {
"amount_minor": {},
"currency": {}
},
"conversion_rate": "string",
"conversion_rate_date": "2026-03-31",
"conversion_rate_source": "string"
},
"treatment_reason": "string"
}
}
{
"accounting_finality": "none",
"allocation_id": {},
"blockers": [
{
"code": "string",
"message": "string"
}
],
"business_date": "2026-03-31",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"evidence_hashes": {
"attachment_hashes": [
"string"
],
"evidence_link_hashes": [
"string"
],
"source_hash": "string",
"source_payload_hash": "string"
},
"external_reference": "string",
"fact_type": "expense_document",
"id": "string",
"idempotency_key": "string",
"journal_entry_id": {},
"object": "source_fact"
}
{
"business_date": "2026-03-31",
"end_customer_id": "00000000-0000-4000-8000-000000000000",
"external_reference": "string",
"idempotency_key": "string",
"source_hash": "string",
"source_payload_hash": "string",
"source_system": "string",
"evidence_links": [
{
"sha256": "string",
"type": "source_export",
"label": "string",
"media_type": "string",
"uri": "string"
}
],
"replay_policy": "idempotent_replay",
"fact_type": "expense_line",
"payload": {
"description": "string",
"expense_document_external_reference": "string",
"gross_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"net_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"rounding_basis": "line",
"vat_amount": {
"amount_minor": 123,
"currency": "CHF"
},
"vat_relevance": "vat_relevant",
"edge_case_flags": [
"string"
],
"tax_code_id": "string",
"tax_snapshot": {
"document_vat_amount": {
"amount_minor": {},
"currency": {}
},
"jurisdiction_source": "CH_ESTV",
"rate_basis_points": 123,
"rate_version": "string",
"tax_code_id": "string",
"chf_vat_mirror": {
"amount_minor": {},
"currency": {}
},
"conversion_rate": "string",
"conversion_rate_date": "2026-03-31",
"conversion_rate_source": "string"
},
"treatment_reason": "string"
}
}