All URIs are relative to http://localhost:8700
| Method | HTTP request | Description |
|---|---|---|
| allocate_receipt_payment | POST /fiscal-document/v1/fiscal-documents/receipt/allocate-payment | Allocate payment associated with receipt to charge transactions. |
| apply_receipt | POST /fiscal-document/v1/fiscal-documents/receipts/{receiptId}/apply | Apply receipt to invoice |
| create_credit_note | POST /fiscal-document/v1/fiscal-documents/credit-note | Create a fiscal document of the type credit note |
| create_invoice | POST /fiscal-document/v1/fiscal-documents/invoice | Create a fiscal document of the type invoice |
| create_pro_forma_invoice | POST /fiscal-document/v1/fiscal-documents/pro-forma-invoice | Create a fiscal document of the type pro forma invoice |
| create_receipt | POST /fiscal-document/v1/fiscal-documents/receipt | Create receipt for a payment. |
| create_rectify_invoice | POST /fiscal-document/v1/fiscal-documents/rectify-invoice | Create a fiscal document of the type rectify invoice |
| create_settlement_invoice | POST /fiscal-document/v1/fiscal-documents/{advance_invoice_id}/settlement | Create a settlement invoice for an advance invoice |
| create_simple_receipt | POST /fiscal-document/v1/fiscal-documents/simple-receipt | Create simple receipts. |
| download_fiscal_document | GET /fiscal-document/v1/fiscal-documents/{id}/download | Download fiscal document |
| email_fiscal_document | POST /fiscal-document/v1/fiscal-documents/{id}/email | Email a fiscal document |
| get_allocations | GET /fiscal-document/v1/fiscal-documents/allocations | Get payment allocation transactions |
| get_allocations_summary | GET /fiscal-document/v1/fiscal-documents/allocations/summary | Get allocations summary |
| get_credit_note_preview | POST /fiscal-document/v1/fiscal-documents/credit-note/preview | Get fiscal document preview of the type credit note |
| get_document_preview | POST /fiscal-document/v1/fiscal-documents/invoice/preview | Get fiscal document preview of the type invoice |
| get_fiscal_document_recipients_by_id | GET /fiscal-document/v1/fiscal-documents/{id}/recipients | Get list of recipients associated to the fiscal document |
| get_fiscal_document_transactions | GET /fiscal-document/v1/fiscal-documents/transactions | Get available transactions for fiscal documents |
| get_fiscal_document_transactions_by_id | GET /fiscal-document/v1/fiscal-documents/{id}/transactions | Get list of transactions for a given fiscal document id |
| get_fiscal_document_transactions_for_allocation | GET /fiscal-document/v1/fiscal-documents/allocations/transactions | Get available transactions for allocations |
| get_fiscal_documents | GET /fiscal-document/v1/fiscal-documents | Get list of fiscal documents |
| get_invoice_allocations | GET /fiscal-document/v1/invoices/{id}/receipts/allocations | Get allocations for an invoice |
| get_pro_forma_preview | POST /fiscal-document/v1/fiscal-documents/pro-forma-invoice/preview | Create a fiscal document of the type pro forma invoice |
| get_rectify_invoice_preview | POST /fiscal-document/v1/fiscal-documents/rectify-invoice/preview | Get fiscal document preview of the type rectify invoice |
| get_selected_transactions_summary | GET /fiscal-document/v1/fiscal-documents/transactions/summary | Get totals of selected available transactions for fiscal documents (deprecated) |
| get_transactions_summary_by_document_id | GET /fiscal-document/v1/fiscal-documents/{id}/transactions/summary | Get totals of transactions for a given fiscal document id |
| post_selected_transactions_summary | POST /fiscal-document/v1/fiscal-documents/transactions/summary | Get totals of selected available transactions for fiscal documents |
| put_fiscal_document | PUT /fiscal-document/v1/fiscal-documents/{id} | Update a fiscal document by id |
| update_pro_forma_invoice_status | PUT /fiscal-document/v1/fiscal-documents/pro-forma-invoice/{id}/status | Update pro forma invoice status |
| void_receipt | POST /fiscal-document/v1/fiscal-documents/receipts/{receiptId}/void | Void a receipt |
FiscalDocumentSummaryResponse allocate_receipt_payment(x_property_id, allocate_receipt_payment_request)
Allocate payment associated with receipt to charge transactions.
Allocate payment associated with receipt to charge transactions. The amounts of all allocations must be equal to the payment amount. The transactions should not be fully allocated already and the amount allocated should not be more than the remaining balance on the transaction. All transactions not part of an invoice will be added to newly created invoice.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.allocate_receipt_payment_request import AllocateReceiptPaymentRequest
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
allocate_receipt_payment_request = cloudbeds_fiscal_document.AllocateReceiptPaymentRequest() # AllocateReceiptPaymentRequest |
try:
# Allocate payment associated with receipt to charge transactions.
api_response = api_instance.allocate_receipt_payment(x_property_id, allocate_receipt_payment_request)
print("The response of FiscalDocumentsApi->allocate_receipt_payment:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->allocate_receipt_payment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| allocate_receipt_payment_request | AllocateReceiptPaymentRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Receipt will be accepted to start the process of document creation according to country rules | - |
| 400 | Bad Request | - |
| 404 | Payment or payment transaction not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
apply_receipt(x_property_id, receipt_id, apply_receipt_request)
Apply receipt to invoice
Apply receipt to invoice. Receipt should not have allocations
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.apply_receipt_request import ApplyReceiptRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
receipt_id = 56 # int | The ID of the receipt
apply_receipt_request = cloudbeds_fiscal_document.ApplyReceiptRequest() # ApplyReceiptRequest |
try:
# Apply receipt to invoice
api_instance.apply_receipt(x_property_id, receipt_id, apply_receipt_request)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->apply_receipt: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| receipt_id | int | The ID of the receipt | |
| apply_receipt_request | ApplyReceiptRequest |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Receipt successfully voided | - |
| 400 | Bad Request - Invalid status or document type | - |
| 404 | Receipt not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentSummaryResponse create_credit_note(x_property_id, create_credit_note_request)
Create a fiscal document of the type credit note
Create a fiscal document of the type credit note.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.create_credit_note_request import CreateCreditNoteRequest
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
create_credit_note_request = cloudbeds_fiscal_document.CreateCreditNoteRequest() # CreateCreditNoteRequest |
try:
# Create a fiscal document of the type credit note
api_response = api_instance.create_credit_note(x_property_id, create_credit_note_request)
print("The response of FiscalDocumentsApi->create_credit_note:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->create_credit_note: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| create_credit_note_request | CreateCreditNoteRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentSummaryResponse create_invoice(x_property_id, create_invoice_request)
Create a fiscal document of the type invoice
Create a fiscal document of the type invoice.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.create_invoice_request import CreateInvoiceRequest
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
create_invoice_request = cloudbeds_fiscal_document.CreateInvoiceRequest() # CreateInvoiceRequest |
try:
# Create a fiscal document of the type invoice
api_response = api_instance.create_invoice(x_property_id, create_invoice_request)
print("The response of FiscalDocumentsApi->create_invoice:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->create_invoice: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| create_invoice_request | CreateInvoiceRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentSummaryResponse create_pro_forma_invoice(x_property_id, pro_forma_invoice_request)
Create a fiscal document of the type pro forma invoice
Create a fiscal document of the type pro forma invoice.
Pro Forma Invoice Characteristics:
- Contains pending transactions that are subject to change
- Includes payment information
- Transactions are NOT locked (unlike regular invoices)
- Can be converted to regular invoices later when transactions are posted
- Has its own sequence numbering and settings
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.models.pro_forma_invoice_request import ProFormaInvoiceRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
pro_forma_invoice_request = cloudbeds_fiscal_document.ProFormaInvoiceRequest() # ProFormaInvoiceRequest |
try:
# Create a fiscal document of the type pro forma invoice
api_response = api_instance.create_pro_forma_invoice(x_property_id, pro_forma_invoice_request)
print("The response of FiscalDocumentsApi->create_pro_forma_invoice:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->create_pro_forma_invoice: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| pro_forma_invoice_request | ProFormaInvoiceRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentSummaryResponse create_receipt(x_property_id, create_receipt_request)
Create receipt for a payment.
Create a receipt for a payment and optionally specify allocations per transaction. In case of no allocations, a 'Simple receipt' will be created that can later be allocated to charge transactions. The amounts of all allocations must be equal to the payment amount. The transactions should not be fully allocated already and the amount allocated should not be more than the remaining balance on the transaction. All transactions not part of an invoice will be added to newly created invoice.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.create_receipt_request import CreateReceiptRequest
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
create_receipt_request = cloudbeds_fiscal_document.CreateReceiptRequest() # CreateReceiptRequest |
try:
# Create receipt for a payment.
api_response = api_instance.create_receipt(x_property_id, create_receipt_request)
print("The response of FiscalDocumentsApi->create_receipt:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->create_receipt: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| create_receipt_request | CreateReceiptRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Receipt successfully created | - |
| 400 | Bad Request | - |
| 404 | Payment or payment transaction not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentSummaryResponse create_rectify_invoice(x_property_id, rectify_invoice_note_request)
Create a fiscal document of the type rectify invoice
Create a fiscal document of the type rectify invoice.
Spanish Fiscal Regulations:
- Only available for properties in Spain
- An invoice that has already been rectified cannot be rectified again
- To make corrections to a rectified invoice, you must rectify the most recent invoice in the rectification chain
Validation Rules:
- The target invoice must not have been previously rectified
- If the invoice has been rectified, the API will return an error with details about which invoice should be rectified instead
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.models.rectify_invoice_note_request import RectifyInvoiceNoteRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
rectify_invoice_note_request = cloudbeds_fiscal_document.RectifyInvoiceNoteRequest() # RectifyInvoiceNoteRequest |
try:
# Create a fiscal document of the type rectify invoice
api_response = api_instance.create_rectify_invoice(x_property_id, rectify_invoice_note_request)
print("The response of FiscalDocumentsApi->create_rectify_invoice:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->create_rectify_invoice: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| rectify_invoice_note_request | RectifyInvoiceNoteRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request - Validation errors | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentSummaryResponse create_settlement_invoice(x_property_id, advance_invoice_id, create_settlement_invoice_request)
Create a settlement invoice for an advance invoice
Create a settlement invoice linked to an existing advance invoice.
A settlement invoice finalizes the billing cycle started by an advance invoice. It references the advance invoice and may include additional transactions that were not part of the original advance.
Validation Rules:
- The parent document must be an ADVANCE_INVOICE
- The parent document must be in an active status
- There must not already be an active settlement invoice for this advance
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.create_settlement_invoice_request import CreateSettlementInvoiceRequest
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
advance_invoice_id = 56 # int | The ID of the advance invoice to settle
create_settlement_invoice_request = cloudbeds_fiscal_document.CreateSettlementInvoiceRequest() # CreateSettlementInvoiceRequest |
try:
# Create a settlement invoice for an advance invoice
api_response = api_instance.create_settlement_invoice(x_property_id, advance_invoice_id, create_settlement_invoice_request)
print("The response of FiscalDocumentsApi->create_settlement_invoice:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->create_settlement_invoice: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| advance_invoice_id | int | The ID of the advance invoice to settle | |
| create_settlement_invoice_request | CreateSettlementInvoiceRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[FiscalDocumentSummaryResponse] create_simple_receipt(x_property_id, create_simple_receipt_request)
Create simple receipts.
Create receipts for list of payments without allocations.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.create_simple_receipt_request import CreateSimpleReceiptRequest
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
create_simple_receipt_request = cloudbeds_fiscal_document.CreateSimpleReceiptRequest() # CreateSimpleReceiptRequest |
try:
# Create simple receipts.
api_response = api_instance.create_simple_receipt(x_property_id, create_simple_receipt_request)
print("The response of FiscalDocumentsApi->create_simple_receipt:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->create_simple_receipt: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| create_simple_receipt_request | CreateSimpleReceiptRequest |
List[FiscalDocumentSummaryResponse]
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Receipt successfully created | - |
| 400 | Bad Request | - |
| 404 | Payment or payment transaction not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray download_fiscal_document(id, x_property_id)
Download fiscal document
Initiates the download of the fiscal document file
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
id = 'id_example' # str | Unique ID of the fiscal document to download.
x_property_id = 56 # int | Property id
try:
# Download fiscal document
api_response = api_instance.download_fiscal_document(id, x_property_id)
print("The response of FiscalDocumentsApi->download_fiscal_document:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->download_fiscal_document: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique ID of the fiscal document to download. | |
| x_property_id | int | Property id |
bytearray
- Content-Type: Not defined
- Accept: application/octet-stream
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful file download | * Content-Disposition - Used to indicate if the content should be displayed inline or as an attachment. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object email_fiscal_document(id, x_property_id, fiscal_document_email_request)
Email a fiscal document
Initiates the process to send the invoice to a customer
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_email_request import FiscalDocumentEmailRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
id = 'id_example' # str | Unique ID of the fiscal document to download.
x_property_id = 56 # int | Property id
fiscal_document_email_request = cloudbeds_fiscal_document.FiscalDocumentEmailRequest() # FiscalDocumentEmailRequest |
try:
# Email a fiscal document
api_response = api_instance.email_fiscal_document(id, x_property_id, fiscal_document_email_request)
print("The response of FiscalDocumentsApi->email_fiscal_document:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->email_fiscal_document: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique ID of the fiscal document to download. | |
| x_property_id | int | Property id | |
| fiscal_document_email_request | FiscalDocumentEmailRequest |
object
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[AllocationsData] get_allocations(x_property_id, source_ids=source_ids, source_identifiers=source_identifiers, source_kind=source_kind, receipt_ids=receipt_ids)
Get payment allocation transactions
Retrieves payment allocations.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.allocations_data import AllocationsData
from cloudbeds_fiscal_document.models.source_kind import SourceKind
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
source_ids = [56] # List[int] | source IDs. (optional)
source_identifiers = ['source_identifiers_example'] # List[str] | source Identifiers. (optional)
source_kind = cloudbeds_fiscal_document.SourceKind() # SourceKind | Filter by source kind. (optional)
receipt_ids = [56] # List[int] | document IDs. (optional)
try:
# Get payment allocation transactions
api_response = api_instance.get_allocations(x_property_id, source_ids=source_ids, source_identifiers=source_identifiers, source_kind=source_kind, receipt_ids=receipt_ids)
print("The response of FiscalDocumentsApi->get_allocations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_allocations: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| source_ids | List[int] | source IDs. | [optional] |
| source_identifiers | List[str] | source Identifiers. | [optional] |
| source_kind | SourceKind | Filter by source kind. | [optional] |
| receipt_ids | List[int] | document IDs. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AllocationsSummary get_allocations_summary(x_property_id, source_id, source_kind, folio_ids=folio_ids, document_ids=document_ids)
Get allocations summary
Retrieves allocations summary.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.allocations_summary import AllocationsSummary
from cloudbeds_fiscal_document.models.source_kind import SourceKind
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
source_id = 56 # int | source ID.
source_kind = cloudbeds_fiscal_document.SourceKind() # SourceKind | Filter by source kind.
folio_ids = [56] # List[int] | Filter by folio IDs. (optional)
document_ids = [56] # List[int] | document IDs. (optional)
try:
# Get allocations summary
api_response = api_instance.get_allocations_summary(x_property_id, source_id, source_kind, folio_ids=folio_ids, document_ids=document_ids)
print("The response of FiscalDocumentsApi->get_allocations_summary:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_allocations_summary: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| source_id | int | source ID. | |
| source_kind | SourceKind | Filter by source kind. | |
| folio_ids | List[int] | Filter by folio IDs. | [optional] |
| document_ids | List[int] | document IDs. | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_credit_note_preview(x_property_id, get_credit_note_preview_request)
Get fiscal document preview of the type credit note
Get fiscal document preview of the type credit note.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.get_credit_note_preview_request import GetCreditNotePreviewRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
get_credit_note_preview_request = cloudbeds_fiscal_document.GetCreditNotePreviewRequest() # GetCreditNotePreviewRequest |
try:
# Get fiscal document preview of the type credit note
api_response = api_instance.get_credit_note_preview(x_property_id, get_credit_note_preview_request)
print("The response of FiscalDocumentsApi->get_credit_note_preview:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_credit_note_preview: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| get_credit_note_preview_request | GetCreditNotePreviewRequest |
bytearray
- Content-Type: application/json
- Accept: application/octet-stream
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful file download | * Content-Disposition - Used to indicate if the content should be displayed inline or as an attachment. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_document_preview(x_property_id, get_invoice_preview_request)
Get fiscal document preview of the type invoice
Get fiscal document preview of the type invoice.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.get_invoice_preview_request import GetInvoicePreviewRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
get_invoice_preview_request = cloudbeds_fiscal_document.GetInvoicePreviewRequest() # GetInvoicePreviewRequest |
try:
# Get fiscal document preview of the type invoice
api_response = api_instance.get_document_preview(x_property_id, get_invoice_preview_request)
print("The response of FiscalDocumentsApi->get_document_preview:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_document_preview: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| get_invoice_preview_request | GetInvoicePreviewRequest |
bytearray
- Content-Type: application/json
- Accept: application/octet-stream
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful file download | * Content-Disposition - Used to indicate if the content should be displayed inline or as an attachment. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[FiscalDocumentRecipient] get_fiscal_document_recipients_by_id(id, x_property_id)
Get list of recipients associated to the fiscal document
Retrieves a list of recipients associated to the transaction.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_recipient import FiscalDocumentRecipient
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
id = 'id_example' # str | Unique ID of the fiscal document to download.
x_property_id = 56 # int | Property id
try:
# Get list of recipients associated to the fiscal document
api_response = api_instance.get_fiscal_document_recipients_by_id(id, x_property_id)
print("The response of FiscalDocumentsApi->get_fiscal_document_recipients_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_fiscal_document_recipients_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique ID of the fiscal document to download. | |
| x_property_id | int | Property id |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentTransactionsPaginated get_fiscal_document_transactions(x_property_id, source_id, source_kind, for_document_type=for_document_type, document_kind=document_kind, page_token=page_token, limit=limit, sort=sort, folio_ids=folio_ids)
Get available transactions for fiscal documents
Retrieves a paginated list of available transactions for a source based on the document type.
- For INVOICE: Returns posted (paid) transactions, and pending transactions when feature.fiscal-document.pending-transactions is enabled
- For CREDIT_NOTE: Returns posted (paid) transactions, and pending transactions when feature.fiscal-document.pending-transactions is enabled
- For PRO_FORMA_INVOICE: Returns both pending transactions and posted (paid) payments
- Transactions already included in fiscal documents are excluded
- Each transaction includes a status field (PENDING or POSTED)
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_kind import FiscalDocumentKind
from cloudbeds_fiscal_document.models.fiscal_document_transactions_paginated import FiscalDocumentTransactionsPaginated
from cloudbeds_fiscal_document.models.source_kind import SourceKind
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
source_id = 56 # int | source ID.
source_kind = cloudbeds_fiscal_document.SourceKind() # SourceKind | Filter by source kind.
for_document_type = cloudbeds_fiscal_document.FiscalDocumentKind() # FiscalDocumentKind | Document type for which transactions are related (deprecated, use `documentKind` instead). (optional)
document_kind = cloudbeds_fiscal_document.FiscalDocumentKind() # FiscalDocumentKind | Document type for which transactions are related. (optional)
page_token = 'page_token_example' # str | Token for fetching the next page, as per cursor-based pagination. (optional)
limit = 20 # int | Number of results to return per page. (optional) (default to 20)
sort = 'createdAt:desc' # str | Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode (optional)
folio_ids = [56] # List[int] | Filter by folio IDs. (optional)
try:
# Get available transactions for fiscal documents
api_response = api_instance.get_fiscal_document_transactions(x_property_id, source_id, source_kind, for_document_type=for_document_type, document_kind=document_kind, page_token=page_token, limit=limit, sort=sort, folio_ids=folio_ids)
print("The response of FiscalDocumentsApi->get_fiscal_document_transactions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_fiscal_document_transactions: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| source_id | int | source ID. | |
| source_kind | SourceKind | Filter by source kind. | |
| for_document_type | FiscalDocumentKind | Document type for which transactions are related (deprecated, use `documentKind` instead). | [optional] |
| document_kind | FiscalDocumentKind | Document type for which transactions are related. | [optional] |
| page_token | str | Token for fetching the next page, as per cursor-based pagination. | [optional] |
| limit | int | Number of results to return per page. | [optional] [default to 20] |
| sort | str | Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode | [optional] |
| folio_ids | List[int] | Filter by folio IDs. | [optional] |
FiscalDocumentTransactionsPaginated
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentTransactionsPaginated get_fiscal_document_transactions_by_id(id, x_property_id, page_token=page_token, include_linked_document_transactions=include_linked_document_transactions, sort=sort, limit=limit, folio_ids=folio_ids)
Get list of transactions for a given fiscal document id
Retrieves a paginated list of available transactions for fiscal document id.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_transactions_paginated import FiscalDocumentTransactionsPaginated
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
id = 'id_example' # str | Unique ID of the fiscal document to download.
x_property_id = 56 # int | Property id
page_token = 'page_token_example' # str | Token for fetching the next page, as per cursor-based pagination. (optional)
include_linked_document_transactions = False # bool | Include transactions from linked documents. (optional) (default to False)
sort = 'createdAt:desc' # str | Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode (optional)
limit = 20 # int | Number of results to return per page. (optional) (default to 20)
folio_ids = [56] # List[int] | Filter by folio IDs. (optional)
try:
# Get list of transactions for a given fiscal document id
api_response = api_instance.get_fiscal_document_transactions_by_id(id, x_property_id, page_token=page_token, include_linked_document_transactions=include_linked_document_transactions, sort=sort, limit=limit, folio_ids=folio_ids)
print("The response of FiscalDocumentsApi->get_fiscal_document_transactions_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_fiscal_document_transactions_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique ID of the fiscal document to download. | |
| x_property_id | int | Property id | |
| page_token | str | Token for fetching the next page, as per cursor-based pagination. | [optional] |
| include_linked_document_transactions | bool | Include transactions from linked documents. | [optional] [default to False] |
| sort | str | Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode | [optional] |
| limit | int | Number of results to return per page. | [optional] [default to 20] |
| folio_ids | List[int] | Filter by folio IDs. | [optional] |
FiscalDocumentTransactionsPaginated
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentTransactionsForAllocationPaginated get_fiscal_document_transactions_for_allocation(x_property_id, source_id, source_kind, page_token=page_token, limit=limit, sort=sort, folio_ids=folio_ids, document_ids=document_ids, document_id=document_id, statuses=statuses)
Get available transactions for allocations
Retrieves a paginated list of available transactions for allocations.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_transactions_for_allocation_paginated import FiscalDocumentTransactionsForAllocationPaginated
from cloudbeds_fiscal_document.models.source_kind import SourceKind
from cloudbeds_fiscal_document.models.transaction_status import TransactionStatus
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
source_id = 56 # int | source ID.
source_kind = cloudbeds_fiscal_document.SourceKind() # SourceKind | Filter by source kind.
page_token = 'page_token_example' # str | Token for fetching the next page, as per cursor-based pagination. (optional)
limit = 20 # int | Number of results to return per page. (optional) (default to 20)
sort = 'createdAt:desc' # str | Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode (optional)
folio_ids = [56] # List[int] | Filter by folio IDs. (optional)
document_ids = [56] # List[int] | document IDs. (optional)
document_id = 56 # int | document ID. (optional)
statuses = [cloudbeds_fiscal_document.TransactionStatus()] # List[TransactionStatus] | Filter by status. (optional)
try:
# Get available transactions for allocations
api_response = api_instance.get_fiscal_document_transactions_for_allocation(x_property_id, source_id, source_kind, page_token=page_token, limit=limit, sort=sort, folio_ids=folio_ids, document_ids=document_ids, document_id=document_id, statuses=statuses)
print("The response of FiscalDocumentsApi->get_fiscal_document_transactions_for_allocation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_fiscal_document_transactions_for_allocation: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| source_id | int | source ID. | |
| source_kind | SourceKind | Filter by source kind. | |
| page_token | str | Token for fetching the next page, as per cursor-based pagination. | [optional] |
| limit | int | Number of results to return per page. | [optional] [default to 20] |
| sort | str | Supported fields - createdAt, serviceDate, sourceId, transactionDate, internalCode | [optional] |
| folio_ids | List[int] | Filter by folio IDs. | [optional] |
| document_ids | List[int] | document IDs. | [optional] |
| document_id | int | document ID. | [optional] |
| statuses | List[TransactionStatus] | Filter by status. | [optional] |
FiscalDocumentTransactionsForAllocationPaginated
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentPaginated get_fiscal_documents(x_property_id, page_token=page_token, sort=sort, limit=limit, filters=filters)
Get list of fiscal documents
Retrieves a paginated list of fiscal documents filtered by optional criteria.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_filters import FiscalDocumentFilters
from cloudbeds_fiscal_document.models.fiscal_document_paginated import FiscalDocumentPaginated
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
page_token = 'page_token_example' # str | Token for fetching the next page, as per cursor-based pagination. (optional)
sort = 'createdAt:desc' # str | Supported fields: - createdAt - dueDate - invoiceDate - kind - status Supported sort modes asc:desc. If not supplied default is asc. (optional)
limit = 20 # int | Number of results to return per page. (optional) (default to 20)
filters = cloudbeds_fiscal_document.FiscalDocumentFilters() # FiscalDocumentFilters | (optional)
try:
# Get list of fiscal documents
api_response = api_instance.get_fiscal_documents(x_property_id, page_token=page_token, sort=sort, limit=limit, filters=filters)
print("The response of FiscalDocumentsApi->get_fiscal_documents:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_fiscal_documents: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| page_token | str | Token for fetching the next page, as per cursor-based pagination. | [optional] |
| sort | str | Supported fields: - createdAt - dueDate - invoiceDate - kind - status Supported sort modes asc:desc. If not supplied default is asc. | [optional] |
| limit | int | Number of results to return per page. | [optional] [default to 20] |
| filters | FiscalDocumentFilters | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvoiceAllocationsResponse get_invoice_allocations(x_property_id, id)
Get allocations for an invoice
Retrieves all active allocations for the specified invoice, grouped by transaction ID. Only includes allocations from receipts with active statuses.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.invoice_allocations_response import InvoiceAllocationsResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
id = 'id_example' # str | Invoice ID
try:
# Get allocations for an invoice
api_response = api_instance.get_invoice_allocations(x_property_id, id)
print("The response of FiscalDocumentsApi->get_invoice_allocations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_invoice_allocations: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| id | str | Invoice ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Bad Request - Invalid request (document is not an invoice or invalid ID format) | - |
| 404 | Bad Request - Invoice not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_pro_forma_preview(x_property_id, pro_forma_invoice_preview_request)
Create a fiscal document of the type pro forma invoice
Create a fiscal document of the type pro forma invoice.
Pro Forma Invoice Characteristics:
- Contains pending transactions that are subject to change
- Includes payment information
- Transactions are NOT locked (unlike regular invoices)
- Can be converted to regular invoices later when transactions are posted
- Has its own sequence numbering and settings
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.pro_forma_invoice_preview_request import ProFormaInvoicePreviewRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
pro_forma_invoice_preview_request = cloudbeds_fiscal_document.ProFormaInvoicePreviewRequest() # ProFormaInvoicePreviewRequest |
try:
# Create a fiscal document of the type pro forma invoice
api_response = api_instance.get_pro_forma_preview(x_property_id, pro_forma_invoice_preview_request)
print("The response of FiscalDocumentsApi->get_pro_forma_preview:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_pro_forma_preview: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| pro_forma_invoice_preview_request | ProFormaInvoicePreviewRequest |
bytearray
- Content-Type: application/json
- Accept: application/octet-stream
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful file download | * Content-Disposition - Used to indicate if the content should be displayed inline or as an attachment. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_rectify_invoice_preview(x_property_id, get_rectify_invoice_note_preview_request)
Get fiscal document preview of the type rectify invoice
Get fiscal document preview of the type rectify invoice. Spanish Fiscal Regulations:
- Only available for properties in Spain
- An invoice that has already been rectified cannot be rectified again
- To make corrections to a rectified invoice, you must rectify the most recent invoice in the rectification chain Validation Rules:
- The target invoice must not have been previously rectified
- If the invoice has been rectified, the API will return an error with details about which invoice should be rectified instead
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.get_rectify_invoice_note_preview_request import GetRectifyInvoiceNotePreviewRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
get_rectify_invoice_note_preview_request = cloudbeds_fiscal_document.GetRectifyInvoiceNotePreviewRequest() # GetRectifyInvoiceNotePreviewRequest |
try:
# Get fiscal document preview of the type rectify invoice
api_response = api_instance.get_rectify_invoice_preview(x_property_id, get_rectify_invoice_note_preview_request)
print("The response of FiscalDocumentsApi->get_rectify_invoice_preview:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_rectify_invoice_preview: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| get_rectify_invoice_note_preview_request | GetRectifyInvoiceNotePreviewRequest |
bytearray
- Content-Type: application/json
- Accept: application/octet-stream
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful file download | * Content-Disposition - Used to indicate if the content should be displayed inline or as an attachment. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentTransactionsSummary get_selected_transactions_summary(x_property_id, source_id, source_kind, for_document_type=for_document_type, document_kind=document_kind, folio_ids=folio_ids, exclude_transaction_ids=exclude_transaction_ids, include_transaction_ids=include_transaction_ids)
Get totals of selected available transactions for fiscal documents (deprecated)
Deprecated: Use POST /fiscal-document/v1/fiscal-documents/transactions/summary instead. Get totals of selected available transactions for fiscal documents based on the document type.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_kind import FiscalDocumentKind
from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary import FiscalDocumentTransactionsSummary
from cloudbeds_fiscal_document.models.source_kind import SourceKind
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
source_id = 56 # int | source ID.
source_kind = cloudbeds_fiscal_document.SourceKind() # SourceKind | Filter by source kind.
for_document_type = cloudbeds_fiscal_document.FiscalDocumentKind() # FiscalDocumentKind | Document type for which transactions are related (deprecated, use `documentKind` instead). (optional)
document_kind = cloudbeds_fiscal_document.FiscalDocumentKind() # FiscalDocumentKind | Document type for which transactions are related. (optional)
folio_ids = [56] # List[int] | Filter by folio IDs. (optional)
exclude_transaction_ids = [56] # List[int] | transaction IDs to exclude. (optional)
include_transaction_ids = [56] # List[int] | transaction IDs to include. (optional)
try:
# Get totals of selected available transactions for fiscal documents (deprecated)
api_response = api_instance.get_selected_transactions_summary(x_property_id, source_id, source_kind, for_document_type=for_document_type, document_kind=document_kind, folio_ids=folio_ids, exclude_transaction_ids=exclude_transaction_ids, include_transaction_ids=include_transaction_ids)
print("The response of FiscalDocumentsApi->get_selected_transactions_summary:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_selected_transactions_summary: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| source_id | int | source ID. | |
| source_kind | SourceKind | Filter by source kind. | |
| for_document_type | FiscalDocumentKind | Document type for which transactions are related (deprecated, use `documentKind` instead). | [optional] |
| document_kind | FiscalDocumentKind | Document type for which transactions are related. | [optional] |
| folio_ids | List[int] | Filter by folio IDs. | [optional] |
| exclude_transaction_ids | List[int] | transaction IDs to exclude. | [optional] |
| include_transaction_ids | List[int] | transaction IDs to include. | [optional] |
FiscalDocumentTransactionsSummary
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentTransactionsSummary get_transactions_summary_by_document_id(id, x_property_id, include_linked_document_transactions=include_linked_document_transactions)
Get totals of transactions for a given fiscal document id
Get totals of transactions for a given fiscal document id.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary import FiscalDocumentTransactionsSummary
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
id = 'id_example' # str | Unique ID of the fiscal document to download.
x_property_id = 56 # int | Property id
include_linked_document_transactions = False # bool | Include transactions from linked documents. (optional) (default to False)
try:
# Get totals of transactions for a given fiscal document id
api_response = api_instance.get_transactions_summary_by_document_id(id, x_property_id, include_linked_document_transactions=include_linked_document_transactions)
print("The response of FiscalDocumentsApi->get_transactions_summary_by_document_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->get_transactions_summary_by_document_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | str | Unique ID of the fiscal document to download. | |
| x_property_id | int | Property id | |
| include_linked_document_transactions | bool | Include transactions from linked documents. | [optional] [default to False] |
FiscalDocumentTransactionsSummary
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentTransactionsSummary post_selected_transactions_summary(x_property_id, transactions_summary_request)
Get totals of selected available transactions for fiscal documents
Get totals of selected available transactions for fiscal documents based on the document type. Supports partial transaction amounts via transactionIdToAmount.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_transactions_summary import FiscalDocumentTransactionsSummary
from cloudbeds_fiscal_document.models.transactions_summary_request import TransactionsSummaryRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
transactions_summary_request = cloudbeds_fiscal_document.TransactionsSummaryRequest() # TransactionsSummaryRequest |
try:
# Get totals of selected available transactions for fiscal documents
api_response = api_instance.post_selected_transactions_summary(x_property_id, transactions_summary_request)
print("The response of FiscalDocumentsApi->post_selected_transactions_summary:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->post_selected_transactions_summary: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| transactions_summary_request | TransactionsSummaryRequest |
FiscalDocumentTransactionsSummary
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentSummaryResponse put_fiscal_document(id, x_property_id, fiscal_document_patch_request)
Update a fiscal document by id
Update a fiscal document status, government integration details, or failure reason. Used by integration partners to update document lifecycle and government processing status.
Common Updates:
- Update status (PENDING_INTEGRATION, COMPLETED_INTEGRATION, FAILED, etc.)
- Set government integration details (series, number, external ID, QR codes)
- Record failure reasons for failed integrations
Invoice Cancellation (Spanish Properties Only):
- Set status to CANCEL_REQUESTED to cancel invoices
- Only invoices in OPEN, PAID, PARTIALLY_PAID or CORRECTION_NEEDED status can be canceled
- Invoices with rectifying documents cannot be canceled
- Integration partners must handle CANCEL_REQUESTED and update to CANCELED (success) or revert to previous status (failure)
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_patch_request import FiscalDocumentPatchRequest
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
id = 56 # int | Unique ID of the fiscal document to download.
x_property_id = 56 # int | Property id
fiscal_document_patch_request = cloudbeds_fiscal_document.FiscalDocumentPatchRequest() # FiscalDocumentPatchRequest |
try:
# Update a fiscal document by id
api_response = api_instance.put_fiscal_document(id, x_property_id, fiscal_document_patch_request)
print("The response of FiscalDocumentsApi->put_fiscal_document:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->put_fiscal_document: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Unique ID of the fiscal document to download. | |
| x_property_id | int | Property id | |
| fiscal_document_patch_request | FiscalDocumentPatchRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FiscalDocumentSummaryResponse update_pro_forma_invoice_status(id, x_property_id, pro_forma_status_update_request)
Update pro forma invoice status
Update the status of a pro forma invoice. Supported status transitions:
- OPEN -> ACCEPTED, REJECTED, CANCELED
- ACCEPTED -> CANCELED
- REJECTED -> CANCELED
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.models.fiscal_document_summary_response import FiscalDocumentSummaryResponse
from cloudbeds_fiscal_document.models.pro_forma_status_update_request import ProFormaStatusUpdateRequest
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
id = 56 # int | Unique ID of the pro forma invoice to update.
x_property_id = 56 # int | Property id
pro_forma_status_update_request = cloudbeds_fiscal_document.ProFormaStatusUpdateRequest() # ProFormaStatusUpdateRequest |
try:
# Update pro forma invoice status
api_response = api_instance.update_pro_forma_invoice_status(id, x_property_id, pro_forma_status_update_request)
print("The response of FiscalDocumentsApi->update_pro_forma_invoice_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->update_pro_forma_invoice_status: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Unique ID of the pro forma invoice to update. | |
| x_property_id | int | Property id | |
| pro_forma_status_update_request | ProFormaStatusUpdateRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Pro forma invoice status successfully updated | - |
| 400 | Bad Request - Invalid status or document type | - |
| 404 | Pro forma invoice not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void_receipt(x_property_id, receipt_id)
Void a receipt
Voids a receipt by updating its status to VOIDED. The receipt must be in OPEN status. For Italy, a refund receipt will be automatically created and linked to the voided receipt.
- Bearer (JWT) Authentication (bearerAuth):
import cloudbeds_fiscal_document
from cloudbeds_fiscal_document.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8700
# See configuration.py for a list of all supported configuration parameters.
configuration = cloudbeds_fiscal_document.Configuration(
host = "http://localhost:8700"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = cloudbeds_fiscal_document.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with cloudbeds_fiscal_document.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cloudbeds_fiscal_document.FiscalDocumentsApi(api_client)
x_property_id = 56 # int | Property id
receipt_id = 56 # int | The ID of the receipt to void
try:
# Void a receipt
api_instance.void_receipt(x_property_id, receipt_id)
except Exception as e:
print("Exception when calling FiscalDocumentsApi->void_receipt: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| x_property_id | int | Property id | |
| receipt_id | int | The ID of the receipt to void |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Receipt successfully voided | - |
| 400 | Bad Request - Invalid status or document type | - |
| 404 | Receipt not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]