» Order Module SDK Documentation

Getting Order List 

Functionorder_list_basic()

Purpose

This function fetches a paginated list of all orders in the system. Each order contains metadata such as status, order ID, currency, billing/shipping details, order lines, communication preferences, tax settings, and KPIs.

Parameters

Parameter
Type
Description
order_by
String
Field name to sort the result set.
direction
String
Sorting direction. Accepts asc or desc.
limit
Integer
Number of records to retrieve per page.
offset
Integer
Number of records to skip from the beginning

Use Case

The function is used to fetch a paginated list of orders for an account to review order details such as order ID, customer name, item list, pricing, tax, billing/shipping addresses, and order properties. It helps users quickly access order history, verify records, or audit key financial and fulfillment information in a summarized format.

def ORDER_LIST_BASIC():
    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.ORDER.LIST(
            LIMIT="NUMBER",
            OFFSET="NUMBER",
            DIRECTION="STRING",
            ORDER_BY="STRING"
        )
        PRINT(RESPONSE)
        # RESPONSETOOBJ().PROCESS(RESPONSE=RESPONSE["ACCOUNTS"][0])
    except ABEXCEPTION AS AB:
        PRINT(AB)
        PRINT(AB.GET_ERRORS())
        PRINT(AB.RAW_RESPONSE)

Response

The function returns an object containing a list of  entries. Each order includes full order metadata: order ID, UUID, customer details, item lines with pricing and tax, currency, addresses, communication preferences, invoice terms, and KPIs. The response also includes pagination information such as record count, limit, offset, and navigation URLs for previous and next pages.

ORDERLISTDTO(
    ORDERS=[
        ORDERDATADTO(
            ACCOUNTID="ACCOUNT_ID",
            STATUS="STATUS_VALUE",
            ID="ORDER_ID",
            UUID="UUID_VALUE",
            VERSION="VERSION_NUMBER",
            PREORDER="BOOLEAN",
            QUOTEORDER="BOOLEAN",
            NAME="ORDER_NAME",
            DISPLAYNAME="ORDER_DISPLAY_NAME",
            DESCRIPTION="DESCRIPTION_TEXT",
            MANAGER="NULL",
            REFERRALACCOUNT="EMPTY",
            SHIPPINGCOST="NUMBER",
            ORIGIN="ORIGIN_VALUE",
            INVOICENOTE="INVOICE_NOTE_TEXT",
            BILLINGSTARTDATE="DATE_STRING",
            ORDERSTARTDATE="TIMESTAMP",
            NEXTBILLINGFROMDATE="EMPTY",
            NEXTBILLINGFROMDATEUTC="NULL",
            TRIALREQUIRESPAYMENTMETHOD="NULL",
            PRICETAXINCLUSIVE="BOOLEAN",
            CREATEDBY="CREATOR_NAME",
            CREATEDON="TIMESTAMP",
            LASTUPDATEDBY="UPDATER_NAME",
            LASTUPDATEDON="TIMESTAMP",
            ALLOWCONTRACT="BOOLEAN",
            LINES=[
                ORDERLINEDTO(
                    ITEMID="ITEM_ID",
                    ITEMORDERQUANTITY="NUMBER",
                    ITEMUUID="UUID_VALUE",
                    ITEMNAME="ITEM_NAME",
                    SHIPPINGCOST="NUMBER",
                    ITEMINVOICENOTE="NOTE_TEXT",
                    ITEMDESCRIPTION="DESCRIPTION_TEXT",
                    ITEMTYPE="ITEM_TYPE",
                    ITEMCHARGETYPE="CHARGE_TYPE",
                    CHARGEITEMUUID="UUID_VALUE",
                    VERSION="VERSION_NUMBER",
                    ITEMPRICETAX=TAXDTO(
                        UUID="UUID_VALUE",
                        CODE="TAX_CODE",
                        RATE="NUMBER",
                        LINK="URL",
                        AMOUNT="NULL"
                    ),
                    ISTAXEXEMPTWHENSOLD="NULL",
                    TAXEXEMPTWHENSOLD="NULL",
                    ITEMPRICESNAPSHOT=ORDERITEMPRICESNAPSHOTDTO(
                        PRICINGRULE=ORDERITEMPRICINGRULEDTO(
                            PRICE="NUMBER",
                            UUID="UUID_VALUE",
                            VERSION="VERSION_NUMBER",
                            PRICETYPE="PRICE_TYPE",
                            UOM="EMPTY",
                            PRICEPERIOD="EMPTY",
                            PRICINGSCHEDULE="EMPTY",
                            PRICINGLEVEL="EMPTY",
                            PRICINGMETHOD="NUMBER",
                            WAREHOUSE="WAREHOUSE_NAME"
                        )
                    ),
                    ITEMSALETAXCONFIGURATION=ORDERITEMSALETAXCONFIGURATIONDTO(
                        SALEPRICEISBASEDON="TAX_BASIS",
                        TAXCODE=TAXDTO(UUID="EMPTY", CODE="EMPTY", RATE="EMPTY", LINK="EMPTY", AMOUNT="NULL")
                    ),
                    PURCHASEORDER="NULL",
                    PACKAGENAME="NULL",
                    ITEMSERIALORBATCHNUMBER="NULL",
                    ITEMCUSTOMATTRIBUTES=[],
                    OP="NULL",
                    UUID="NULL",
                    ITEMPROPERTIES="NULL",
                    SUBTOTAL="NUMBER",
                    TOTAL="NUMBER",
                    TAX="NUMBER",
                    ITEMUOM="NULL",
                    ITEMWAREHOUSE="NULL",
                    PRICINGSNAPSHOTUUID="NULL",
                    CHARGINGSTARTDATE="NULL",
                    ALTERNATECHARGINGSTARTDATE="NULL",
                    CHARGINGENDDATE="NULL",
                    ALTERNATECHARGINGENDDATE="NULL",
                    ITEMPRICE="NULL",
                    ITEMDISCOUNTAMOUNT="NULL",
                    TAXAMOUNT="NULL",
                    OPERATION="NULL",
                    DISCOUNT="NUMBER",
                    UOM="NULL",
                    WAREHOUSE="NULL",
                    QUANTITY="NULL",
                    ACCOUNTINGCODE="NULL",
                    ITEMACCOUNTINGCODE=ORDERITEMACCOUNTINGCODEDTO(SALESREVENUE="EMPTY"),
                    PREORDERSTOCKDETAILS="NULL",
                    EXPECTEDDELIVERYDATE="EMPTY",
                    PURCHASEORDERID="NULL",
                    PURCHASEINVOICEID="NULL"
                )
            ],
            CUSTOMFORMS=CUSTOMFORMSDTO(
                UUID="UUID_VALUE",
                NAME="FORM_NAME"
            ),
            CURRENCY=CURRENCYDTO(
                UUID="UUID_VALUE",
                NAME="CURRENCY_CODE",
                LINK="URL"
            ),
            TIMEZONE=TIMEZONEDTO(
                UUID="UUID_VALUE",
                NAME="TIMEZONE_NAME",
                LINK="URL"
            ),
            PROPERTIES=ORDERPROPERTIESDTO(
                COMMUNICATIONPROFILE="PROFILE_NAME",
                INVOICEMODE="INVOICE_MODE",
                INVOICETERM="INVOICE_TERM",
                BILLINGPERIOD="BILLING_PERIOD",
                PAYMENTPROCESSOR="PAYMENT_PROCESSOR",
                PAYMENTMODE="PAYMENT_MODE",
                PAYMENTTERM="PAYMENT_TERM",
                PAYMENTTERMALIGNMENT="ALIGNMENT_TYPE",
                FULFILLMENTMODE="FULFILLMENT_MODE",
                FULFILLMENTTERM="FULFILLMENT_TERM",
                CONSOLIDATEINVOICE="BOOLEAN",
                CONSOLIDATEKEY="KEY_VALUE"
            ),
            CONTRACTPROPERTIES="NULL",
            BILLINGADDRESS=ADDRESSDTO(
                ADDRESSLINE1="ADDRESS_LINE",
                ADDRESSLINE2="ADDRESS_LINE",
                ADDRESSLINE3="ADDRESS_LINE",
                ADDRESSLINE4="ADDRESS_LINE",
                ADDRESSLINE5="ADDRESS_LINE",
                POSTCODE="POST_CODE",
                CITY="CITY_NAME",
                STATE="STATE_NAME",
                COUNTRY="COUNTRY_NAME",
                ISDEFAULTBILLING="NULL",
                ISDEFAULTSHIPPING="NULL",
                UUID="NULL",
                NAME="EMPTY"
            ),
            SHIPPINGADDRESS=ADDRESSDTO(
                ADDRESSLINE1="ADDRESS_LINE",
                ADDRESSLINE2="ADDRESS_LINE",
                ADDRESSLINE3="ADDRESS_LINE",
                ADDRESSLINE4="ADDRESS_LINE",
                ADDRESSLINE5="ADDRESS_LINE",
                POSTCODE="POST_CODE",
                CITY="CITY_NAME",
                STATE="STATE_NAME",
                COUNTRY="COUNTRY_NAME",
                ISDEFAULTBILLING="NULL",
                ISDEFAULTSHIPPING="NULL",
                UUID="NULL",
                NAME="EMPTY"
            ),
            SHIPPINGPROFILE=SHIPPINGPROFILEDTO(
                UUID="NULL",
                STATUS="NULL",
                NAME="NULL",
                DISPLAYNAME="NULL",
                DESCRIPTION="NULL",
                INVOICENOTE="NULL",
                TYPE="NULL",
                FIXEDAMOUNT="NULL",
                ISTAXEXEMPT="NULL",
                ISTAXINCLUSIVE="NULL",
                TAXCONFIGURATION="NULL",
                ACCOUNTINGCODE="NULL"
            ),
            DEFAULTWAREHOUSE="NULL",
            CUSTOMOBJECTS=[],
            ISTAXEXEMPTWHENSOLD="NULL",
            KPIS=KPISDTO(
                STARTDATE="EMPTY",
                ESTIMATEDTOTAL="NUMBER",
                TOTALREVENUE="NUMBER",
                MONTHLYRECURRINGREVENUE="NUMBER",
                TOTALCOLLECTED="NUMBER",
                TOTALOUTSTANDING="NUMBER",
                TOTALDUE="NUMBER",
                LASTINVOICEISSUEDATE="EMPTY",
                LASTINVOICETOTAL="NUMBER",
                TOTALINVOICE="NUMBER",
                NEXTINVOICEISSUEDATE="NULL",
                LASTREACTIVATEDON="EMPTY",
                LASTCANCELLEDON="EMPTY",
                LASTCHANGEDON="EMPTY",
                LASTDELETEDON="EMPTY"
            ),
            LINEITEMS=[],
            EFFECTIVEDATE="NULL",
            CHARGE="NULL",
            COMMUNICATIONPREFERENCE=[
                COMMUNICATIONPREFERENCEDTO(MEDIA="MEDIA_TYPE", ISENABLED="NULL")
            ],
            LINE="NULL",
            CUSTOMATTRIBUTES=[],
            CUSTOMERPURCHASEORDERID="ORDER_ID",
            DISCOUNTPROFILE="NULL",
            ACCOUNTNAME="ACCOUNT_NAME",
            CURRENCYID="CURRENCY_ID",
            TOTAL="NUMBER",
            SUBTOTAL="NUMBER",
            TAX="NUMBER",
            INVOICEID="NULL",
            PAYMENTID="NULL",
            INVOICE="NULL"
        )
    ],
    PAGINATION=PAGINATIONDTO(
        RECORDS="NUMBER",
        LIMIT="NUMBER",
        OFFSET="NUMBER",
        PREVIOUSPAGE="URL",
        NEXTPAGE="NULL"
    )
)

