Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.5.18 - 2026-05-07
- accounting: add pdf_name and name in different models to support specifying a name for a pdf

## 0.5.17 - 2026-05-06
- pos: add `Tax` model and `get tax rates` endpoint (`/pos/tax-rates`)

Expand Down
112 changes: 109 additions & 3 deletions chift/openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"description": "The Chift API is a universal API giving you access to financial data from the software of your clients. It helps software companies to offer native integrations to their clients without the effort needed to maintain those native integrations. By using the APIs (Accounting, POS, eCommerce) of Chift, you connect once and allow your clients to use their software packages.",
"version": "1.0.0"
},
"servers": [{ "url": "https://api.chift.eu", "description": "Chift" }],
"servers": [
{ "url": "https://api.chift.eu", "description": "Chift" }
],
"paths": {
"/token": {
"post": {
Expand Down Expand Up @@ -17304,7 +17306,20 @@
},
"AttachmentItem": {
"properties": {
"base64_string": { "type": "string", "title": "Base64 String" }
"base64_string": { "type": "string", "title": "Base64 String" },
"name": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$"
},
{ "type": "null" }
],
"title": "Name",
"description": "A name for the PDF file to be created for accounting software that support it."
}
},
"type": "object",
"required": ["base64_string"],
Expand Down Expand Up @@ -17517,6 +17532,19 @@
"title": "Pdf",
"description": "Base64 PDF attachment of the bank statement."
},
"pdf_name": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$"
},
{ "type": "null" }
],
"title": "Pdf Name",
"description": "A name for the PDF file to be created for accounting software that support it."
},
"items": {
"items": { "$ref": "#/components/schemas/BankTransactionItemIn" },
"type": "array",
Expand Down Expand Up @@ -20944,6 +20972,19 @@
"title": "Pdf",
"description": "Base64 PDF attachment of the expense document."
},
"pdf_name": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$"
},
{ "type": "null" }
],
"title": "Pdf Name",
"description": "A name for the PDF file to be created for accounting software that support it."
},
"lines": {
"items": { "$ref": "#/components/schemas/ExpenseLineItem" },
"type": "array",
Expand Down Expand Up @@ -21018,6 +21059,19 @@
"title": "Pdf",
"description": "Base64 PDF attachment of the expense document."
},
"pdf_name": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$"
},
{ "type": "null" }
],
"title": "Pdf Name",
"description": "A name for the PDF file to be created for accounting software that support it."
},
"lines": {
"items": { "$ref": "#/components/schemas/ExpenseLineItem" },
"type": "array",
Expand Down Expand Up @@ -21382,6 +21436,19 @@
"anyOf": [{ "type": "string" }, { "type": "null" }],
"title": "Pdf",
"description": "Base 64 string representing the PDF attached to the sale/purchase entry."
},
"pdf_name": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$"
},
{ "type": "null" }
],
"title": "Pdf Name",
"description": "A name for the PDF file to be created for accounting software that support it."
}
},
"type": "object",
Expand Down Expand Up @@ -21858,6 +21925,19 @@
"title": "Pdf",
"description": "Base 64 string representing the PDF attached to the item."
},
"pdf_name": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$"
},
{ "type": "null" }
],
"title": "Pdf Name",
"description": "A name for the PDF file to be created for accounting software that support it."
},
"posted": {
"anyOf": [{ "type": "boolean" }, { "type": "null" }],
"title": "Posted",
Expand Down Expand Up @@ -22467,6 +22547,19 @@
"title": "Pdf",
"description": "Base 64 string representing the PDF attached to the invoice."
},
"pdf_name": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$"
},
{ "type": "null" }
],
"title": "Pdf Name",
"description": "A name for the PDF file to be created for accounting software that support it."
},
"currency_exchange_rate": {
"anyOf": [{ "type": "number" }, { "type": "null" }],
"title": "Currency Exchange Rate",
Expand Down Expand Up @@ -22634,6 +22727,19 @@
"title": "Pdf",
"description": "Base 64 string representing the PDF attached to the invoice."
},
"pdf_name": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^[a-zA-Z0-9\\-_ ]{1,196}+(?:.pdf)?$"
},
{ "type": "null" }
],
"title": "Pdf Name",
"description": "A name for the PDF file to be created for accounting software that support it."
},
"currency_exchange_rate": {
"anyOf": [{ "type": "number" }, { "type": "null" }],
"title": "Currency Exchange Rate",
Expand Down Expand Up @@ -30993,4 +31099,4 @@
}
},
"security": [{ "bearerAuth": [] }]
}
}
74 changes: 73 additions & 1 deletion chift/openapi/openapi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: openapi.json
# timestamp: 2026-05-06T18:03:11+00:00
# timestamp: 2026-05-07T14:06:52+00:00

