- list - Get Transactions
- create - Create Transaction
- get_by_external_id - Get Transaction By External Id
- update - Update Transaction
- get_by_id - Get Transaction By Id
- get_by_filing_id - Get Transactions By Filing Id
- create_credit_note - Create Credit Note By Transaction Id
- update_credit_note - Update Credit Note By Transaction Id
The Get Transactions API retrieves a list of transactions with optional filtering, sorting, and pagination.
from kintsugi_tax_platform_sdk import SDK, models
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.list(address_status_in="UNVERIFIED,INVALID,PARTIALLY_VERIFIED,VERIFIED,UNVERIFIABLE", order_by="date,state,customer_name,status", page=1, size=50)
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
state_code |
Optional[str] | ➖ | Filter transactions by state code. |
transaction_type |
Optional[str] | ➖ | Filter by transaction type (e.g., SALE, FULL_CREDIT_NOTE, PARTIAL_CREDIT_NOTE, ARCHIVE etc.). |
transaction_source |
Optional[str] | ➖ | Filter transactions based on the source. |
search_query |
Optional[str] | ➖ | Search for transactions using a general query (e.g., order ID, customer name). |
country |
List[models.CountryCodeEnum] | ➖ | Filter transactions by country code (ISO 3166-1 alpha-2 format, e.g., US). |
state |
Optional[str] | ➖ | Filter by full state name (e.g., California). |
address_status_in |
Optional[str] | ➖ | Filter by address status (e.g., UNVERIFIED, INVALID, PARTIALLY_VERIFIED, VERIFIED, UNVERIFIABLE). |
status |
Optional[models.TransactionStatusEnum] | ➖ | Filter by transaction status (e.g., PENDING, COMMITTED, CANCELLED, FULLY_REFUNDED, PARTIALLY_REFUNDED, ARCHIVED). |
filing_id |
Optional[str] | ➖ | Retrieve transactions linked to a specific filing ID. |
order_by |
Optional[str] | ➖ | Sort results based on specified fields. Prefix with - for descending order (e.g., -date for newest first). |
date_gte |
Optional[str] | ➖ | Retrieve transactions with a date greater than or equal to (YYYY-MM-DD). |
date_lte |
Optional[str] | ➖ | Retrieve transactions with a date less than or equal to (YYYY-MM-DD). |
processing_status_in |
Optional[str] | ➖ | Filter transactions based on processing status. Multiple values can be passed as a comma-separated list. |
marketplace |
Optional[bool] | ➖ | Filter transactions by marketplace (e.g., AMAZON, EBAY). |
exempt_in |
Optional[str] | ➖ | Filter transactions by exemption status. Multiple values can be passed as a comma-separated list (e.g., EXEMPT,TAXABLE). |
page |
Optional[int] | ➖ | Page number |
size |
Optional[int] | ➖ | Page size |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 401, 404 | application/json |
| errors.BackendSrcTransactionsResponsesValidationErrorResponse | 422 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Create a transaction.
from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.create(organization_id="<id>", external_id="<id>", date_=parse_datetime("2025-11-05T23:48:53.053Z"), addresses=[], transaction_items=[], customer={
"organization_id": "<id>",
}, type_=models.TransactionTypeEnum.ARCHIVE, total_amount=0, marketplace=False, total_tax_amount_imported=0, tax_rate_imported=0, total_tax_amount_calculated=0, tax_rate_calculated=0, total_tax_liability_amount=0, taxable_amount=0, locked=False)
# Handle response
print(res)from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.create(organization_id="<id>", external_id="<id>", date_=parse_datetime("2025-11-05T23:48:53.053Z"), addresses=[], transaction_items=[], customer={
"organization_id": "<id>",
}, type_=models.TransactionTypeEnum.ARCHIVE, total_amount=0, marketplace=False, total_tax_amount_imported=0, tax_rate_imported=0, total_tax_amount_calculated=0, tax_rate_calculated=0, total_tax_liability_amount=0, taxable_amount=0, locked=False)
# Handle response
print(res)from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.create(organization_id="<id>", external_id="<id>", date_=parse_datetime("2025-11-05T23:48:53.053Z"), addresses=[], transaction_items=[], customer={
"organization_id": "<id>",
}, type_=models.TransactionTypeEnum.ARCHIVE, total_amount=0, marketplace=False, total_tax_amount_imported=0, tax_rate_imported=0, total_tax_amount_calculated=0, tax_rate_calculated=0, total_tax_liability_amount=0, taxable_amount=0, locked=False)
# Handle response
print(res)from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.create(organization_id="<id>", external_id="<id>", date_=parse_datetime("2025-11-05T23:48:53.053Z"), addresses=[], transaction_items=[], customer={
"organization_id": "<id>",
}, type_=models.TransactionTypeEnum.ARCHIVE, total_amount=0, marketplace=False, total_tax_amount_imported=0, tax_rate_imported=0, total_tax_amount_calculated=0, tax_rate_calculated=0, total_tax_liability_amount=0, taxable_amount=0, locked=False)
# Handle response
print(res)from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.create(organization_id="<id>", external_id="<id>", date_=parse_datetime("2025-11-05T23:48:53.053Z"), addresses=[], transaction_items=[], customer={
"organization_id": "<id>",
}, type_=models.TransactionTypeEnum.ARCHIVE, total_amount=0, marketplace=False, total_tax_amount_imported=0, tax_rate_imported=0, total_tax_amount_calculated=0, tax_rate_calculated=0, total_tax_liability_amount=0, taxable_amount=0, locked=False)
# Handle response
print(res)from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.create(organization_id="<id>", external_id="<id>", date_=parse_datetime("2025-11-05T23:48:53.053Z"), addresses=[], transaction_items=[], customer={
"organization_id": "<id>",
}, type_=models.TransactionTypeEnum.ARCHIVE, total_amount=0, marketplace=False, total_tax_amount_imported=0, tax_rate_imported=0, total_tax_amount_calculated=0, tax_rate_calculated=0, total_tax_liability_amount=0, taxable_amount=0, locked=False)
# Handle response
print(res)from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.create(organization_id="<id>", external_id="<id>", date_=parse_datetime("2025-11-05T23:48:53.053Z"), addresses=[], transaction_items=[], customer={
"organization_id": "<id>",
}, type_=models.TransactionTypeEnum.ARCHIVE, total_amount=0, marketplace=False, total_tax_amount_imported=0, tax_rate_imported=0, total_tax_amount_calculated=0, tax_rate_calculated=0, total_tax_liability_amount=0, taxable_amount=0, locked=False)
# Handle response
print(res)from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.create(organization_id="<id>", external_id="<id>", date_=parse_datetime("2025-11-05T23:48:53.053Z"), addresses=[], transaction_items=[], customer={
"organization_id": "<id>",
}, type_=models.TransactionTypeEnum.ARCHIVE, total_amount=0, marketplace=False, total_tax_amount_imported=0, tax_rate_imported=0, total_tax_amount_calculated=0, tax_rate_calculated=0, total_tax_liability_amount=0, taxable_amount=0, locked=False)
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
organization_id |
str | ✔️ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Unique identifier of the organization. This field is deprecated, and should no longer be used. The value is populated through the 'x-organization-id' header. |
external_id |
str | ✔️ | External identifier of the transaction. |
date_ |
date | ✔️ | Transaction date and time |
addresses |
List[models.TransactionAddressPublic] | ✔️ | N/A |
transaction_items |
List[models.TransactionItemBuilder] | ✔️ | N/A |
customer |
models.CustomerBaseBase | ✔️ | N/A |
type |
models.TransactionTypeEnum | ✔️ | N/A |
requires_exemption |
Optional[models.ExemptionRequired] | ➖ | N/A |
shop_date |
Optional[str] | ➖ | Transaction date in the shop's local timezone |
shop_date_tz |
Optional[str] | ➖ | Timezone of the shop |
description |
Optional[str] | ➖ | Description of the transaction. |
refund_status |
Optional[models.TransactionRefundStatus] | ➖ | Shopify has 2 order statuses for refund case: refunded and partially_refunded If the given order has different status from these 2, we will set the transaction's refund_status to PARTIALLY_REFUNDED by default. |
total_amount |
Optional[float] | ➖ | Total amount of the transaction. |
customer_id |
Optional[str] | ➖ | Unique identifier of the customer. |
marketplace |
Optional[bool] | ➖ | Indicates if transaction is marketplace-based. |
exempt |
Optional[models.TransactionExemptStatusEnum] | ➖ | Based on transaction item exempt status. NOT EXEMPT: None of the items are NOT EXEMPT PARTIALLY EXEMPT: At least some of the items are NOT EXEMPT FULLY_EXEMPT: All items sold in the transaction are EXEMPT ZERO_RATE_NOT_EXEMPT: All items sold in the transaction are zero-rated |
exemptions |
List[models.Exemption] | ➖ | List of exemptions applied (if any). |
related_to |
Optional[str] | ➖ | Related transaction identifier. |
secondary_external_id |
Optional[str] | ➖ | Secondary External Identifier. |
secondary_source |
Optional[str] | ➖ | Secondary source information |
external_friendly_id |
Optional[str] | ➖ | Friendly identifier of the original item. |
total_tax_amount_imported |
Optional[float] | ➖ | Imported tax amount. |
tax_rate_imported |
Optional[float] | ➖ | Imported tax rate. |
total_tax_amount_calculated |
Optional[float] | ➖ | Calculated tax amount. |
tax_rate_calculated |
Optional[float] | ➖ | Calculated tax rate. |
total_tax_liability_amount |
Optional[float] | ➖ | Total tax liability amount. |
tax_liability_source |
Optional[models.TaxLiabilitySourceEnum] | ➖ | N/A |
taxable_amount |
Optional[float] | ➖ | Taxable amount. |
currency |
Optional[models.CurrencyEnum] | ➖ | N/A |
locked |
Optional[bool] | ➖ | Transaction lock status. |
source |
Optional[models.SourceEnum] | ➖ | N/A |
connection_id |
Optional[str] | ➖ | Connection Identifier |
filing_id |
Optional[str] | ➖ | Filing identifier. |
city |
Optional[str] | ➖ | City of the transaction address. |
county |
Optional[str] | ➖ | County of the transaction address. |
state |
Optional[str] | ➖ | State of the transaction address. |
country |
Optional[models.CountryCodeEnum] | ➖ | N/A |
postal_code |
Optional[str] | ➖ | Postal code of the transaction. |
tax_id |
Optional[str] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Tax ID associated with the transaction. DEPRECATED: This field is only populated for QuickBooks integrations and will be removed in a future version. |
status |
Optional[models.TransactionStatusEnum] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 400, 401 | application/json |
| errors.BackendSrcTransactionsResponsesValidationErrorResponse | 422 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Retrieves a specific transaction based on its external ID. This allows users to fetch transaction details using an identifier from an external system.
from kintsugi_tax_platform_sdk import SDK, models
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.get_by_external_id(external_id="<id>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
external_id |
str | ✔️ | The unique external identifier of the transaction. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 401, 404 | application/json |
| errors.BackendSrcTransactionsResponsesValidationErrorResponse | 422 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Update a specific transaction by its ID.
from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.update(transaction_id="<id>", organization_id="orgn_argaLQwMy2fJc", external_id="EXT12345", date_=parse_datetime("2025-04-02T17:36:59.814Z"), addresses=[
{
"type": models.AddressType.BILL_TO,
},
], transaction_items=[
models.TransactionItemCreateUpdate(
organization_id="orgn_argaLQwMy2fJc",
date_=parse_datetime("2025-04-02T17:36:59.814Z"),
external_product_id="1186DUMMYITEM",
),
], customer={}, total_amount=0, marketplace=False, total_tax_amount_imported=0, tax_rate_imported=0, total_tax_amount_calculated=0, tax_rate_calculated=0, total_tax_liability_amount=0, taxable_amount=0, locked=False)
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id |
str | ✔️ | N/A |
organization_id |
str | ✔️ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Unique identifier of the organization. This field is deprecated, and should no longer be used. The value is populated through the 'x-organization-id' header. |
external_id |
str | ✔️ | External identifier of the transaction. |
date_ |
date | ✔️ | Transaction date and time |
addresses |
List[models.TransactionAddressBuilder] | ✔️ | N/A |
transaction_items |
List[models.TransactionItemCreateUpdate] | ✔️ | N/A |
customer |
models.CustomerUpdate | ✔️ | N/A |
requires_exemption |
Optional[models.ExemptionRequired] | ➖ | N/A |
shop_date |
Optional[str] | ➖ | Transaction date in the shop's local timezone |
shop_date_tz |
Optional[str] | ➖ | Timezone of the shop |
description |
Optional[str] | ➖ | Description of the transaction. |
refund_status |
Optional[models.TransactionRefundStatus] | ➖ | Shopify has 2 order statuses for refund case: refunded and partially_refunded If the given order has different status from these 2, we will set the transaction's refund_status to PARTIALLY_REFUNDED by default. |
total_amount |
Optional[float] | ➖ | Total amount of the transaction. |
customer_id |
Optional[str] | ➖ | Unique identifier of the customer. |
marketplace |
Optional[bool] | ➖ | Indicates if transaction is marketplace-based. |
exempt |
Optional[models.TransactionExemptStatusEnum] | ➖ | Based on transaction item exempt status. NOT EXEMPT: None of the items are NOT EXEMPT PARTIALLY EXEMPT: At least some of the items are NOT EXEMPT FULLY_EXEMPT: All items sold in the transaction are EXEMPT ZERO_RATE_NOT_EXEMPT: All items sold in the transaction are zero-rated |
exemptions |
List[models.Exemption] | ➖ | List of exemptions applied (if any). |
related_to |
Optional[str] | ➖ | Related transaction identifier. |
secondary_external_id |
Optional[str] | ➖ | Secondary External Identifier. |
secondary_source |
Optional[str] | ➖ | Secondary source information |
external_friendly_id |
Optional[str] | ➖ | Friendly identifier of the original item. |
total_tax_amount_imported |
Optional[float] | ➖ | Imported tax amount. |
tax_rate_imported |
Optional[float] | ➖ | Imported tax rate. |
total_tax_amount_calculated |
Optional[float] | ➖ | Calculated tax amount. |
tax_rate_calculated |
Optional[float] | ➖ | Calculated tax rate. |
total_tax_liability_amount |
Optional[float] | ➖ | Total tax liability amount. |
tax_liability_source |
Optional[models.TaxLiabilitySourceEnum] | ➖ | N/A |
taxable_amount |
Optional[float] | ➖ | Taxable amount. |
currency |
Optional[models.CurrencyEnum] | ➖ | N/A |
locked |
Optional[bool] | ➖ | Transaction lock status. |
source |
Optional[models.SourceEnum] | ➖ | N/A |
connection_id |
Optional[str] | ➖ | Connection Identifier |
filing_id |
Optional[str] | ➖ | Filing identifier. |
city |
Optional[str] | ➖ | City of the transaction address. |
county |
Optional[str] | ➖ | County of the transaction address. |
state |
Optional[str] | ➖ | State of the transaction address. |
country |
Optional[models.CountryCodeEnum] | ➖ | N/A |
postal_code |
Optional[str] | ➖ | Postal code of the transaction. |
tax_id |
Optional[str] | ➖ | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. Tax ID associated with the transaction. DEPRECATED: This field is only populated for QuickBooks integrations and will be removed in a future version. |
status |
Optional[models.TransactionStatusEnum] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.APIError | 4XX, 5XX | */* |
The Get Transaction By Id API retrieves detailed information about a specific transaction by providing its unique transaction ID.
from kintsugi_tax_platform_sdk import SDK, models
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.get_by_id(transaction_id="<id>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
transaction_id |
str | ✔️ | The unique identifier of the transaction to retrieve. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 401, 404 | application/json |
| errors.BackendSrcTransactionsResponsesValidationErrorResponse | 422 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Retrieve transactions by filing ID.
from kintsugi_tax_platform_sdk import SDK, models
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.get_by_filing_id(filing_id="<id>")
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
filing_id |
str | ✔️ | The unique identifier of the filing whose transactions you wish to retrieve. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.ErrorResponse | 401 | application/json |
| errors.BackendSrcTransactionsResponsesValidationErrorResponse | 422 | application/json |
| errors.ErrorResponse | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Create a new credit note for a specific transaction.
from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.create_credit_note(original_transaction_id="<id>", external_id="CN-12345", date_=parse_datetime("2024-10-27T14:30:00Z"), status=models.Status.PENDING, total_amount=50, currency=models.CurrencyEnum.USD, transaction_items=[
{
"external_id": "ITEM-1",
"date_": parse_datetime("2024-10-27T14:30:00Z"),
"external_product_id": "PROD-ABC",
"quantity": 1,
"amount": 50,
},
], description="Refund for damaged product", marketplace=False)
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
original_transaction_id |
str | ✔️ | N/A |
external_id |
str | ✔️ | Unique identifier for the credit note in the external system. |
date_ |
date | ✔️ | Date when the credit note was issued or created. |
status |
models.Status | ✔️ | Current state of the credit note in its lifecycle. |
total_amount |
float | ✔️ | Total monetary value of the credit note, including all items and taxes. |
currency |
models.CurrencyEnum | ✔️ | N/A |
transaction_items |
List[models.CreditNoteItemCreateUpdate] | ✔️ | Detailed list of individual items included in this credit note. |
description |
Optional[str] | ➖ | Brief explanation or reason for issuing the credit note. |
marketplace |
Optional[bool] | ➖ | Indicates whether this credit note is associated with a marketplace transaction. |
tax_amount_imported |
Optional[float] | ➖ | Pre-calculated total tax amount for the entire credit note, if provided by the external system. |
tax_rate_imported |
Optional[float] | ➖ | Pre-calculated overall tax rate for the credit note, if provided by the external system. |
taxable_amount |
Optional[float] | ➖ | Total portion of the credit note amount subject to taxation. |
addresses |
List[models.TransactionAddressBuilder] | ➖ | A list of TransactionAddressBuilder objects or None if no addresses are provided. This field represents the addresses associated with the transaction. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Update an existing credit note for a specific transaction.
from kintsugi_tax_platform_sdk import SDK, models
from kintsugi_tax_platform_sdk.utils import parse_datetime
with SDK(
security=models.Security(
api_key_header="<YOUR_API_KEY_HERE>",
custom_header="<YOUR_API_KEY_HERE>",
),
) as sdk:
res = sdk.transactions.update_credit_note(original_transaction_id="<id>", credit_note_id="<id>", external_id="<id>", date_=parse_datetime("2023-07-25T11:01:44.924Z"), status=models.Status.CANCELLED, total_amount=0, currency=models.CurrencyEnum.SPL, transaction_items=[
{
"external_id": "<id>",
"date_": parse_datetime("2024-09-15T23:01:02.880Z"),
"external_product_id": "<id>",
"quantity": 1,
"amount": 0,
},
], marketplace=False)
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
original_transaction_id |
str | ✔️ | N/A |
credit_note_id |
str | ✔️ | N/A |
external_id |
str | ✔️ | Unique identifier for the credit note in the external system. |
date_ |
date | ✔️ | Date when the credit note was issued or created. |
status |
models.Status | ✔️ | Current state of the credit note in its lifecycle. |
total_amount |
float | ✔️ | Total monetary value of the credit note, including all items and taxes. |
currency |
models.CurrencyEnum | ✔️ | N/A |
transaction_items |
List[models.CreditNoteItemCreateUpdate] | ✔️ | Detailed list of individual items included in this credit note. |
description |
Optional[str] | ➖ | Brief explanation or reason for issuing the credit note. |
marketplace |
Optional[bool] | ➖ | Indicates whether this credit note is associated with a marketplace transaction. |
tax_amount_imported |
Optional[float] | ➖ | Pre-calculated total tax amount for the entire credit note, if provided by the external system. |
tax_rate_imported |
Optional[float] | ➖ | Pre-calculated overall tax rate for the credit note, if provided by the external system. |
taxable_amount |
Optional[float] | ➖ | Total portion of the credit note amount subject to taxation. |
addresses |
List[models.TransactionAddressBuilder] | ➖ | A list of TransactionAddressBuilder objects or None if no addresses are provided. This field represents the addresses associated with the transaction. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.HTTPValidationError | 422 | application/json |
| errors.APIError | 4XX, 5XX | */* |