Retrieving Order Details

Functionorder_details()

Purpose

This function retrieves the full details of a specific order using its unique order ID. It provides all associated metadata, billing and shipping configuration, line items, pricing rules, and performance indicators.

Parameters

ParameterTypeDescription
order_idStringUnique identifier of the order 

Use Case

The function is used to programmatically fetch full order details, useful for account managers, billing systems, or customer service dashboards. For instance, authenticated user  might use this endpoint to verify order configurations (like billing period, items, taxes, and invoice modes), check customer preferences (email notifications), and review associated line items and totals. It supports deep visibility into every aspect of the order lifecycle for validation, auditing, and operations.

def order_details():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto()
    )

    try:
        response = exsited_sdk.order.details(id="ORDER_ID")
        print(response)
        return response
    except ABException as ab:
        error_code = None
        if ab.get_errors() and "errors" in ab.raw_response:
            error_code = ab.raw_response["errors"][0].get("code", None)
        print(f" {error_code}")

Response

The function response containing the order's metadata, lines, pricing configuration, tax structure, billing and shipping settings, and KPIs like total, subtotal, and MRR. Each OrderLineDTO includes item identifiers, pricing snapshot, charge type, discount, tax setup, and accounting details.

OrderDetailsDTO(
    order=OrderDataDTO(
        accountId='ACCOUNT_ID',
        status='ORDER_STATUS',
        id='ORDER_ID',
        uuid='ORDER_UUID',
        version='VERSION',
        preOrder='BOOLEAN',
        quoteOrder='BOOLEAN',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        manager=None,
        referralAccount='EMPTY',
        shippingCost='DECIMAL_VALUE',
        origin='ORDER_ORIGIN',
        invoiceNote='INVOICE_NOTE',
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_TIMESTAMP',
        nextBillingFromDate='NEXT_BILLING_DATE',
        nextBillingFromDateUtc='NEXT_BILLING_UTC_TIMESTAMP',
        trialRequiresPaymentMethod=None,
        priceTaxInclusive='BOOLEAN',
        createdBy='CREATED_BY',
        createdOn='CREATION_TIMESTAMP',
        lastUpdatedBy='UPDATED_BY',
        lastUpdatedOn='UPDATE_TIMESTAMP',
        allowContract='BOOLEAN',
        lines=[
            OrderLineDTO(
                itemId='ITEM_ID',
                itemOrderQuantity='DECIMAL_VALUE',
                itemUuid='ITEM_UUID',
                itemName='ITEM_NAME',
                shippingCost='DECIMAL_VALUE',
                itemInvoiceNote='EMPTY',
                itemDescription='EMPTY',
                itemType='ITEM_TYPE',
                itemChargeType='CHARGE_TYPE',
                chargeItemUuid='CHARGE_ITEM_UUID',
                version='VERSION',
                itemPriceTax=TaxDTO(uuid='TAX_UUID', code='TAX_CODE', rate='TAX_RATE', link='TAX_API_LINK', amount=None),
                isTaxExemptWhenSold=None,
                taxExemptWhenSold=None,
                itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                    pricingRule=OrderItemPricingRuleDTO(
                        price='DECIMAL_VALUE',
                        uuid='PRICING_RULE_UUID',
                        version='VERSION',
                        priceType='PRICE_TYPE',
                        uom='EMPTY',
                        pricePeriod='EMPTY',
                        pricingSchedule='EMPTY',
                        pricingLevel='EMPTY',
                        pricingMethod='DECIMAL_VALUE',
                        warehouse='WAREHOUSE_NAME'
                    )
                ),
                itemSaleTaxConfiguration=OrderItemSaleTaxConfigurationDTO(
                    salePriceIsBasedOn='TAX_BASIS',
                    taxCode=TaxDTO(uuid='EMPTY', code='EMPTY', rate='EMPTY', link='EMPTY', amount=None)
                ),
                purchaseOrder=None,
                packageName=None,
                itemSerialOrBatchNumber=None,
                itemCustomAttributes=[],
                op=None,
                uuid=None,
                itemProperties=ItemPropertiesDataDTO(
                    billingMode=None,
                    chargingPeriod=None,
                    chargingStartDate=None,
                    chargingStartDayOfMonth=None,
                    chargingFixedStartDate=None,
                    chargingAndBillingAlignment=None,
                    proRataPartialChargingPeriod=None,
                    proRataPartialPricingPeriod=None,
                    proRataPartialUnit=None
                ),
                subtotal='DECIMAL_VALUE',
                total='DECIMAL_VALUE',
                tax='DECIMAL_VALUE',
                itemUom=None,
                itemWarehouse=None,
                pricingSnapshotUuid=None,
                chargingStartDate=None,
                alternateChargingStartDate=None,
                chargingEndDate=None,
                alternateChargingEndDate=None,
                itemPrice=None,
                itemDiscountAmount=None,
                taxAmount=None,
                operation=None,
                discount='DECIMAL_VALUE',
                uom=None,
                warehouse=None,
                quantity=None,
                accountingCode=None,
                itemAccountingCode=OrderItemAccountingCodeDTO(salesRevenue='EMPTY'),
                preOrderStockDetails=None,
                expectedDeliveryDate='EMPTY',
                purchaseOrderId=None,
                purchaseInvoiceId=None
            )
        ],
        customForms=CustomFormsDTO(uuid='CUSTOM_FORM_UUID', name='CUSTOM_FORM_NAME'),
        currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_CODE', link='CURRENCY_API_LINK'),
        timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME', link='TIMEZONE_API_LINK'),
        properties=OrderPropertiesDTO(
            communicationProfile='COMMUNICATION_PROFILE',
            invoiceMode='INVOICE_MODE',
            invoiceTerm='INVOICE_TERM',
            billingPeriod='BILLING_PERIOD',
            paymentProcessor='PAYMENT_PROCESSOR',
            paymentMode='PAYMENT_MODE',
            paymentTerm='PAYMENT_TERM',
            paymentTermAlignment='PAYMENT_TERM_ALIGNMENT',
            fulfillmentMode='FULFILLMENT_MODE',
            fulfillmentTerm='FULFILLMENT_TERM',
            consolidateInvoice='BOOLEAN',
            consolidateKey='CONSOLIDATION_KEY'
        ),
        contractProperties=None,
        billingAddress=AddressDTO(
            addressLine1=None,
            addressLine2=None,
            addressLine3=None,
            addressLine4=None,
            addressLine5=None,
            postCode=None,
            city=None,
            state=None,
            country=None,
            isDefaultBilling=None,
            isDefaultShipping=None,
            uuid=None,
            name=None
        ),
        shippingAddress=AddressDTO(
            addressLine1=None,
            addressLine2=None,
            addressLine3=None,
            addressLine4=None,
            addressLine5=None,
            postCode=None,
            city=None,
            state=None,
            country=None,
            isDefaultBilling=None,
            isDefaultShipping=None,
            uuid=None,
            name=None
        ),
        shippingProfile=ShippingProfileDTO(
            uuid=None,
            status=None,
            name=None,
            displayName=None,
            description=None,
            invoiceNote=None,
            type=None,
            fixedAmount=None,
            isTaxExempt=None,
            isTaxInclusive=None,
            taxConfiguration=None,
            accountingCode=None
        ),
        defaultWarehouse=None,
        customObjects=[],
        isTaxExemptWhenSold=None,
        kpis=KpisDTO(
            startDate='EMPTY',
            estimatedTotal=0,
            totalRevenue=0,
            monthlyRecurringRevenue=0,
            totalCollected=0,
            totalOutstanding=0,
            totalDue=0,
            lastInvoiceIssueDate='EMPTY',
            lastInvoiceTotal=0,
            totalInvoice=0,
            nextInvoiceIssueDate=None,
            lastReactivatedOn='EMPTY',
            lastCancelledOn='EMPTY',
            lastChangedOn='EMPTY',
            lastDeletedOn='EMPTY'
        ),
        lineItems=[],
        effectiveDate=None,
        charge=None,
        communicationPreference=[
            CommunicationPreferenceDTO(media='COMMUNICATION_MEDIA', isEnabled=None)
        ],
        line=None,
        customAttributes=[],
        customerPurchaseOrderId='CUSTOMER_PO_ID',
        discountProfile=None,
        accountName='ACCOUNT_NAME',
        currencyId='CURRENCY_ID',
        total='DECIMAL_VALUE',
        subtotal='DECIMAL_VALUE',
        tax='DECIMAL_VALUE',
        invoiceId=None,
        paymentId=None,
        invoice=None
    ),
    eventUuid=None
)