from __future__ import annotations

Expand Down Expand Up @@ -421,6 +421,15 @@ class Api(Enum):

class AttachmentItem(BaseModel):
base64_string: str = Field(..., title="Base64 String")
name: Optional[
constr(
pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200
)
] = Field(
None,
description="A name for the PDF file to be created for accounting software that support it.",
title="Name",
)


class AttachmentItemOut(BaseModel):
Expand Down Expand Up @@ -4159,6 +4168,15 @@ class ExpenseItemIn(BaseModel):
pdf: Optional[str] = Field(
None, description="Base64 PDF attachment of the expense document.", title="Pdf"
)
pdf_name: Optional[
constr(
pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200
)
] = Field(
None,
description="A name for the PDF file to be created for accounting software that support it.",
title="Pdf Name",
)
lines: List[ExpenseLineItem] = Field(
..., description="Expense lines.", min_length=1, title="Lines"
)
Expand Down Expand Up @@ -4199,6 +4217,15 @@ class ExpenseItemOut(BaseModel):
pdf: Optional[str] = Field(
None, description="Base64 PDF attachment of the expense document.", title="Pdf"
)
pdf_name: Optional[
constr(
pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200
)
] = Field(
None,
description="A name for the PDF file to be created for accounting software that support it.",
title="Pdf Name",
)
lines: List[ExpenseLineItem] = Field(
..., description="Expense lines.", min_length=1, title="Lines"
)
Expand Down Expand Up @@ -6127,6 +6154,15 @@ class BankStatementItemIn(BaseModel):
pdf: Optional[str] = Field(
None, description="Base64 PDF attachment of the bank statement.", title="Pdf"
)
pdf_name: Optional[
constr(
pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200
)
] = Field(
None,
description="A name for the PDF file to be created for accounting software that support it.",
title="Pdf Name",
)
items: List[BankTransactionItemIn] = Field(
..., description="List of transaction items", title="Items"
)
Expand Down Expand Up @@ -6559,6 +6595,15 @@ class FinancialEntryItemIn(BaseModel):
description="Base 64 string representing the PDF attached to the sale/purchase entry.",
title="Pdf",
)
pdf_name: Optional[
constr(
pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200
)
] = Field(
None,
description="A name for the PDF file to be created for accounting software that support it.",
title="Pdf Name",
)


class FinancialEntryItemOut(BaseModel):
Expand Down Expand Up @@ -6647,6 +6692,15 @@ class GenericJournalEntry(BaseModel):
description="Base 64 string representing the PDF attached to the item.",
title="Pdf",
)
pdf_name: Optional[
constr(
pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200
)
] = Field(
None,
description="A name for the PDF file to be created for accounting software that support it.",
title="Pdf Name",
)
posted: Optional[bool] = Field(
True,
description="Indicates if the journal entry has been posted (finalized) in the accounting system. If not provided, it defaults to True.",
Expand Down Expand Up @@ -6805,6 +6859,15 @@ class InvoiceItemInMonoAnalyticPlan(BaseModel):
description="Base 64 string representing the PDF attached to the invoice.",
title="Pdf",
)
pdf_name: Optional[
constr(
pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200
)
] = Field(
None,
description="A name for the PDF file to be created for accounting software that support it.",
title="Pdf Name",
)
currency_exchange_rate: Optional[float] = Field(
1,
description="Exchange rate applicable at the date of the invoice. Required when the invoice currency is different from the folder's default currency.",
Expand Down Expand Up @@ -6922,6 +6985,15 @@ class InvoiceItemInMultiAnalyticPlans(BaseModel):
description="Base 64 string representing the PDF attached to the invoice.",
title="Pdf",
)
pdf_name: Optional[
constr(
pattern=r"^[a-zA-Z0-9\-_ ]{1,196}+(?:.pdf)?$", min_length=1, max_length=200
)
] = Field(
None,
description="A name for the PDF file to be created for accounting software that support it.",
title="Pdf Name",
)
currency_exchange_rate: Optional[float] = Field(
1,
description="Exchange rate applicable at the date of the invoice. Required when the invoice currency is different from the folder's default currency.",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "chift"
version = "0.5.17"
version = "0.5.18"
description = "Chift API client"
authors = ["Henry Hertoghe <henry.hertoghe@chift.eu>"]
readme = "README.md"
Expand Down
Loading