Getting Details of a Specific Credit Note
Function: getCreditNoteDetails()
Purpose
The function retrieves detailed information about a specific credit note, including its status, amount, invoice linkage, and custom attributes.
Parameters
Parameter | Type | Description |
---|---|---|
CREDIT_NOTE_ID | string | The unique identifier for the credit note. |
Use Case
This function can be used when a user or system needs to fetch and validate specific credit note details, including its status, amount, and associated invoice. It ensures accurate information for accounting processes, refunds, or audits.
def get_credit_note_details():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = True
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.credit_note.details(id='CREDIT_NOTE_ID')
print(response)
return response
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function getCreditNoteDetails()
{
$id = "CREDIT_NOTE_ID";
try {
$response = $this->creditNoteService->read($id);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response contains detailed information about the credit note, including its status, amount, remaining balance, and other associated metadata. Custom attributes and versioning details are also included for extensibility and traceability.
CreditNoteDetailsDTO(
creditNote=CreditNoteDTO(
status='STATUS',
id='CREDIT_NOTE_ID',
date='DATE',
amount='AMOUNT',
invoiceId='INVOICE_ID',
remainingBalance='REMAINING_BALANCE',
refundable='BOOLEAN',
paymentId='PAYMENT_ID',
customAttributes=[
{'name': 'ATTRIBUTE_NAME_1', 'value': 'ATTRIBUTE_VALUE_1'},
{'name': 'ATTRIBUTE_NAME_2', 'value': 'ATTRIBUTE_VALUE_2'}
],
customObjects=[],
version='VERSION',
createdBy='CREATED_BY',
createdOn='CREATED_ON',
updatedBy='UPDATED_BY',
updatedOn='UPDATED_ON',
uuid='UUID'
)
)
{
"credit_note": {
"status": "STATUS",
"id": "CREDIT_NOTE_ID",
"date": "DATE",
"amount": "AMOUNT",
"invoice_id": "INVOICE_ID",
"remaining_balance": "REMAINING_BALANCE",
"refundable": "BOOLEAN",
"payment_id": "PAYMENT_ID",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
},
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
}
],
"custom_objects": [],
"version": "VERSION",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"updated_by": "UPDATED_BY",
"updated_on": "UPDATED_ON",
"uuid": "UUID"
}
}
Getting a List of Credit Note Applications
Function: getAllCreditNoteApplications()
Purpose
The function retrieves a list of all credit note applications, providing details like date, amount, associated payment and refund IDs, and other metadata.
Parameters
This function does not require any input parameters.
Use Case
This function can be used to fetch all credit note applications for reporting, reconciliation, or auditing purposes. It provides complete visibility into applied credit notes, including their payment and refund statuses, along with pagination details to handle large datasets.
def get_all_credit_note_applications():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = True
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.credit_note.credit_note_application_list()
print(response)
return response
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function getAllCreditNoteApplications()
{
try {
$response = $this->creditNoteService->readAllCreditNoteApplications();
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response contains a list of credit note applications, including details such as the associated credit note ID, payment ID, refund ID, remaining balance, and creation metadata. It also includes pagination details for managing large result sets.
CreditNoteApplicationListDTO(
creditNoteApplications=[
CreditNoteApplicationDTO(
date='DATE',
amount='AMOUNT',
creditNoteId='CREDIT_NOTE_ID',
paymentId='PAYMENT_ID',
refundId='REFUND_ID',
remainingBalance='REMAINING_BALANCE',
createdBy='CREATED_BY',
createdOn='CREATED_ON',
uuid='UUID',
version='VERSION'
)
],
pagination=PaginationDTO(
records='RECORD_COUNT',
limit='LIMIT',
offset='OFFSET',
previousPage='PREVIOUS_PAGE',
nextPage='NEXT_PAGE'
)
)
{
"credit_note_applications": [
{
"date": "DATE",
"amount": "AMOUNT",
"credit_note_id": "CREDIT_NOTE_ID",
"payment_id": "PAYMENT_ID",
"refund_id": "REFUND_ID",
"remaining_balance": "REMAINING_BALANCE",
"created_by": "User",
"created_on": "CREATED_ON",
"uuid": "UUID-PLACEHOLDER",
"version": "VERSION"
}
],
"pagination": {
"records": "RECORDS_PLACEHOLDER",
"limit": "LIMIT_PLACEHOLDER",
"offset": "OFFSET_PLACEHOLDER",
"previous_page": "PREVIOUS_PAGE_PLACEHOLDER",
"next_page": "NEXT_PAGE_PLACEHOLDER"
}
}
Getting Details of a Specifice Credit Note Application
Function: getCreditNoteApplicationDetails()
Purpose
The function retrieves detailed information about a specific credit note application using its unique identifier (UUID).
Parameters
Parameter | Type | Description |
---|---|---|
CREDIT_NOTE_UUID | string | The unique identifier for the credit note application is to be retrieved. |
Use Case
This function can be used when you need to retrieve detailed information about a specific credit note application, typically for auditing, tracking, or reconciling individual credit note transactions. It provides complete insight into a single application, including associated payment and refund details.
def get_credit_note_application_details():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = True
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.credit_note.credit_note_application_details(uuid='CREDIT_NOTE_UUID')
print(response)
return response
public function getCreditNoteApplicationDetails()
{
$creditNoteApplicationsUUID = "CREDIT_NOTE_UUID";
try {
$response = $this->creditNoteService->readCreditNoteApplicationsDetails($creditNoteApplicationsUUID);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response provides detailed information about the credit note application, including the date of application, amount, associated credit note ID, payment ID, refund ID, remaining balance, and metadata such as creation time and version.
CreditNoteApplicationDetailDTO(
creditNoteApplication=CreditNoteApplicationDTO(
date='DATE',
amount='AMOUNT',
creditNoteId='CREDIT_NOTE_ID',
paymentId='PAYMENT_ID',
refundId='REFUND_ID',
remainingBalance='REMAINING_BALANCE',
createdBy='CREATED_BY',
createdOn='CREATED_ON',
uuid='UUID',
version='VERSION'
)
)
{
"credit_note_application": {
"date": "DATE",
"amount": "AMOUNT",
"credit_note_id": "CREDIT_NOTE_ID",
"payment_id": "PAYMENT_ID",
"refund_id": "REFUND_ID",
"remaining_balance": "REMAINING_BALANCE",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"uuid": "UUID",
"version": "VERSION"
}
}
Getting Credit Note Applications List of a Specific Invoice
Function: getInvoiceCreditNoteApplications()
Purpose
The function retrieves a list of all credit note applications associated with a specific invoice, providing transaction details such as amounts, credit note IDs, and payment references.
Parameters
Parameter | Type | Description |
---|---|---|
INVOICE_ID | string | The unique identifier for the invoice to fetch associated credit note applications. |
Use Case
This function can be used for retrieving all credit note applications linked to a specific invoice, aiding in detailed transaction analysis, payment reconciliation, or refund processing. It is particularly helpful for tracking how credit notes have been applied to settle an invoice.
def get_invoice_credit_note_applications():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = True
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.credit_note.invoice_credit_note_application_list(id='INVOICE_ID')
print(response)
return response
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function getInvoiceCreditNoteApplications()
{
$invoiceId = "INVOICE_ID";
try {
$response = $this->creditNoteService->readInvoiceCreditNoteApplications($invoiceId);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response includes a list of credit note applications linked to the specified invoice, detailing each application’s date, amount, associated credit note and payment IDs, remaining balance, and metadata such as creation time and version. Pagination information is provided to manage large datasets.
InvoiceCreditNoteApplicationListDTO(
invoice=CreditNoteApplicationListDTO(
creditNoteApplications=[
CreditNoteApplicationDTO(
date='DATE',
amount='AMOUNT',
creditNoteId='CREDIT_NOTE_ID',
paymentId='PAYMENT_ID',
refundId='REFUND_ID',
remainingBalance='REMAINING_BALANCE',
createdBy='CREATED_BY',
createdOn='CREATED_ON',
uuid='UUID',
version='VERSION'
)
],
pagination=PaginationDTO(
records='RECORD_COUNT',
limit='LIMIT',
offset='OFFSET',
previousPage='PREVIOUS_PAGE',
nextPage='NEXT_PAGE'
)
)
)
{
"invoice": {
"credit_note_applications": [
{
"date": "DATE",
"amount": "AMOUNT",
"credit_note_id": "CREDIT_NOTE_ID",
"payment_id": "PAYMENT_ID",
"refund_id": "REFUND_ID",
"remaining_balance": "REMAINING_BALANCE",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"uuid": "UUID",
"version": "VERSION"
}
],
"pagination": {
"records": "RECORD_COUNT",
"limit": "LIMIT",
"offset": "OFFSET",
"previous_page": "PREVIOUS_PAGE",
"next_page": "NEXT_PAGE"
}
}
}