Removing an Order

Functionorder_delete()

Purpose

This function permanently deletes an order using its unique identifier. It ensures that the order and all related data are removed from the system for cleanup or testing purposes.

Parameters

ParameterTypeDescription
order_idStringUnique identifier of the order.

Use Case

The function is used to programmatically remove an order from the system. This is useful in scenarios where orders were created by mistake, duplicated, or generated during testing. For example, a QA team might use this function to delete dummy orders after verifying order lifecycle features. The function confirms successful deletion through a 204 response code, ensuring no residual data is retained.

def order_delete():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = exsited_sdk.order.delete(id="ORDER_ID")
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

If the deletion is successful, the response will return a dictionary with success: True and a status_code: 204, indicating the order has been permanently deleted with no content returned.

{'SUCCESS': TRUE, 'STATUS_CODE': 204}

Cancelling an Order

Functionorder_cancel()

Purpose

This function cancels an existing order by marking its status as INACTIVE. The cancellation can take effect immediately or be scheduled for a future date based on the effective_date provided in the request.

Parameters

Parameter Type Description
order_id String Unique identifier of the order to cancel.
effective_date String Date from which the cancellation takes effect (format: YYYY-MM-DD).

Use Case

The function  is used to programmatically cancel a specific order using its unique order ID and effective cancellation date. It is typically used in billing or subscription management systems to deactivate a recurring or one-time order, while preserving full historical details such as customer data, pricing, billing terms, discounts, taxes, and item properties. The function accepts an effective_date to control when the cancellation takes place. If the date is today , the order is immediately inactivated. If it is in the future, the order remains active until the scheduled cancellation date, allowing billing or service to continue for the current cycle.

def order_cancel():
    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.order.cancel(id="ORDER_ID", effective_date="EFFECTIVE_DATE")
        print(response)
        # ResponseToObj().process(response=response["accounts"][0])
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The response returns an object containing full details of the cancelled order. The order’s status is set to INACTIVE and all associated metadata  such as line items, customer purchase reference, pricing rules, discount, tax configuration, and custom forms  is preserved. It includes a unique eventUuid to track the cancellation event, making it easy to audit or retrieve history of cancellations. 

OrderCancelResponseDTO(
    eventUuid='EVENT_UUID',
    order=OrderDataDTO(
        accountId='ACCOUNT_ID',
        status='ORDER_STATUS',
        id='ORDER_ID',
        uuid='ORDER_UUID',
        version='VERSION',
        preOrder='BOOLEAN',
        quoteOrder='BOOLEAN',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        manager=None,
        referralAccount='EMPTY',
        shippingCost='DECIMAL_VALUE',
        origin='ORDER_ORIGIN',
        invoiceNote='INVOICE_NOTE',
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_TIMESTAMP',
        nextBillingFromDate='EMPTY',
        nextBillingFromDateUtc=None,
        trialRequiresPaymentMethod=None,
        priceTaxInclusive='BOOLEAN',
        createdBy='CREATED_BY',
        createdOn='CREATION_TIMESTAMP',
        lastUpdatedBy='UPDATED_BY',
        lastUpdatedOn='UPDATE_TIMESTAMP',
        allowContract='BOOLEAN',
        lines=[
            OrderLineDTO(
                itemId='ITEM_ID',
                itemOrderQuantity='DECIMAL_VALUE',
                itemUuid='ITEM_UUID',
                itemName='ITEM_NAME',
                shippingCost='DECIMAL_VALUE',
                itemInvoiceNote='EMPTY',
                itemDescription='EMPTY',
                itemType='ITEM_TYPE',
                itemChargeType='CHARGE_TYPE',
                chargeItemUuid='CHARGE_ITEM_UUID',
                version='VERSION',
                itemPriceTax=TaxDTO(uuid='TAX_UUID', code='TAX_CODE', rate='TAX_RATE', link='TAX_API_LINK', amount=None),
                isTaxExemptWhenSold=None,
                taxExemptWhenSold=None,
                itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                    pricingRule=OrderItemPricingRuleDTO(
                        price='DECIMAL_VALUE',
                        uuid='PRICING_RULE_UUID',
                        version='VERSION',
                        priceType='PRICE_TYPE',
                        uom='EMPTY',
                        pricePeriod='EMPTY',
                        pricingSchedule='EMPTY',
                        pricingLevel='EMPTY',
                        pricingMethod='DECIMAL_VALUE',
                        warehouse='WAREHOUSE_NAME'
                    )
                ),
                itemSaleTaxConfiguration=OrderItemSaleTaxConfigurationDTO(
                    salePriceIsBasedOn='TAX_BASIS',
                    taxCode=TaxDTO(uuid='EMPTY', code='EMPTY', rate='EMPTY', link='EMPTY', amount=None)
                ),
                purchaseOrder=None,
                packageName=None,
                itemSerialOrBatchNumber=None,
                itemCustomAttributes=[],
                op=None,
                uuid=None,
                itemProperties=ItemPropertiesDataDTO(
                    billingMode='BILLING_MODE',
                    chargingPeriod='CHARGING_PERIOD',
                    chargingStartDate='CHARGING_START_DATE',
                    chargingStartDayOfMonth=None,
                    chargingFixedStartDate=None,
                    chargingAndBillingAlignment='BOOLEAN',
                    proRataPartialChargingPeriod='BOOLEAN',
                    proRataPartialPricingPeriod='BOOLEAN',
                    proRataPartialUnit='BOOLEAN'
                ),
                subtotal='DECIMAL_VALUE',
                total='DECIMAL_VALUE',
                tax='DECIMAL_VALUE',
                itemUom=None,
                itemWarehouse=None,
                pricingSnapshotUuid=None,
                chargingStartDate=None,
                alternateChargingStartDate=None,
                chargingEndDate=None,
                alternateChargingEndDate=None,
                itemPrice=None,
                itemDiscountAmount=None,
                taxAmount=None,
                operation=None,
                discount='DECIMAL_VALUE',
                uom=None,
                warehouse=None,
                quantity=None,
                accountingCode=None,
                itemAccountingCode=OrderItemAccountingCodeDTO(salesRevenue='EMPTY'),
                preOrderStockDetails=None,
                expectedDeliveryDate='EMPTY',
                purchaseOrderId=None,
                purchaseInvoiceId=None
            )
        ],
        customForms=CustomFormsDTO(uuid='CUSTOM_FORM_UUID', name='CUSTOM_FORM_NAME'),
        currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_CODE', link='CURRENCY_API_LINK'),
        timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME', link='TIMEZONE_API_LINK'),
        properties=OrderPropertiesDTO(
            communicationProfile='COMMUNICATION_PROFILE',
            invoiceMode='INVOICE_MODE',
            invoiceTerm='INVOICE_TERM',
            billingPeriod='BILLING_PERIOD',
            paymentProcessor='PAYMENT_PROCESSOR',
            paymentMode='PAYMENT_MODE',
            paymentTerm='PAYMENT_TERM',
            paymentTermAlignment='PAYMENT_TERM_ALIGNMENT',
            fulfillmentMode='FULFILLMENT_MODE',
            fulfillmentTerm='FULFILLMENT_TERM',
            consolidateInvoice='BOOLEAN',
            consolidateKey='CONSOLIDATION_KEY'
        ),
        contractProperties=None,
        billingAddress=AddressDTO(
            addressLine1=None,
            addressLine2=None,
            addressLine3=None,
            addressLine4=None,
            addressLine5=None,
            postCode=None,
            city=None,
            state=None,
            country=None,
            isDefaultBilling=None,
            isDefaultShipping=None,
            uuid=None,
            name=None
        ),
        shippingAddress=AddressDTO(
            addressLine1=None,
            addressLine2=None,
            addressLine3=None,
            addressLine4=None,
            addressLine5=None,
            postCode=None,
            city=None,
            state=None,
            country=None,
            isDefaultBilling=None,
            isDefaultShipping=None,
            uuid=None,
            name=None
        ),
        shippingProfile=ShippingProfileDTO(
            uuid=None,
            status=None,
            name=None,
            displayName=None,
            description=None,
            invoiceNote=None,
            type=None,
            fixedAmount=None,
            isTaxExempt=None,
            isTaxInclusive=None,
            taxConfiguration=None,
            accountingCode=None
        ),
        defaultWarehouse=None,
        customObjects=[],
        isTaxExemptWhenSold=None,
        kpis=KpisDTO(
            startDate='EMPTY',
            estimatedTotal='DECIMAL_VALUE',
            totalRevenue='DECIMAL_VALUE',
            monthlyRecurringRevenue='DECIMAL_VALUE',
            totalCollected='DECIMAL_VALUE',
            totalOutstanding='DECIMAL_VALUE',
            totalDue='DECIMAL_VALUE',
            lastInvoiceIssueDate='EMPTY',
            lastInvoiceTotal='DECIMAL_VALUE',
            totalInvoice='DECIMAL_VALUE',
            nextInvoiceIssueDate=None,
            lastReactivatedOn='EMPTY',
            lastCancelledOn='EMPTY',
            lastChangedOn='EMPTY',
            lastDeletedOn='EMPTY'
        ),
        lineItems=[],
        effectiveDate=None,
        charge=None,
        communicationPreference=[
            CommunicationPreferenceDTO(media='COMMUNICATION_MEDIA', isEnabled=None)
        ],
        line=None,
        customAttributes=[],
        customerPurchaseOrderId='CUSTOMER_PO_ID',
        discountProfile=None,
        accountName='ACCOUNT_NAME',
        currencyId='CURRENCY_ID',
        total='DECIMAL_VALUE',
        subtotal='DECIMAL_VALUE',
        tax='DECIMAL_VALUE',
        invoiceId=None,
        paymentId=None,
        invoice=None
    )
)

Reactivating an Order

Function: order_reactivate()

Purpose

This function  reactivate an order that was previously marked as inactive or cancelled. It updates the order’s status based on a provided effective date and schedules reactivation accordingly.

Parameters

ParameterTypeDescription
order_idStringUnique identifier of the order.
effective_dateStringDate (YYYY-MM-DD) to reactivate the order.

Use Case

The function is used to reinstate an order in the Exsited system that has been marked as inactive. When executed, it triggers the reactivation process by sending the order ID and the effective_date. If the date is today's date, the order becomes active immediately. If the date is in the future, the system will queue the reactivation until the specified day arrives. This is particularly useful in scenarios where service continuity must be scheduled after a temporary cancellation.

def order_reactivate():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = exsited_sdk.order.reactivate(id="ORDER_ID", effective_date="EFFECTIVE_DATE")
        print(response)
        # ResponseToObj().process(response=response["accounts"][0])
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns an  object. If successful, the eventUuid will contain the UUID of the reactivation event, and the order will contain the full reactivated order data. If the reactivation is scheduled for the future, order and eventUuid may remain null until the date is reached.

OrderCancelResponseDTO(
    eventUuid="EVENT_UUID",
    order="ORDER"
)

Retrieving Order Information

Function: order_get_information()

Purpose

The function retrieves complete order details by order ID, including its metadata, billing and shipping addresses, custom configurations, and linked settings.

Parameters

Parameter
Type
Description
order_id
String
The unique identifier of the order .

Use Case

The function is used to fetch the latest configuration and metadata of an order in the system. This includes key attributes like the order's status, billing and shipping details, communication preferences, price settings ( tax-inclusive or not), time zone and currency settings, and links to the associated profile or forms. It is especially useful for reviewing or displaying order information in dashboards, summaries, or validation steps before invoice generation or fulfillment.

def order_get_information():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = exsited_sdk.order.information(id="ORDER_ID")
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns an object that contains the full structure of the order under the order key. The response includes fields like accountId, name, status, billing/shipping address, time zone, currency, invoice note, tax settings, and metadata such as who created or last updated the order. It also includes optional configuration objects like custom forms, shipping profiles, and communication preferences.

OrderDetailsDTO(
    order=OrderDataDTO(
        accountId='ACCOUNT_ID',
        status='ORDER_STATUS',
        id='ORDER_ID',
        uuid='ORDER_UUID',
        version='VERSION',
        preOrder='BOOLEAN',
        quoteOrder='BOOLEAN',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        manager=None,
        referralAccount='EMPTY',
        shippingCost='DECIMAL_VALUE',
        origin='ORDER_ORIGIN',
        invoiceNote='INVOICE_NOTE',
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_TIMESTAMP',
        nextBillingFromDate='NEXT_BILLING_DATE',
        nextBillingFromDateUtc='NEXT_BILLING_UTC_TIMESTAMP',
        trialRequiresPaymentMethod=None,
        priceTaxInclusive='BOOLEAN',
        createdBy='CREATED_BY',
        createdOn='CREATION_TIMESTAMP',
        lastUpdatedBy='UPDATED_BY',
        lastUpdatedOn='UPDATE_TIMESTAMP',
        allowContract='BOOLEAN',
        lines=None,
        customForms=CustomFormsDTO(
            uuid='CUSTOM_FORM_UUID',
            name='CUSTOM_FORM_NAME'
        ),
        currency=CurrencyDTO(
            uuid='CURRENCY_UUID',
            name='CURRENCY_CODE',
            link='CURRENCY_API_LINK'
        ),
        timeZone=TimeZoneDTO(
            uuid='TIMEZONE_UUID',
            name='TIMEZONE_NAME',
            link='TIMEZONE_API_LINK'
        ),
        properties=None,
        contractProperties=None,
        billingAddress=AddressDTO(
            addressLine1='ADDRESS_LINE_1',
            addressLine2='EMPTY',
            addressLine3='EMPTY',
            addressLine4='EMPTY',
            addressLine5='EMPTY',
            postCode='POSTAL_CODE',
            city='CITY',
            state='STATE',
            country='COUNTRY',
            isDefaultBilling=None,
            isDefaultShipping=None,
            uuid=None,
            name='EMPTY'
        ),
        shippingAddress=AddressDTO(
            addressLine1='ADDRESS_LINE_1',
            addressLine2='EMPTY',
            addressLine3='EMPTY',
            addressLine4='EMPTY',
            addressLine5='EMPTY',
            postCode='POSTAL_CODE',
            city='CITY',
            state='STATE',
            country='COUNTRY',
            isDefaultBilling=None,
            isDefaultShipping=None,
            uuid=None,
            name='EMPTY'
        ),
        shippingProfile=ShippingProfileDTO(
            uuid=None,
            status=None,
            name=None,
            displayName=None,
            description=None,
            invoiceNote=None,
            type=None,
            fixedAmount=None,
            isTaxExempt=None,
            isTaxInclusive=None,
            taxConfiguration=None,
            accountingCode=None
        ),
        defaultWarehouse=None,
        customObjects=[],
        isTaxExemptWhenSold=None,
        kpis=None,
        lineItems=None,
        effectiveDate=None,
        charge=None,
        communicationPreference=[
            CommunicationPreferenceDTO(
                media='COMMUNICATION_MEDIA',
                isEnabled=None
            )
        ],
        line=None,
        customAttributes=[],
        customerPurchaseOrderId='CUSTOMER_PO_ID',
        discountProfile=None,
        accountName=None,
        currencyId='CURRENCY_ID',
        total=None,
        subtotal=None,
        tax=None,
        invoiceId=None,
        paymentId=None,
        invoice=None
    ),
    eventUuid=None
)

Getting Order Billing Preferences

Functionorder_get_billing_preferences()

Purpose

This function retrieves the billing preferences and configurations for a specific order. It provides key financial and fulfillment settings such as invoice mode, billing period, payment method, and consolidation details for proper billing management.

Parameters

ParameterType
Description
order_id
String
Unique identifier of the order

Use Case

The function is used when an admin or billing system needs to view how an order is configured for invoicing and payment. . It helps determine key properties such as invoice mode, billing cycle, fulfillment terms, and payment processor. This is useful for displaying or verifying an order’s financial setup before triggering billing actions, syncing with external systems, or performing audits.

def order_get_billing_preferences():
    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.order.billing_preferences(id="ORDER_ID")
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The response returns the billing preferences of a specific order under the order > properties section. It includes key fields such as the communication profile used for notifications, invoice mode, invoice term, and billing period . It also provides payment details like processor type, payment mode, payment term, and alignment rules. Additionally, fulfillment settings and consolidation options (including a consolidate key) are included. These preferences define how the order is billed, fulfilled, and invoiced.

ORDERDETAILSDTO(
    ORDER=ORDERDATADTO(
        ACCOUNTID="NULL",
        STATUS="NULL",
        ID="NULL",
        UUID="NULL",
        VERSION="NULL",
        PREORDER="NULL",
        QUOTEORDER="NULL",
        NAME="NULL",
        DISPLAYNAME="NULL",
        DESCRIPTION="NULL",
        MANAGER="NULL",
        REFERRALACCOUNT="NULL",
        SHIPPINGCOST="NULL",
        ORIGIN="NULL",
        INVOICENOTE="NULL",
        BILLINGSTARTDATE="NULL",
        ORDERSTARTDATE="NULL",
        NEXTBILLINGFROMDATE="NULL",
        NEXTBILLINGFROMDATEUTC="NULL",
        TRIALREQUIRESPAYMENTMETHOD="NULL",
        PRICETAXINCLUSIVE="NULL",
        CREATEDBY="NULL",
        CREATEDON="NULL",
        LASTUPDATEDBY="NULL",
        LASTUPDATEDON="NULL",
        ALLOWCONTRACT="NULL",
        LINES="NULL",
        CUSTOMFORMS="NULL",
        CURRENCY="NULL",
        TIMEZONE="NULL",
        PROPERTIES=ORDERPROPERTIESDTO(
            COMMUNICATIONPROFILE="STRING_VALUE",
            INVOICEMODE="STRING_VALUE",
            INVOICETERM="STRING_VALUE",
            BILLINGPERIOD="STRING_VALUE",
            PAYMENTPROCESSOR="STRING_VALUE",
            PAYMENTMODE="STRING_VALUE",
            PAYMENTTERM="STRING_VALUE",
            PAYMENTTERMALIGNMENT="STRING_VALUE",
            FULFILLMENTMODE="STRING_VALUE",
            FULFILLMENTTERM="STRING_VALUE",
            CONSOLIDATEINVOICE="BOOLEAN",
            CONSOLIDATEKEY="STRING_VALUE"
        ),
        CONTRACTPROPERTIES="NULL",
        BILLINGADDRESS="NULL",
        SHIPPINGADDRESS="NULL",
        SHIPPINGPROFILE="NULL",
        DEFAULTWAREHOUSE="NULL",
        CUSTOMOBJECTS="NULL",
        ISTAXEXEMPTWHENSOLD="NULL",
        KPIS="NULL",
        LINEITEMS="NULL",
        EFFECTIVEDATE="NULL",
        CHARGE="NULL",
        COMMUNICATIONPREFERENCE="NULL",
        LINE="NULL",
        CUSTOMATTRIBUTES="NULL",
        CUSTOMERPURCHASEORDERID="NULL",
        DISCOUNTPROFILE="NULL",
        ACCOUNTNAME="NULL",
        CURRENCYID="NULL",
        TOTAL="NULL",
        SUBTOTAL="NULL",
        TAX="NULL",
        INVOICEID="NULL",
        PAYMENTID="NULL",
        INVOICE="NULL"
    ),
    EVENTUUID="NULL"
)

Updating Order Billing Preferences

Functionupdate_order_billing_preference()

Purpose

This function updates the billing configuration of a specific order, including invoice mode, payment terms, billing period, and fulfillment preferences.

Parameters

ParameterTypeDescription
order_idStringUnique order ID to update preferences.
request_dataOrderCreateDTOContains the new properties object with updated billing configurations.

Use Case

The function is used when an existing order's billing behavior needs to be modified. A business may want to change the invoice mode from automatic to manual, extend the billing period, update the payment processor, or align payment terms with the invoice date. This method allows such updates to be applied programmatically for precise control over invoicing and fulfillment policies.

def UPDATE_ORDER_BILLING_PREFERENCE():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    EXSITED_SDK: EXSITEDSDK = EXSITEDSDK().INIT_SDK(REQUEST_TOKEN_DTO=COMMONDATA.GET_REQUEST_TOKEN_DTO())

    try:
        ORDER_PROPERTIES = ORDERPROPERTIESDTO(
            COMMUNICATIONPROFILE="STRING_VALUE",
            INVOICEMODE="STRING_VALUE",
            INVOICETERM="STRING_VALUE",
            BILLINGPERIOD="STRING_VALUE",
            PAYMENTPROCESSOR="STRING_VALUE",
            PAYMENTMODE="STRING_VALUE",
            PAYMENTTERM="STRING_VALUE",
            PAYMENTTERMALIGNMENT="STRING_VALUE",
            FULFILLMENTMODE="STRING_VALUE",
            FULFILLMENTTERM="STRING_VALUE"
        )
        REQUEST_DATA = ORDERCREATEDTO(ORDER=ORDERDATADTO(PROPERTIES=ORDER_PROPERTIES))
        RESPONSE = EXSITED_SDK.ORDER.UPDATE_BILLING_PREFERENCE(
            ID="ORDER_ID",
            REQUEST_DATA=REQUEST_DATA
        )
        PRINT(RESPONSE)

    except ABEXCEPTION AS AB:
        PRINT(AB)
        PRINT(AB.GET_ERRORS())
        PRINT(AB.RAW_RESPONSE)

Response

The function returns the updated order object, reflecting the new billing preferences such as invoice mode, invoice term, billing period, payment mode, processor, and fulfillment settings.

ORDERDETAILSDTO(
    ORDER=ORDERDATADTO(
        ACCOUNTID="NULL",
        STATUS="NULL",
        ID="NULL",
        UUID="NULL",
        VERSION="NULL",
        PREORDER="NULL",
        QUOTEORDER="NULL",
        NAME="NULL",
        DISPLAYNAME="NULL",
        DESCRIPTION="NULL",
        MANAGER="NULL",
        REFERRALACCOUNT="NULL",
        SHIPPINGCOST="NULL",
        ORIGIN="NULL",
        INVOICENOTE="NULL",
        BILLINGSTARTDATE="NULL",
        ORDERSTARTDATE="NULL",
        NEXTBILLINGFROMDATE="NULL",
        NEXTBILLINGFROMDATEUTC="NULL",
        TRIALREQUIRESPAYMENTMETHOD="NULL",
        PRICETAXINCLUSIVE="NULL",
        CREATEDBY="NULL",
        CREATEDON="NULL",
        LASTUPDATEDBY="NULL",
        LASTUPDATEDON="NULL",
        ALLOWCONTRACT="NULL",
        LINES="NULL",
        CUSTOMFORMS="NULL",
        CURRENCY="NULL",
        TIMEZONE="NULL",
        PROPERTIES=ORDERPROPERTIESDTO(
            COMMUNICATIONPROFILE="STRING_VALUE",
            INVOICEMODE="STRING_VALUE",
            INVOICETERM="STRING_VALUE",
            BILLINGPERIOD="STRING_VALUE",
            PAYMENTPROCESSOR="STRING_VALUE",
            PAYMENTMODE="STRING_VALUE",
            PAYMENTTERM="STRING_VALUE",
            PAYMENTTERMALIGNMENT="STRING_VALUE",
            FULFILLMENTMODE="STRING_VALUE",
            FULFILLMENTTERM="STRING_VALUE",
            CONSOLIDATEINVOICE="BOOLEAN",
            CONSOLIDATEKEY="STRING_VALUE"
        ),
        CONTRACTPROPERTIES="NULL",
        BILLINGADDRESS="NULL",
        SHIPPINGADDRESS="NULL",
        SHIPPINGPROFILE="NULL",
        DEFAULTWAREHOUSE="NULL",
        CUSTOMOBJECTS="NULL",
        ISTAXEXEMPTWHENSOLD="NULL",
        KPIS="NULL",
        LINEITEMS="NULL",
        EFFECTIVEDATE="NULL",
        CHARGE="NULL",
        COMMUNICATIONPREFERENCE="NULL",
        LINE="NULL",
        CUSTOMATTRIBUTES="NULL",
        CUSTOMERPURCHASEORDERID="NULL",
        DISCOUNTPROFILE="NULL",
        ACCOUNTNAME="NULL",
        CURRENCYID="NULL",
        TOTAL="NULL",
        SUBTOTAL="NULL",
        TAX="NULL",
        INVOICEID="NULL",
        PAYMENTID="NULL",
        INVOICE="NULL"
    ),
    EVENTUUID="NULL"
)

Getting Order Line Items

Function: order_get_lines()

Purpose

This function is used to retrieve the complete list of line items associated with a specific order. It helps extract detailed information about each ordered item, including quantities, prices, tax details, shipping costs, and related configurations.

Parameters

AttributeTypeDescription
order_idStringUnique identifier of order.

Use Case

The function is used to inspect the individual items included in an order. This includes the item ID, name, quantity, price per unit, total shipping cost, tax details, and any additional metadata such as custom attributes or expected delivery dates. It is especially helpful for reporting, invoicing, order audits, or fulfillment operations.

def order_get_lines():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = exsited_sdk.order.lines(id="ORDER_ID")
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The SDK function response includes a list of line items within the order. Each item contains attributes such as item name, UUID, quantity, charge type (ONE_OFF or RECURRING), pricing snapshot with rule details, tax configuration, accounting codes, and expected delivery date. For recurring items, additional properties such as billing mode and proration flags are included. The response also provides overall order KPIs like total revenue, estimated total, outstanding amount, and invoice metrics.

ORDERDETAILSDTO(
    ORDER=ORDERDATADTO(
        ACCOUNTID="NULL",
        STATUS="NULL",
        ID="NULL",
        UUID="NULL",
        VERSION="NULL",
        PREORDER="NULL",
        QUOTEORDER="NULL",
        NAME="NULL",
        DISPLAYNAME="NULL",
        DESCRIPTION="NULL",
        MANAGER="NULL",
        REFERRALACCOUNT="NULL",
        SHIPPINGCOST="NULL",
        ORIGIN="NULL",
        INVOICENOTE="NULL",
        BILLINGSTARTDATE="NULL",
        ORDERSTARTDATE="NULL",
        NEXTBILLINGFROMDATE="NULL",
        NEXTBILLINGFROMDATEUTC="NULL",
        TRIALREQUIRESPAYMENTMETHOD="NULL",
        PRICETAXINCLUSIVE="NULL",
        CREATEDBY="NULL",
        CREATEDON="NULL",
        LASTUPDATEDBY="NULL",
        LASTUPDATEDON="NULL",
        ALLOWCONTRACT="NULL",
        LINES=[
            ORDERLINEDTO(
                ITEMID="ITEM_ID",
                ITEMORDERQUANTITY="NUMBER",
                ITEMUUID="UUID_VALUE",
                ITEMNAME="STRING_VALUE",
                SHIPPINGCOST="NUMBER",
                ITEMINVOICENOTE="STRING_VALUE",
                ITEMDESCRIPTION="STRING_VALUE",
                ITEMTYPE="STRING_VALUE",
                ITEMCHARGETYPE="STRING_VALUE",
                CHARGEITEMUUID="UUID_VALUE",
                VERSION="VERSION_NUMBER",
                ITEMPRICETAX=TAXDTO(
                    UUID="EMPTY",
                    CODE="EMPTY",
                    RATE="EMPTY",
                    LINK="EMPTY",
                    AMOUNT="NULL"
                ),
                ISTAXEXEMPTWHENSOLD="NULL",
                TAXEXEMPTWHENSOLD="BOOLEAN",
                ITEMPRICESNAPSHOT=ORDERITEMPRICESNAPSHOTDTO(
                    PRICINGRULE=ORDERITEMPRICINGRULEDTO(
                        PRICE="NUMBER",
                        UUID="UUID_VALUE",
                        VERSION="VERSION_NUMBER",
                        PRICETYPE="STRING_VALUE",
                        UOM="EMPTY",
                        PRICEPERIOD="EMPTY",
                        PRICINGSCHEDULE="EMPTY",
                        PRICINGLEVEL="EMPTY",
                        PRICINGMETHOD="NUMBER",
                        WAREHOUSE="STRING_VALUE"
                    )
                ),
                ITEMSALETAXCONFIGURATION=ORDERITEMSALETAXCONFIGURATIONDTO(
                    SALEPRICEISBASEDON="STRING_VALUE",
                    TAXCODE=TAXDTO(UUID="EMPTY", CODE="EMPTY", RATE="EMPTY", LINK="EMPTY", AMOUNT="NULL")
                ),
                PURCHASEORDER="NULL",
                PACKAGENAME="NULL",
                ITEMSERIALORBATCHNUMBER="NULL",
                ITEMCUSTOMATTRIBUTES=[],
                OP="NULL",
                UUID="NULL",
                ITEMPROPERTIES="NULL",
                SUBTOTAL="NULL",
                TOTAL="NULL",
                TAX="NULL",
                ITEMUOM="NULL",
                ITEMWAREHOUSE="NULL",
                PRICINGSNAPSHOTUUID="NULL",
                CHARGINGSTARTDATE="NULL",
                ALTERNATECHARGINGSTARTDATE="NULL",
                CHARGINGENDDATE="NULL",
                ALTERNATECHARGINGENDDATE="NULL",
                ITEMPRICE="NULL",
                ITEMDISCOUNTAMOUNT="NULL",
                TAXAMOUNT="NULL",
                OPERATION="NULL",
                DISCOUNT="NULL",
                UOM="NULL",
                WAREHOUSE="NULL",
                QUANTITY="NULL",
                ACCOUNTINGCODE="NULL",
                ITEMACCOUNTINGCODE=ORDERITEMACCOUNTINGCODEDTO(SALESREVENUE="STRING_VALUE"),
                PREORDERSTOCKDETAILS="NULL",
                EXPECTEDDELIVERYDATE="EMPTY",
                PURCHASEORDERID="NULL",
                PURCHASEINVOICEID="NULL"
            ),
     
        ],
        CUSTOMFORMS="NULL",
        CURRENCY="NULL",
        TIMEZONE="NULL",
        PROPERTIES="NULL",
        CONTRACTPROPERTIES="NULL",
        BILLINGADDRESS="NULL",
        SHIPPINGADDRESS="NULL",
        SHIPPINGPROFILE="NULL",
        DEFAULTWAREHOUSE="NULL",
        CUSTOMOBJECTS="NULL",
        ISTAXEXEMPTWHENSOLD="NULL",
        KPIS=KPISDTO(
            STARTDATE="EMPTY",
            ESTIMATEDTOTAL="NUMBER",
            TOTALREVENUE="NUMBER",
            MONTHLYRECURRINGREVENUE="NUMBER",
            TOTALCOLLECTED="NUMBER",
            TOTALOUTSTANDING="NUMBER",
            TOTALDUE="NUMBER",
            LASTINVOICEISSUEDATE="EMPTY",
            LASTINVOICETOTAL="NUMBER",
            TOTALINVOICE="NUMBER",
            NEXTINVOICEISSUEDATE="EMPTY",
            LASTREACTIVATEDON="EMPTY",
            LASTCANCELLEDON="EMPTY",
            LASTCHANGEDON="EMPTY",
            LASTDELETEDON="EMPTY"
        ),
        LINEITEMS=[],
        EFFECTIVEDATE="NULL",
        CHARGE="NULL",
        COMMUNICATIONPREFERENCE="NULL",
        LINE="NULL",
        CUSTOMATTRIBUTES="NULL",
        CUSTOMERPURCHASEORDERID="NULL",
        DISCOUNTPROFILE="NULL",
        ACCOUNTNAME="NULL",
        CURRENCYID="NULL",
        TOTAL="NULL",
        SUBTOTAL="NULL",
        TAX="NULL",
        INVOICEID="NULL",
        PAYMENTID="NULL",
        INVOICE="NULL"
    ),
    EVENTUUID="NULL"
)

Getting Order a single Line Item

Function: get_order_lines_by_charge_uuid()

Purpose

This function retrieves detailed information about a specific line item in an order by referencing the order ID and the unique charge UUID. It is intended to fetch complete charge-level data such as pricing, tax settings, charge type, and item-specific metadata for auditing, reporting, or processing purposes.

Parameters

ParameterTypeDescription
order_idStringThe ID of the order .
charge_uuidStringUnique identifier for the specific charge in the order.

Use Case

The function is used to extract detailed charge information from a specific line in an order. Viewing a customer’s invoice or validating tax details for a particular item, this function helps isolate and retrieve the individual charge data identified by its charge_uuid, without fetching the entire order lines list.

def get_order_lines_by_charge_uuid():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = exsited_sdk.order.lines_charge(id="ORDER_ID",
                                                  charge_uuid="CHARGE_UUID")
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The response returns a single charge item from an order, showing key details like item_id, item_name, quantity, and shipping_cost. It includes pricing info from the snapshot, tax settings, and charge UUID. The item is categorized as ONE_OFF and STANDARD, with optional fields such as description, invoice note, and expected delivery date. KPIs are returned but mostly empty.

ORDERDETAILSDTO(
    ORDER=ORDERDATADTO(
        ACCOUNTID="NULL",
        STATUS="NULL",
        ID="NULL",
        UUID="NULL",
        VERSION="NULL",
        PREORDER="NULL",
        QUOTEORDER="NULL",
        NAME="NULL",
        DISPLAYNAME="NULL",
        DESCRIPTION="NULL",
        MANAGER="NULL",
        REFERRALACCOUNT="NULL",
        SHIPPINGCOST="NULL",
        ORIGIN="NULL",
        INVOICENOTE="NULL",
        BILLINGSTARTDATE="NULL",
        ORDERSTARTDATE="NULL",
        NEXTBILLINGFROMDATE="NULL",
        NEXTBILLINGFROMDATEUTC="NULL",
        TRIALREQUIRESPAYMENTMETHOD="NULL",
        PRICETAXINCLUSIVE="NULL",
        CREATEDBY="NULL",
        CREATEDON="NULL",
        LASTUPDATEDBY="NULL",
        LASTUPDATEDON="NULL",
        ALLOWCONTRACT="NULL",
        LINES="NULL",
        CUSTOMFORMS="NULL",
        CURRENCY="NULL",
        TIMEZONE="NULL",
        PROPERTIES="NULL",
        CONTRACTPROPERTIES="NULL",
        BILLINGADDRESS="NULL",
        SHIPPINGADDRESS="NULL",
        SHIPPINGPROFILE="NULL",
        DEFAULTWAREHOUSE="NULL",
        CUSTOMOBJECTS="NULL",
        ISTAXEXEMPTWHENSOLD="NULL",
        KPIS=KPISDTO(
            STARTDATE="EMPTY",
            ESTIMATEDTOTAL="NUMBER",
            TOTALREVENUE="NUMBER",
            MONTHLYRECURRINGREVENUE="NUMBER",
            TOTALCOLLECTED="NUMBER",
            TOTALOUTSTANDING="NUMBER",
            TOTALDUE="NUMBER",
            LASTINVOICEISSUEDATE="EMPTY",
            LASTINVOICETOTAL="NUMBER",
            TOTALINVOICE="NUMBER",
            NEXTINVOICEISSUEDATE="EMPTY",
            LASTREACTIVATEDON="EMPTY",
            LASTCANCELLEDON="EMPTY",
            LASTCHANGEDON="EMPTY",
            LASTDELETEDON="EMPTY"
        ),
        LINEITEMS=[],
        EFFECTIVEDATE="NULL",
        CHARGE=ORDERLINEDTO(
            ITEMID="ITEM_ID",
            ITEMORDERQUANTITY="NUMBER",
            ITEMUUID="UUID_VALUE",
            ITEMNAME="STRING_VALUE",
            SHIPPINGCOST="NUMBER",
            ITEMINVOICENOTE="STRING_VALUE",
            ITEMDESCRIPTION="STRING_VALUE",
            ITEMTYPE="STRING_VALUE",
            ITEMCHARGETYPE="STRING_VALUE",
            CHARGEITEMUUID="UUID_VALUE",
            VERSION="VERSION_NUMBER",
            ITEMPRICETAX=TAXDTO(
                UUID="UUID_VALUE",
                CODE="STRING_VALUE",
                RATE="NUMBER",
                LINK="URL",
                AMOUNT="NULL"
            ),
            ISTAXEXEMPTWHENSOLD="NULL",
            TAXEXEMPTWHENSOLD="BOOLEAN",
            ITEMPRICESNAPSHOT=ORDERITEMPRICESNAPSHOTDTO(
                PRICINGRULE=ORDERITEMPRICINGRULEDTO(
                    PRICE="NUMBER",
                    UUID="UUID_VALUE",
                    VERSION="VERSION_NUMBER",
                    PRICETYPE="STRING_VALUE",
                    UOM="EMPTY",
                    PRICEPERIOD="EMPTY",
                    PRICINGSCHEDULE="EMPTY",
                    PRICINGLEVEL="EMPTY",
                    PRICINGMETHOD="NUMBER",
                    WAREHOUSE="STRING_VALUE"
                )
            ),
            ITEMSALETAXCONFIGURATION=ORDERITEMSALETAXCONFIGURATIONDTO(
                SALEPRICEISBASEDON="STRING_VALUE",
                TAXCODE=TAXDTO(UUID="EMPTY", CODE="EMPTY", RATE="EMPTY", LINK="EMPTY", AMOUNT="NULL")
            ),
            PURCHASEORDER="NULL",
            PACKAGENAME="NULL",
            ITEMSERIALORBATCHNUMBER="NULL",
            ITEMCUSTOMATTRIBUTES=[],
            OP="NULL",
            UUID="NULL",
            ITEMPROPERTIES="NULL",
            SUBTOTAL="NULL",
            TOTAL="NULL",
            TAX="NULL",
            ITEMUOM="NULL",
            ITEMWAREHOUSE="NULL",
            PRICINGSNAPSHOTUUID="NULL",
            CHARGINGSTARTDATE="NULL",
            ALTERNATECHARGINGSTARTDATE="NULL",
            CHARGINGENDDATE="NULL",
            ALTERNATECHARGINGENDDATE="NULL",
            ITEMPRICE="NULL",
            ITEMDISCOUNTAMOUNT="NULL",
            TAXAMOUNT="NULL",
            OPERATION="NULL",
            DISCOUNT="NULL",
            UOM="NULL",
            WAREHOUSE="NULL",
            QUANTITY="NULL",
            ACCOUNTINGCODE="NULL",
            ITEMACCOUNTINGCODE=ORDERITEMACCOUNTINGCODEDTO(SALESREVENUE="EMPTY"),
            PREORDERSTOCKDETAILS="NULL",
            EXPECTEDDELIVERYDATE="EMPTY",
            PURCHASEORDERID="NULL",
            PURCHASEINVOICEID="NULL"
        ),
        COMMUNICATIONPREFERENCE="NULL",
        LINE="NULL",
        CUSTOMATTRIBUTES="NULL",
        CUSTOMERPURCHASEORDERID="NULL",
        DISCOUNTPROFILE="NULL",
        ACCOUNTNAME="NULL",
        CURRENCYID="NULL",
        TOTAL="NULL",
        SUBTOTAL="NULL",
        TAX="NULL",
        INVOICEID="NULL",
        PAYMENTID="NULL",
        INVOICE="NULL"
    ),
    EVENTUUID="NULL"
)