Visit Main Site
Join Partner Program
Login
     
Introduction
Installation
Python
PHP
GitHub
Composer
Documentation
Account
Item
Item Fulfillment
Item Receipts
Order
Usage
Express
Invoice
Payment
Credit Note
Refund
Purchase Order
Purchase Invoice
Purchase Payment
Purchase Credit Notes
Purchase Refund
Gift Certificate
Return Merchandise Authorizations
RVA
Settings
Integration
Portal
Communications
Reports
Proforma
Custom Objects
Rental Asset Profiles
User settings
Labour
Custom Development
Custom Component
Custom Attribute
Custom Object
Custom Database
» Order Module SDK Documentation

Getting Order List 

Function : order_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.

Python
PHP
def order_list_basic():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.list(limit='NUMBER',offset='NUMBER',direction='',order_by='')
        print(response)
        # ResponseToObj().process(response=response["accounts"][0])
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
   public function orderListBasic()
    {
        try {
            $response = $this->orderService->readAll('v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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.

Python
PHP
OrderListDTO(
    orders=[
        OrderDataDTO(
            accountId="ACCOUNT_ID",
            bulkid="BULK_ID",
            requestid="REQUEST_ID",
            status="ORDER_STATUS",
            id="ORDER_ID",
            uuid="ORDER_UUID",
            version="ORDER_VERSION",
            preOrder="BOOLEAN",
            quoteOrder="BOOLEAN",
            name="ORDER_NAME",
            displayName="DISPLAY_NAME",
            description="ORDER_DESCRIPTION",
            manager="ORDER_MANAGER",
            referralAccount="REFERRAL_ACCOUNT",
            shippingCost="SHIPPING_COST",
            origin="ORDER_ORIGIN",
            invoiceNote="INVOICE_NOTE",
            billingStartDate="BILLING_START_DATE",
            orderStartDate="ORDER_START_DATE",
            nextBillingFromDate="NEXT_BILLING_DATE",
            nextBillingFromDateUtc="NEXT_BILLING_DATE_UTC",
            trialRequiresPaymentMethod="BOOLEAN",
            priceTaxInclusive="BOOLEAN",
            createdBy="CREATED_BY",
            createdOn="CREATED_TIMESTAMP",
            lastUpdatedBy="LAST_UPDATED_BY",
            lastUpdatedOn="LAST_UPDATED_TIMESTAMP",
            allowContract="BOOLEAN",
            accountName="ACCOUNT_NAME",
            currencyId="CURRENCY_ID",
            total="ORDER_TOTAL",
            subtotal="ORDER_SUBTOTAL",
            tax="ORDER_TAX",
            callbackUrl="CALLBACK_URL",
            lines=[
                OrderLineDTO(
                    itemId="ITEM_ID",
                    itemOrderQuantity="ITEM_QUANTITY",
                    itemUuid="ITEM_UUID",
                    itemName="ITEM_NAME",
                    shippingCost="ITEM_SHIPPING_COST",
                    itemInvoiceNote="ITEM_INVOICE_NOTE",
                    itemDescription="ITEM_DESCRIPTION",
                    itemType="ITEM_TYPE",
                    itemChargeType="CHARGE_TYPE",
                    chargeItemUuid="CHARGE_ITEM_UUID",
                    version="ITEM_VERSION",
                    itemPriceTax=TaxDTO(
                        uuid="TAX_UUID",
                        code="TAX_CODE",
                        rate="TAX_RATE",
                        link="TAX_LINK",
                        amount="TAX_AMOUNT"
                    ),
                    isTaxExemptWhenSold="BOOLEAN",
                    taxExemptWhenSold="BOOLEAN",
                    itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                        pricingRule=OrderItemPricingRuleDTO(
                            price="ITEM_PRICE",
                            uuid="PRICING_RULE_UUID",
                            version="PRICING_RULE_VERSION",
                            priceType="PRICE_TYPE",
                            uom="UOM",
                            pricePeriod="PRICE_PERIOD",
                            pricingSchedule="PRICING_SCHEDULE",
                            pricingLevel="PRICING_LEVEL",
                            pricingMethod="PRICING_METHOD",
                            warehouse="WAREHOUSE"
                        )
                    ),
                    itemSaleTaxConfiguration=OrderItemSaleTaxConfigurationDTO(
                        salePriceIsBasedOn="SALE_PRICE_BASIS",
                        taxCode=TaxDTO(
                            uuid="TAX_CODE_UUID",
                            code="TAX_CODE",
                            rate="TAX_RATE",
                            link="TAX_LINK",
                            amount="TAX_AMOUNT"
                        )
                    ),
                    purchaseOrder="PURCHASE_ORDER",
                    packageName="PACKAGE_NAME",
                    itemSerialOrBatchNumber="SERIAL_OR_BATCH",
                    itemCustomAttributes=[],
                    op="OPERATION",
                    uuid="LINE_UUID",
                    itemProperties=ItemPropertiesDataDTO(
                        billingMode="BILLING_MODE",
                        chargingPeriod="CHARGING_PERIOD",
                        chargingStartDate="CHARGING_START_DATE",
                        chargingStartDayOfMonth="CHARGING_DAY",
                        chargingFixedStartDate="CHARGING_FIXED_DATE",
                        chargingAndBillingAlignment="ALIGNMENT",
                        proRataPartialChargingPeriod="PRORATA_CHARGING",
                        proRataPartialPricingPeriod="PRORATA_PRICING",
                        proRataPartialUnit="BOOLEAN"
                    ),
                    subtotal="LINE_SUBTOTAL",
                    total="LINE_TOTAL",
                    tax="LINE_TAX",
                    itemUom="ITEM_UOM",
                    itemWarehouse="ITEM_WAREHOUSE",
                    pricingSnapshotUuid="PRICING_SNAPSHOT_UUID",
                    chargingStartDate="CHARGING_START_DATE",
                    alternateChargingStartDate="ALT_CHARGING_START_DATE",
                    chargingEndDate="CHARGING_END_DATE",
                    alternateChargingEndDate="ALT_CHARGING_END_DATE",
                    itemPrice="ITEM_PRICE",
                    itemDiscountAmount="DISCOUNT_AMOUNT",
                    taxAmount="TAX_AMOUNT",
                    operation="LINE_OPERATION",
                    discount="DISCOUNT_VALUE",
                    uom="UOM",
                    warehouse="WAREHOUSE",
                    quantity="QUANTITY",
                    accountingCode="ACCOUNTING_CODE",
                    itemAccountingCode=OrderItemAccountingCodeDTO(
                        salesRevenue="SALES_REVENUE"
                    ),
                    preOrderStockDetails="PREORDER_STOCK",
                    expectedDeliveryDate="DELIVERY_DATE",
                    purchaseOrderId="PURCHASE_ORDER_ID",
                    purchaseInvoiceId="PURCHASE_INVOICE_ID"
                )
            ],
            customForms=CustomFormsDTO(
                uuid="CUSTOM_FORM_UUID",
                name="CUSTOM_FORM_NAME"
            ),
            currency=CurrencyDTO(
                uuid="CURRENCY_UUID",
                name="CURRENCY_NAME",
                link="CURRENCY_LINK"
            ),
            timeZone=TimeZoneDTO(
                uuid="TIMEZONE_UUID",
                name="TIMEZONE_NAME",
                link="TIMEZONE_LINK"
            ),
            properties=OrderPropertiesDTO(
                communicationProfile="COMM_PROFILE",
                invoiceMode="INVOICE_MODE",
                invoiceTerm="INVOICE_TERM",
                billingPeriod="BILLING_PERIOD",
                paymentProcessor="PAYMENT_PROCESSOR",
                paymentMode="PAYMENT_MODE",
                paymentTerm="PAYMENT_TERM",
                paymentTermAlignment="TERM_ALIGNMENT",
                fulfillmentMode="FULFILLMENT_MODE",
                fulfillmentTerm="FULFILLMENT_TERM",
                consolidateInvoice="BOOLEAN",
                consolidateKey="CONSOLIDATE_KEY"
            ),
            contractProperties="CONTRACT_PROPERTIES",
            billingAddress=AddressDTO(
                addressLine1="ADDRESS_LINE_1",
                addressLine2="ADDRESS_LINE_2",
                addressLine3="ADDRESS_LINE_3",
                addressLine4="ADDRESS_LINE_4",
                addressLine5="ADDRESS_LINE_5",
                postCode="POST_CODE",
                city="CITY",
                state="STATE",
                country="COUNTRY",
                isDefaultBilling="BOOLEAN",
                isDefaultShipping="BOOLEAN",
                uuid="ADDRESS_UUID",
                name="ADDRESS_NAME"
            ),
            shippingAddress=AddressDTO(
                addressLine1="ADDRESS_LINE_1",
                addressLine2="ADDRESS_LINE_2",
                addressLine3="ADDRESS_LINE_3",
                addressLine4="ADDRESS_LINE_4",
                addressLine5="ADDRESS_LINE_5",
                postCode="POST_CODE",
                city="CITY",
                state="STATE",
                country="COUNTRY",
                isDefaultBilling="BOOLEAN",
                isDefaultShipping="BOOLEAN",
                uuid="ADDRESS_UUID",
                name="ADDRESS_NAME"
            ),
            shippingProfile=ShippingProfileDTO(
                uuid="SHIPPING_PROFILE_UUID",
                status="SHIPPING_STATUS",
                name="SHIPPING_NAME",
                displayName="SHIPPING_DISPLAY_NAME",
                description="SHIPPING_DESCRIPTION",
                invoiceNote="SHIPPING_INVOICE_NOTE",
                type="SHIPPING_TYPE",
                fixedAmount="FIXED_AMOUNT",
                isTaxExempt="BOOLEAN",
                isTaxInclusive="BOOLEAN",
                taxConfiguration="TAX_CONFIGURATION",
                accountingCode="ACCOUNTING_CODE"
            ),
            defaultWarehouse="DEFAULT_WAREHOUSE",
            customObjects=[],
            isTaxExemptWhenSold="BOOLEAN",
            kpis=KpisDTO(
                startDate="KPI_START_DATE",
                estimatedTotal="ESTIMATED_TOTAL",
                totalRevenue="TOTAL_REVENUE",
                monthlyRecurringRevenue="MRR",
                totalCollected="TOTAL_COLLECTED",
                totalOutstanding="TOTAL_OUTSTANDING",
                totalDue="TOTAL_DUE",
                lastInvoiceIssueDate="LAST_INVOICE_DATE",
                lastInvoiceTotal="LAST_INVOICE_TOTAL",
                totalInvoice="TOTAL_INVOICE",
                nextInvoiceIssueDate="NEXT_INVOICE_DATE",
                lastReactivatedOn="LAST_REACTIVATED",
                lastCancelledOn="LAST_CANCELLED",
                lastChangedOn="LAST_CHANGED",
                lastDeletedOn="LAST_DELETED"
            ),
            lineItems=[],
            effectiveDate="EFFECTIVE_DATE",
            charge="CHARGE_DETAILS",
            communicationPreference="COMM_PREF",
            line="LINE_REFERENCE",
            customAttributes=[],
            customerPurchaseOrderId="CUSTOMER_PO_ID",
            discountProfile="DISCOUNT_PROFILE",
            invoiceId="INVOICE_ID",
            paymentId="PAYMENT_ID",
            invoice="INVOICE_DETAILS"
        )
    ],
    pagination=PaginationDTO(
        records="TOTAL_RECORDS",
        limit="PAGE_LIMIT",
        offset="PAGE_OFFSET",
        previousPage="PREVIOUS_PAGE_URL",
        nextPage="NEXT_PAGE_URL"
    )
)
{
    "order": {
        "status": "ACTIVE",
        "id": "order_id",
        "pre_order": "true_or_false",
        "quote_order": "true_or_false",
        "name": "order_name",
        "display_name": "display_name",
        "description": "description",
        "manager": "manager_name",
        "referral_account": "referral_account",
        "customer_purchase_order_id": "customer_purchase_order_id",
        "shipping_profile": {},
        "shipping_cost": "shipping_cost",
        "discount_profile": null,
        "origin": "origin",
        "custom_forms": {
            "uuid": "form_uuid",
            "name": "form_name"
        },
        "currency": {
            "uuid": "currency_uuid",
            "name": "currency_name",
            "link": "currency_link"
        },
        "time_zone": {
            "uuid": "time_zone_uuid",
            "name": "time_zone_name",
            "link": "time_zone_link"
        },
        "invoice_note": "invoice_note",
        "billing_start_date": "billing_start_date",
        "order_start_date": "order_start_date",
        "next_billing_from_date": "next_billing_from_date",
        "price_tax_inclusive": "true_or_false",
        "billing_address": {},
        "shipping_address": {},
        "created_by": "creator_name",
        "created_on": "created_on_date",
        "last_updated_by": "last_updated_by",
        "last_updated_on": "last_updated_on_date",
        "uuid": "order_uuid",
        "version": "version_number",
        "account_id": "account_id",
        "allow_contract": "true_or_false",
        "custom_attributes": [
            {
                "name": "attribute_name_1",
                "value": "attribute_value_1"
            },
            {
                "name": "attribute_name_2",
                "value": "attribute_value_2"
            },
            {
                "name": "attribute_name_3",
                "value": "attribute_value_3"
            },
            {
                "name": "attribute_name_4",
                "value": "attribute_value_4"
            },
            {
                "name": "attribute_name_5",
                "value": "attribute_value_5"
            },
            {
                "name": "attribute_name_6",
                "value": []
            },
            {
                "name": "attribute_name_7",
                "value": []
            }
        ],
        "custom_objects": [
            {
                "uuid": "custom_object_uuid",
                "name": "custom_object_name",
                "link": "custom_object_link"
            }
        ],
        "properties": {
            "communication_profile": "communication_profile",
            "invoice_mode": "invoice_mode",
            "invoice_term": "invoice_term",
            "billing_period": "billing_period",
            "payment_processor": "payment_processor",
            "payment_mode": "payment_mode",
            "payment_term": "payment_term",
            "payment_term_alignment": "payment_term_alignment",
            "fulfillment_mode": "fulfillment_mode",
            "fulfillment_term": "fulfillment_term"
        },
        "lines": [
            {
                "charge_item_uuid": "charge_item_uuid",
                "item_uuid": "item_uuid",
                "item_id": "item_id",
                "item_name": "item_name",
                "item_order_quantity": "item_quantity",
                "shipping_cost": "shipping_cost",
                "item_invoice_note": "item_invoice_note",
                "item_description": "item_description",
                "item_type": "item_type",
                "item_charge_type": "item_charge_type",
                "item_custom_attributes": [
                    {
                        "name": "custom_attribute_name_1",
                        "value": "custom_attribute_value_1"
                    },
                    {
                        "name": "custom_attribute_name_2",
                        "value": "custom_attribute_value_2"
                    },
                    {
                        "name": "custom_attribute_name_3",
                        "value": []
                    },
                    {
                        "name": "custom_attribute_name_4",
                        "value": "custom_attribute_value_4"
                    },
                    {
                        "name": "custom_attribute_name_5",
                        "value": "custom_attribute_value_5"
                    },
                    {
                        "name": "custom_attribute_name_6",
                        "value": "custom_attribute_value_6"
                    },
                    {
                        "name": "custom_attribute_name_7",
                        "value": []
                    }
                ],
                "item_price_snapshot": {
                    "pricing_rule": {
                        "uuid": "pricing_rule_uuid",
                        "version": "pricing_rule_version",
                        "price_type": "price_type",
                        "price": "item_price",
                        "uom": "unit_of_measure",
                        "price_period": "price_period",
                        "pricing_schedule": "pricing_schedule",
                        "pricing_level": "pricing_level",
                        "pricing_method": "pricing_method",
                        "warehouse": "warehouse"
                    }
                },
                "item_sale_tax_configuration": {
                    "sale_price_is_based_on": "sale_price_based_on",
                    "tax_code": {
                        "uuid": "tax_code_uuid",
                        "code": "tax_code",
                        "rate": "tax_rate",
                        "link": "tax_link"
                    }
                },
                "isTaxExemptWhenSold": "true_or_false",
                "item_price_tax": {
                    "uuid": "tax_uuid",
                    "code": "tax_code",
                    "rate": "tax_rate",
                    "link": "tax_link"
                },
                "item_accounting_code": {
                    "sales_revenue": "sales_revenue"
                },
                "version": "version"
            }
        ],
        "kpis": {
            "start_date": "start_date",
            "estimated_total": "estimated_total",
            "total_revenue": "total_revenue",
            "monthly_recurring_revenue": "monthly_recurring_revenue",
            "total_collected": "total_collected",
            "total_outstanding": "total_outstanding",
            "total_due": "total_due",
            "last_invoice_issue_date": "last_invoice_issue_date",
            "last_invoice_total": "last_invoice_total",
            "total_invoice": "total_invoice",
            "next_invoice_issueDate": "next_invoice_issue_date",
            "last_reactivated_on": "last_reactivated_on",
            "last_cancelled_on": "last_cancelled_on",
            "last_changed_on": "last_changed_on",
            "last_deleted_on": "last_deleted_on"
        },
        "line_items": []
    }
}

Getting Account Orders

Function: account_orders()

Purpose

This function retrieves a list of orders associated with a specific account. It allows developers to fetch detailed order information, including order metadata, line items, billing and shipping details, currency information, applied taxes, and KPI metrics. This SDK is useful when you want to display or process all orders linked to a customer account in your system, such as for order management dashboards, invoicing, reporting, or auditing purposes.

Parameters

Parameter Type Description
account_id String Unique identifier of the account whose orders are to be retrieved.
limit Integer Defines how many records to return per page. Default is platform-defined if not provided.
offset Integer Used for pagination to skip a specific number of records.

Use Case

The Get Account Orders function is typically used to fetch all orders belonging to a given account. For example, when an account manager or billing system needs to retrieve and display the current or historical orders associated with a customer, this method provides all order-level details such as product names, quantities, prices, applicable taxes, and communication preferences. It also returns pagination details to handle large datasets efficiently.

Python
PHP
def account_orders():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        # Replace with your actual Account ID
        response = exsited_sdk.order.account_list(id="ACCOUNT_ID", limit=1)
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function accountOrders()
{
    $accountID = 'ACCOUNT_ID';
    try {
        $response = $this->orderService->readAccountOrders($accountID, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an object containing the account’s order list and related pagination information. Each order object includes details such as status, identifiers, descriptions, billing configuration, tax information, product lines, and key performance indicators (KPIs). The SDKs wrap the raw API data into structured DTO (Data Transfer Object) classes, making it easier to handle and access nested properties like currency, custom_forms, and lines.

Python
PHP
AccountOrdersResponseDTO(
    account=OrderListDTO(
        orders=[
            OrderDataDTO(
                accountId="ACCOUNT_ID",
                bulkid="BULK_ID",
                requestid="REQUEST_ID",
                status="ORDER_STATUS",
                id="ORDER_ID",
                uuid="ORDER_UUID",
                version="ORDER_VERSION",
                preOrder="BOOLEAN",
                quoteOrder="BOOLEAN",
                name="ORDER_NAME",
                displayName="DISPLAY_NAME",
                description="ORDER_DESCRIPTION",
                manager="ORDER_MANAGER",
                referralAccount="REFERRAL_ACCOUNT",
                shippingCost="SHIPPING_COST",
                origin="ORDER_ORIGIN",
                invoiceNote="INVOICE_NOTE",
                billingStartDate="BILLING_START_DATE",
                orderStartDate="ORDER_START_DATE",
                nextBillingFromDate="NEXT_BILLING_DATE",
                nextBillingFromDateUtc="NEXT_BILLING_DATE_UTC",
                trialRequiresPaymentMethod="BOOLEAN",
                priceTaxInclusive="BOOLEAN",
                createdBy="CREATED_BY",
                createdOn="CREATED_TIMESTAMP",
                lastUpdatedBy="LAST_UPDATED_BY",
                lastUpdatedOn="LAST_UPDATED_TIMESTAMP",
                allowContract="BOOLEAN",
                accountName="ACCOUNT_NAME",
                currencyId="CURRENCY_ID",
                total="ORDER_TOTAL",
                subtotal="ORDER_SUBTOTAL",
                tax="ORDER_TAX",
                callbackUrl="CALLBACK_URL",
                lines=[
                    OrderLineDTO(
                        itemId="ITEM_ID",
                        itemOrderQuantity="ITEM_QUANTITY",
                        itemUuid="ITEM_UUID",
                        itemName="ITEM_NAME",
                        shippingCost="ITEM_SHIPPING_COST",
                        itemInvoiceNote="ITEM_INVOICE_NOTE",
                        itemDescription="ITEM_DESCRIPTION",
                        itemType="ITEM_TYPE",
                        itemChargeType="CHARGE_TYPE",
                        chargeItemUuid="CHARGE_ITEM_UUID",
                        version="ITEM_VERSION",
                        itemPriceTax=TaxDTO(
                            uuid="TAX_UUID",
                            code="TAX_CODE",
                            rate="TAX_RATE",
                            link="TAX_LINK",
                            amount="TAX_AMOUNT"
                        ),
                        isTaxExemptWhenSold="BOOLEAN",
                        taxExemptWhenSold="BOOLEAN",
                        itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                            pricingRule=OrderItemPricingRuleDTO(
                                price="ITEM_PRICE",
                                uuid="PRICING_RULE_UUID",
                                version="PRICING_RULE_VERSION",
                                priceType="PRICE_TYPE",
                                uom="UOM",
                                pricePeriod="PRICE_PERIOD",
                                pricingSchedule="PRICING_SCHEDULE",
                                pricingLevel="PRICING_LEVEL",
                                pricingMethod="PRICING_METHOD",
                                warehouse="WAREHOUSE"
                            )
                        ),
                        itemSaleTaxConfiguration=OrderItemSaleTaxConfigurationDTO(
                            salePriceIsBasedOn="SALE_PRICE_BASIS",
                            taxCode=TaxDTO(
                                uuid="TAX_CODE_UUID",
                                code="TAX_CODE",
                                rate="TAX_RATE",
                                link="TAX_LINK",
                                amount="TAX_AMOUNT"
                            )
                        ),
                        purchaseOrder="PURCHASE_ORDER",
                        packageName="PACKAGE_NAME",
                        itemSerialOrBatchNumber="SERIAL_OR_BATCH",
                        itemCustomAttributes=[],
                        op="OPERATION",
                        uuid="LINE_UUID",
                        itemProperties=ItemPropertiesDataDTO(
                            billingMode="BILLING_MODE",
                            chargingPeriod="CHARGING_PERIOD",
                            chargingStartDate="CHARGING_START_DATE",
                            chargingStartDayOfMonth="CHARGING_DAY",
                            chargingFixedStartDate="CHARGING_FIXED_DATE",
                            chargingAndBillingAlignment="ALIGNMENT",
                            proRataPartialChargingPeriod="PRORATA_CHARGING",
                            proRataPartialPricingPeriod="PRORATA_PRICING",
                            proRataPartialUnit="BOOLEAN"
                        ),
                        subtotal="LINE_SUBTOTAL",
                        total="LINE_TOTAL",
                        tax="LINE_TAX",
                        itemUom="ITEM_UOM",
                        itemWarehouse="ITEM_WAREHOUSE",
                        pricingSnapshotUuid="PRICING_SNAPSHOT_UUID",
                        chargingStartDate="CHARGING_START_DATE",
                        alternateChargingStartDate="ALT_CHARGING_START_DATE",
                        chargingEndDate="CHARGING_END_DATE",
                        alternateChargingEndDate="ALT_CHARGING_END_DATE",
                        itemPrice="ITEM_PRICE",
                        itemDiscountAmount="DISCOUNT_AMOUNT",
                        taxAmount="TAX_AMOUNT",
                        operation="LINE_OPERATION",
                        discount="DISCOUNT_VALUE",
                        uom="UOM",
                        warehouse="WAREHOUSE",
                        quantity="QUANTITY",
                        accountingCode="ACCOUNTING_CODE",
                        itemAccountingCode=OrderItemAccountingCodeDTO(
                            salesRevenue="SALES_REVENUE"
                        ),
                        preOrderStockDetails="PREORDER_STOCK",
                        expectedDeliveryDate="DELIVERY_DATE",
                        purchaseOrderId="PURCHASE_ORDER_ID",
                        purchaseInvoiceId="PURCHASE_INVOICE_ID"
                    )
                ],
                customForms=CustomFormsDTO(
                    uuid="CUSTOM_FORM_UUID",
                    name="CUSTOM_FORM_NAME"
                ),
                currency=CurrencyDTO(
                    uuid="CURRENCY_UUID",
                    name="CURRENCY_NAME",
                    link="CURRENCY_LINK"
                ),
                timeZone=TimeZoneDTO(
                    uuid="TIMEZONE_UUID",
                    name="TIMEZONE_NAME",
                    link="TIMEZONE_LINK"
                ),
                properties=OrderPropertiesDTO(
                    communicationProfile="COMM_PROFILE",
                    invoiceMode="INVOICE_MODE",
                    invoiceTerm="INVOICE_TERM",
                    billingPeriod="BILLING_PERIOD",
                    paymentProcessor="PAYMENT_PROCESSOR",
                    paymentMode="PAYMENT_MODE",
                    paymentTerm="PAYMENT_TERM",
                    paymentTermAlignment="TERM_ALIGNMENT",
                    fulfillmentMode="FULFILLMENT_MODE",
                    fulfillmentTerm="FULFILLMENT_TERM",
                    consolidateInvoice="BOOLEAN",
                    consolidateKey="CONSOLIDATE_KEY"
                ),
                contractProperties="CONTRACT_PROPERTIES",
                billingAddress=AddressDTO(
                    addressLine1="ADDRESS_LINE_1",
                    addressLine2="ADDRESS_LINE_2",
                    addressLine3="ADDRESS_LINE_3",
                    addressLine4="ADDRESS_LINE_4",
                    addressLine5="ADDRESS_LINE_5",
                    postCode="POST_CODE",
                    city="CITY",
                    state="STATE",
                    country="COUNTRY",
                    isDefaultBilling="BOOLEAN",
                    isDefaultShipping="BOOLEAN",
                    uuid="ADDRESS_UUID",
                    name="ADDRESS_NAME"
                ),
                shippingAddress=AddressDTO(
                    addressLine1="ADDRESS_LINE_1",
                    addressLine2="ADDRESS_LINE_2",
                    addressLine3="ADDRESS_LINE_3",
                    addressLine4="ADDRESS_LINE_4",
                    addressLine5="ADDRESS_LINE_5",
                    postCode="POST_CODE",
                    city="CITY",
                    state="STATE",
                    country="COUNTRY",
                    isDefaultBilling="BOOLEAN",
                    isDefaultShipping="BOOLEAN",
                    uuid="ADDRESS_UUID",
                    name="ADDRESS_NAME"
                ),
                shippingProfile=ShippingProfileDTO(
                    uuid="SHIPPING_PROFILE_UUID",
                    status="SHIPPING_STATUS",
                    name="SHIPPING_NAME",
                    displayName="SHIPPING_DISPLAY_NAME",
                    description="SHIPPING_DESCRIPTION",
                    invoiceNote="SHIPPING_INVOICE_NOTE",
                    type="SHIPPING_TYPE",
                    fixedAmount="FIXED_AMOUNT",
                    isTaxExempt="BOOLEAN",
                    isTaxInclusive="BOOLEAN",
                    taxConfiguration="TAX_CONFIGURATION",
                    accountingCode="ACCOUNTING_CODE"
                ),
                defaultWarehouse="DEFAULT_WAREHOUSE",
                customObjects=[],
                isTaxExemptWhenSold="BOOLEAN",
                kpis=KpisDTO(
                    startDate="KPI_START_DATE",
                    estimatedTotal="ESTIMATED_TOTAL",
                    totalRevenue="TOTAL_REVENUE",
                    monthlyRecurringRevenue="MRR",
                    totalCollected="TOTAL_COLLECTED",
                    totalOutstanding="TOTAL_OUTSTANDING",
                    totalDue="TOTAL_DUE",
                    lastInvoiceIssueDate="LAST_INVOICE_DATE",
                    lastInvoiceTotal="LAST_INVOICE_TOTAL",
                    totalInvoice="TOTAL_INVOICE",
                    nextInvoiceIssueDate="NEXT_INVOICE_DATE",
                    lastReactivatedOn="LAST_REACTIVATED",
                    lastCancelledOn="LAST_CANCELLED",
                    lastChangedOn="LAST_CHANGED",
                    lastDeletedOn="LAST_DELETED"
                ),
                lineItems=[],
                effectiveDate="EFFECTIVE_DATE",
                charge="CHARGE_DETAILS",
                communicationPreference=[
                    CommunicationPreferenceDTO(
                        media="COMM_MEDIA",
                        isEnabled="BOOLEAN"
                    )
                ],
                line="LINE_REFERENCE",
                customAttributes=[],
                customerPurchaseOrderId="CUSTOMER_PO_ID",
                discountProfile="DISCOUNT_PROFILE",
                invoiceId="INVOICE_ID",
                paymentId="PAYMENT_ID",
                invoice="INVOICE_DETAILS"
            )
        ],
        pagination=PaginationDTO(
            records="TOTAL_RECORDS",
            limit="PAGE_LIMIT",
            offset="PAGE_OFFSET",
            previousPage="PREVIOUS_PAGE_URL",
            nextPage="NEXT_PAGE_URL"
        )
    )
)
```

Let me know if you'd like this broken into modular DTOs, exported as a mock generator, or scaffolded into test cases for order lifecycle validation.
{
  "account": {
    "orders": [
      {
        "status": "ACTIVE",
        "id": "order_id",
        "uuid": "order_uuid",
        "version": "1",
        "name": "order_name",
        "display_name": "order_display_name",
        "account_id": "account_id",
        "account_name": "account_name",
        "total": "order_total",
        "subtotal": "order_subtotal",
        "tax": "order_tax",
        "currency": {
          "uuid": "currency_uuid",
          "name": "currency_name",
          "link": "currency_link"
        },
        "lines": [
          {
            "item_id": "item_id",
            "item_name": "item_name",
            "item_order_quantity": "item_quantity",
            "item_price_snapshot": {
              "pricing_rule": {
                "uuid": "pricing_rule_uuid",
                "price": "item_price"
              }
            },
            "item_price_tax": {
              "uuid": "tax_uuid",
              "code": "tax_code",
              "rate": "tax_rate"
            },
            "subtotal": "line_subtotal",
            "total": "line_total"
          }
        ],
        "kpis": {
          "estimated_total": "kpi_estimated_total",
          "total_revenue": "kpi_total_revenue",
          "total_outstanding": "kpi_total_outstanding"
        },
        "created_by": "created_by",
        "created_on": "created_on"
      }
    ],
    "pagination": {
      "records": 1,
      "limit": 20,
      "offset": 0,
      "previous_page": "",
      "next_page": "NULL"
    }
  },
  "autobillCredential": {
    "apiUrl": "https://domain/api/v3/accounts/account_id/orders",
    "accessToken": "access_token",
    "refreshToken": "refresh_token",
    "file_path": "token_file_path"
  }
}

Getting All Notes for a Specific Order

Function: get_specific_order_notes()

Purpose

The Order Notes SDK function allows developers to retrieve all notes associated with a specific order. Notes are typically used for storing comments, updates, or metadata linked to an order throughout its lifecycle. This SDK function provides a structured way to fetch notes along with pagination metadata and any custom attributes defined for the order. By using the SDK instead of making direct API calls, developers benefit from built-in authentication handling, structured response objects, and simplified error management.

Parameters

ParameterTypeDescription
order_idstringUnique identifier of the order for which notes are to be retrieved.
limitinteger(Optional) Maximum number of notes to return in one response.
offsetinteger(Optional) Pagination offset for fetching the next set of results.

Use Case

This function is typically used in order management workflows where teams need to review or process order-related notes. For instance, when a support agent opens an order in the dashboard, the system can fetch all notes left by implementers, auditors, or automated processes. This ensures that all stakeholders have visibility into the communication history, decisions made, and contextual details tied to the order. The SDK functions in Python and PHP allow developers to easily integrate this capability into backend services, CRMs, or workflow automation without dealing with raw HTTP requests.

Python
PHP
def get_specific_order_notes():
    from exsited_sdk import ExsitedSDK, SDKConfig, FileTokenManager, CommonData
    from exsited_sdk.exceptions import ABException

    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "your_token_file.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.notes.order_note_details(id="ORDER_ID")
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function getSpecificOrderNotes()
{
    $orderId = "ORDER_ID";
    try {
        $response = $this->notesService->readOrderAllNotes($orderId, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

The response contains an order object with two main parts: notes, which is an array of note objects containing unique identifiers, versioning, HTML-supported content, attached files (if any), creator details, timestamps, and optional client-defined custom attributes; and pagination, which provides metadata about the number of records, limits, and navigation links for accessing the next or previous pages in large datasets. The Python SDK represents this data as structured DTO (Data Transfer Object) classes for easier access, while the PHP SDK returns it as a JSON-like associative array, with both approaches enabling developers to iterate through notes and extract relevant details for display, auditing, or automation purposes.

Python
PHP
OrderNoteDetailsDTO(
    order=OrderNoteDataDTO(
        notes=[
            NoteDataDTO(
                uuid="NOTE_UUID",
                version="1",
                content="<p>NOTE_CONTENT</p>",
                files=[],
                createdBy="CREATED_BY",
                createdOn="CREATED_ON_TIMESTAMP",
                lastUpdatedBy="LAST_UPDATED_BY",
                lastUpdatedOn="LAST_UPDATED_ON_TIMESTAMP"
            )
        ],
        pagination=PaginationDTO(
            records="RECORDS_NUMBER",
            limit="LIMIT_NUMBER",
            offset="OFFSET_NUMBER",
            previousPage="",
            nextPage="NULL"
        )
    )
)
{
  "order": {
    "notes": [
      {
        "uuid": "NOTE_UUID",
        "version": "1",
        "content": "<p>NOTE_CONTENT</p>",
        "files": [],
        "created_by": "CREATED_BY",
        "created_on": "CREATED_ON_TIMESTAMP",
        "last_updated_by": "LAST_UPDATED_BY",
        "last_updated_on": "LAST_UPDATED_ON_TIMESTAMP",
        "custom_attributes": [
          {
            "name": "Custom_Att_One",
            "value": ""
          },
          {
            "name": "CA_TEST_ONE",
            "value": ""
          }
        ]
      }
    ],
    "pagination": {
      "records": "RECORD_NUMBER",
      "limit": "NUMBER",
      "offset": "NUMBER",
      "previous_page": "",
      "next_page": "NULL"
    }
  }
}

Getting a Specific Note from a Specific Order

Function: get_order_note_details()

Purpose

The Order Note by UUID SDK allows developers to retrieve detailed information for a single note belonging to a specific order. Unlike the “all notes” function, which lists multiple notes, this method focuses on one note identified by its uuid. This is particularly useful in workflows where a user selects or references a specific note (for example, from a list view) and needs to view its full details, including content, creator, timestamps, attachments, and custom attributes. The SDK encapsulates this functionality in Python and PHP, enabling seamless integration without handling raw HTTP requests.

Parameters

ParameterTypeDescription
order_idstringUnique identifier of the order to which the note belongs.
note_uuidstringUnique identifier (UUID) of the specific note to be retrieved.

Use Case

This function is typically used in scenarios where a stakeholder wants to inspect a specific order note in detail. For example, when an auditor clicks on a note entry in an order’s activity feed, the system can call this function to fetch and display the full note content along with its metadata. Developers can integrate this into dashboards, CRMs, or automated review systems where targeted note access is required, reducing the overhead of fetching all notes and filtering manually.

Python
PHP
def get_order_note_details():
    from exsited_sdk import ExsitedSDK, SDKConfig, FileTokenManager, CommonData
    from exsited_sdk.exceptions import ABException

    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "your_token_file.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.notes.order_note_uuid_details(
            id="ORDER_ID",
            uuid="NOTE_UUID"
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function getOrderNoteDetails()
{
    $orderId = "ORDER_ID";
    $noteUuid = "NOTE_UUID";

    try {
        $response = $this->notesService->readOrderNotesDetails($orderId, $noteUuid, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

The response contains an order object with a nested note object. The note includes the following details: a unique identifier (uuid), version number (for concurrency control), note content (HTML-supported), any attached files, the creator of the note, creation timestamp, optional last updated details, and custom attributes (if any are defined). Unlike the “all notes” function, this response contains only a single note object, making it lightweight and efficient for targeted retrieval.

Python
PHP
OrderNoteUuidDetailsDTO(
    order=OrderNoteUuidDataDTO(
        note=NoteDataDTO(
            uuid="NOTE_UUID",
            version="1",
            content="<p>NOTE_CONTENT</p>",
            files=[],
            createdBy="CREATED_BY",
            createdOn="CREATED_ON_TIMESTAMP",
            lastUpdatedBy="LAST_UPDATED_BY",
            lastUpdatedOn="LAST_UPDATED_ON_TIMESTAMP"
        )
    )
)
{
  "order": {
    "note": {
      "uuid": "NOTE_UUID",
      "version": "1",
      "content": "<p>NOTE_CONTENT</p>",
      "files": [],
      "created_by": "CREATED_BY",
      "created_on": "CREATED_ON_TIMESTAMP",
      "last_updated_by": "LAST_UPDATED_BY",
      "last_updated_on": "LAST_UPDATED_ON_TIMESTAMP",
      "custom_attributes": []
    }
  }
}

Getting All Files of an Order Note

Function: order_note_files()

Purpose

The Order Note Files SDK enables developers to retrieve all files attached to a specific note belonging to an order. This is particularly useful when notes include supporting documents, images, or other reference materials that need to be accessed or displayed alongside the note content. Using the SDK, developers can easily fetch the file list with metadata such as uuid, name, and version without having to make raw HTTP requests or manually parse JSON responses.

Parameters

Parameter Type Description
order_id string Unique identifier of the order to which the note belongs.
note_uuid string Unique identifier (UUID) of the note whose attached files need to be retrieved.

Use Case

This function is typically used when a user or system needs to view or process all files linked to a particular note. For example, in a field service inspection scenario, technicians might upload annotated images as files in notes. Later, a quality assurance manager may open the order and fetch all attached files to review supporting evidence. The SDK functions in Python and PHP simplify this workflow by handling authentication, structured responses, and error handling internally.

Python
PHP
def order_note_files():
    from exsited_sdk import ExsitedSDK, SDKConfig, FileTokenManager, CommonData
    from exsited_sdk.exceptions import ABException

    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "your_token_file.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.notes.order_note_uuid_files_details(
            id="ORDER_ID",
            uuid="NOTE_UUID"
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function orderNoteFiles()
{
    $orderId = "ORDER_ID";
    $noteUuid = "NOTE_UUID";

    try {
        $response = $this->notesService->readOrderNoteAllFiles($orderId, $noteUuid, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

The response contains an order object with a nested note object. The note includes an array of files, each file represented by its unique identifier (uuid), filename (name), and version number (used for concurrency control or version tracking). If there are no files attached, the files array will be empty. The SDK abstracts this into structured DTOs in Python and associative arrays in PHP, allowing developers to easily iterate over files and integrate them into workflows or UI components.

Python
PHP
OrderNoteUuidFileDetailsDTO(
    order=OrderNoteUuidFileDataDTO(
        note=NoteFileDataDTO(
            files=[
                FileDTO(
                    uuid="FILE_UUID",
                    name="FILE_NAME",
                    version="1"
                )
            ]
        )
    )
)
{
  "order": {
    "note": {
      "files": [
        {
          "uuid": "FILE_UUID",
          "name": "FILE_NAME",
          "version": "1"
        }
      ],
      "custom_attributes": []
    }
  }
}

Getting a Specific File of a Specific Order Note

Function : order_note_file_details()

Purpose

The Order Note File by UUID SDK provides detailed metadata about a single file attached to a specific note within an order. While the “all files” function returns a list of files, this method focuses on a single file identified by its unique file_uuid. It is particularly useful in workflows where a user selects or references a specific file (e.g., from a list of attachments) and needs to view or process its details individually. Using the SDK functions, developers can easily integrate this retrieval into systems without needing to handle raw API calls.

Parameters

Parameter Type Description
order_id string Unique identifier of the order to which the note belongs.
note_uuid string Unique identifier (UUID) of the note that contains the file.
file_uuid string Unique identifier (UUID) of the specific file to retrieve.

Use Case

This function is typically used when an application or user needs to access metadata for a specific file attached to a note. For example, in a quality assurance review, a manager may click on an image linked to an inspection note, and the system can fetch the file details (filename, identifier, version) before downloading or displaying it. Developers can integrate this function into document management features, audit trails, or file preview components. The SDK functions simplify the process by wrapping authentication, request handling, and structured response parsing.

Python
PHP
def order_note_file_details():
    from exsited_sdk import ExsitedSDK, SDKConfig, FileTokenManager, CommonData
    from exsited_sdk.exceptions import ABException

    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "your_token_file.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.notes.order_note_uuid_files_uuid_details(
            id="ORDER_ID",
            uuid="NOTE_UUID",
            file_uuid="FILE_UUID"
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function orderNoteFileDetails()
{
    $orderId = "ORDER_ID";
    $noteUuid = "NOTE_UUID";
    $fileUuid = "FILE_UUID";

    try {
        $response = $this->notesService->readOrderNoteFileDetails($orderId, $noteUuid, $fileUuid, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

The response contains an order object with a nested note object. The note contains a file object representing the requested file. The file includes its unique identifier (uuid), filename (name), and version number. This lightweight response is designed for situations where only one file’s metadata is required rather than retrieving all attachments. The Python SDK represents this as a structured DTO (OrderNoteUuidFileUuidDetailsDTO), while the PHP SDK returns it as an associative array.

Python
PHP
OrderNoteUuidFileUuidDetailsDTO(
    order=OrderNoteUuidFileUuidDataDTO(
        note=NoteFileUuidDataDTO(
            file=FileDTO(
                uuid="FILE_UUID",
                name="FILE_NAME",
                version="1"
            )
        )
    )
)
{
  "order": {
    "note": {
      "file": {
        "uuid": "FILE_UUID",
        "name": "FILE_NAME",
        "version": "1"
      },
      "custom_attributes": []
    }
  }
}

Retrieving Order Details

Function: order_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 function 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.

Python
PHP
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}")
    public function orderDetails()
    {
        $id = 'ORDER_ID';
        try {
            $response = $this->orderService->readDetails($id,'v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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.

Python
PHP
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
)
{
    "order": {
        "status": "ACTIVE",
        "id": "ORDER_ID",
        "pre_order": "false",
        "quote_order": "false",
        "name": "ORDER_NAME",
        "display_name": "ORDER_DISPLAY_NAME",
        "description": "ORDER_DESCRIPTION",
        "manager": "MANAGER_NAME",
        "referral_account": "REFERRAL_ACCOUNT",
        "customer_purchase_order_id": "PURCHASE_ORDER_ID",
        "shipping_profile": [],
        "shipping_cost": "0.000000",
        "discount_profile": null,
        "origin": "ORIGIN",
        "custom_forms": {
            "uuid": "FORM_UUID",
            "name": "FORM_NAME"
        },
        "currency": {
            "uuid": "CURRENCY_UUID",
            "name": "CURRENCY_NAME",
            "link": "CURRENCY_LINK"
        },
        "time_zone": {
            "uuid": "TIMEZONE_UUID",
            "name": "TIMEZONE_NAME",
            "link": "TIMEZONE_LINK"
        },
        "invoice_note": "INVOICE_NOTE",
        "billing_start_date": "BILLING_START_DATE",
        "order_start_date": "ORDER_START_DATE",
        "next_billing_from_date": "NEXT_BILLING_DATE",
        "price_tax_inclusive": "false",
        "billing_address": [],
        "shipping_address": [],
        "created_by": "CREATED_BY",
        "created_on": "CREATED_ON_DATE",
        "last_updated_by": "LAST_UPDATED_BY",
        "last_updated_on": "LAST_UPDATED_ON_DATE",
        "uuid": "ORDER_UUID",
        "version": "1",
        "account_id": "ACCOUNT_ID",
        "allow_contract": "false",
        "custom_attributes": [
            {
                "name": "ATTRIBUTE_NAME",
                "value": "ATTRIBUTE_VALUE"
            }
        ],
        "custom_objects": [
            {
                "uuid": "OBJECT_UUID",
                "name": "OBJECT_NAME",
                "link": "OBJECT_LINK"
            }
        ],
        "properties": {
            "communication_profile": "COMM_PROFILE",
            "invoice_mode": "INVOICE_MODE",
            "invoice_term": "INVOICE_TERM",
            "billing_period": "BILLING_PERIOD",
            "payment_processor": "PAYMENT_PROCESSOR",
            "payment_mode": "PAYMENT_MODE",
            "payment_term": "PAYMENT_TERM",
            "payment_term_alignment": "PAYMENT_ALIGNMENT",
            "fulfillment_mode": "FULFILLMENT_MODE",
            "fulfillment_term": "FULFILLMENT_TERM"
        },
        "lines": [
            {
                "charge_item_uuid": "ITEM_CHARGE_UUID",
                "item_uuid": "ITEM_UUID",
                "item_id": "ITEM_ID",
                "item_name": "ITEM_NAME",
                "item_order_quantity": "ITEM_QUANTITY",
                "shipping_cost": "ITEM_SHIPPING_COST",
                "item_invoice_note": "ITEM_NOTE",
                "item_description": "ITEM_DESCRIPTION",
                "item_type": "ITEM_TYPE",
                "item_charge_type": "CHARGE_TYPE",
                "item_custom_attributes": [
                    {
                        "name": "ATTRIBUTE_NAME",
                        "value": "ATTRIBUTE_VALUE"
                    }
                ],
                "item_price_snapshot": {
                    "pricing_rule": {
                        "uuid": "PRICING_RULE_UUID",
                        "version": "PRICING_RULE_VERSION",
                        "price_type": "PRICE_TYPE",
                        "price": "PRICE_VALUE",
                        "uom": "UNIT_OF_MEASURE",
                        "price_period": "PRICE_PERIOD",
                        "pricing_schedule": "SCHEDULE",
                        "pricing_level": "PRICING_LEVEL",
                        "pricing_method": "PRICING_METHOD",
                        "warehouse": "WAREHOUSE_NAME"
                    }
                },
                "item_sale_tax_configuration": {
                    "sale_price_is_based_on": "TAX_BASIS",
                    "tax_code": {
                        "uuid": "TAX_UUID",
                        "code": "TAX_CODE",
                        "rate": "TAX_RATE",
                        "link": "TAX_LINK"
                    }
                },
                "isTaxExemptWhenSold": "false",
                "item_price_tax": {
                    "uuid": "TAX_UUID",
                    "code": "TAX_CODE",
                    "rate": "TAX_RATE",
                    "link": "TAX_LINK"
                },
                "item_accounting_code": {
                    "sales_revenue": "REVENUE_CODE"
                },
                "version": "1"
            }
        ],
        "kpis": {
            "start_date": "START_DATE",
            "estimated_total": "ESTIMATED_TOTAL",
            "total_revenue": "TOTAL_REVENUE",
            "monthly_recurring_revenue": "MRR",
            "total_collected": "TOTAL_COLLECTED",
            "total_outstanding": "TOTAL_OUTSTANDING",
            "total_due": "TOTAL_DUE",
            "last_invoice_issue_date": "LAST_INVOICE_DATE",
            "last_invoice_total": "LAST_INVOICE_TOTAL",
            "total_invoice": "TOTAL_INVOICES",
            "next_invoice_issueDate": "NEXT_INVOICE_DATE",
            "last_reactivated_on": "LAST_REACTIVATED_DATE",
            "last_cancelled_on": "LAST_CANCELLED_DATE",
            "last_changed_on": "LAST_CHANGED_DATE",
            "last_deleted_on": "LAST_DELETED_DATE"
        },
        "line_items": []
    }
}

Creating Order Note

Function: create_order_note()

Purpose

The Create Order Note SDK allows you to attach a new note to an existing order. Notes can contain plain text (example: remarks, instructions, or audit comments) and may include file attachments such as images, documents, or PDFs. This function is useful for scenarios where operational staff or automated workflows need to log updates, inspection results, or supporting documents against an order record. The SDK methods handle both text and file upload seamlessly, abstracting away multipart request complexity.

Parameters

Parameter Type Description
order_id string Unique identifier of the order where the note will be added.
datas string The note content (free text).
file_urls array of strings Local file path(s) of attachments to upload along with the note.

Use Case

This function is typically used when a user or system needs to add new context to an order, such as logging a status update, inspection note, or attaching photos as evidence. For example, a field inspector may take a photo of an issue and upload it with a note describing the problem. The SDK functions make this process developer-friendly by simplifying file handling and note submission in one call.

Python
PHP
def create_order_note():
    from exsited_sdk import ExsitedSDK, SDKConfig, FileTokenManager, CommonData
    from exsited_sdk.exceptions import ABException

    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "TOKEN_FILE_PATH"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        datas = "NOTE_TEXT"
        file_urls = ["FILE_PATH_1", "FILE_PATH_2"]  

        response = exsited_sdk.notes.order_add_notes(
            file_urls=file_urls,
            datas=datas,
            order_id="ORDER_ID"
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function createOrderNotes()
{
    $orderId  = 'ORDER_ID';
    $filePath = 'FILE_PATH'; 
    $note     = 'NOTE_TEXT';

    try {
        $response = $this->notesService->createOrderNotes($filePath, $note, $orderId);
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

The response confirms creation of the note and returns its unique identifier (uuid). This uuid can then be used to retrieve the note, update it, or fetch associated files.

Python
PHP
OrderNoteResponseDetailsDTO(
    order=OrderNoteResponseDataDTO(
        notes=NoteDataDTO(
            uuid="NOTE_UUID",
            version=None,
            content=None,
            files=None,
            createdBy=None,
            createdOn=None,
            lastUpdatedBy=None,
            lastUpdatedOn=None
        )
    )
)
{
  "order": {
    "notes": {
      "uuid": "NOTE_UUID"
    }
  }
}

Removing an Order

Function: order_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.

Python
PHP
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)
    public function orderDelete()
    {
        $id='ORDER_ID';
        try {
            $response = $this->orderService->delete($id);
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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.

Python
PHP
{'SUCCESS': TRUE, 'STATUS_CODE': 204}
null

Cancelling an Order

Function: order_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.

Python
PHP
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)
    public function orderCancel()
    {
        $params = [
            "order" => [
                "effective_date" => "EFFECTIVE_DATE"
            ]
        ];
        $id='ORDER_ID';
        try {
            $response = $this->orderService->cancel($params,$id,'v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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. 

Python
PHP
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
    )
)
{
    event_uuid: "EVENT_UUID",
    order: {
       status: "STATUS",
        id: "ORDER_ID",
        pre_order: "PRE_ORDER",
        quote_order: "QUOTE_ORDER",
        name: "NAME",
        display_name: "DISPLAY_NAME",
        description: "DESCRIPTION",
        manager: "MANAGER",
        referral_account: "REFERRAL_ACCOUNT",
        customer_purchase_order_id: "CUSTOMER_PURCHASE_ORDER_ID",
        shipping_profile: "SHIPPING_PROFILE",
        shipping_cost: "SHIPPING_COST",
        discount_profile: "DISCOUNT_PROFILE",
        origin: "ORIGIN",
        custom_forms: {
            uuid: "CUSTOM_FORMS_UUID",
            name: "CUSTOM_FORMS_NAME"
        },
        currency: {
            uuid: "CURRENCY_UUID",
            name: "CURRENCY_NAME",
            link: "CURRENCY_LINK"
        },
        time_zone: {
            uuid: "TIME_ZONE_UUID",
            name: "TIME_ZONE_NAME",
            link: "TIME_ZONE_LINK"
        },
        invoice_note: "INVOICE_NOTE",
        billing_start_date: "BILLING_START_DATE",
        order_start_date: "ORDER_START_DATE",
        next_billing_from_date: "NEXT_BILLING_FROM_DATE",
        price_tax_inclusive: "PRICE_TAX_INCLUSIVE",
        billing_address: "BILLING_ADDRESS",
        shipping_address: "SHIPPING_ADDRESS",
        created_by: "CREATED_BY",
        created_on: "CREATED_ON",
        last_updated_by: "LAST_UPDATED_BY",
        last_updated_on: "LAST_UPDATED_ON",
        uuid: "ORDER_UUID",
        version: "ORDER_VERSION",
        account_id: "ACCOUNT_ID",
        allow_contract: "ALLOW_CONTRACT",
        custom_attributes: "CUSTOM_ATTRIBUTES",
        custom_objects: "CUSTOM_OBJECTS",
        properties: {
            communication_profile: "COMMUNICATION_PROFILE",
            invoice_mode: "INVOICE_MODE",
            invoice_term: "INVOICE_TERM",
            billing_period: "BILLING_PERIOD",
            payment_processor: "PAYMENT_PROCESSOR",
            payment_mode: "PAYMENT_MODE",
            payment_term: "PAYMENT_TERM",
            payment_term_alignment: "PAYMENT_TERM_ALIGNMENT",
            fulfillment_mode: "FULFILLMENT_MODE",
            fulfillment_term: "FULFILLMENT_TERM"
        },
        lines: [
            {
                charge_item_uuid: "CHARGE_ITEM_UUID",
                item_uuid: "ITEM_UUID",
                item_id: "ITEM_ID",
                item_name: "ITEM_NAME",
                item_order_quantity: "ITEM_ORDER_QUANTITY",
                shipping_cost: "SHIPPING_COST",
                item_invoice_note: "ITEM_INVOICE_NOTE",
                item_description: "ITEM_DESCRIPTION",
                item_type: "ITEM_TYPE",
                item_charge_type: "ITEM_CHARGE_TYPE",
                item_custom_attributes: "ITEM_CUSTOM_ATTRIBUTES",
                item_price_snapshot: {
                    pricing_rule: {
                        uuid: "PRICING_RULE_UUID",
                        version: "PRICING_RULE_VERSION",
                        price_type: "PRICE_TYPE",
                        price: "PRICE",
                        uom: "UOM",
                        price_period: "PRICE_PERIOD",
                        pricing_schedule: "PRICING_SCHEDULE",
                        pricing_level: "PRICING_LEVEL",
                        pricing_method: "PRICING_METHOD",
                        warehouse: "WAREHOUSE"
                    }
                },
                item_sale_tax_configuration: {
                    sale_price_is_based_on: "SALE_PRICE_IS_BASED_ON",
                    tax_code: {
                        uuid: "TAX_CODE_UUID",
                        code: "TAX_CODE",
                        rate: "TAX_RATE",
                        link: "TAX_LINK"
                    }
                },
                isTaxExemptWhenSold: "IS_TAX_EXEMPT_WHEN_SOLD",
                item_price_tax: {
                    uuid: "ITEM_PRICE_TAX_UUID",
                    code: "ITEM_PRICE_TAX_CODE",
                    rate: "ITEM_PRICE_TAX_RATE",
                    link: "ITEM_PRICE_TAX_LINK"
                },
                item_accounting_code: {
                    sales_revenue: "SALES_REVENUE"
                },
                version: "LINE_VERSION",
                expected_delivery_date: "EXPECTED_DELIVERY_DATE"
            }
        ],
        kpis: {
            start_date: "KPIS_START_DATE",
            estimated_total: "KPIS_ESTIMATED_TOTAL",
            total_revenue: "KPIS_TOTAL_REVENUE",
            monthly_recurring_revenue: "KPIS_MONTHLY_RECURRING_REVENUE",
            total_collected: "KPIS_TOTAL_COLLECTED",
            total_outstanding: "KPIS_TOTAL_OUTSTANDING",
            total_due: "KPIS_TOTAL_DUE",
            last_invoice_issue_date: "KPIS_LAST_INVOICE_ISSUE_DATE",
            last_invoice_total: "KPIS_LAST_INVOICE_TOTAL",
            total_invoice: "KPIS_TOTAL_INVOICE",
            next_invoice_issueDate: "KPIS_NEXT_INVOICE_ISSUE_DATE",
            last_reactivated_on: "KPIS_LAST_REACTIVATED_ON",
            last_cancelled_on: "KPIS_LAST_CANCELLED_ON",
            last_changed_on: "KPIS_LAST_CHANGED_ON",
            last_deleted_on: "KPIS_LAST_DELETED_ON"
        },
        line_items: "LINE_ITEMS"
    

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.

Python
PHP
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)
    public function orderReactivate()
    {
        $params = [
            "order" => [
                "effective_date" => "EFFECTIVE_DATE"
            ]
        ];
        $id='ORDER_ID';
        try {
            $response = $this->orderService->reactivate($params,$id,'v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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.

Python
PHP
OrderCancelResponseDTO(
    eventUuid="EVENT_UUID",
    order="ORDER"
)
{
    "event_uuid": EVENT_UUID
}

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.

Python
PHP
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)
    public function orderGetInformation()
    {
        $id = 'ORDER_ID';
        try {
            $response = $this->orderService->readInformation($id,'v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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.

Python
PHP
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
)
{
  "order": {
    "status": "STATUS",
    "id": "ORDER_ID",
    "pre_order": "PRE_ORDER",
    "quote_order": "QUOTE_ORDER",
    "name": "ORDER_NAME",
    "display_name": "ORDER_DISPLAY_NAME",
    "description": "DESCRIPTION",
    "manager": "MANAGER",
    "referral_account": "REFERRAL_ACCOUNT",
    "customer_purchase_order_id": "CUSTOMER_PURCHASE_ORDER_ID",
    "shipping_profile": "SHIPPING_PROFILE",
    "shipping_cost": "SHIPPING_COST",
    "discount_profile": "DISCOUNT_PROFILE",
    "origin": "ORIGIN",
    "custom_forms": {
      "uuid": "CUSTOM_FORM_UUID",
      "name": "CUSTOM_FORM_NAME"
    },
    "currency": {
      "uuid": "CURRENCY_UUID",
      "name": "CURRENCY_NAME",
      "link": "CURRENCY_LINK"
    },
    "time_zone": {
      "uuid": "TIME_ZONE_UUID",
      "name": "TIME_ZONE_NAME",
      "link": "TIME_ZONE_LINK"
    },
    "invoice_note": "INVOICE_NOTE",
    "billing_start_date": "BILLING_START_DATE",
    "order_start_date": "ORDER_START_DATE",
    "next_billing_from_date": "NEXT_BILLING_FROM_DATE",
    "price_tax_inclusive": "PRICE_TAX_INCLUSIVE",
    "billing_address": "BILLING_ADDRESS",
    "shipping_address": "SHIPPING_ADDRESS",
    "created_by": "CREATED_BY",
    "created_on": "CREATED_ON",
    "last_updated_by": "LAST_UPDATED_BY",
    "last_updated_on": "LAST_UPDATED_ON",
    "uuid": "ORDER_UUID",
    "version": "ORDER_VERSION",
    "account_id": "ACCOUNT_ID",
    "allow_contract": "ALLOW_CONTRACT",
    "custom_attributes": "CUSTOM_ATTRIBUTES",
    "custom_objects": "CUSTOM_OBJECTS"
  }
}

Getting Order Billing Preferences

Function: order_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.

Python
PHP
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)
    public function orderGetBillingPreferences()
    {
        $accountID = 'ACCOUNT_ID';
        try {
            $response = $this->orderService->readBillingPreferences($accountID,'v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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.

Python
PHP
OrderDetailsDTO(
    order=OrderDataDTO(
        accountId="ACCOUNT_ID",
        bulkid="BULK_ID",
        requestid="REQUEST_ID",
        status="ORDER_STATUS",
        id="ORDER_ID",
        uuid="ORDER_UUID",
        version="ORDER_VERSION",
        preOrder="BOOLEAN",
        quoteOrder="BOOLEAN",
        name="ORDER_NAME",
        displayName="DISPLAY_NAME",
        description="ORDER_DESCRIPTION",
        manager="ORDER_MANAGER",
        referralAccount="REFERRAL_ACCOUNT",
        shippingCost="SHIPPING_COST",
        origin="ORDER_ORIGIN",
        invoiceNote="INVOICE_NOTE",
        billingStartDate="BILLING_START_DATE",
        orderStartDate="ORDER_START_DATE",
        nextBillingFromDate="NEXT_BILLING_DATE",
        nextBillingFromDateUtc="NEXT_BILLING_DATE_UTC",
        trialRequiresPaymentMethod="BOOLEAN",
        priceTaxInclusive="BOOLEAN",
        createdBy="CREATED_BY",
        createdOn="CREATED_TIMESTAMP",
        lastUpdatedBy="LAST_UPDATED_BY",
        lastUpdatedOn="LAST_UPDATED_TIMESTAMP",
        allowContract="BOOLEAN",
        accountName="ACCOUNT_NAME",
        currencyId="CURRENCY_ID",
        total="ORDER_TOTAL",
        subtotal="ORDER_SUBTOTAL",
        tax="ORDER_TAX",
        callbackUrl="CALLBACK_URL",
        lines="ORDER_LINES",
        customForms="CUSTOM_FORMS",
        currency="CURRENCY",
        timeZone="TIME_ZONE",
        properties=OrderPropertiesDTO(
            communicationProfile="COMMUNICATION_PROFILE",
            invoiceMode="INVOICE_MODE",
            invoiceTerm="INVOICE_TERM",
            billingPeriod="BILLING_PERIOD",
            paymentProcessor="PAYMENT_PROCESSOR",
            paymentMode="PAYMENT_MODE",
            paymentTerm="PAYMENT_TERM",
            paymentTermAlignment="TERM_ALIGNMENT",
            fulfillmentMode="FULFILLMENT_MODE",
            fulfillmentTerm="FULFILLMENT_TERM",
            consolidateInvoice="BOOLEAN",
            consolidateKey="CONSOLIDATE_KEY"
        ),
        contractProperties="CONTRACT_PROPERTIES",
        billingAddress="BILLING_ADDRESS",
        shippingAddress="SHIPPING_ADDRESS",
        shippingProfile="SHIPPING_PROFILE",
        defaultWarehouse="DEFAULT_WAREHOUSE",
        customObjects="CUSTOM_OBJECTS",
        isTaxExemptWhenSold="BOOLEAN",
        kpis="ORDER_KPIS",
        lineItems="LINE_ITEMS",
        effectiveDate="EFFECTIVE_DATE",
        charge="CHARGE_DETAILS",
        communicationPreference="COMMUNICATION_PREFERENCE",
        line="LINE_REFERENCE",
        customAttributes="CUSTOM_ATTRIBUTES",
        customerPurchaseOrderId="CUSTOMER_PO_ID",
        discountProfile="DISCOUNT_PROFILE",
        invoiceId="INVOICE_ID",
        paymentId="PAYMENT_ID",
        invoice="INVOICE_DETAILS"
    ),
    eventUuid="EVENT_UUID",
    operation="OPERATION_TYPE"
)
{
  "order": {
    "properties": {
      "communication_profile": "COMMUNICATION_PROFILE",
      "invoice_mode": "INVOICE_MODE",
      "invoice_term": "INVOICE_TERM",
      "billing_period": "BILLING_PERIOD",
      "payment_processor": "PAYMENT_PROCESSOR",
      "payment_mode": "PAYMENT_MODE",
      "payment_term": "PAYMENT_TERM",
      "payment_term_alignment": "TERM_ALIGNMENT",
      "fulfillment_mode": "FULFILLMENT_MODE",
      "fulfillment_term": "FULFILLMENT_TERM"
    }
  }
}

Updating Order Billing Preferences

Function: update_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.

Python
PHP
def update_order_billing_preference():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_properties = OrderPropertiesDTO(
           communicationProfile = "COMMUNICATION_PROFILE"
           invoiceMode = "INVOICE_MODE"
           invoiceTerm = "INVOICE_TERM"
           billingPeriod = "BILLING_PERIOD"
           paymentProcessor = "PAYMENT_PROCESSOR"
           paymentMode = "PAYMENT_MODE"
           paymentTerm = "PAYMENT_TERM"
           paymentTermAlignment = "TERM_ALIGNMENT"
           fulfillmentMode = "FULFILLMENT_MODE"
          fulfillmentTerm = "FULFILLMENT_TERM"
        )
        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)
    public function updateOrderBillingPreference()
    {

        $params = [
            "order" => [
                "properties" => [
                   "communication_profile" => "COMMUNICATION_PROFILE",
                  "invoice_mode" => "INVOICE_MODE",
                  "invoice_term" => "INVOICE_TERM",
                 "billing_period" => "BILLING_PERIOD",
                 "payment_processor" => "PAYMENT_PROCESSOR",
                 "payment_mode" => "PAYMENT_MODE",
                 "payment_term" => "PAYMENT_TERM",
                 "payment_term_alignment" => "TERM_ALIGNMENT",
                 "fulfillment_mode" => "FULFILLMENT_MODE",
                 "fulfillment_term" => "FULFILLMENT_TERM"
                ]
            ]
        ];
        $id='ORDER_ID';

        try {
            $response = $this->orderService->updateBillingPreferences($params,$id,'v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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.

Python
PHP
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"
)
{
    "order": {
        "properties": {
            "communication_profile": "AutoBill Communication Profile",
            "invoice_mode": "AUTOMATIC",
            "invoice_term": "Billing Start Date",
            "billing_period": "1 Day",
            "payment_processor": "Cash",
            "payment_mode": "MANUAL",
            "payment_term": "Net 15",
            "payment_term_alignment": "BILLING_DATE",
            "fulfillment_mode": "MANUAL",
            "fulfillment_term": "Immediately"
        }
    }

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.

Python
PHP
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)
    public function orderGetLines()
    {
        $id = 'ORDER_ID';
        try {
            $orderInfo = $this->orderService->readOrderLines($id,'v3');
            echo '<pre>' . json_encode($orderInfo, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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.

Python
PHP
OrderDetailsDTO(
    order=OrderDataDTO(
        accountId="ACCOUNT_ID",
        bulkid="BULK_ID",
        requestid="REQUEST_ID",
        status="ORDER_STATUS",
        id="ORDER_ID",
        uuid="ORDER_UUID",
        version="ORDER_VERSION",
        preOrder="BOOLEAN",
        quoteOrder="BOOLEAN",
        name="ORDER_NAME",
        displayName="DISPLAY_NAME",
        description="ORDER_DESCRIPTION",
        manager="ORDER_MANAGER",
        referralAccount="REFERRAL_ACCOUNT",
        shippingCost="SHIPPING_COST",
        origin="ORDER_ORIGIN",
        invoiceNote="INVOICE_NOTE",
        billingStartDate="BILLING_START_DATE",
        orderStartDate="ORDER_START_DATE",
        nextBillingFromDate="NEXT_BILLING_DATE",
        nextBillingFromDateUtc="NEXT_BILLING_DATE_UTC",
        trialRequiresPaymentMethod="BOOLEAN",
        priceTaxInclusive="BOOLEAN",
        createdBy="CREATED_BY",
        createdOn="CREATED_TIMESTAMP",
        lastUpdatedBy="LAST_UPDATED_BY",
        lastUpdatedOn="LAST_UPDATED_TIMESTAMP",
        allowContract="BOOLEAN",
        accountName="ACCOUNT_NAME",
        currencyId="CURRENCY_ID",
        total="ORDER_TOTAL",
        subtotal="ORDER_SUBTOTAL",
        tax="ORDER_TAX",
        callbackUrl="CALLBACK_URL",
        lines=[
            OrderLineDTO(
                itemId="ITEM_ID",
                itemOrderQuantity="ITEM_QUANTITY",
                itemUuid="ITEM_UUID",
                itemName="ITEM_NAME",
                shippingCost="ITEM_SHIPPING_COST",
                itemInvoiceNote="ITEM_INVOICE_NOTE",
                itemDescription="ITEM_DESCRIPTION",
                itemType="ITEM_TYPE",
                itemChargeType="CHARGE_TYPE",
                chargeItemUuid="CHARGE_ITEM_UUID",
                version="ITEM_VERSION",
                itemPriceTax=TaxDTO(
                    uuid="TAX_UUID",
                    code="TAX_CODE",
                    rate="TAX_RATE",
                    link="TAX_LINK",
                    amount="TAX_AMOUNT"
                ),
                isTaxExemptWhenSold="BOOLEAN",
                taxExemptWhenSold="BOOLEAN",
                itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                    pricingRule=OrderItemPricingRuleDTO(
                        price="ITEM_PRICE",
                        uuid="PRICING_RULE_UUID",
                        version="PRICING_RULE_VERSION",
                        priceType="PRICE_TYPE",
                        uom="UOM",
                        pricePeriod="PRICE_PERIOD",
                        pricingSchedule="PRICING_SCHEDULE",
                        pricingLevel="PRICING_LEVEL",
                        pricingMethod="PRICING_METHOD",
                        warehouse="WAREHOUSE"
                    )
                ),
                itemSaleTaxConfiguration=OrderItemSaleTaxConfigurationDTO(
                    salePriceIsBasedOn="SALE_PRICE_BASIS",
                    taxCode=TaxDTO(
                        uuid="TAX_CODE_UUID",
                        code="TAX_CODE",
                        rate="TAX_RATE",
                        link="TAX_LINK",
                        amount="TAX_AMOUNT"
                    )
                ),
                purchaseOrder="PURCHASE_ORDER",
                packageName="PACKAGE_NAME",
                itemSerialOrBatchNumber="SERIAL_OR_BATCH",
                itemCustomAttributes=[],
                op="OPERATION",
                uuid="LINE_UUID",
                itemProperties="ITEM_PROPERTIES",
                subtotal="LINE_SUBTOTAL",
                total="LINE_TOTAL",
                tax="LINE_TAX",
                itemUom="ITEM_UOM",
                itemWarehouse="ITEM_WAREHOUSE",
                pricingSnapshotUuid="PRICING_SNAPSHOT_UUID",
                chargingStartDate="CHARGING_START_DATE",
                alternateChargingStartDate="ALT_CHARGING_START_DATE",
                chargingEndDate="CHARGING_END_DATE",
                alternateChargingEndDate="ALT_CHARGING_END_DATE",
                itemPrice="ITEM_PRICE",
                itemDiscountAmount="DISCOUNT_AMOUNT",
                taxAmount="TAX_AMOUNT",
                operation="LINE_OPERATION",
                discount="DISCOUNT_VALUE",
                uom="UOM",
                warehouse="WAREHOUSE",
                quantity="QUANTITY",
                accountingCode="ACCOUNTING_CODE",
                itemAccountingCode=OrderItemAccountingCodeDTO(
                    salesRevenue={"name": "SALES_REVENUE"}
                ),
                preOrderStockDetails="PREORDER_STOCK",
                expectedDeliveryDate="DELIVERY_DATE",
                purchaseOrderId="PURCHASE_ORDER_ID",
                purchaseInvoiceId="PURCHASE_INVOICE_ID"
            )
        ],
        customForms="CUSTOM_FORMS",
        currency="CURRENCY",
        timeZone="TIME_ZONE",
        properties="ORDER_PROPERTIES",
        contractProperties="CONTRACT_PROPERTIES",
        billingAddress="BILLING_ADDRESS",
        shippingAddress="SHIPPING_ADDRESS",
        shippingProfile="SHIPPING_PROFILE",
        defaultWarehouse="DEFAULT_WAREHOUSE",
        customObjects="CUSTOM_OBJECTS",
        isTaxExemptWhenSold="BOOLEAN",
        kpis=KpisDTO(
            startDate="KPI_START_DATE",
            estimatedTotal="ESTIMATED_TOTAL",
            totalRevenue="TOTAL_REVENUE",
            monthlyRecurringRevenue="MRR",
            totalCollected="TOTAL_COLLECTED",
            totalOutstanding="TOTAL_OUTSTANDING",
            totalDue="TOTAL_DUE",
            lastInvoiceIssueDate="LAST_INVOICE_DATE",
            lastInvoiceTotal="LAST_INVOICE_TOTAL",
            totalInvoice="TOTAL_INVOICE",
            nextInvoiceIssueDate="NEXT_INVOICE_DATE",
            lastReactivatedOn="LAST_REACTIVATED",
            lastCancelledOn="LAST_CANCELLED",
            lastChangedOn="LAST_CHANGED",
            lastDeletedOn="LAST_DELETED"
        ),
        lineItems=[],
        effectiveDate="EFFECTIVE_DATE",
        charge="CHARGE_DETAILS",
        communicationPreference="COMMUNICATION_PREFERENCE",
        line="LINE_REFERENCE",
        customAttributes="CUSTOM_ATTRIBUTES",
        customerPurchaseOrderId="CUSTOMER_PO_ID",
        discountProfile="DISCOUNT_PROFILE",
        invoiceId="INVOICE_ID",
        paymentId="PAYMENT_ID",
        invoice="INVOICE_DETAILS"
    ),
    eventUuid="EVENT_UUID",
    operation="OPERATION_TYPE"
)
{
  "order": {
    "lines": [
      {
        "charge_item_uuid": "CHARGE_ITEM_UUID",
        "item_uuid": "ITEM_UUID",
        "item_id": "ITEM_ID",
        "item_name": "ITEM_NAME",
        "item_order_quantity": "ITEM_ORDER_QUANTITY",
        "shipping_cost": "SHIPPING_COST",
        "item_invoice_note": "ITEM_INVOICE_NOTE",
        "item_description": "ITEM_DESCRIPTION",
        "item_type": "ITEM_TYPE",
        "item_charge_type": "ITEM_CHARGE_TYPE",
        "item_custom_attributes": "ITEM_CUSTOM_ATTRIBUTES",
        "item_price_snapshot": {
          "pricing_rule": {
            "uuid": "PRICING_RULE_UUID",
            "version": "PRICING_RULE_VERSION",
            "price_type": "PRICE_TYPE",
            "price": "PRICE",
            "uom": "UOM",
            "price_period": "PRICE_PERIOD",
            "pricing_schedule": "PRICING_SCHEDULE",
            "pricing_level": "PRICING_LEVEL",
            "pricing_method": "PRICING_METHOD",
            "warehouse": "WAREHOUSE"
          }
        },
        "item_sale_tax_configuration": {
          "sale_price_is_based_on": "SALE_PRICE_BASED_ON",
          "tax_code": {
            "uuid": "TAX_CODE_UUID",
            "code": "TAX_CODE",
            "rate": "TAX_RATE",
            "link": "TAX_LINK"
          }
        },
        "isTaxExemptWhenSold": "IS_TAX_EXEMPT",
        "item_price_tax": {
          "uuid": "TAX_UUID",
          "code": "TAX_CODE",
          "rate": "TAX_RATE",
          "link": "TAX_LINK"
        },
        "item_accounting_code": {
          "sales_revenue": "SALES_REVENUE"
        },
        "version": "VERSION"
      }
    ],
    "kpis": {
      "start_date": "KPIS_START_DATE",
      "estimated_total": "ESTIMATED_TOTAL",
      "total_revenue": "TOTAL_REVENUE",
      "monthly_recurring_revenue": "MONTHLY_RECURRING_REVENUE",
      "total_collected": "TOTAL_COLLECTED",
      "total_outstanding": "TOTAL_OUTSTANDING",
      "total_due": "TOTAL_DUE",
      "last_invoice_issue_date": "LAST_INVOICE_ISSUE_DATE",
      "last_invoice_total": "LAST_INVOICE_TOTAL",
      "total_invoice": "TOTAL_INVOICE",
      "next_invoice_issueDate": "NEXT_INVOICE_ISSUE_DATE",
      "last_reactivated_on": "LAST_REACTIVATED_ON",
      "last_cancelled_on": "LAST_CANCELLED_ON",
      "last_changed_on": "LAST_CHANGED_ON",
      "last_deleted_on": "LAST_DELETED_ON"
    },
    "line_items": "LINE_ITEMS"
  }
}

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.

Python
PHP
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)
    public function getOrderLinesByChargeUuid()
    {
        $id = 'ORDER_ID';
        $chargeItemUUID="CHARGE_UUID";
        try {
            $orderInfo = $this->orderService->readDetailsOrderLine($id,$chargeItemUUID,'v3');
            echo '<pre>' . json_encode($orderInfo, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

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.

Python
PHP
OrderDetailsDTO(
    order=OrderDataDTO(
        accountId="ACCOUNT_ID",
        bulkid="BULK_ID",
        requestid="REQUEST_ID",
        status="ORDER_STATUS",
        id="ORDER_ID",
        uuid="ORDER_UUID",
        version="ORDER_VERSION",
        preOrder="BOOLEAN",
        quoteOrder="BOOLEAN",
        name="ORDER_NAME",
        displayName="DISPLAY_NAME",
        description="ORDER_DESCRIPTION",
        manager="ORDER_MANAGER",
        referralAccount="REFERRAL_ACCOUNT",
        shippingCost="SHIPPING_COST",
        origin="ORDER_ORIGIN",
        invoiceNote="INVOICE_NOTE",
        billingStartDate="BILLING_START_DATE",
        orderStartDate="ORDER_START_DATE",
        nextBillingFromDate="NEXT_BILLING_DATE",
        nextBillingFromDateUtc="NEXT_BILLING_DATE_UTC",
        trialRequiresPaymentMethod="BOOLEAN",
        priceTaxInclusive="BOOLEAN",
        createdBy="CREATED_BY",
        createdOn="CREATED_TIMESTAMP",
        lastUpdatedBy="LAST_UPDATED_BY",
        lastUpdatedOn="LAST_UPDATED_TIMESTAMP",
        allowContract="BOOLEAN",
        accountName="ACCOUNT_NAME",
        currencyId="CURRENCY_ID",
        total="ORDER_TOTAL",
        subtotal="ORDER_SUBTOTAL",
        tax="ORDER_TAX",
        callbackUrl="CALLBACK_URL",
        lines="ORDER_LINES",
        customForms="CUSTOM_FORMS",
        currency="CURRENCY",
        timeZone="TIME_ZONE",
        properties="ORDER_PROPERTIES",
        contractProperties="CONTRACT_PROPERTIES",
        billingAddress="BILLING_ADDRESS",
        shippingAddress="SHIPPING_ADDRESS",
        shippingProfile="SHIPPING_PROFILE",
        defaultWarehouse="DEFAULT_WAREHOUSE",
        customObjects="CUSTOM_OBJECTS",
        isTaxExemptWhenSold="BOOLEAN",
        kpis=KpisDTO(
            startDate="KPI_START_DATE",
            estimatedTotal="ESTIMATED_TOTAL",
            totalRevenue="TOTAL_REVENUE",
            monthlyRecurringRevenue="MRR",
            totalCollected="TOTAL_COLLECTED",
            totalOutstanding="TOTAL_OUTSTANDING",
            totalDue="TOTAL_DUE",
            lastInvoiceIssueDate="LAST_INVOICE_DATE",
            lastInvoiceTotal="LAST_INVOICE_TOTAL",
            totalInvoice="TOTAL_INVOICE",
            nextInvoiceIssueDate="NEXT_INVOICE_DATE",
            lastReactivatedOn="LAST_REACTIVATED",
            lastCancelledOn="LAST_CANCELLED",
            lastChangedOn="LAST_CHANGED",
            lastDeletedOn="LAST_DELETED"
        ),
        lineItems=[],
        effectiveDate="EFFECTIVE_DATE",
        charge=OrderLineDTO(
            itemId="ITEM_ID",
            itemOrderQuantity="ITEM_QUANTITY",
            itemUuid="ITEM_UUID",
            itemName="ITEM_NAME",
            shippingCost="ITEM_SHIPPING_COST",
            itemInvoiceNote="ITEM_INVOICE_NOTE",
            itemDescription="ITEM_DESCRIPTION",
            itemType="ITEM_TYPE",
            itemChargeType="CHARGE_TYPE",
            chargeItemUuid="CHARGE_ITEM_UUID",
            version="ITEM_VERSION",
            itemPriceTax=TaxDTO(
                uuid="TAX_UUID",
                code="TAX_CODE",
                rate="TAX_RATE",
                link="TAX_LINK",
                amount="TAX_AMOUNT"
            ),
            isTaxExemptWhenSold="BOOLEAN",
            taxExemptWhenSold="BOOLEAN",
            itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                pricingRule=OrderItemPricingRuleDTO(
                    price="ITEM_PRICE",
                    uuid="PRICING_RULE_UUID",
                    version="PRICING_RULE_VERSION",
                    priceType="PRICE_TYPE",
                    uom="UOM",
                    pricePeriod="PRICE_PERIOD",
                    pricingSchedule="PRICING_SCHEDULE",
                    pricingLevel="PRICING_LEVEL",
                    pricingMethod="PRICING_METHOD",
                    warehouse="WAREHOUSE"
                )
            ),
            itemSaleTaxConfiguration=OrderItemSaleTaxConfigurationDTO(
                salePriceIsBasedOn="SALE_PRICE_BASIS",
                taxCode=TaxDTO(
                    uuid="TAX_CODE_UUID",
                    code="TAX_CODE",
                    rate="TAX_RATE",
                    link="TAX_LINK",
                    amount="TAX_AMOUNT"
                )
            ),
            purchaseOrder="PURCHASE_ORDER",
            packageName="PACKAGE_NAME",
            itemSerialOrBatchNumber="SERIAL_OR_BATCH",
            itemCustomAttributes=[],
            op="OPERATION",
            uuid="LINE_UUID",
            itemProperties="ITEM_PROPERTIES",
            subtotal="LINE_SUBTOTAL",
            total="LINE_TOTAL",
            tax="LINE_TAX",
            itemUom="ITEM_UOM",
            itemWarehouse="ITEM_WAREHOUSE",
            pricingSnapshotUuid="PRICING_SNAPSHOT_UUID",
            chargingStartDate="CHARGING_START_DATE",
            alternateChargingStartDate="ALT_CHARGING_START_DATE",
            chargingEndDate="CHARGING_END_DATE",
            alternateChargingEndDate="ALT_CHARGING_END_DATE",
            itemPrice="ITEM_PRICE",
            itemDiscountAmount="DISCOUNT_AMOUNT",
            taxAmount="TAX_AMOUNT",
            operation="LINE_OPERATION",
            discount="DISCOUNT_VALUE",
            uom="UOM",
            warehouse="WAREHOUSE",
            quantity="QUANTITY",
            accountingCode="ACCOUNTING_CODE",
            itemAccountingCode=OrderItemAccountingCodeDTO(
                salesRevenue={"name": "SALES_REVENUE"}
            ),
            preOrderStockDetails="PREORDER_STOCK",
            expectedDeliveryDate="DELIVERY_DATE",
            purchaseOrderId="PURCHASE_ORDER_ID",
            purchaseInvoiceId="PURCHASE_INVOICE_ID"
        ),
        communicationPreference="COMMUNICATION_PREFERENCE",
        line="LINE_REFERENCE",
        customAttributes="CUSTOM_ATTRIBUTES",
        customerPurchaseOrderId="CUSTOMER_PO_ID",
        discountProfile="DISCOUNT_PROFILE",
        invoiceId="INVOICE_ID",
        paymentId="PAYMENT_ID",
        invoice="INVOICE_DETAILS"
    ),
    eventUuid="EVENT_UUID",
    operation="OPERATION_TYPE"
)
{
  "order": {
    "lines": [
      {
        "charge_item_uuid": "CHARGE_ITEM_UUID",
        "item_uuid": "ITEM_UUID",
        "item_id": "ITEM_ID",
        "item_name": "ITEM_NAME",
        "item_order_quantity": "ITEM_ORDER_QUANTITY",
        "shipping_cost": "SHIPPING_COST",
        "item_invoice_note": "ITEM_INVOICE_NOTE",
        "item_description": "ITEM_DESCRIPTION",
        "item_type": "ITEM_TYPE",
        "item_charge_type": "ITEM_CHARGE_TYPE",
        "item_custom_attributes": "ITEM_CUSTOM_ATTRIBUTES",
        "item_price_snapshot": {
          "pricing_rule": {
            "uuid": "PRICING_RULE_UUID",
            "version": "PRICING_RULE_VERSION",
            "price_type": "PRICE_TYPE",
            "price": "PRICE",
            "uom": "UOM",
            "price_period": "PRICE_PERIOD",
            "pricing_schedule": "PRICING_SCHEDULE",
            "pricing_level": "PRICING_LEVEL",
            "pricing_method": "PRICING_METHOD",
            "warehouse": "WAREHOUSE"
          }
        },
        "item_sale_tax_configuration": {
          "sale_price_is_based_on": "SALE_PRICE_BASED_ON",
          "tax_code": {
            "uuid": "TAX_CODE_UUID",
            "code": "TAX_CODE",
            "rate": "TAX_RATE",
            "link": "TAX_LINK"
          }
        },
        "isTaxExemptWhenSold": "IS_TAX_EXEMPT",
        "item_price_tax": {
          "uuid": "TAX_UUID",
          "code": "TAX_CODE",
          "rate": "TAX_RATE",
          "link": "TAX_LINK"
        },
        "item_accounting_code": {
          "sales_revenue": "SALES_REVENUE"
        },
        "version": "VERSION"
      }
    ],
    "kpis": {
      "start_date": "KPIS_START_DATE",
      "estimated_total": "ESTIMATED_TOTAL",
      "total_revenue": "TOTAL_REVENUE",
      "monthly_recurring_revenue": "MONTHLY_RECURRING_REVENUE",
      "total_collected": "TOTAL_COLLECTED",
      "total_outstanding": "TOTAL_OUTSTANDING",
      "total_due": "TOTAL_DUE",
      "last_invoice_issue_date": "LAST_INVOICE_ISSUE_DATE",
      "last_invoice_total": "LAST_INVOICE_TOTAL",
      "total_invoice": "TOTAL_INVOICE",
      "next_invoice_issueDate": "NEXT_INVOICE_ISSUE_DATE",
      "last_reactivated_on": "LAST_REACTIVATED_ON",
      "last_cancelled_on": "LAST_CANCELLED_ON",
      "last_changed_on": "LAST_CHANGED_ON",
      "last_deleted_on": "LAST_DELETED_ON"
    },
    "line_items": "LINE_ITEMS"
  }

Getting Specific Order Details from Bulk Order

Function: bulk_order_details()

Purpose

This function retrieves the detailed result of a specific request submitted under a bulk operation. In a bulk submission, a single bulk_id can represent up to hundreds of orders, each generating its own unique request_id. By calling this function with both identifiers, you can extract the complete details of an individual order from the bulk processing job. This is particularly useful when you need to drill down into a single order’s attributes, contract details, billing information, and line items without querying the entire bulk result.

Parameters

Parameter Type Description
bulk_id string Unique identifier for the bulk submission (the parent that groups all orders).
request_id string Unique identifier for the specific order request within the bulk operation.

Use Case

Imagine a scenario where your application submits a bulk operation containing 500 customer orders. While the overall bulk job succeeds, you need to review one specific order in detail — for example, to check its pricing, billing cycle, or contract terms. Instead of parsing the full bulk payload, you can use this function with the bulk_id and request_id to directly extract only the order you care about. The SDKs make this easier by exposing a simple method call.

PHP
Python
public function bulkOrderDetails()
{
    $bulk_id = "BULK_ID";
    $request_id = "REQUEST_ID";

    try {
        $response = $this->orderService->getBulkOrderDetails($bulk_id, $request_id, 'v2');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}
def test_order_bulk_result_details():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.bulk_result(bulk_id="BULK_ID", request_id="REQUEST_ID")
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

On success, the function returns a detailed order object containing all the key details about the requested order, such as order status, identifiers, contract properties, billing settings, line items, pricing, taxes, and KPIs. This structured data enables developers to programmatically validate the order’s financials, ensure correct configuration, and display complete order details in UI applications.

JSON
Python
{
  "order": {
    "status": "ACTIVE",
    "id": "ORDER_ID",
    "name": "ORDER_NAME",
    "currency": {
      "uuid": "CURRENCY_UUID",
      "name": "CURRENCY_NAME",
      "link": "CURRENCY_LINK"
    },
    "time_zone": {
      "uuid": "TIMEZONE_UUID",
      "name": "TIMEZONE_NAME",
      "link": "TIMEZONE_LINK"
    },
    "contract_properties": {
      "require_customer_acceptance": "false",
      "renew_automatically": "true",
      "initial_contract_term": "1 Year"
    },
    "lines": [
      {
        "item_id": "ITEM_ID",
        "item_name": "ITEM_NAME",
        "item_order_quantity": "1.000000",
        "item_charge_type": "RECURRING",
        "item_price_snapshot": {
          "pricing_rule": {
            "uuid": "PRICING_RULE_UUID",
            "price": "0.000000"
          }
        }
      }
    ],
    "total": "0",
    "subtotal": "0",
    "tax": "0"
  }
}
OrderDetailsDTO( eventUuid='EVENT_UUID', operation='OPERATION', order=OrderDataDTO( status='ORDER_STATUS', id='ORDER_ID', name='ORDER_NAME', displayName='ORDER_DISPLAY_NAME', description='ORDER_DESCRIPTION', orderType='ORDER_TYPE', currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_NAME'), timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME'), billingStartDate='BILLING_START_DATE', orderStartDate='ORDER_START_DATE', nextBillingFromDate='NEXT_BILLING_FROM_DATE', priceTaxInclusive='PRICE_TAX_INCLUSIVE', accountId='ACCOUNT_ID', accountName='ACCOUNT_NAME', createdBy='CREATED_BY', createdOn='CREATED_ON', lastUpdatedBy='LAST_UPDATED_BY', lastUpdatedOn='LAST_UPDATED_ON', uuid='ORDER_UUID', version='VERSION', lines=[ OrderLineDTO( itemUuid='ITEM_UUID', itemId='ITEM_ID', itemName='ITEM_NAME', itemOrderQuantity='ITEM_ORDER_QUANTITY', itemChargeType='ITEM_CHARGE_TYPE', subtotal='LINE_SUBTOTAL', tax='LINE_TAX', total='LINE_TOTAL', version='LINE_VERSION' ) ], subtotal='ORDER_SUBTOTAL', tax='ORDER_TAX', total='ORDER_TOTAL', customAttributes=[], kpis=KpisDTO( estimatedTotal=0, createdOn='CREATED_ON', lastUpdatedOn='LAST_UPDATED_ON' ) ) )

Getting Order Quote PDF

Function: order_quote_pdf()

Purpose

This endpoint allows the client to retrieve the PDF version of an order quote for a specific order. The server returns the PDF as a binary file, which the SDK user can then save to disk or process further. This API is commonly used for exporting, printing, or sharing order quotes directly from the system in a standardized PDF format.

Parameters

Parameter Type Description
order_id string The unique identifier of the order for which the quote PDF should be generated and retrieved.

Use Case

This API is used when a user needs to download the quote PDF for a particular order. The SDK sends a GET request with the order ID and receives binary PDF data in response. After receiving the bytes, the client can save the PDF to a specified file path, attach it to an email, or allow the user to preview it. This is essential for workflows where users require official documentation of order details. Below are example implementations using the Python and PHP SDKs.

Python


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

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_id = "<ORDER_ID>"
        response = exsited_sdk.order.order_quote_pdf(id=order_id)
        pdf_filename = f"C:/Users/<USER_NAME>/Downloads/{order_id}.pdf"

        if isinstance(response, bytes):
            try:
                with open(pdf_filename, "wb") as pdf_file:
                    pdf_file.write(response)
                print(f"PDF saved successfully at: {pdf_filename}")
                webbrowser.open(pdf_filename)
            except Exception as e:
                print("Failed to save or open the PDF:", e)
        else:
            print("Unexpected response type:", type(response))

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

Response

The API returns the PDF file as binary data. The SDK functions interpret this response as bytes (Python) or a binary string (PHP). The client is expected to handle the saving of the PDF to local storage or any other storage mechanism. A successful operation means the PDF is fully written to the provided file path, whereas errors may occur due to invalid order ID, permission issues, or connection failures.

Python
"PDF saved successfully at: C:/Users/<USER_NAME>/Downloads/<ORDER_ID>.pdf"

Creating Order 

Function : create_order()

Purpose

This endpoint allows clients to create a new order within the system. It accepts structured order details, including account information and line items, and returns the newly created order record. This functionality is essential for workflows where users need to generate sales orders, service orders, or internal operational orders programmatically through the SDK.

Parameters

This function does not require any input parameters.

Use Case

This API is used when a user needs to programmatically create an order by specifying the account ID and providing the necessary order lines. Each line typically includes an item identifier and quantity. After sending the payload through the SDK, the server validates the data, creates the order, assigns an order ID, and returns the complete order object. This supports business processes like creating new sales orders directly from an internal system, automating order generation from integrations, or testing order creation flows. Below are example implementations using Python and PHP SDKs with placeholders for actual values.

Python
PHP
Python(v3)
def create_order():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        request_data = OrderCreateDTO(
            order=OrderDataDTO(accountId="<ACCOUNT_ID>").add_line(
                item_id="<ITEM_ID>", 
                quantity="<QUANTITY>"
            )
        )

        response = exsited_sdk.order.create(request_data=request_data)
        print(response.order.id, response.order.displayName)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testCreate()
{
    $params = [
        "account_id" => "{account_id}",
        "lines" => [
            [
                "item_id" => "{item_id}",
                "item_order_quantity" => "{quantity}",
                "item_price_snapshot" => [
                    "pricing_rule" => [
                        "price" => "{price}"
                    ]
                ]
            ]
        ]
    ];

    try {
        $response = $this->orderService->create($params, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}
def test_order_create_with_purchase_order():
    # Configure SDK logging
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    # Prepare supplier lines
    supplier_01_line = OrderLineDTO(
        itemId="ITEM-0156",
        itemOrderQuantity="1",
        itemPriceSnapshot=OrderItemPriceSnapshotDTO(
            pricingRule=OrderItemPricingRuleDTO(price="10.00")
        ),
        purchaseOrder=OrderPurchaseDTO(
            createPo="true",
            poInformation=POInformationDTO(
                # id="landxyz12",
                accountId="ACC-RMWN69-CA",
                currency="AUD",
                itemQuantity="1",
                itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                    pricingRule=OrderItemPricingRuleDTO(price="98.00")
                )
            )
        )
    )

    supplier_02_line = OrderLineDTO(
        itemId="ITEM-0157",
        itemOrderQuantity="1",
        itemPriceSnapshot=OrderItemPriceSnapshotDTO(
            pricingRule=OrderItemPricingRuleDTO(price="0.00")
        ),
        purchaseOrder=OrderPurchaseDTO(
            createPo="true",
            poInformation=POInformationDTO(
                # id="ownerxyz12",
                accountId="ACC-RMWN69-CA",
                currency="AUD",
                itemQuantity="1",
                itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                    pricingRule=OrderItemPricingRuleDTO(price="2.00")
                )
            )
        )
    )

    # Create the full request payload
    request_data = OrderCreateDTO(
        order=OrderDataDTO(
            accountId="ACC-7AINLC-CA",
            name="renterSDKxSOPO",
            # id="orderRenterSDKxyz12SOPO",
            billingStartDate="ORDER_START_DATE",
            orderStartDate="2025-05-13",
            currency='AUD',
            properties=OrderPropertiesDTO(
                communicationProfile="",
                invoiceMode="AUTOMATIC",
                invoiceTerm="NET -7",
                billingPeriod="1 Week",
                paymentProcessor="Cash",
                paymentMode="MANUAL",
                paymentTerm="NET 30",
                paymentTermAlignment="BILLING_DATE",
                fulfillmentMode="MANUAL",
                fulfillmentTerm="Immediately"
            ),
            lines=[
                supplier_01_line,
                supplier_02_line
            ]
        )
    )

    # Call SDK method
    try:
        response = exsited_sdk.order.create_with_purchase(request_data=request_data)
        print(response)
        # ResponseToObj().process(response=response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

Upon successful creation, the API returns a complete order object containing the newly assigned order ID, display name, and other relevant order details. The SDK provides this information in a structured format, allowing applications to use the returned ID for downstream operations such as updating, viewing, or generating documentation. The response confirms that the order has been successfully recorded in the system and is now available for further processing.

Python
PHP
  OrderDetailsDTO(                                                                                                                                                                                                                            eventUuid='EVENT_UUID',                                                                                                                                                                                                           
      operation='OPERATION',                                                                                                                                                                                                                  order=OrderDataDTO(                                                                                                                                                                                                               
          status='ORDER_STATUS',         
          id='ORDER_ID',
          uuid='ORDER_UUID',
          version='VERSION',
          preOrder='PRE_ORDER',
          quoteOrder='QUOTE_ORDER',
          quoteConverted='QUOTE_CONVERTED',
          orderType='ORDER_TYPE',
          name='ORDER_NAME',
          displayName='DISPLAY_NAME',
          description='DESCRIPTION',
          manager='MANAGER',
          referralAccount='REFERRAL_ACCOUNT',
          customerPurchaseOrderId='CUSTOMER_PO_ID',
          shippingProfile=ShippingProfileDTO(...),
          shippingCost='SHIPPING_COST',
          discountProfile=DiscountProfileDTO(...),
          origin='ORIGIN',
          customForms=CustomFormsDTO(uuid='FORM_UUID', name='FORM_NAME'),
          currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_NAME', link='CURRENCY_LINK'),
          timeZone=TimeZoneDTO(uuid='TZ_UUID', name='TZ_NAME', link='TZ_LINK'),
          invoiceNote='INVOICE_NOTE',
          defaultWarehouse='DEFAULT_WAREHOUSE',
          billingStartDate='BILLING_START_DATE',
          orderStartDate='ORDER_START_DATE',
          nextBillingFromDate='NEXT_BILLING_FROM_DATE',
          priceTaxInclusive='PRICE_TAX_INCLUSIVE',
          billingAddress=AddressDTO(...),
          shippingAddress=AddressDTO(...),
          createdBy='CREATED_BY',
          createdOn='CREATED_ON',
          lastUpdatedBy='LAST_UPDATED_BY',
          lastUpdatedOn='LAST_UPDATED_ON',
          accountId='ACCOUNT_ID',
          accountName='ACCOUNT_NAME',
          allowContract='ALLOW_CONTRACT',
          customAttributes=[CustomAttributesDataDTO(name='ATTR_NAME', value='ATTR_VALUE')],
          customObjects=[],
          currencyId='CURRENCY_ID',
          properties=OrderPropertiesDTO(
              communicationProfile='...',
              invoiceMode='AUTOMATIC',
              invoiceTerm='...',
              billingPeriod='...',
              consolidateInvoice='false',
              paymentProcessor='...',
              paymentMode='MANUAL',
              paymentTerm='Net 30',
              paymentTermAlignment='...',
              fulfillmentMode='...',
              fulfillmentTerm='...'
          ),
          invoiceId='INVOICE_ID',
          lines=[
              OrderLineDTO(
                  itemSerialOrBatchNumber='SERIAL',
                  chargeItemUuid='CHARGE_ITEM_UUID',
                  itemUuid='ITEM_UUID',
                  itemId='ITEM_ID',
                  itemName='ITEM_NAME',
                  itemOrderQuantity='ITEM_ORDER_QUANTITY',
                  shippingCost='SHIPPING_COST',
                  itemInvoiceNote='ITEM_INVOICE_NOTE',
                  itemDescription='ITEM_DESCRIPTION',
                  itemType='ITEM_TYPE',
                  itemChargeType='ITEM_CHARGE_TYPE',
                  itemCustomAttributes=[],
                  itemPriceSnapshot=OrderItemPriceSnapshotDTO(...),
                  itemSaleTaxConfiguration=ItemSaleTaxConfigurationDTO(...),
                  isTaxExemptWhenSold='false',
                  itemPriceTax=TaxDTO(uuid='TAX_UUID', code='TAX_CODE', rate='TAX_RATE', link='TAX_LINK'),
                  itemAccountingCode=AccountingCodeDTO(salesRevenue='SALES_REVENUE'),
                  version='LINE_VERSION',
                  expectedDeliveryDate='...',
                  purchaseOrderId='...',
                  purchaseInvoiceId='...',
                  discount=0,
                  subtotal='LINE_SUBTOTAL',
                  tax='LINE_TAX',
                  total='LINE_TOTAL'
              )
          ],
          total='ORDER_TOTAL',
          subtotal='ORDER_SUBTOTAL',
          tax='ORDER_TAX',
          kpis=KpisDTO(estimatedTotal=0, createdOn='...', lastUpdatedOn='...'),
          lineItems=[]
      )
  )
{
    "order": {
        "status": "ACTIVE",
        "id": "ORD-2561EE-0600",
        "pre_order": "false",
        "quote_order": "false",
        "name": "Contract Discount Check 0.0.5",
        "display_name": "Contract Discount Check 0.0.5",
        "description": "",
        "referral_account": "",
        "customer_purchase_order_id": "",
        "shipping_profile": {},
        "shipping_cost": "0.000000",
        "discount_profile": null,
        "origin": "",
        "custom_forms": {
            "uuid": "cdabab76-ae49-4567-b2da-9d6b60b6a7ed",
            "name": "Default for Order"
        },
        "currency": {
            "uuid": "4f444464-defa-4180-a18e-e2bf4b5a84a1",
            "name": "AUD",
            "link": "https://dev-api.exsited.com/api/v1/currencies/4f444464-defa-4180-a18e-e2bf4b5a84a1"
        },
        "time_zone": {
            "uuid": "990e82c3-8cc6-4cc6-a69c-77f9caaa8b61",
            "name": "Australia/Melbourne",
            "link": "https://dev-api.exsited.com/api/v1/time_zones/990e82c3-8cc6-4cc6-a69c-77f9caaa8b61"
        },
        "invoice_note": "",
        "billing_start_date": "ORDER_START_DATE",
        "order_start_date": "2025-11-03T00:00:00Z",
        "next_billing_from_date": "2025-12-03 00:00:00.000000",
        "next_billing_from_date_utc": "2025-12-02T13:00:00Z",
        "price_tax_inclusive": "false",
        "billing_address": {},
        "shipping_address": {},
        "created_by": "test5",
        "created_on": "2025-11-03T10:36:53Z",
        "last_updated_by": "",
        "last_updated_on": "",
        "uuid": "a3aab472-6c94-48a7-9ad4-b80432413395",
        "version": "1",
        "account_id": "2561EE",
        "account_name": "basic/express - data",
        "allow_contract": "true",
        "contract_properties": {
            "require_customer_acceptance": "false",
            "requires_payment_method": "false",
            "initial_contract_term": "1 Year",
            "renew_automatically": "false",
            "allow_early_termination": "false",
            "termination_accounting_code": "",
            "allow_postponement": "false",
            "allow_trial": "false",
            "allow_downgrade": "true",
            "period_before_downgrade": "",
            "allow_downgrade_charge": "false",
            "downgrade_charge_type": "Fixed",
            "downgrade_charge_fixed": "",
            "allow_upgrade": "true",
            "termination_notice_period": ""
        },
        "custom_attributes": [],
        "custom_objects": [],
        "currency_id": "1",
        "properties": {
            "communication_profile": "",
            "invoice_mode": "AUTOMATIC",
            "invoice_term": "Billing Start Date",
            "billing_period": "1 Month",
            "consolidate_invoice": "false",
            "payment_processor": "Cash",
            "payment_mode": "MANUAL",
            "payment_term": "Net 30",
            "payment_term_alignment": "BILLING_DATE",
            "fulfillment_mode": "MANUAL",
            "fulfillment_term": "Immediately"
        },
        "invoice_id": "INV-2561EE-0671",
        "lines": [
            {
                "charge_item_uuid": "28655b88-22c5-42a9-b853-ab102193e6f6",
                "item_uuid": "a07f3435-6899-4b62-9f0f-5afc198bcf30",
                "item_id": "ITEM-0001",
                "item_name": "family item - family",
                "item_order_quantity": "1.000000",
                "shipping_cost": "0.00",
                "item_invoice_note": "",
                "item_description": "",
                "item_type": "FAMILY",
                "item_charge_type": "RECURRING",
                "item_custom_attributes": [],
                "item_properties": {
                    "billing_mode": "IN_ADVANCE",
                    "fixed_start_date": "",
                    "pro_rata_partial_unit": "false"
                },
                "item_price_snapshot": {
                    "pricing_rule": {
                        "uuid": "2535569c-7eff-47bd-9f5c-0b625eb65452",
                        "version": "3",
                        "price_type": "PER_UNIT_PRICING",
                        "price": "149.000000",
                        "uom": "",
                        "price_period": "",
                        "pricing_schedule": "",
                        "pricing_level": "",
                        "pricing_method": "0.000000",
                        "warehouse": "BareHouse"
                    }
                },
                "item_sale_tax_configuration": {
                    "sale_price_is_based_on": "",
                    "tax_code": {
                        "uuid": "",
                        "code": "",
                        "rate": "",
                        "link": ""
                    }
                },
                "isTaxExemptWhenSold": "false",
                "item_price_tax": {
                    "uuid": "58a36f3d-efaa-4ce7-bfc5-ce20c7330e6a",
                    "code": "No Tax",
                    "rate": 0.0000,
                    "link": "https://dev-api.exsited.com/api/v3/settings/taxes/58a36f3d-efaa-4ce7-bfc5-ce20c7330e6a"
                },
                "item_accounting_code": {
                    "sales_revenue": ""
                },
                "version": "1",
                "expected_delivery_date": "",
                "package_name": "family",
                "purchase_order_id": "",
                "purchase_invoice_id": "",
                "discount": 0,
                "total": "149",
                "subtotal": "149",
                "tax": "0"
            }
        ],
        "total": "149",
        "subtotal": "149",
        "tax": "0",
        "kpis": {
            "start_date": "",
            "estimated_total": 0,
            "total_revenue": 0,
            "monthly_recurring_revenue": 0,
            "total_collected": 0,
            "total_outstanding": 0,
            "total_due": 0,
            "last_invoice_issue_date": "",
            "last_invoice_total": 0,
            "total_invoice": 0,
            "next_invoice_issueDate": "",
            "last_reactivated_on": "",
            "last_cancelled_on": "",
            "last_changed_on": "",
            "last_deleted_on": ""
        },
        "line_items": []
    }
}

Updating Order Information

Function : update_order_information()

Purpose

This endpoint allows clients to update the general information of an existing order. It supports modifying fields such as name, display name, description, manager, and other order-level attributes without affecting order lines or financial details. This functionality is useful in scenarios where order metadata needs to be corrected, enriched, or administratively updated after the order has already been created.

Parameters

Parameter Type Description
order_id string Unique identifier of the order whose information needs to be updated.

Use Case

This API is used when a user needs to update the non-financial, informational properties of an order that has already been created. For example, administrators or automated processes may modify the order name, display label, manager information, or description to reflect updated business context, corrections, or workflow adjustments. The endpoint ensures that only the high-level metadata is updated while preserving all existing line items and structural components of the order. Below are example implementations in Python and PHP SDKs using placeholders instead of actual values.

Python
PHP
def update_order_information():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        request_data = OrderCreateDTO(
            order=OrderDataDTO(
                name="<ORDER_NAME>",
                displayName="<ORDER_DISPLAY_NAME>",
                description="<ORDER_DESCRIPTION>",
                manager="<ORDER_MANAGER>"
            )
        )

        response = exsited_sdk.order.update_information(
            id="<ORDER_ID>",
            request_data=request_data
        )
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function updateOrderInformation()
    {
        $params = [
            "order" => [
                "name" => "My Collection",
                "display_name" => "My Collection",
                "description" => "Exclusive Item",
//                "manager" => "Administrator",
                "origin" => "NetSuite",
                "invoice_note" => "Invoice note",
//                "communication_preference" => [
//                    [
//                        "media" => "EMAIL",
//                        "isEnabled" => "true"
//                    ],
//                    [
//                        "media" => "POSTAL_EMAIL",
//                        "isEnabled" => "true"
//                    ],
//                    [
//                        "media" => "TEXT_MESSAGE",
//                        "isEnabled" => "true"
//                    ],
//                    [
//                        "media" => "VOICE_MAIL",
//                        "isEnabled" => "true"
//                    ]
//                ]
            ]
        ];
        $id='ORD-90YDLX-0636';
        try {
            $response= $this->orderService->changeInformation($params,$id,'v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

Response

Upon successful execution, the API returns the full updated order details, including unchanged fields along with the modified attributes. The response includes the order's identifiers, version number, timestamps, addresses, currency, custom objects, and all other metadata. This confirms that the update operation was applied correctly and provides the latest snapshot of the order record. Below are sample Python and PHP SDK response formats with placeholder values.

Python
PHP
OrderDetailsDTO(
    order=OrderDataDTO(
        accountId="<ACCOUNT_ID>",
        status="<ORDER_STATUS>",
        id="<ORDER_ID>",
        uuid="<ORDER_UUID>",
        version="<VERSION>",
        name="<ORDER_NAME>",
        displayName="<ORDER_DISPLAY_NAME>",
        description="<ORDER_DESCRIPTION>",
        manager="<ORDER_MANAGER>",
        createdBy="<CREATED_BY>",
        createdOn="<CREATED_ON>",
        lastUpdatedBy="<UPDATED_BY>",
        lastUpdatedOn="<UPDATED_ON>",
        currencyId="<CURRENCY_ID>",
        total="<TOTAL>",
        subtotal="<SUBTOTAL>",
        tax="<TAX>"
    )
)
{
    "order": {
        "status": "ACTIVE",
        "id": "ORD-90YDLX-0636",
        "pre_order": "true",
        "quote_order": "false",
        "name": "My Collection",
        "display_name": "My Collection",
        "description": "Exclusive Item",
        "referral_account": "",
        "customer_purchase_order_id": "",
        "shipping_profile": {},
        "shipping_cost": "0.000000",
        "discount_profile": null,
        "origin": "NetSuite",
        "custom_forms": {
            "uuid": "cdabab76-ae49-4567-b2da-9d6b60b6a7ed",
            "name": "Default for Order"
        },
        "currency": {
            "uuid": "4f444464-defa-4180-a18e-e2bf4b5a84a1",
            "name": "AUD",
            "link": "https:\/\/dev-api.exsited.com\/api\/v1\/currencies\/4f444464-defa-4180-a18e-e2bf4b5a84a1"
        },
        "time_zone": {
            "uuid": "990e82c3-8cc6-4cc6-a69c-77f9caaa8b61",
            "name": "Australia\/Melbourne",
            "link": "https:\/\/dev-api.exsited.com\/api\/v1\/time_zones\/990e82c3-8cc6-4cc6-a69c-77f9caaa8b61"
        },
        "invoice_note": "Invoice note",
        "billing_start_date": "ORDER_START_DATE",
        "order_start_date": "2025-11-25T00:00:00Z",
        "next_billing_from_date": "",
        "price_tax_inclusive": "true",
        "billing_address": {},
        "shipping_address": {},
        "created_by": "test5",
        "created_on": "2025-11-25T12:54:48Z",
        "last_updated_by": "test5",
        "last_updated_on": "2025-12-03T13:02:18Z",
        "uuid": "482432b9-c292-4073-9ce8-8081ff7f76d1",
        "version": "2",
        "account_id": "90YDLX",
        "account_name": "david",
        "allow_contract": "false",
        "custom_attributes": [],
        "custom_objects": [],
        "currency_id": "1",
        "invoice_id": "",
        "total": "0",
        "subtotal": "0",
        "tax": "0"
    }

Updating Order Line Information

Function : update_order_line_information()

Purpose

This endpoint allows updating the information of a specific order line within an existing order. It enables modifying attributes such as item name, item invoice note, and item description without altering other order details or financial information. This is useful when a product name needs correction, line-level notes need updating, or descriptive content must be revised after the line has been created.

Parameters

Parameter Type Description
order_id string Unique identifier of the order containing the line to be updated.
line_uuid string Unique identifier of the specific order line whose information is being updated.

Use Case

This API is used when a client needs to modify the descriptive information of an individual order line while leaving all other order attributes intact. For instance, after an order is created, the business may want to update the item name to reflect a product version change or add additional internal notes for invoicing or fulfillment. This endpoint isolates modification to a single targeted line, ensuring the core order structure remains unchanged. Below are example implementations in Python and PHP SDKs using placeholder values.

Python
PHP
def update_order_line_information():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        line_data = OrderLineDTO(
            itemName="<ITEM_NAME>",
            itemInvoiceNote="<ITEM_INVOICE_NOTE>",
            itemDescription="<ITEM_DESCRIPTION>"
        )
        request_data = OrderCreateDTO(order=OrderDataDTO(line=line_data))

        response = exsited_sdk.order.update_line_information(
            id="<ORDER_ID>",
            uuid="<ORDER_LINE_UUID>",
            request_data=request_data
        )
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function updateOrderLineInformation()
    {
        $params = [
            "order" => [
                "line" => [
                    "item_name" => "chips",
                    "item_invoice_note" => "note",
                    "item_description" => "description",
//                    "item_custom_attributes" => [
//                        [
//                            "name" => "Mug",
//                            "value" => "plastic material"
//                        ]
//                    ]
                ]
            ]
        ];
        $id='ORD-90YDLX-0638';
        $chargeItemUUID="59046704-3557-428d-9b0d-c46b3739a46f";

        try {
            $response = $this->orderService->changeOrderLineInformation($params, $id,$chargeItemUUID,'v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

Response

The response returns the updated order with refreshed details for the specific order line, including pricing, tax configuration, item properties, and other metadata. While the response includes the entire order structure, only the targeted line displays changes, confirming the successful update. This ensures complete transparency of the final order state after applying the modification. Below are Python and PHP response examples using placeholders.

Python
PHP
OrderDetailsDTO(
    order=OrderDataDTO(
        kpis=KpisDTO(
            startDate="<START_DATE>",
            estimatedTotal="<ESTIMATED_TOTAL>"
        ),
        charge=OrderLineDTO(
            itemId="<ITEM_ID>",
            itemOrderQuantity="<ITEM_QUANTITY>",
            itemUuid="<ITEM_UUID>",
            itemName="<ITEM_NAME>",
            itemInvoiceNote="<ITEM_INVOICE_NOTE>",
            itemDescription="<ITEM_DESCRIPTION>",
            itemType="<ITEM_TYPE>",
            itemChargeType="<CHARGE_TYPE>",
            chargeItemUuid="<CHARGE_ITEM_UUID>",
            version="<VERSION>"
        )
    )
)
{
    "order": {
        "invoice_id": null,
        "charge": {
            "charge_item_uuid": "59046704-3557-428d-9b0d-c46b3739a46f",
            "item_uuid": "0530ce11-f6b9-42dc-88fe-02aba933089f",
            "item_id": "ITEM-0034",
            "item_name": "chips",
            "item_order_quantity": "1.000000",
            "shipping_cost": "0.000000",
            "item_invoice_note": "note",
            "item_description": "description",
            "item_type": "STANDARD",
            "item_charge_type": "ONE_OFF",
            "item_custom_attributes": [],
            "item_price_snapshot": {
                "pricing_rule": {
                    "uuid": "03a0cf98-b37f-4166-808d-afb1c64ea3a3",
                    "version": "1",
                    "price_type": "PER_UNIT_PRICING",
                    "price": "0.000000",
                    "uom": "Square Centimetre",
                    "price_period": "",
                    "pricing_schedule": "",
                    "pricing_level": "",
                    "pricing_method": "0.000000",
                    "warehouse": "BareHouse"
                }
            },
            "item_sale_tax_configuration": {
                "sale_price_is_based_on": "",
                "tax_code": {
                    "uuid": "",
                    "code": "",
                    "rate": "",
                    "link": ""
                }
            },
            "isTaxExemptWhenSold": "false",
            "item_price_tax": {
                "uuid": "58a36f3d-efaa-4ce7-bfc5-ce20c7330e6a",
                "code": "No Tax",
                "rate": 0,
                "link": "https:\/\/dev-api.exsited.com\/api\/v3\/settings\/taxes\/58a36f3d-efaa-4ce7-bfc5-ce20c7330e6a"
            },
            "item_accounting_code": {
                "sales_revenue": ""
            },
            "version": "2",
            "pre_order_stock_details": {
                "pending_reserve": "0",
                "reserved": "1",
                "sold": "0"
            },
            "expected_delivery_date": "",
            "purchase_order_id": "",
            "purchase_invoice_id": "",
            "flat_discount": "",
            "item_sales_rate_id": "42",
            "latestData0": "\u0000",
            "shipping_profile_id": "",
            "pro_rata_partial_unit": "FALSE",
            "id": 656,
            "perUnitPrice0": "",
            "total0": "0.000000",
            "warehouse_applicable": "true",
            "rule_excess_price": "0.000000",
            "price_tax_inclusive": "false",
            "back_order_quantity": "0.000000",
            "tax_inclusive_rate": "0.000000",
            "sales_rate_option": "PER_UNIT",
            "price": "0.000000",
            "tax_inclusive_based_on": "SALES_TAX",
            "salesTaxName0": "",
            "tax0": "",
            "sales_tax_code_id": "22",
            "sales_tax_rate": "0.000000"
        },
        "kpis": {
            "start_date": "",
            "estimated_total": 0,
            "total_revenue": 0,
            "monthly_recurring_revenue": 0,
            "total_collected": 0,
            "total_outstanding": 0,
            "total_due": 0,
            "last_invoice_issue_date": "",
            "last_invoice_total": 0,
            "total_invoice": 0,
            "next_invoice_issueDate": "",
            "last_reactivated_on": "",
            "last_cancelled_on": "",
            "last_changed_on": "",
            "last_deleted_on": ""
        },
        "line_items": []
    }

Updating Order Line Billing Preferences

Function : update_order_line_billing_preferences()

Purpose

This API allows updating the billing preferences of a specific line item within an existing order. Billing preferences determine how and when the item is billed, including billing mode, charging period, charging start rules, and pro-rata behavior. This endpoint is typically used when modifying subscriptions, recurring charges, or any item whose billing configuration needs to be changed during the lifecycle of an order.

Parameters

ParameterTypeDescription
order_idstringUnique identifier of the order containing the line to be updated.
line_uuidstringUnique identifier of the specific order line whose information is being updated.

Use Case

This API is commonly used in subscription billing environments where an existing order contains a recurring or usage-based item and the billing structure for that item needs updating. For example, a business may need to switch a customer from monthly billing to a daily cycle, enable pro-rata adjustments, or modify alignment rules between charging and billing periods. This endpoint allows such modifications without replacing the entire order, giving full control over the billing logic at the line-item level. The following examples demonstrate how to perform this update using Python and PHP SDK functions, with placeholders replacing actual values.

Python
def update_order_line_billing_preferences():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_line = OrderLineDTO(
           itemProperties=ItemPropertiesDataDTO(
               billingMode="IN_ADVANCE",
               chargingPeriod="1 Day",
               chargingStartDate="SUBSCRIPTION_START_DATE",
               chargingAndBillingAlignment="false",
               proRataPartialChargingPeriod="true",
               proRataPartialPricingPeriod="true",
               proRataPartialUnit="true"
           )
        )

        request_data = BillingPreferenceRequestDTO(
            order=BillingPreferenceDataDTO(
                line=order_line
            )
        )

        response = exsited_sdk.order.update_item_billing_preferences(order_id="EXORD-ZU2E4RCH1XM0-11172", line_item_uuid="2886c30f-cfe1-4694-a5e5-130299290a19", request_data=request_data)

        print(response)

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

Response

The API responds with the complete order details after applying the updated billing preferences on the target line item. The response confirms the updated billing configuration such as billing mode, charging period, pro-rata flags, and related metadata. It also includes the full order structure, including order metadata, currency, properties, time zone, custom objects, KPIs, and updated line item details. This allows consumers of the SDK to verify the updated billing logic for the item. The examples below show typical response structures from Python and PHP SDK functions with placeholder values.

Python
OrderDetailsDTO(
    order=OrderDataDTO(
        id="ORDER_ID_PLACEHOLDER",
        status="ACTIVE",
        lineItems=[],
        lines=[
            OrderLineDTO(
                itemUuid="LINE_UUID_PLACEHOLDER",
                itemName="ITEM_NAME_PLACEHOLDER",
                itemProperties=ItemPropertiesDataDTO(
                    billingMode="IN_ADVANCE",
                    chargingPeriod="1 Day",
                    chargingStartDate="SUBSCRIPTION_START_DATE",
                    chargingAndBillingAlignment="false",
                    proRataPartialChargingPeriod="true",
                    proRataPartialPricingPeriod="true",
                    proRataPartialUnit="true"
                )
            )
        ]
    )
)

Changing an Existing Order

Function: order_change()

Purpose

This function updates an existing order by applying modifications to one or more order lines. It is commonly used for adjusting quantities, prices, or pricing rules on items already included in an order. The change operation recalculates order totals, taxes, and pricing snapshots while maintaining order history integrity. This SDK function enables developers and QA testers to perform controlled updates to active orders without recreating or cancelling the order.

Parameters

ParameterTypeDescription
order_idstringThe unique order identifier.

Use Case

This function is used when an existing order needs to be updated without performing a cancel-and-recreate process. Common scenarios include customers requesting quantity changes, pricing corrections, or rate adjustments based on updated pricing rules or promotions. Using this endpoint through the SDK ensures the system correctly recalculates totals, invoice amounts, and tax values. It also preserves order versioning and audit history, which is required for billing compliance. QA engineers typically use this function to verify pricing workflows, automated billing logic, and the system's handling of line-level changes.

Python
PHP
def order_change():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        line = OrderLineDTO(op="change", uuid="6c3e9d19-7114-4c83-983c-539c60accb29", itemOrderQuantity="4",
                            itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                                pricingRule=OrderItemPricingRuleDTO(price="40.0000")))

        request_data = OrderCreateDTO(order=OrderDataDTO(effectiveDate="2025-11-25", lines=[line]))

        response = exsited_sdk.order.change(id="ORD-3X6JF3-0635", request_data=request_data)
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function orderChange()
    {
        $params = [
            "order" => [
                "effective_date" => "2025-11-25",
                "properties" => [
                    "billing_period" => "3 Year"
                ],
                "lines" => [
                    [
                        "op" => "change",
                        "uuid" => "6c3e9d19-7114-4c83-983c-539c60accb29",
                        "item_order_quantity" => "3",
                        "item_price_snapshot" => [
                            "pricing_rule" => [
                                "price" => "6.000000"
                            ]
                        ]
                    ]
                ]
            ]
        ];
        $id='ORD-3X6JF3-0635';
        try {
            $response = $this->orderService->change($params,$id,'v3');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

Response

The response returns a complete updated order object containing all recalculated values such as total, subtotal, tax, pricing snapshots, and updated metadata. It includes the full order structure, including lines, charges, dates, properties, invoicing details, and associated objects. The system also tracks version changes to reflect that the order has been updated.

Python
PHP
OrderDetailsDTO(
    order=OrderDataDTO(
        id="{ORDER_ID}",
        uuid="{ORDER_UUID}",
        status="ACTIVE",
        version="{ORDER_VERSION}",
        effectiveDate="{EFFECTIVE_DATE}",
        total="{ORDER_TOTAL}",
        subtotal="{ORDER_SUBTOTAL}",
        tax="{ORDER_TAX}",
        lines=[
            OrderLineDTO(
                itemId="{ITEM_ID}",
                itemName="{ITEM_NAME}",
                itemOrderQuantity="{ITEM_QUANTITY}",
                itemUuid="{ITEM_UUID}",
                subtotal="{LINE_SUBTOTAL}",
                total="{LINE_TOTAL}",
                tax="{LINE_TAX}",
                itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                    pricingRule=OrderItemPricingRuleDTO(
                        price="{ITEM_PRICE}",
                        uuid="{PRICING_RULE_UUID}",
                        version="{PRICING_RULE_VERSION}"
                    )
                )
            )
        ],
        customForms=CustomFormsDTO(
            uuid="{FORM_UUID}",
            name="{FORM_NAME}"
        ),
        currency=CurrencyDTO(
            uuid="{CURRENCY_UUID}",
            name="{CURRENCY_NAME}"
        )
    ),
    eventUuid="{EVENT_UUID}"
)
{
    "event_uuid": "ad61c95f-ba12-462c-9044-3e9be3358363",
    "order": {
        "status": "ACTIVE",
        "id": "ORD-3X6JF3-0635",
        "pre_order": "false",
        "quote_order": "false",
        "name": "Test Account RD check name - Book",
        "display_name": "Test Account RD check name - Book",
        "description": "",
        "referral_account": "",
        "customer_purchase_order_id": "",
        "shipping_profile": {},
        "shipping_cost": "0.000000",
        "discount_profile": null,
        "origin": "",
        "custom_forms": {
            "uuid": "cdabab76-ae49-4567-b2da-9d6b60b6a7ed",
            "name": "Default for Order"
        },
        "currency": {
            "uuid": "4f444464-defa-4180-a18e-e2bf4b5a84a1",
            "name": "AUD",
            "link": "https:\/\/dev-api.exsited.com\/api\/v1\/currencies\/4f444464-defa-4180-a18e-e2bf4b5a84a1"
        },
        "time_zone": {
            "uuid": "990e82c3-8cc6-4cc6-a69c-77f9caaa8b61",
            "name": "Australia\/Melbourne",
            "link": "https:\/\/dev-api.exsited.com\/api\/v1\/time_zones\/990e82c3-8cc6-4cc6-a69c-77f9caaa8b61"
        },
        "invoice_note": "",
        "communication_preference": [
            {
                "media": "EMAIL",
                "isEnabled": "true"
            }
        ],
        "billing_start_date": "ORDER_START_DATE",
        "order_start_date": "2025-11-25T00:00:00Z",
        "next_billing_from_date": "",
        "price_tax_inclusive": "true",
        "billing_address": {},
        "shipping_address": {},
        "created_by": "Implementer",
        "created_on": "2025-11-25T10:15:14Z",
        "last_updated_by": "test5",
        "last_updated_on": "2025-12-03T12:48:54Z",
        "uuid": "fabb77d6-39b9-4b4a-a32c-6ee34452c37d",
        "version": "4",
        "account_id": "3X6JF3",
        "account_name": "Test Account RD check name",
        "allow_contract": "false",
        "custom_attributes": [],
        "custom_objects": [],
        "currency_id": "1",
        "properties": {
            "communication_profile": "AutoBill Communication Profile",
            "invoice_mode": "AUTOMATIC",
            "invoice_term": "Billing Start Date",
            "billing_period": "3 Year",
            "consolidate_invoice": "false",
            "payment_processor": "Cash",
            "payment_mode": "MANUAL",
            "payment_term": "Net 30",
            "payment_term_alignment": "BILLING_DATE",
            "fulfillment_mode": "MANUAL",
            "fulfillment_term": "Immediately"
        },
        "invoice_id": "INV-3X6JF3-0714",
        "lines": [
            {
                "charge_item_uuid": "6c3e9d19-7114-4c83-983c-539c60accb29",
                "item_uuid": "feec0089-3782-482f-811a-cdc28c46a680",
                "item_id": "ITEM-0042",
                "item_name": "Book",
                "item_order_quantity": "3.000000",
                "shipping_cost": "0.00",
                "item_invoice_note": "",
                "item_description": "",
                "item_type": "STANDARD",
                "item_charge_type": "ONE_OFF",
                "item_custom_attributes": [],
                "item_price_snapshot": {
                    "pricing_rule": {
                        "uuid": "20a78487-d987-4d1e-8b54-c33b68cfd5ee",
                        "version": "2",
                        "price_type": "PER_UNIT_PRICING",
                        "price": "6.000000",
                        "uom": "",
                        "price_period": "",
                        "pricing_schedule": "",
                        "pricing_level": "",
                        "pricing_method": "0.000000",
                        "warehouse": "BareHouse"
                    }
                },
                "item_sale_tax_configuration": {
                    "sale_price_is_based_on": "SALES_TAX",
                    "tax_code": {
                        "uuid": "",
                        "code": "",
                        "rate": "",
                        "link": ""
                    }
                },
                "isTaxExemptWhenSold": "true",
                "item_price_tax": {
                    "uuid": "",
                    "code": "",
                    "rate": "",
                    "link": ""
                },
                "item_accounting_code": {
                    "sales_revenue": ""
                },
                "version": "1",
                "expected_delivery_date": "",
                "purchase_order_id": "",
                "purchase_invoice_id": "",
                "discount": 0,
                "total": "18",
                "subtotal": "18",
                "tax": "0"
            }
        ],
        "total": "18",
        "subtotal": "18",
        "tax": "0",
        "kpis": {
            "start_date": "",
            "estimated_total": 0,
            "total_revenue": 0,
            "monthly_recurring_revenue": 0,
            "total_collected": 0,
            "total_outstanding": 0,
            "total_due": 0,
            "last_invoice_issue_date": "",
            "last_invoice_total": 0,
            "total_invoice": 0,
            "next_invoice_issueDate": "",
            "last_reactivated_on": "",
            "last_cancelled_on": "",
            "last_changed_on": "",
            "last_deleted_on": ""
        },
        "line_items": []
    }

Creating a Pre-Order

Function: order_preorder()

Purpose

This function creates a pre-order, which represents an order intended for future fulfillment where stock is not immediately deducted. Pre-orders allow organisations to record customer intent before items are physically available, enabling forecasting, demand planning, and controlled reservation of inventory once stock arrives. The SDK provides a simple method to create pre-orders programmatically while ensuring the system automatically handles pre-order rules, pricing behaviour, tax settings, and inventory reservation workflows.

Parameters

No parameters is required.

Use Case

This SDK function is used when a business wants to capture a customer’s order before stock is available, without immediately affecting inventory levels. Pre-orders are commonly utilised during product launches, restock cycles, seasonal campaigns, or limited-quantity pre-sales. When a pre-order is created, the system prepares the order with line-level pre-order stock details such as pending reserve quantities, enabling downstream fulfilment to occur once items are back in stock.

Python
PHP
def order_preorder():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        request_data = OrderCreateDTO(
            order=OrderDataDTO(accountId="90YDLX", preOrder="true", priceTaxInclusive="true").
            add_line(item_id="ITEM-0034", quantity="1"))
        response = exsited_sdk.order.preorder(request_data=request_data)
        print(response)

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function orderPreorder()
    {
        $params = [
            "order" => [
                "pre_order" => "true",
                "account_id" => "90YDLX",
                "price_tax_inclusive" => "true",
                "lines" => [
                    [
                        "item_id" => "ITEM-0034",
                        "item_order_quantity" => "20",
                    ]
                ]
            ]
        ];
        try {
            $response = $this->orderService->createPreorder($params);
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

Response

The response returns the fully created pre-order with all system-generated values such as order ID, UUID, status, pricing details, tax information, timestamps, and pre-order stock details. The order lines will include a preOrderStockDetails section that shows pending reserve quantities, which indicates how many units are expected to be reserved once stock becomes available. The SDK maps the full order into structured DTOs (Python) or associative arrays (PHP), enabling detailed validation of default values, item pricing behaviour, taxation rules, and inventory reservation workflows.

Python
PHP
OrderDetailsDTO(
    order=OrderDataDTO(
        id="{ORDER_ID}",
        uuid="{ORDER_UUID}",
        accountId="{ACCOUNT_ID}",
        status="ACTIVE",
        preOrder="true",
        version="{ORDER_VERSION}",
        total="{ORDER_TOTAL}",
        subtotal="{ORDER_SUBTOTAL}",
        tax="{ORDER_TAX}",
        createdBy="{CREATED_BY}",
        createdOn="{CREATED_ON}",
        lines=[
            OrderLineDTO(
                itemId="{ITEM_ID}",
                itemName="{ITEM_NAME}",
                itemUuid="{ITEM_UUID}",
                itemOrderQuantity="{ITEM_QUANTITY}",
                subtotal="{LINE_SUBTOTAL}",
                total="{LINE_TOTAL}",
                tax="{LINE_TAX}",
                itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                    pricingRule=OrderItemPricingRuleDTO(
                        price="{ITEM_PRICE}",
                        uuid="{PRICING_RULE_UUID}",
                        version="{PRICING_RULE_VERSION}"
                    )
                ),
                preOrderStockDetails=PreOrderStockDetailsDTO(
                    pendingReserve="{PENDING_RESERVE}",
                    reserved="{RESERVED_QUANTITY}",
                    sold="{SOLD_QUANTITY}"
                )
            )
        ],
        currency=CurrencyDTO(
            uuid="{CURRENCY_UUID}",
            name="{CURRENCY_NAME}"
        )
    ),
    eventUuid="{EVENT_UUID}"
)
{
    "order": {
        "status": "ACTIVE",
        "id": "ORD-90YDLX-0639",
        "pre_order": "true",
        "quote_order": "false",
        "name": "david - apple",
        "display_name": "david - apple",
        "description": "",
        "referral_account": "",
        "customer_purchase_order_id": "",
        "shipping_profile": {},
        "shipping_cost": "0.000000",
        "discount_profile": null,
        "origin": "",
        "custom_forms": {
            "uuid": "cdabab76-ae49-4567-b2da-9d6b60b6a7ed",
            "name": "Default for Order"
        },
        "currency": {
            "uuid": "4f444464-defa-4180-a18e-e2bf4b5a84a1",
            "name": "AUD",
            "link": "https:\/\/dev-api.exsited.com\/api\/v1\/currencies\/4f444464-defa-4180-a18e-e2bf4b5a84a1"
        },
        "time_zone": {
            "uuid": "990e82c3-8cc6-4cc6-a69c-77f9caaa8b61",
            "name": "Australia\/Melbourne",
            "link": "https:\/\/dev-api.exsited.com\/api\/v1\/time_zones\/990e82c3-8cc6-4cc6-a69c-77f9caaa8b61"
        },
        "invoice_note": "",
        "billing_start_date": "ORDER_START_DATE",
        "order_start_date": "2025-12-03T00:00:00Z",
        "next_billing_from_date": "",
        "price_tax_inclusive": "true",
        "billing_address": {},
        "shipping_address": {},
        "created_by": "test5",
        "created_on": "2025-12-03T12:57:05Z",
        "last_updated_by": "",
        "last_updated_on": "",
        "uuid": "71160f33-3698-499a-b889-c4b790da2af6",
        "version": "1",
        "account_id": "90YDLX",
        "account_name": "david",
        "allow_contract": "false",
        "custom_attributes": [],
        "custom_objects": [],
        "currency_id": "1",
        "properties": {
            "communication_profile": "",
            "invoice_mode": "AUTOMATIC",
            "invoice_term": "Billing Start Date",
            "billing_period": "1 Day",
            "consolidate_invoice": "false",
            "payment_processor": "Cash",
            "payment_mode": "MANUAL",
            "payment_term": "Net 30",
            "payment_term_alignment": "BILLING_DATE",
            "fulfillment_mode": "MANUAL",
            "fulfillment_term": "Immediately"
        },
        "invoice_id": "",
        "lines": [
            {
                "charge_item_uuid": "d603dcd2-ad72-4686-a446-91880e625756",
                "item_uuid": "0530ce11-f6b9-42dc-88fe-02aba933089f",
                "item_id": "ITEM-0034",
                "item_name": "apple",
                "item_order_quantity": "20.000000",
                "shipping_cost": "0.00",
                "item_invoice_note": "",
                "item_description": "",
                "item_type": "STANDARD",
                "item_charge_type": "ONE_OFF",
                "item_custom_attributes": [],
                "item_price_snapshot": {
                    "pricing_rule": {
                        "uuid": "03a0cf98-b37f-4166-808d-afb1c64ea3a3",
                        "version": "1",
                        "price_type": "PER_UNIT_PRICING",
                        "price": "0.000000",
                        "uom": "Square Centimetre",
                        "price_period": "",
                        "pricing_schedule": "",
                        "pricing_level": "",
                        "pricing_method": "0.000000",
                        "warehouse": "BareHouse"
                    }
                },
                "item_sale_tax_configuration": {
                    "sale_price_is_based_on": "",
                    "tax_code": {
                        "uuid": "",
                        "code": "",
                        "rate": "",
                        "link": ""
                    }
                },
                "isTaxExemptWhenSold": "false",
                "item_price_tax": {
                    "uuid": "58a36f3d-efaa-4ce7-bfc5-ce20c7330e6a",
                    "code": "No Tax",
                    "rate": 0,
                    "link": "https:\/\/dev-api.exsited.com\/api\/v3\/settings\/taxes\/58a36f3d-efaa-4ce7-bfc5-ce20c7330e6a"
                },
                "item_accounting_code": {
                    "sales_revenue": ""
                },
                "version": "1",
                "pre_order_stock_details": {
                    "pending_reserve": "4",
                    "reserved": "16",
                    "sold": "0"
                },
                "expected_delivery_date": "",
                "purchase_order_id": "",
                "purchase_invoice_id": "",
                "discount": 0,
                "total": "0",
                "subtotal": "0",
                "tax": "0"
            }
        ],
        "total": "0",
        "subtotal": "0",
        "tax": "0",
        "kpis": {
            "start_date": "",
            "estimated_total": 0,
            "total_revenue": 0,
            "monthly_recurring_revenue": 0,
            "total_collected": 0,
            "total_outstanding": 0,
            "total_due": 0,
            "last_invoice_issue_date": "",
            "last_invoice_total": 0,
            "total_invoice": 0,
            "next_invoice_issueDate": "",
            "last_reactivated_on": "",
            "last_cancelled_on": "",
            "last_changed_on": "",
            "last_deleted_on": ""
        },
        "line_items": []
    }

Changing Order Status

Function : order_change_status()

Purpose

This function changes the workflow status of an existing order identified by the order ID. It updates the order’s workflow state to the specified target status within the configured workflow.

Parameters

ParameterTypeDescription
order_idStringUnique identifier of the order whose status is to be changed.

Use Case

This function is used to progress or update an order through its workflow lifecycle. Common scenarios include completing an order, moving it to a new processing stage, or finalizing workflow transitions as part of operational or fulfillment processes.

Python
PHP
def test_order_change_status():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.change_status(id="ORDER_ID", workflow_status="End")
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testChangeStatus()
{
    $params = [
        "workflow_status" => "Quote Approved"
    ];
    $id = 'ORDER_ID';
    try {
        $response = $this->orderService->changeStatus($params, $id, 'v2');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

The function returns a confirmation response indicating that the order’s workflow state has been successfully changed. The response includes a message confirming the successful status update.

Python
PHP
OrderChangeStatusResponseDTO(
    message='workflow state has been changed successfully'
)

{
    "message": "workflow state has been changed successfully"
}

Converting Quote to Order

Function : order_convert_to_order()

Purpose

This function converts an existing quote order into a confirmed sales order using the provided order ID. After conversion, the resulting order becomes a standard order (quoteOrder set to false) while retaining key order details such as account information, line items, pricing, currency, properties, and custom attributes.

Parameters

ParameterTypeDescription
order_idStringUnique identifier of the order (quote) to be converted into an order.

Use Case

This function is used when a customer quote is accepted and needs to be finalized as an actual order for fulfillment and billing. It helps users transition a quote into an active order while keeping the original order structure, items, and pricing intact.

Python
PHP
def test_order_convert_to_order():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.convert_to_order(id="ORDER_ID")
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testConvertToOrder()
{
    $id = 'ORDER_ID';
    try {
        $response = $this->orderService->convertToOrder($id, 'v2');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

The function returns an object containing the converted order details. The response includes full order metadata such as order ID, UUID, status, version, quote/order flags, account and customer details, order start date, totals (subtotal, tax, total), currency and timezone details, order properties (billing and payment settings), line items with pricing and tax configuration, custom forms, KPIs, and any custom attributes associated with the original quote/order.

Python
PHP
OrderDetailsDTO(
  order=OrderDataDTO(
    accountId='ACCOUNT_ID',
    bulkid=None,
    requestid=None,
    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='REFERRAL_ACCOUNT',
    shippingCost='SHIPPING_COST',
    origin='ORIGIN',
    invoiceNote='INVOICE_NOTE',
    billingStartDate='BILLING_START_DATE',
    orderStartDate='ORDER_START_DATE',
    nextBillingFromDate='NEXT_BILLING_DATE',
    nextBillingFromDateUtc=None,
    trialRequiresPaymentMethod=None,
    priceTaxInclusive='BOOLEAN',
    createdBy='CREATED_BY',
    createdOn='CREATED_ON',
    lastUpdatedBy='LAST_UPDATED_BY',
    lastUpdatedOn='LAST_UPDATED_ON',
    allowContract='BOOLEAN',
    accountName='ACCOUNT_NAME',
    currencyId='CURRENCY_ID',
    total='TOTAL_AMOUNT',
    subtotal='SUBTOTAL_AMOUNT',
    tax='TAX_AMOUNT',
    callbackUrl=None,
    lines=[
      OrderLineDTO(
        itemId='ITEM_ID',
        itemOrderQuantity='QUANTITY',
        itemUuid='ITEM_UUID',
        itemName='ITEM_NAME',
        shippingCost='ITEM_SHIPPING_COST',
        itemInvoiceNote='ITEM_INVOICE_NOTE',
        itemDescription='ITEM_DESCRIPTION',
        itemType='ITEM_TYPE',
        itemChargeType='ITEM_CHARGE_TYPE',
        chargeItemUuid='CHARGE_ITEM_UUID',
        version='VERSION',
        itemPriceTax=TaxDTO(
          uuid='TAX_UUID',
          code='TAX_CODE',
          rate=0.0,
          link='TAX_LINK',
          amount=None
        ),
        isTaxExemptWhenSold=None,
        taxExemptWhenSold=None,
        itemPriceSnapshot=OrderItemPriceSnapshotDTO(
          pricingRule=OrderItemPricingRuleDTO(
            price='ITEM_PRICE',
            uuid='PRICING_UUID',
            version='PRICING_VERSION',
            priceType='PRICE_TYPE',
            uom='UOM',
            pricePeriod='PRICE_PERIOD',
            pricingSchedule='PRICING_SCHEDULE',
            pricingLevel='PRICING_LEVEL',
            pricingMethod='PRICING_METHOD',
            warehouse=None
          )
        ),
        itemSaleTaxConfiguration=OrderItemSaleTaxConfigurationDTO(
          salePriceIsBasedOn='SALE_PRICE_BASE',
          taxCode=TaxDTO(
            uuid='',
            code='',
            rate='',
            link='',
            amount=None
          )
        ),
        purchaseOrder=None,
        packageName=None,
        itemSerialOrBatchNumber=None,
        itemCustomAttributes=[],
        subtotal='ITEM_SUBTOTAL',
        total='ITEM_TOTAL',
        tax='ITEM_TAX',
        discount=0,
        expectedDeliveryDate='',
        purchaseOrderId='',
        purchaseInvoiceId=''
      )
    ],
    customForms=CustomFormsDTO(
      uuid='CUSTOM_FORM_UUID',
      name='CUSTOM_FORM_NAME'
    ),
    currency=CurrencyDTO(
      uuid='CURRENCY_UUID',
      name='CURRENCY_NAME',
      link='CURRENCY_LINK'
    ),
    timeZone=TimeZoneDTO(
      uuid='TIMEZONE_UUID',
      name='TIMEZONE_NAME',
      link='TIMEZONE_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=None
    ),
    billingAddress=AddressDTO(...),
    shippingAddress=AddressDTO(...),
    defaultWarehouse='WAREHOUSE_NAME',
    customObjects=[],
    kpis=KpisDTO(...),
    customAttributes=[
      CustomAttributesDataDTO(
        name='ATTRIBUTE_NAME',
        value='ATTRIBUTE_VALUE'
      )
    ],
    customerPurchaseOrderId='CUSTOMER_PO_ID',
    invoiceId='INVOICE_ID',
    paymentId=None,
    invoice=None
  ),
  eventUuid=None,
  operation=None
)
{
  "order": {
    "status": "ORDER_STATUS",
    "id": "ORDER_ID",
    "pre_order": "BOOLEAN",
    "quote_order": "BOOLEAN",
    "quote_converted": "BOOLEAN",
    "order_type": "ORDER_TYPE",
    "name": "ORDER_NAME",
    "display_name": "ORDER_DISPLAY_NAME",
    "description": "ORDER_DESCRIPTION",
    "referral_account": "REFERRAL_ACCOUNT",
    "customer_purchase_order_id": "CUSTOMER_PO_ID",
    "shipping_profile": {},
    "shipping_cost": "SHIPPING_COST",
    "discount_profile": null,
    "origin": "ORIGIN",
    "custom_forms": {
      "uuid": "CUSTOM_FORM_UUID",
      "name": "CUSTOM_FORM_NAME"
    },
    "currency": {
      "uuid": "CURRENCY_UUID",
      "name": "CURRENCY_NAME",
      "link": "CURRENCY_LINK"
    },
    "time_zone": {
      "uuid": "TIMEZONE_UUID",
      "name": "TIMEZONE_NAME",
      "link": "TIMEZONE_LINK"
    },
    "invoice_note": "INVOICE_NOTE",
    "default_warehouse": "WAREHOUSE_NAME",
    "billing_start_date": "BILLING_START_DATE",
    "order_start_date": "ORDER_START_DATE",
    "next_billing_from_date": "NEXT_BILLING_DATE",
    "price_tax_inclusive": "BOOLEAN",
    "billing_address": {},
    "shipping_address": {},
    "created_by": "CREATED_BY",
    "created_on": "CREATED_ON",
    "last_updated_by": "LAST_UPDATED_BY",
    "last_updated_on": "LAST_UPDATED_ON",
    "uuid": "ORDER_UUID",
    "version": "VERSION",
    "account_id": "ACCOUNT_ID",
    "account_name": "ACCOUNT_NAME",
    "allow_contract": "BOOLEAN",
    "custom_attributes": [
      {
        "name": "ATTRIBUTE_NAME",
        "value": "ATTRIBUTE_VALUE"
      }
    ],
    "custom_objects": [],
    "currency_id": "CURRENCY_ID",
    "properties": {
      "communication_profile": "COMMUNICATION_PROFILE",
      "invoice_mode": "INVOICE_MODE",
      "invoice_term": "INVOICE_TERM",
      "billing_period": "BILLING_PERIOD",
      "consolidate_invoice": "BOOLEAN",
      "payment_processor": "PAYMENT_PROCESSOR",
      "payment_mode": "PAYMENT_MODE",
      "payment_term": "PAYMENT_TERM",
      "payment_term_alignment": "PAYMENT_TERM_ALIGNMENT",
      "fulfillment_mode": "FULFILLMENT_MODE",
      "fulfillment_term": "FULFILLMENT_TERM",
      "proforma_properties": {
        "acceptance_required": "BOOLEAN",
        "payment_required": "BOOLEAN",
        "acceptance_term": "ACCEPTANCE_TERM",
        "acceptance_date": "ACCEPTANCE_DATE",
        "terms_and_conditions": "TERMS_AND_CONDITIONS"
      }
    },
    "invoice_id": "INVOICE_ID",
    "lines": [
      {
        "charge_item_uuid": "CHARGE_ITEM_UUID",
        "item_uuid": "ITEM_UUID",
        "item_id": "ITEM_ID",
        "item_name": "ITEM_NAME",
        "item_order_quantity": "ITEM_QUANTITY",
        "shipping_cost": "ITEM_SHIPPING_COST",
        "item_invoice_note": "ITEM_INVOICE_NOTE",
        "item_description": "ITEM_DESCRIPTION",
        "item_type": "ITEM_TYPE",
        "item_charge_type": "ITEM_CHARGE_TYPE",
        "item_custom_attributes": [],
        "item_price_snapshot": {
          "pricing_rule": {
            "uuid": "PRICING_UUID",
            "version": "PRICING_VERSION",
            "price_type": "PRICE_TYPE",
            "price": "ITEM_PRICE",
            "uom": "UOM",
            "price_period": "PRICE_PERIOD",
            "pricing_schedule": "PRICING_SCHEDULE",
            "pricing_level": "PRICING_LEVEL",
            "pricing_method": "PRICING_METHOD"
          }
        },
        "item_sale_tax_configuration": {
          "sale_price_is_based_on": "SALE_PRICE_BASE",
          "tax_code": {
            "uuid": "TAX_UUID",
            "code": "TAX_CODE",
            "rate": "TAX_RATE",
            "link": "TAX_LINK"
          }
        },
        "isTaxExemptWhenSold": "BOOLEAN",
        "item_price_tax": {
          "uuid": "TAX_UUID",
          "code": "TAX_NAME",
          "rate": "TAX_RATE",
          "link": "TAX_LINK"
        },
        "item_accounting_code": {
          "sales_revenue": {
            "name": "ACCOUNTING_CODE_NAME"
          }
        },
        "version": "VERSION",
        "expected_delivery_date": "EXPECTED_DELIVERY_DATE",
        "purchase_order_id": "PURCHASE_ORDER_ID",
        "purchase_invoice_id": "PURCHASE_INVOICE_ID",
        "discount": 0,
        "newTaxCodeSet": null,
        "total": "LINE_TOTAL",
        "subtotal": "LINE_SUBTOTAL",
        "tax": "LINE_TAX"
      }
    ],
    "total": "ORDER_TOTAL",
    "subtotal": "ORDER_SUBTOTAL",
    "tax": "ORDER_TAX",
    "kpis": {
      "start_date": "START_DATE",
      "estimated_total": 0,
      "total_revenue": 0,
      "monthly_recurring_revenue": 0,
      "total_collected": 0,
      "total_outstanding": 0,
      "total_due": 0,
      "last_invoice_issue_date": "LAST_INVOICE_DATE",
      "last_invoice_total": 0,
      "total_invoice": 0,
      "next_invoice_issueDate": "NEXT_INVOICE_DATE",
      "last_reactivated_on": "",
      "last_cancelled_on": "",
      "last_changed_on": "",
      "last_deleted_on": ""
    },
    "line_items": [],
    "activity_logs": [
      {
        "activity": "ORDER_ACTIVITY_MESSAGE"
      }
    ]
  }
}

Getting Order Pdf

Function : orderPdf()()

Purpose

This function retrieves a PDF document for an existing order using the provided order ID. The PDF can be returned in multiple formats (binary, hexadecimal, or base64) depending on the intended use case. The generated PDF
contains the complete order details including line items, pricing, billing information, and other order-specific data formatted for printing or digital distribution.

Parameters

ParameterTypeDescription
order_idStringUnique identifier of the order for which the PDF document will be generated.

Use Case

This function is used when users need to retrieve order documentation in PDF format for various purposes such as:
Binary format: Direct file saving to disk for immediate viewing or printing
 Hexadecimal format: Debugging, transmission over systems requiring hex encoding, or storage in hex format
 Base64 format: Embedding PDFs in emails, web applications, or APIs that require base64-encoded data

Python
PHP
def test_order_quote_pdf():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_id = "ORD-4V65EM-0064"
        response = exsited_sdk.order.order_quote_pdf(id=order_id)
        pdf_filename = f'C:/Users/Meharaj/Documents/{order_id}.pdf'

        if isinstance(response, bytes):
            try:
                with open(pdf_filename, "wb") as pdf_file:
                    pdf_file.write(response)
                print(f"PDF saved successfully at: {pdf_filename}")
                webbrowser.open(pdf_filename)
            except Exception as e:
                print("Failed to save or open the PDF:", e)
        else:
            print("Unexpected response type: Expected binary (bytes), got:", type(response))

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
    public function testOrderPdf()
    {
        $orderId = "ORD-3X6JF3-0645";

        try {
            // Binary format
            echo "<h3>Test 1: Binary Format</h3>";
            $pdfBinary = $this->orderService->orderPdf($orderId, null, 'binary');

            if (is_string($pdfBinary)) {
                $pdfPath = "C:/Users/mehedi/Documents/{$orderId}.pdf";
                file_put_contents($pdfPath, $pdfBinary);
                echo "✓ PDF saved successfully at: {$pdfPath}<br>";
                echo "✓ File size: " . strlen($pdfBinary) . " bytes<br>";
                exec("start {$pdfPath}");
            }

            echo "<hr>";

            // Small delay to avoid rate limiting
            sleep(1);

            // Hexadecimal format
            echo "<h3>Test 2: Hex Format</h3>";
            $pdfHex = $this->orderService->orderPdf($orderId, null, 'hex');

            if (is_string($pdfHex)) {
                $hexPath = "C:/Users/mehedi/Documents/{$orderId}.hex";
                file_put_contents($hexPath, $pdfHex);
                echo "✓ Hex file saved successfully at: {$hexPath}<br>";
                echo "✓ Hex string length: " . strlen($pdfHex) . " characters<br><br>";
                exec("start {$hexPath}");
            }

            echo "<hr>";

            sleep(1);

            // Base64 format
            echo "<h3>Test 3: Base64 Format</h3>";
            $pdfBase64 = $this->orderService->orderPdf($orderId, null, 'base64');

            if (is_string($pdfBase64)) {
                $base64Path = "C:/Users/mehedi/Documents/{$orderId}.base64.txt";
                file_put_contents($base64Path, $pdfBase64);
                echo "✓ Base64 file saved successfully at: {$base64Path}<br>";
                echo "✓ Base64 string length: " . strlen($pdfBase64) . " characters<br><br>";
                exec("start {$base64Path}");
            }

        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

Response

The function returns an object containing return binary, hexadecimal and base64 format. SDK will convert it PDF, Hex and Base64 file format.

Pro Forma Request Accept

Function: order_accept()


Purpose

This endpoint is used to accept a Pro Forma request that was created during an order upgrade process. When a Pro Forma request is added as part of upgrading an order, it must be explicitly accepted to proceed with the upgrade workflow. Accepting the request confirms the user’s approval and allows the system to continue with invoice generation or order finalization based on configuration.

Parameters

ParameterTypeRequiredDescription
order_idStringYesUnique identifier of the order for which the Pro Forma request is being accepted

Use Case

This endpoint is typically used after an order upgrade where a Pro Forma invoice is required for confirmation. Once the Pro Forma request is generated, the user or system must accept it to validate the upgrade.

Python
PHP
def test_order_accept():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.accept(id="Order ID")
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testCreateOrderAccept()
    {
        $id = "Order ID";
        try {
            $response = $this->orderService->createOrderAccept($id,'v2');
            echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
        } catch (Exception $e) {
            echo 'Error: ' . $e->getMessage();
        }
    }

Response

The response returns a confirmation message indicating that the Pro Forma acceptance has been successfully created. It also includes information about whether an invoice has been generated, whether payment is required, and a list of activity logs recording the acceptance action.

Python
PHP
OrderAcceptResponseDTO(
    message='Acceptance has been created successfully',
    invoiceId=None,
    paymentRequired=False,
    activityLogs=[]
)
 {
    "message": "Acceptance has been created successfully",
      "invoice_id": null,
      "payment_required": false,
      "activity_logs": [
        {
          "activity": "Operon_kawsar accept Quote ORD-AADVVI-0438"
        }
      ]
  }

Getting Global Order Notes

Function: orders_notes()

Purpose

This API retrieves a paginated, cross-order list of all notes attached to regular orders in the system. Unlike the per-order notes endpoint, this call aggregates notes across every order, returning an order object that wraps a notes array (with each note's uuid, version, content, noteGroup, noteUser, files, and audit fields) together with pagination metadata. Pagination parameters (limit, offset, direction, order_by) control traversal through large datasets. This is useful for building global notes feeds, operational dashboards, and compliance reports that require a unified view of order-level commentary and attachments across the entire order population.

Parameters

Parameter nameTypeDescription
limitintMaximum number of records to return.
offsetintNumber of records to skip for pagination.
directionStringSort direction (e.g., "asc" or "desc").
order_byStringField to order results by.

Use Case

In sales and fulfilment operations, organizations often need a single consolidated view of notes attached to all orders — not just one order at a time. Customer success teams may scan the latest notes across every open order to surface issues early. Compliance officers may audit a time-sliced window of notes to confirm that required approvals or customer communications are properly documented. Reporting systems may ingest this feed to generate activity summaries or surface high-risk items (e.g., disputed orders). Instead of iterating per-order endpoints, this call provides a paginated global feed, reducing request volume and making it practical to build cross-order analytics, notifications, and audit workflows.

Python
PHP
def test_orders_notes():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.notes.orders_notes()
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testReadAllOrderNotes()
{
    try {
        $response = $this->notesService->readAllOrderNotes('v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an order object containing a notes array and a pagination object. Each note includes its uuid, version, content (HTML-supported), a noteGroup (uuid, status, name, displayName), a noteUser (uuid, name, displayName, emailAddress), optional files (each with uuid, name, version), and audit fields (createdBy, createdOn, lastUpdatedBy, lastUpdatedOn). The pagination block exposes records, limit, offset, previousPage, and nextPage for navigating large result sets. This makes it easy to render global notes feeds, paginate through history, and drill into individual notes or their attachments using the returned UUIDs.

Python
PHP
OrderNotesResponseDTO(
    order=OrderNotesDataDTO(
        notes=[
            NoteDataDTO(
                uuid='NOTE_UUID',
                version='NOTE_VERSION',
                content='NOTE_CONTENT',
                noteGroup=NoteGroupDTO(
                    uuid='GROUP_UUID',
                    status='GROUP_STATUS',
                    name='GROUP_NAME',
                    displayName='GROUP_DISPLAY_NAME'
                ),
                noteUser=NoteUserDTO(
                    uuid='USER_UUID',
                    name='USER_NAME',
                    displayName='USER_DISPLAY_NAME',
                    emailAddress='USER_EMAIL'
                ),
                files=[
                    FileDTO(
                        uuid='FILE_UUID',
                        name='FILE_NAME',
                        version='FILE_VERSION'
                    )
                ],
                createdBy='CREATED_BY',
                createdOn='CREATED_ON',
                lastUpdatedBy='LAST_UPDATED_BY',
                lastUpdatedOn='LAST_UPDATED_ON'
            )
        ],
        pagination=PaginationDTO(
            records=PAGINATION_RECORDS,
            limit=PAGINATION_LIMIT,
            offset=PAGINATION_OFFSET,
            previousPage=PAGINATION_PREVIOUS_PAGE,
            nextPage=PAGINATION_NEXT_PAGE
        )
    )
)
{
    "order": {
        "notes": [
            {
                "uuid": "note_uuid",
                "version": "version_number",
                "content": "note_content",
                "files": [],
                "created_by": "created_by",
                "created_on": "created_on_timestamp",
                "last_updated_by": "last_updated_by",
                "last_updated_on": "last_updated_on_timestamp",
                "watcherList": {
                    "internal_watchers": [
                        {
                            "email": "internal_watcher_email"
                        }
                    ],
                    "external_watchers": [
                        {
                            "email": "external_watcher_email",
                            "account_id": "account_id"
                        }
                    ]
                },
                "custom_attributes": []
            }
        ],
        "pagination": {
            "records": "total_records",
            "limit": "page_limit",
            "offset": "page_offset",
            "previous_page": "previous_page",
            "next_page": "next_page"
        }
    }
}

Getting All Order Notes (Orders and Quotes)

Function: orders_all_notes()

Purpose

This API retrieves a paginated, combined feed of notes from both regular orders and quote-type orders in a single call. Each entry is returned in the unified order → notes structure, with every note including uuid, version, content, noteGroup, noteUser, files, and audit fields. Pagination parameters (limit, offset, direction, order_by) let callers traverse large collections. This endpoint is intended for scenarios where a caller needs a single, blended view of all order-domain commentary — regardless of whether the underlying record is an active order or a quote — without making multiple calls or stitching results together on the client side.

Parameters

Parameter nameTypeDescription
limitintMaximum number of records to return.
offsetintNumber of records to skip for pagination.
directionStringSort direction (e.g., "asc" or "desc").
order_byStringField to order results by.

Use Case

Many organizations treat orders and quotes as two stages of the same customer lifecycle: a quote is negotiated, then converted into an order. Sales operations, account management, and compliance teams often need to follow conversations across that transition without losing context. For example, a sales manager reviewing a customer escalation may want to see every note tied to the customer's quotes and their resulting orders, in chronological order. Analytics pipelines may also consume this feed to measure communication volume across the full pipeline. By returning notes from both record types through one endpoint, this call simplifies integrations, removes the need for client-side merging, and gives stakeholders an end-to-end commentary view.

Python
PHP
def test_orders_all_notes():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.notes.orders_all_notes()
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testReadOrderAllNotesCollection()
{
    try {
        $response = $this->notesService->readOrderAllNotesCollection('v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an order object that wraps a combined notes array drawn from both orders and quotes, along with pagination metadata. Each note carries its uuid, version, content (HTML-supported), noteGroup (uuid, status, name, displayName), noteUser (uuid, name, displayName, emailAddress), optional files (each with uuid, name, version), and audit fields (createdBy, createdOn, lastUpdatedBy, lastUpdatedOn). The pagination block provides records, limit, offset, previousPage, and nextPage for navigating the merged dataset. This makes it straightforward to build pipeline-wide activity feeds, cross-stage compliance reports, and customer-lifecycle dashboards without coordinating multiple endpoints.

Python
PHP
OrderNotesResponseDTO(
    order=OrderNotesDataDTO(
        notes=[
            NoteDataDTO(
                uuid='NOTE_UUID',
                version='NOTE_VERSION',
                content='NOTE_CONTENT',
                noteGroup=NoteGroupDTO(
                    uuid='GROUP_UUID',
                    status='GROUP_STATUS',
                    name='GROUP_NAME',
                    displayName='GROUP_DISPLAY_NAME'
                ),
                noteUser=NoteUserDTO(
                    uuid='USER_UUID',
                    name='USER_NAME',
                    displayName='USER_DISPLAY_NAME',
                    emailAddress='USER_EMAIL'
                ),
                files=[
                    FileDTO(
                        uuid='FILE_UUID',
                        name='FILE_NAME',
                        version='FILE_VERSION'
                    )
                ],
                createdBy='CREATED_BY',
                createdOn='CREATED_ON',
                lastUpdatedBy='LAST_UPDATED_BY',
                lastUpdatedOn='LAST_UPDATED_ON'
            )
        ],
        pagination=PaginationDTO(
            records=PAGINATION_RECORDS,
            limit=PAGINATION_LIMIT,
            offset=PAGINATION_OFFSET,
            previousPage=PAGINATION_PREVIOUS_PAGE,
            nextPage=PAGINATION_NEXT_PAGE
        )
    )
)
{
    "order": {
        "notes": [
            {
                "uuid": "note_uuid",
                "version": "version_number",
                "content": "note_content",
                "files": [],
                "created_by": "created_by",
                "created_on": "created_on_timestamp",
                "last_updated_by": "last_updated_by",
                "last_updated_on": "last_updated_on_timestamp",
                "watcherList": {
                    "internal_watchers": [
                        {
                            "email": "internal_watcher_email"
                        }
                    ],
                    "external_watchers": [
                        {
                            "email": "external_watcher_email",
                            "account_id": "account_id"
                        }
                    ]
                },
                "custom_attributes": []
            }
        ],
        "pagination": {
            "records": "total_records",
            "limit": "page_limit",
            "offset": "page_offset",
            "previous_page": "previous_page",
            "next_page": "next_page"
        }
    }
}

Getting Global Quote Notes

Function: quotes_notes()

Purpose

This API retrieves a paginated list of all notes attached to quote-type orders across the system. The response uses the same unified order → notes envelope as the order notes endpoints, so callers can reuse parsing logic. Each note entry includes uuid, version, content, noteGroup, noteUser, files, and audit fields. Pagination parameters (limit, offset, direction, order_by) support traversal through large quote-note datasets. This endpoint is focused specifically on the pre-sale stage of the customer lifecycle, where quotes are being negotiated, revised, and approved before conversion into orders.

Parameters

Parameter nameTypeDescription
limitintMaximum number of records to return.
offsetintNumber of records to skip for pagination.
directionStringSort direction (e.g., "asc" or "desc").
order_byStringField to order results by.

Use Case

In pre-sale workflows, quotes carry the bulk of negotiation context: pricing discussions, scope clarifications, approval chains, and attached supporting documents such as proposals and vendor replies. Sales managers, revenue operations, and deal desks often need a dedicated feed of all quote-level notes, distinct from executed orders, to monitor in-flight negotiations, flag stalled deals, or audit discount approvals. Teams integrating with CRM or revenue analytics platforms can pull this feed to enrich opportunity records with communication history. By scoping the response to quote notes only, this endpoint keeps pre-sale dashboards focused and avoids mixing in post-conversion order activity.

Python
PHP
def test_quotes_notes():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.notes.quotes_notes()
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testReadAllQuoteNotes()
{
    try {
        $response = $this->notesService->readAllQuoteNotes('v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an order object containing a notes array of quote-specific notes and a pagination object. Each note exposes its uuid, version, content (HTML-supported), noteGroup (uuid, status, name, displayName), noteUser (uuid, name, displayName, emailAddress), optional files (each with uuid, name, version), and audit fields (createdBy, createdOn, lastUpdatedBy, lastUpdatedOn). Pagination metadata (records, limit, offset, previousPage, nextPage) supports traversal through large quote-note histories. This makes it straightforward to render quote-focused activity streams, power negotiation dashboards, and maintain an audit trail of pre-sale communications.

Python
PHP
OrderNotesResponseDTO(
    order=OrderNotesDataDTO(
        notes=[
            NoteDataDTO(
                uuid='NOTE_UUID',
                version='NOTE_VERSION',
                content='NOTE_CONTENT',
                noteGroup=NoteGroupDTO(
                    uuid='GROUP_UUID',
                    status='GROUP_STATUS',
                    name='GROUP_NAME',
                    displayName='GROUP_DISPLAY_NAME'
                ),
                noteUser=NoteUserDTO(
                    uuid='USER_UUID',
                    name='USER_NAME',
                    displayName='USER_DISPLAY_NAME',
                    emailAddress='USER_EMAIL'
                ),
                files=[
                    FileDTO(
                        uuid='FILE_UUID',
                        name='FILE_NAME',
                        version='FILE_VERSION'
                    )
                ],
                createdBy='CREATED_BY',
                createdOn='CREATED_ON',
                lastUpdatedBy='LAST_UPDATED_BY',
                lastUpdatedOn='LAST_UPDATED_ON'
            )
        ],
        pagination=PaginationDTO(
            records=PAGINATION_RECORDS,
            limit=PAGINATION_LIMIT,
            offset=PAGINATION_OFFSET,
            previousPage=PAGINATION_PREVIOUS_PAGE,
            nextPage=PAGINATION_NEXT_PAGE
        )
    )
)
{
    "order": {
        "notes": [
            {
                "uuid": "note_uuid",
                "version": "version_number",
                "content": "note_content",
                "files": [],
                "created_by": "created_by",
                "created_on": "created_on_timestamp",
                "last_updated_by": "last_updated_by",
                "last_updated_on": "last_updated_on_timestamp",
                "watcherList": {
                    "internal_watchers": [
                        {
                            "email": "internal_watcher_email"
                        }
                    ],
                    "external_watchers": [
                        {
                            "email": "external_watcher_email",
                            "account_id": "account_id"
                        }
                    ]
                },
                "custom_attributes": []
            }
        ],
        "pagination": {
            "records": "total_records",
            "limit": "page_limit",
            "offset": "page_offset",
            "previous_page": "previous_page",
            "next_page": "next_page"
        }
    }
}

Getting Invoices for a Quote

Function: quote_invoices()

Purpose

This API retrieves the paginated list of invoices generated from a specific quote, identified by the quote's order ID. The response wraps the quote's order object around an invoices array, where each invoice carries its full state: status, id, type, dates (issueDate, dueDate, billingStartDate, billingEndDate), financial totals (subtotal, tax, total, paid, due), paymentStatus, associations (accountId, orderId), and audit fields. Pagination parameters (limit, offset, direction, order_by) support quotes that have produced many invoices (e.g., recurring schedules). This endpoint completes the quote-to-cash visibility loop by letting callers trace exactly which invoices a quote has generated.

Parameters

Parameter nameTypeDescription
idStringThe unique ID of the quote whose invoices are to be retrieved.
limitintMaximum number of records to return.
offsetintNumber of records to skip for pagination.
directionStringSort direction (e.g., "asc" or "desc").
order_byStringField to order results by.

Use Case

Once a quote is accepted and converted into a billable order, it typically produces one or more invoices — a single invoice for one-off sales, or a sequence of invoices for recurring or milestone-based billing. Finance teams, customer success, and revenue operations frequently need to answer the question: "Which invoices did this quote produce, and what is their current status?" For example, a collections officer investigating an overdue balance may start from the quote and drill into the specific invoice that is delinquent. A customer success manager may verify that all expected invoices from a recurring quote have been issued. Integrations with accounting or revenue recognition systems may pull this list to reconcile quote-to-cash flows. This endpoint provides that quote-scoped invoice view in a single call, with pagination to handle long-running billing schedules.

Python
PHP
def test_quote_invoices():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.quote_invoices(id="ORD-BD1LVA-0001")
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testReadQuoteInvoices()
{
    $id = "{quote_id}";
    try {
        $response = $this->orderService->readQuoteInvoices($id, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an order object containing an invoices array and a pagination object. Each invoice includes its status, id, type, dates (issueDate, dueDate, billingStartDate, billingEndDate), financial totals (subtotal, tax, total, paid, due), paymentStatus, priceTaxInclusive flag, invoiceNote, associations (accountId, orderId), currency, optional lastPayment snapshot, kpis block (outstanding, overdue, lastPaymentDate, etc.), lines array, and audit fields (createdBy, createdOn, lastUpdatedBy, lastUpdatedOn, uuid, version). The pagination block (records, limit, offset, previousPage, nextPage) supports traversal when the quote has produced many invoices. This makes it easy to render per-quote invoice tables, reconcile billing schedules, and monitor payment status end-to-end.
Python
PHP
InvoiceOrderListDTO(
    order=InvoiceListDTO(
        invoices=[
            InvoiceDataDTO(
                status='INVOICE_STATUS',
                id='INVOICE_ID',
                type='INVOICE_TYPE',
                issueDate='ISSUE_DATE',
                dueDate='DUE_DATE',
                billingStartDate='BILLING_START_DATE',
                billingEndDate='BILLING_END_DATE',
                subtotal='SUBTOTAL',
                tax='TAX',
                total='TOTAL',
                paid='PAID',
                due='DUE',
                paymentStatus='PAYMENT_STATUS',
                priceTaxInclusive='PRICE_TAX_INCLUSIVE',
                invoiceNote='INVOICE_NOTE',
                accountId='ACCOUNT_ID',
                orderId='ORDER_ID',
                currency=CurrencyDTO(
                    uuid='CURRENCY_UUID',
                    name='CURRENCY_NAME'
                ),
                lastPayment=LastPaymentDTO(
                    id='LAST_PAYMENT_ID',
                    amount='LAST_PAYMENT_AMOUNT',
                    createdAt='LAST_PAYMENT_CREATED_AT'
                ),
                kpis=KpisDTO(
                    outstanding='OUTSTANDING',
                    overdue='OVERDUE',
                    lastPaymentDate='LAST_PAYMENT_DATE'
                ),
                createdBy='CREATED_BY',
                createdOn='CREATED_ON',
                lastUpdatedBy='LAST_UPDATED_BY',
                lastUpdatedOn='LAST_UPDATED_ON',
                uuid='INVOICE_UUID',
                version='INVOICE_VERSION'
            )
        ],
        pagination=PaginationDTO(
            records=PAGINATION_RECORDS,
            limit=PAGINATION_LIMIT,
            offset=PAGINATION_OFFSET,
            previousPage=PAGINATION_PREVIOUS_PAGE,
            nextPage=PAGINATION_NEXT_PAGE
        )
    )
)
{
    "order": {
        "invoices": [
            {
                "status": "invoice_status",
                "id": "invoice_id",
                "type": "invoice_type",
                "custom_form": {
                    "uuid": "custom_form_uuid",
                    "name": "custom_form_name"
                },
                "currency": {
                    "uuid": "currency_uuid",
                    "name": "currency_name",
                    "link": "currency_link"
                },
                "customer_purchase_order_id": "customer_purchase_order_id",
                "billing_start_date": "billing_start_date",
                "alternate_billing_start_date": "alternate_billing_start_date",
                "billing_end_date": "billing_end_date",
                "alternate_billing_end_date": "alternate_billing_end_date",
                "issue_date": "issue_date",
                "alternate_issue_date": "alternate_issue_date",
                "due_date": "due_date",
                "alternate_due_date": "alternate_due_date",
                "origin": "origin",
                "subtotal": "subtotal",
                "tax": "tax",
                "total": "total",
                "paid": "paid",
                "due": "due",
                "shipping_cost": "shipping_cost",
                "payment_status": "payment_status",
                "last_payment": {
                    "id": "last_payment_id",
                    "amount": "last_payment_amount",
                    "created_at": "last_payment_created_at"
                },
                "discount_amount": "discount_amount",
                "price_tax_inclusive": "price_tax_inclusive",
                "invoice_note": "invoice_note",
                "account_id": "account_id",
                "account_name": "account_name",
                "order_id": "order_id",
                "kpis": {
                    "outstanding": "outstanding",
                    "overdue": "overdue",
                    "last_payment_date": "last_payment_date",
                    "payment_applied": "payment_applied",
                    "credit_applied": "credit_applied",
                    "credit_issued": "credit_issued",
                    "last_reactivated_on": "last_reactivated_on",
                    "last_cancelled_on": "last_cancelled_on",
                    "last_amended_on": "last_amended_on",
                    "voided_on": "voided_on",
                    "deleted_on": "deleted_on"
                },
                "created_by": "created_by",
                "created_on": "created_on_timestamp",
                "last_updated_by": "last_updated_by",
                "last_updated_on": "last_updated_on_timestamp",
                "uuid": "invoice_uuid",
                "version": "version_number",
                "custom_attributes": [],
                "custom_objects": [],
                "lines": [
                    {
                        "item_serial_or_batch_number": "item_serial_or_batch_number",
                        "subtotal": "line_subtotal",
                        "total": "line_total",
                        "tax": {
                            "amount": "tax_amount",
                            "uuid": "tax_uuid",
                            "code": "tax_code",
                            "rate": "tax_rate",
                            "link": "tax_link"
                        },
                        "accounting_code": {
                            "sales_revenue": "sales_revenue"
                        },
                        "item_uuid": "item_uuid",
                        "item_id": "item_id",
                        "item_name": "item_name",
                        "item_order_quantity": "item_order_quantity",
                        "item_uom": "item_uom",
                        "item_warehouse": "item_warehouse",
                        "pricing_snapshot_uuid": "pricing_snapshot_uuid",
                        "charging_start_date": "charging_start_date",
                        "alternate_charging_start_date": "alternate_charging_start_date",
                        "charging_end_date": "charging_end_date",
                        "alternate_charging_end_date": "alternate_charging_end_date",
                        "uuid": "line_uuid",
                        "version": "line_version"
                    }
                ]
            }
        ],
        "pagination": {
            "records": "total_records",
            "limit": "page_limit",
            "offset": "page_offset",
            "previous_page": "previous_page",
            "next_page": "next_page"
        }
    }
}

Getting Invoices for a Quote Order

Function: quote_order_invoices()

Purpose

This API retrieves the paginated list of invoices generated from a specific quote order, identified by the quote order's ID, via GET /api/v3/quote-orders/{id}/invoices. The response wraps the quoteOrder object around an invoices array, where each invoice carries its full state: status, id, type, dates (issueDate, dueDate, billingStartDate, billingEndDate), financial totals (subtotal, tax, total, paid, due), paymentStatus, associations (accountId, orderId), currency, optional lastPayment snapshot, kpis, and audit fields. Pagination parameters (limit, offset, direction, order_by) support quote orders that have produced many invoices (e.g., recurring billing schedules). This endpoint is the quote-order-scoped counterpart to the regular order/invoice traversal endpoints, providing complete quote-to-cash visibility for quote-typed orders.

Parameters

Parameter nameTypeDescription
idStringThe unique ID of the quote order whose invoices are to be retrieved.
limitintMaximum number of records to return.
offsetintNumber of records to skip for pagination.
directionStringSort direction (e.g., "asc" or "desc").

Use Case

Quote orders represent the pre-conversion stage of the customer lifecycle: a negotiated proposal that, once accepted, produces one or more invoices according to the agreed billing schedule. Finance, revenue operations, and customer success teams routinely need to answer the question: "Which invoices has this quote order produced, and what is their current status?" For example, a collections officer investigating an overdue balance may start from the quote order and drill into the specific invoice that is delinquent. A customer success manager may verify that all expected invoices from a recurring quote order have been issued. Integrations with accounting or revenue recognition systems may pull this list to reconcile quote-order-to-cash flows. This endpoint provides that quote-order-scoped invoice view in a single call, with pagination to handle long-running billing schedules.

Python
PHP
def test_quote_order_invoices():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.quote_order_invoices(id="ORD-BD1LVA-0001")
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testReadQuoteOrderInvoices()
{
    $id = "{quote_order_id}";
    try {
        $response = $this->orderService->readQuoteOrderInvoices($id, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an InvoiceQuoteOrderListDTO containing a quoteOrder object that wraps an invoices array and a pagination object. Each invoice includes its status, id, type, dates (issueDate, dueDate, billingStartDate, billingEndDate), financial totals (subtotal, tax, total, paid, due), paymentStatus, priceTaxInclusive flag, invoiceNote, associations (accountId, orderId), currency, optional lastPayment snapshot, kpis block (outstanding, overdue, lastPaymentDate, etc.), lines array, and audit fields (createdBy, createdOn, lastUpdatedBy, lastUpdatedOn, uuid, version). The pagination block (records, limit, offset, previousPage, nextPage) supports traversal when the quote order has produced many invoices. This makes it easy to render per-quote-order invoice tables, reconcile billing schedules, and monitor payment status end-to-end.

Python
PHP
InvoiceQuoteOrderListDTO(
    quoteOrder=InvoiceListDTO(
        invoices=[
            InvoiceDataDTO(
                status='INVOICE_STATUS',
                id='INVOICE_ID',
                type='INVOICE_TYPE',
                issueDate='ISSUE_DATE',
                dueDate='DUE_DATE',
                billingStartDate='BILLING_START_DATE',
                billingEndDate='BILLING_END_DATE',
                subtotal='SUBTOTAL',
                tax='TAX',
                total='TOTAL',
                paid='PAID',
                due='DUE',
                paymentStatus='PAYMENT_STATUS',
                priceTaxInclusive='PRICE_TAX_INCLUSIVE',
                invoiceNote='INVOICE_NOTE',
                accountId='ACCOUNT_ID',
                orderId='ORDER_ID',
                currency=CurrencyDTO(
                    uuid='CURRENCY_UUID',
                    name='CURRENCY_NAME'
                ),
                lastPayment=LastPaymentDTO(
                    id='LAST_PAYMENT_ID',
                    amount='LAST_PAYMENT_AMOUNT',
                    createdAt='LAST_PAYMENT_CREATED_AT'
                ),
                kpis=KpisDTO(
                    outstanding='OUTSTANDING',
                    overdue='OVERDUE',
                    lastPaymentDate='LAST_PAYMENT_DATE'
                ),
                createdBy='CREATED_BY',
                createdOn='CREATED_ON',
                lastUpdatedBy='LAST_UPDATED_BY',
                lastUpdatedOn='LAST_UPDATED_ON',
                uuid='INVOICE_UUID',
                version='INVOICE_VERSION'
            )
        ],
        pagination=PaginationDTO(
            records=PAGINATION_RECORDS,
            limit=PAGINATION_LIMIT,
            offset=PAGINATION_OFFSET,
            previousPage=PAGINATION_PREVIOUS_PAGE,
            nextPage=PAGINATION_NEXT_PAGE
        )
    )
)
{
    "quote_order": {
        "invoices": [
            {
                "status": "invoice_status",
                "id": "invoice_id",
                "type": "invoice_type",
                "custom_form": {
                    "uuid": "custom_form_uuid",
                    "name": "custom_form_name"
                },
                "currency": {
                    "uuid": "currency_uuid",
                    "name": "currency_name",
                    "link": "currency_link"
                },
                "customer_purchase_order_id": "customer_purchase_order_id",
                "billing_start_date": "billing_start_date",
                "alternate_billing_start_date": "alternate_billing_start_date",
                "billing_end_date": "billing_end_date",
                "alternate_billing_end_date": "alternate_billing_end_date",
                "issue_date": "issue_date",
                "alternate_issue_date": "alternate_issue_date",
                "due_date": "due_date",
                "alternate_due_date": "alternate_due_date",
                "origin": "origin",
                "subtotal": "subtotal",
                "tax": "tax",
                "total": "total",
                "paid": "paid",
                "due": "due",
                "shipping_cost": "shipping_cost",
                "payment_status": "payment_status",
                "last_payment": {
                    "id": "last_payment_id",
                    "amount": "last_payment_amount",
                    "created_at": "last_payment_created_at"
                },
                "discount_amount": "discount_amount",
                "price_tax_inclusive": "price_tax_inclusive",
                "invoice_note": "invoice_note",
                "account_id": "account_id",
                "account_name": "account_name",
                "order_id": "order_id",
                "kpis": {
                    "outstanding": "outstanding",
                    "overdue": "overdue",
                    "last_payment_date": "last_payment_date",
                    "payment_applied": "payment_applied",
                    "credit_applied": "credit_applied",
                    "credit_issued": "credit_issued",
                    "last_reactivated_on": "last_reactivated_on",
                    "last_cancelled_on": "last_cancelled_on",
                    "last_amended_on": "last_amended_on",
                    "voided_on": "voided_on",
                    "deleted_on": "deleted_on"
                },
                "created_by": "created_by",
                "created_on": "created_on_timestamp",
                "last_updated_by": "last_updated_by",
                "last_updated_on": "last_updated_on_timestamp",
                "uuid": "invoice_uuid",
                "version": "version_number",
                "custom_attributes": [],
                "custom_objects": [],
                "lines": [
                    {
                        "item_serial_or_batch_number": "item_serial_or_batch_number",
                        "subtotal": "line_subtotal",
                        "total": "line_total",
                        "tax": {
                            "amount": "tax_amount",
                            "uuid": "tax_uuid",
                            "code": "tax_code",
                            "rate": "tax_rate",
                            "link": "tax_link"
                        },
                        "accounting_code": {
                            "sales_revenue": "sales_revenue"
                        },
                        "item_uuid": "item_uuid",
                        "item_id": "item_id",
                        "item_name": "item_name",
                        "item_order_quantity": "item_order_quantity",
                        "item_uom": "item_uom",
                        "item_warehouse": "item_warehouse",
                        "pricing_snapshot_uuid": "pricing_snapshot_uuid",
                        "charging_start_date": "charging_start_date",
                        "alternate_charging_start_date": "alternate_charging_start_date",
                        "charging_end_date": "charging_end_date",
                        "alternate_charging_end_date": "alternate_charging_end_date",
                        "uuid": "line_uuid",
                        "version": "line_version"
                    }
                ]
            }
        ],
        "pagination": {
            "records": "total_records",
            "limit": "page_limit",
            "offset": "page_offset",
            "previous_page": "previous_page",
            "next_page": "next_page"
        }
    }
}

Discarding a Draft Order

Function: discard_draft()

Purpose

This API discards a draft order (typically a quote-type order in PENDING_CREATE state) via POST /api/v2/orders/{id}/discard_draft. The request wraps an order object (OrderDiscardDraftDataDTO) carrying an optional note that records why the draft is being discarded. On success, the API returns a small confirmation payload with a single message field acknowledging the discard. The underlying draft record is removed from the active workflow and will no longer surface in normal order/quote lists.

Parameters

Parameter nameTypeDescription
idStringThe ID of the draft order to discard.

Use Case

Quote orders and other draft order types frequently sit in a holding state while sales, finance, or operations teams negotiate, review, or wait on customer acceptance. When a deal falls through, when a quote is superseded by a revised version, or when a draft is created in error, the draft must be removed cleanly so it does not clutter dashboards, count toward pipeline metrics, or accidentally get activated later. This endpoint provides that targeted discard operation. Including a note in the request lets the team capture the reason for the discard, which downstream audit and sales-ops reporting can later use to understand why specific drafts were abandoned.

Python
PHP
def test_discard_draft():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        request_obj = OrderDiscardDraftRequestDTO(
            order=OrderDiscardDraftDataDTO(
                note="DISCARD_REASON_NOTE"
            )
        )
        response = exsited_sdk.order.discard_draft(id="ORDER_ID", request_data=request_obj)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testDiscardDraft()
{
    $id = "{order_id}";
    $params = [
        "order" => [
            "note" => "Reason for discarding this draft"
        ]
    ];
    try {
        $response = $this->orderService->discardDraft($params, $id, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderDiscardDraftResponseDTO containing a single message field that confirms the discard (e.g., "Quote has been discarded successfully"). The absence of an error indicates the draft order was permanently discarded. Errors (e.g., the order ID not existing, the order not being in a discardable state, or insufficient permissions) are surfaced through ABException with the standard error payload.

Python
PHP
OrderDiscardDraftResponseDTO(
    message='DISCARD_CONFIRMATION_MESSAGE'
)
{
    "message": "Quote has been discarded successfully"
}

Activating a Draft Order

Function: activate_draft()

Purpose

This API activates a draft order — typically a quote that has been accepted and is ready to enter the active billing/fulfilment workflow — via POST /api/v2/orders/{id}/activate_draft. The request wraps an order object (OrderActivateDraftDataDTO) carrying an optional effective date and note. On success, the API returns the freshly activated record under a quote wrapper, with the order's complete state including its lines, properties (including proforma_properties), custom attributes, KPIs, and audit fields, so the caller can immediately render the activated quote without a follow-up fetch.

Parameters

Parameter nameTypeDescription
idStringThe ID of the draft order to activate.

Use Case

When a customer accepts a quote, the deal moves from the negotiation stage into active billing and fulfilment. This transition is the natural breakpoint between sales and operations: until activation, the quote is provisional and editable; after activation, the order is live, billable, and tied to schedules, payments, and downstream automation. This endpoint performs that handoff. Capturing an effective date lets finance align the activation with the agreed billing start, and the note field provides a free-form audit trail (e.g., "Customer accepted via signed PO #12345"). Returning the full activated record in the response means the client can refresh its rendered view in one shot, avoiding race conditions where the UI could otherwise show stale draft state.

Python
PHP
def test_activate_draft():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        request_obj = OrderActivateDraftRequestDTO(
            order=OrderActivateDraftDataDTO(
                effectiveDate="EFFECTIVE_DATE",
                note="ACTIVATION_NOTE"
            )
        )
        response = exsited_sdk.order.activate_draft(id="ORDER_ID", request_data=request_obj)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testActivateDraft()
{
    $id = "{order_id}";
    $params = [
        "order" => [
            "effective_date" => "2026-02-19",
            "note" => "Created via API"
        ]
    ];
    try {
        $response = $this->orderService->activateDraft($params, $id, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderActivateDraftResponseDTO wrapping a quote field of type OrderDataDTO with the activated record's full state — status (typically PENDING_CREATE during transition), id, identity fields (name, displayName, description), classification flags (preOrder, quoteOrder, quoteConverted, orderType), schedule (billingStartDate, orderStartDate, nextBillingFromDate), currency, timeZone, billing/shipping addresses, properties block (including the proformaProperties sub-object with acceptance/payment terms), customAttributes, customObjects, lines array, totals (subtotal, tax, total), kpis, and audit fields (createdBy, createdOn, lastUpdatedBy, lastUpdatedOn, uuid, version). This single-call full-state contract simplifies client logic for activation flows.

Python
PHP
OrderActivateDraftResponseDTO(
    quote=OrderDataDTO(
        status='ORDER_STATUS',
        id='ORDER_ID',
        preOrder='PRE_ORDER_FLAG',
        quoteOrder='QUOTE_ORDER_FLAG',
        quoteConverted='QUOTE_CONVERTED_FLAG',
        orderType='ORDER_TYPE',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_NAME'),
        timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME'),
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_DATE',
        nextBillingFromDate='NEXT_BILLING_FROM_DATE',
        priceTaxInclusive='PRICE_TAX_INCLUSIVE',
        accountId='ACCOUNT_ID',
        accountName='ACCOUNT_NAME',
        allowContract='ALLOW_CONTRACT',
        customAttributes=[
            CustomAttributesDataDTO(name='ATTR_NAME', value='ATTR_VALUE')
        ],
        properties=OrderPropertiesDTO(
            invoiceMode='INVOICE_MODE',
            invoiceTerm='INVOICE_TERM',
            billingPeriod='BILLING_PERIOD',
            paymentMode='PAYMENT_MODE',
            paymentTerm='PAYMENT_TERM',
            consolidateInvoice='CONSOLIDATE_INVOICE',
            proformaProperties=OrderProformaPropertiesDTO(
                acceptanceRequired='ACCEPTANCE_REQUIRED',
                paymentRequired='PAYMENT_REQUIRED',
                acceptanceTerm='ACCEPTANCE_TERM',
                acceptanceDate='ACCEPTANCE_DATE',
                termsAndConditions='TERMS_AND_CONDITIONS'
            )
        ),
        lines=[
            OrderLineDTO(
                chargeItemUuid='CHARGE_ITEM_UUID',
                itemName='ITEM_NAME',
                itemOrderQuantity='ITEM_ORDER_QUANTITY',
                itemChargeType='ITEM_CHARGE_TYPE',
                total='LINE_TOTAL',
                subtotal='LINE_SUBTOTAL',
                tax='LINE_TAX',
                version='LINE_VERSION'
            )
        ],
        total='ORDER_TOTAL',
        subtotal='ORDER_SUBTOTAL',
        tax='ORDER_TAX',
        kpis=KpisDTO(
            estimatedTotal=0,
            createdOn='CREATED_ON',
            lastUpdatedOn='LAST_UPDATED_ON'
        ),
        createdBy='CREATED_BY',
        createdOn='CREATED_ON',
        uuid='ORDER_UUID',
        version='ORDER_VERSION'
    )
)
{
    "quote": {
        "status": "PENDING_CREATE",
        "id": "ORD-IKOKZU-1197",
        "pre_order": "false",
        "quote_order": "true",
        "quote_converted": "false",
        "order_type": "QUOTE",
        "name": "Quote for Random Guy -1",
        "display_name": "Quote for Random Guy -1",
        "description": "",
        "manager": "",
        "referral_account": "",
        "customer_purchase_order_id": "",
        "shipping_profile": {},
        "shipping_cost": "0.000000",
        "discount_profile": null,
        "origin": "",
        "custom_forms": {
            "uuid": "10f519f1-fbb6-4aad-b2a5-424e38efbf46",
            "name": "Default for Order"
        },
        "currency": {
            "uuid": "a0f921e3-921c-4e93-ba69-bb796fdc4a07",
            "name": "AUD",
            "link": "https://dev-api.exsited.com/api/v1/currencies/a0f921e3-921c-4e93-ba69-bb796fdc4a07"
        },
        "time_zone": {
            "uuid": "eada7aaa-f872-462c-ac63-593c5b11f5a6",
            "name": "Australia/Sydney",
            "link": "https://dev-api.exsited.com/api/v1/time_zones/eada7aaa-f872-462c-ac63-593c5b11f5a6"
        },
        "invoice_note": "",
        "default_warehouse": "Warehouse 1",
        "billing_start_date": "ORDER_START_DATE",
        "order_start_date": "2026-04-16T00:00:00Z",
        "next_billing_from_date": "",
        "price_tax_inclusive": "false",
        "billing_address": {},
        "shipping_address": {},
        "created_by": "Operon_Azim",
        "created_on": "2026-03-31T07:14:13Z",
        "last_updated_by": "",
        "last_updated_on": "",
        "uuid": "61d824ee-be93-4d42-8214-13feb3cd483d",
        "version": "1",
        "account_id": "IKOKZU",
        "account_name": "Random Guy",
        "allow_contract": "false",
        "custom_attributes": [
            {
                "name": "Job_Address",
                "value": "AustraliaFrom Quote"
            },
            {
                "name": "Quote_Version",
                "value": "V1"
            },
            {
                "name": "quote_description",
                "value": "Desc q"
            }
        ],
        "custom_objects": [
            {
                "uuid": "ebd56bb3-1795-4463-9722-ea517f7f2ca3",
                "name": "refund_requests",
                "link": "https://dev-api.exsited.com/api/v2/orders/ORD-IKOKZU-1197/custom_objects/ebd56bb3-1795-4463-9722-ea517f7f2ca3?limit=10&offset=0"
            }
        ],
        "currency_id": "1",
        "properties": {
            "communication_profile": "",
            "invoice_mode": "AUTOMATIC",
            "invoice_term": "Billing Start Date",
            "billing_period": "1 Day",
            "consolidate_invoice": "false",
            "payment_processor": "",
            "payment_mode": "MANUAL",
            "payment_term": "Net 30",
            "payment_term_alignment": "",
            "fulfillment_mode": "",
            "fulfillment_term": "",
            "proforma_properties": {
                "acceptance_required": "true",
                "payment_required": "false",
                "acceptance_term": "3 Week",
                "acceptance_date": "RequestDate",
                "terms_and_conditions": ""
            }
        },
        "invoice_id": "",
        "lines": [
            {
                "item_serial_or_batch_number": "N/A",
                "charge_item_uuid": "b1cb9f60-1795-4de3-befd-f796b2110bd9",
                "item_uuid": "",
                "item_id": "",
                "item_name": "Desc i",
                "item_order_quantity": "1.000000",
                "shipping_cost": "0.00",
                "item_invoice_note": "descitem",
                "item_description": "",
                "item_type": "",
                "item_charge_type": "ONE_OFF",
                "item_custom_attributes": [],
                "item_price_snapshot": {
                    "pricing_rule": {
                        "uuid": "",
                        "version": "",
                        "price_type": "",
                        "price": "14.000000",
                        "uom": "",
                        "price_period": "",
                        "pricing_schedule": "",
                        "pricing_level": "",
                        "pricing_method": "0.000000"
                    }
                },
                "item_sale_tax_configuration": {
                    "sale_price_is_based_on": "",
                    "tax_code": {
                        "uuid": "",
                        "code": "",
                        "rate": "",
                        "link": ""
                    }
                },
                "isTaxExemptWhenSold": "false",
                "item_price_tax": {
                    "uuid": "d0942779-fa7a-4ae9-9295-2ae21bc9b05c",
                    "code": "GST",
                    "rate": "10.0000",
                    "link": "https://dev-api.exsited.com/api/v3/settings/taxes/d0942779-fa7a-4ae9-9295-2ae21bc9b05c"
                },
                "item_accounting_code": {
                    "sales_revenue": ""
                },
                "version": "1",
                "expected_delivery_date": "",
                "purchase_order_id": "",
                "purchase_invoice_id": "",
                "discount": 0,
                "newTaxCodeSet": null,
                "total": "14",
                "subtotal": "14",
                "tax": "1.27"
            }
        ],
        "total": "14",
        "subtotal": "14",
        "tax": "1.27272727272727272727",
        "kpis": {
            "estimated_total": 0,
            "created_on": "",
            "last_updated_on": ""
        },
        "line_items": []
    }
}

Deleting an Order Note

Function: delete_order_note_uuid()

Purpose

This API deletes a single note attached to a regular order, identified by the order's ID and the note's UUID, via DELETE /api/v3/orders/{id}/notes/{noteUuid}. The system permanently removes the note (and its association with the parent order) and returns an empty success response. The note's UUID is the immutable identifier returned when the note is first created or retrieved through the order-notes endpoints. This is the destructive counterpart to the order-note add and retrieve endpoints, completing the standard CRUD lifecycle for order-level notes.

Parameters

Parameter nameTypeDescription
idStringThe unique ID of the order the note belongs to.
uuidStringThe UUID of the note to delete.

Use Case

Order notes accumulate over the life of an order: customer service comments, fulfilment instructions, internal escalations, and ad-hoc reminders. Over time, some notes become stale, incorrect, or contain information that should no longer be retained — for example, a note added in error, a note containing personally identifiable information that must be removed for compliance, or a duplicate created during a sync. Customer service supervisors, data stewards, and compliance teams need a clean way to remove individual notes without affecting the rest of the order's history. This endpoint scopes the deletion precisely to a single note via its UUID, leaving the order itself and all other notes intact. It is also useful in automated workflows that prune notes after a retention window or after they have been migrated to a different system.

Python
PHP
def test_delete_order_note_uuid():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.notes.delete_order_note_uuid(
            id="ORD-BD1LVA-0001",
            uuid="NOTE_UUID"
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testDeleteOrderNote()
{
    $orderId = "{order_id}";
    $noteUuid = "{note_uuid}";
    try {
        $response = $this->notesService->deleteOrderNote($orderId, $noteUuid, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

The function returns a dictionary with success: True and status_code: 204. The 204 status indicates that the operation completed successfully and there is no further content returned. This confirms the removal of the specified note from the order.

Python
PHP
{'SUCCESS': TRUE, 'STATUS_CODE': 204}
null

Activating an Order

Function: activate()

Purpose

This API activates an existing order that is currently in a non-active state — typically pending or held — via POST /api/v2/orders/{id}/activate. The request wraps the activation parameters under an order root key with a single field, the effective_date controlling when the activated lifecycle begins. The system transitions the order, kicks off any downstream side-effects (billing schedule recompute, fulfillment triggers, alert dispatches tied to activation events), and returns the post-activation state including the generated event_uuid for audit trail and the full order object reflecting its new status, version, and audit fields. The SDK exposes this through order.activate(id, request_data) accepting an OrderActivateRequestDTO and returning an OrderCancelResponseDTO (the same response shape is shared with cancel-style transitions).

Parameters

Parameter nameTypeDescription
idStringThe order ID to activate.

Use Case

Sales operations and customer success agents activate orders after upfront prerequisites are cleared — payment received, contract signed, customer onboarding completed, dependency activations resolved — and the order needs to begin its billable lifecycle on a specific date. Migration scripts use this endpoint to bulk-activate orders that were previously seeded in a held state during a tenant cutover. CRM integrations call it from approval workflows where activation is gated on an external signal. The endpoint is distinct from activate_draft (which transitions a draft quote to a real order) — activate operates on already-real orders that are simply not yet active.

Python
PHP
def test_order_activate():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        request_data = OrderActivateRequestDTO(
            order=OrderActivateDataDTO(effectiveDate="EFFECTIVE_DATE")
        )
        response = exsited_sdk.order.activate(id="ORDER_ID", request_data=request_data)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testActivate()
{
    $id = '{order_id}';
    $params = [
        "effective_date" => "{YYYY-MM-DD}"
    ];
    try {
        $response = $this->orderService->activate($params, $id, 'v2');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderCancelResponseDTO carrying the generated eventUuid for audit reference and the full updated order object as OrderDataDTO — including the new status, lifecycle dates, account binding, line items, totals, custom attributes, KPIs, and refreshed audit fields. Some tenant configurations may return only eventUuid without the embedded order block.

Python
PHP
OrderCancelResponseDTO(
    eventUuid='EVENT_UUID',
    order=OrderDataDTO(
        status='ORDER_STATUS',
        id='ORDER_ID',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        orderType='ORDER_TYPE',
        currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_NAME'),
        timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME'),
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_DATE',
        nextBillingFromDate='NEXT_BILLING_FROM_DATE',
        priceTaxInclusive='PRICE_TAX_INCLUSIVE',
        accountId='ACCOUNT_ID',
        accountName='ACCOUNT_NAME',
        createdBy='CREATED_BY',
        createdOn='CREATED_ON',
        lastUpdatedBy='LAST_UPDATED_BY',
        lastUpdatedOn='LAST_UPDATED_ON',
        uuid='ORDER_UUID',
        version='VERSION',
        lines=[
            OrderLineDTO(
                itemUuid='ITEM_UUID',
                itemId='ITEM_ID',
                itemName='ITEM_NAME',
                itemOrderQuantity='ITEM_ORDER_QUANTITY',
                itemChargeType='ITEM_CHARGE_TYPE',
                subtotal='LINE_SUBTOTAL',
                tax='LINE_TAX',
                total='LINE_TOTAL',
                version='LINE_VERSION'
            )
        ],
        subtotal='ORDER_SUBTOTAL',
        tax='ORDER_TAX',
        total='ORDER_TOTAL',
        customAttributes=[],
        kpis=KpisDTO(
            estimatedTotal=0,
            createdOn='CREATED_ON',
            lastUpdatedOn='LAST_UPDATED_ON'
        )
    )
)
{
  "event_uuid": "EVENT_UUID",
  "order": {
    "status": "ORDER_STATUS",
    "id": "ORDER_ID",
    "name": "ORDER_NAME",
    "display_name": "ORDER_DISPLAY_NAME",
    "description": "ORDER_DESCRIPTION",
    "order_type": "ORDER_TYPE",
    "currency": {
      "uuid": "CURRENCY_UUID",
      "name": "CURRENCY_NAME"
    },
    "time_zone": {
      "uuid": "TIMEZONE_UUID",
      "name": "TIMEZONE_NAME"
    },
    "billing_start_date": "BILLING_START_DATE",
    "order_start_date": "ORDER_START_DATE",
    "next_billing_from_date": "NEXT_BILLING_FROM_DATE",
    "price_tax_inclusive": "PRICE_TAX_INCLUSIVE",
    "account_id": "ACCOUNT_ID",
    "account_name": "ACCOUNT_NAME",
    "created_by": "CREATED_BY",
    "created_on": "CREATED_ON",
    "last_updated_by": "LAST_UPDATED_BY",
    "last_updated_on": "LAST_UPDATED_ON",
    "uuid": "ORDER_UUID",
    "version": "VERSION",
    "lines": [
      {
        "item_uuid": "ITEM_UUID",
        "item_id": "ITEM_ID",
        "item_name": "ITEM_NAME",
        "item_order_quantity": "ITEM_ORDER_QUANTITY",
        "item_charge_type": "ITEM_CHARGE_TYPE",
        "subtotal": "LINE_SUBTOTAL",
        "tax": "LINE_TAX",
        "total": "LINE_TOTAL",
        "version": "LINE_VERSION"
      }
    ],
    "subtotal": "ORDER_SUBTOTAL",
    "tax": "ORDER_TAX",
    "total": "ORDER_TOTAL",
    "custom_attributes": [],
    "kpis": {
      "estimated_total": 0,
      "created_on": "CREATED_ON",
      "last_updated_on": "LAST_UPDATED_ON"
    }
  }
}

Retrieving Payment Methods for an Order

Function: payment_methods()

Purpose

This API retrieves the full collection of payment methods bound to a specific order via GET /api/v3/orders/{id}/payment-methods. The request takes only the order ID as a path parameter — no body, no query parameters, no pagination. The system resolves every payment method scoped to the target order and returns them under an order.paymentMethods array. Each entry exposes processor classification (processorType, paymentProcessor), lifecycle and identity fields (status, default, reference, uuid, version), usage metrics (paymentCount, lastUsedOn, lastUsedResult, errorCountSinceLastSuccess), order-scoping flags (specifiedOrders, useForSpecifiedOrders), an embedded processor block for upstream gateway configuration, card-specific fields (cardType, token, cardNumber, expiryMonth, expiryYear, cardCvv, nameOnCard) when the method is a card, and full audit fields (createdBy, createdOn, lastUpdatedBy, lastUpdatedOn). The SDK exposes this through order.payment_methods(id) returning an OrderPaymentMethodsResponseDTO whose nested order.paymentMethods is a list of PaymentMethodsDataDTO. The endpoint is read-only, idempotent, and safe to poll.

Parameters

Parameter nameTypeDescription
idStringThe order ID whose payment methods are to be retrieved.

Use Case

Billing automation, dunning workflows, and customer service consoles routinely need an order-scoped read of payment methods rather than the broader account-level view. When an order has its own bound payment instrument — common when finance overrides the account default for a single subscription, or when useForSpecifiedOrders ties a method to a specific order set — this endpoint is the canonical way to fetch that scope. Collections officers poll it to detect orders whose default method has accumulated repeated failures (errorCountSinceLastSuccess rising), signalling a need to retry on a fallback or escalate. Self-service portals call it to render a payment-methods panel for a specific order without merging account-wide data client-side. Customer service agents use it during dispute investigations to confirm which card was on file and whether it had been recently rotated. Integrations syncing into external CRM, fraud-monitoring, or accounting systems consume it to keep downstream payment metadata aligned per order. The SDK function order.payment_methods() mirrors the .NET SDK's equivalent and lands the response into a typed DTO so callers can iterate response.order.paymentMethods directly without manual JSON parsing.

Python
PHP
def test_order_payment_methods():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.payment_methods(id="ORDER_ID")
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testReadPaymentMethods()
{
    $id = '{order_id}';
    try {
        $response = $this->orderService->readPaymentMethods($id, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderPaymentMethodsResponseDTO whose order field carries an OrderPaymentMethodDataDTO with a paymentMethods list. Each list entry is a PaymentMethodsDataDTO exposing processor classification, lifecycle and identity fields, usage metrics, order-scoping flags, an embedded processor configuration, optional card-specific fields, and audit fields. Card fields are populated when processorType indicates a card-based method; for non-card methods (e.g., bank transfer), card fields will be empty or absent. The DTO uses camelCase field names matching the API response — clients should bind directly without renaming.

Python
PHP
OrderPaymentMethodsResponseDTO(
    order=OrderPaymentMethodDataDTO(
        paymentMethods=[
            PaymentMethodsDataDTO(
                processorType='PROCESSOR_TYPE',
                paymentProcessor='PAYMENT_PROCESSOR',
                status='STATUS',
                default='IS_DEFAULT',
                reference='PAYMENT_METHOD_REFERENCE',
                paymentCount='PAYMENT_COUNT',
                lastUsedOn='LAST_USED_ON',
                createdBy='CREATED_BY',
                createdOn='CREATED_ON',
                lastUpdatedBy='LAST_UPDATED_BY',
                lastUpdatedOn='LAST_UPDATED_ON',
                uuid='PAYMENT_METHOD_UUID',
                version='VERSION',
                specifiedOrders=[],
                useForSpecifiedOrders='USE_FOR_SPECIFIED_ORDERS',
                processor=PaymentProcessorDetailsDTO(),
                cardType='CARD_TYPE',
                token='CARD_TOKEN',
                cardNumber='MASKED_CARD_NUMBER',
                expiryMonth='EXPIRY_MONTH',
                expiryYear='EXPIRY_YEAR',
                cardCvv='CARD_CVV',
                nameOnCard='NAME_ON_CARD',
                lastUsedResult='LAST_USED_RESULT',
                errorCountSinceLastSuccess='ERROR_COUNT_SINCE_LAST_SUCCESS'
            )
        ]
    )
)
{
    "order": {
        "paymentMethods": [
            {
                "processorType": "PROCESSOR_TYPE",
                "paymentProcessor": "PAYMENT_PROCESSOR",
                "status": "STATUS",
                "default": "DEFAULT",
                "reference": "REFERENCE",
                "paymentCount": "PAYMENT_COUNT",
                "lastUsedOn": "LAST_USED_ON",
                "createdBy": "CREATED_BY",
                "createdOn": "CREATED_ON",
                "lastUpdatedBy": "LAST_UPDATED_BY",
                "lastUpdatedOn": "LAST_UPDATED_ON",
                "uuid": "UUID",
                "version": "VERSION",
                "specifiedOrders": [],
                "useForSpecifiedOrders": "USE_FOR_SPECIFIED_ORDERS",
                "processor": {},
                "cardType": "CARD_TYPE",
                "token": "TOKEN",
                "cardNumber": "CARD_NUMBER",
                "expiryMonth": "EXPIRY_MONTH",
                "expiryYear": "EXPIRY_YEAR",
                "cardCvv": "CARD_CVV",
                "nameOnCard": "NAME_ON_CARD",
                "lastUsedResult": "LAST_USED_RESULT",
                "errorCountSinceLastSuccess": "ERROR_COUNT_SINCE_LAST_SUCCESS"
            }
        ]
    }
}

Converting a Quote to an Order

Function: convert_to_order()

Purpose

This API converts a quote-typed order into a regular billable order via POST /api/v2/orders/{id}/convert_to_order. The request takes only the source order ID as a path parameter — no body, no query parameters. The system promotes the quote, generates the live order record, copies line items with pricing snapshot and tax configuration, and returns the post-conversion state under an order wrapper. The response also carries an eventUuid correlation token for the lifecycle event and an operation marker describing the action performed. The SDK exposes this through order.convert_to_order(id) returning an OrderDetailsDTO. The conversion is one-way and cannot be reversed through this endpoint — once the call lands, the source quote is gone and the live order is in place.

Parameters

Parameter nameTypeDescription
idStringThe quote-typed order ID to convert into a regular order.

Use Case

Quote-to-order conversion is the canonical handoff between sales and operations: until conversion lands, the record is a negotiable quote tied to proposal workflows; after conversion, it is a live order tied to billing schedules, fulfillment, and downstream automation. Sales operations call this endpoint when a customer formally accepts a quote and the deal needs to enter the active billing pipeline. CRM integrations invoke it from approval flows where the conversion is gated on an external signal — signed contract uploaded, deposit cleared, manager approval recorded. Migration scripts use it during tenant cutovers to bulk-promote pre-seeded quotes into orders aligned with the agreed activation schedule. Returning the freshly converted record in the response means the calling client can refresh its UI in a single round-trip without a follow-up GET, avoiding race conditions where the rendered view could otherwise show stale quote state immediately after conversion. The SDK function order.convert_to_order() mirrors the .NET SDK's ConvertToOrderAsync() and the PHP SDK's OrderData->convertToOrder(), lending parity across language clients for sales-ops automation.

Python
PHP
def test_order_convert_to_order():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.convert_to_order(id="ORDER_ID")
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testConvertToOrder()
{
    $id = '{order_id}';
    try {
        $response = $this->orderService->convertToOrder($id, 'v2');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderDetailsDTO carrying the resolved OrderDataDTO under the order field, plus eventUuid and operation correlation tokens for the conversion lifecycle event. The embedded order block exposes lifecycle status, identity fields, currency and time zone references, billing/start/next-billing dates, account binding, line items copied from the source quote with pricing snapshot and tax configuration, totals, custom attributes, KPIs, audit fields, UUID, and version. Errors follow the standard envelope: 404 if the order ID does not exist, 409/422 if the source order is not in a convertible state (already converted, wrong order type), 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
OrderDetailsDTO(
    eventUuid='EVENT_UUID',
    operation='OPERATION',
    order=OrderDataDTO(
        status='ORDER_STATUS',
        id='ORDER_ID',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        orderType='ORDER_TYPE',
        currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_NAME'),
        timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME'),
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_DATE',
        nextBillingFromDate='NEXT_BILLING_FROM_DATE',
        priceTaxInclusive='PRICE_TAX_INCLUSIVE',
        accountId='ACCOUNT_ID',
        accountName='ACCOUNT_NAME',
        createdBy='CREATED_BY',
        createdOn='CREATED_ON',
        lastUpdatedBy='LAST_UPDATED_BY',
        lastUpdatedOn='LAST_UPDATED_ON',
        uuid='ORDER_UUID',
        version='VERSION',
        lines=[
            OrderLineDTO(
                itemUuid='ITEM_UUID',
                itemId='ITEM_ID',
                itemName='ITEM_NAME',
                itemOrderQuantity='ITEM_ORDER_QUANTITY',
                itemChargeType='ITEM_CHARGE_TYPE',
                subtotal='LINE_SUBTOTAL',
                tax='LINE_TAX',
                total='LINE_TOTAL',
                version='LINE_VERSION'
            )
        ],
        subtotal='ORDER_SUBTOTAL',
        tax='ORDER_TAX',
        total='ORDER_TOTAL',
        customAttributes=[],
        kpis=KpisDTO(
            estimatedTotal=0,
            createdOn='CREATED_ON',
            lastUpdatedOn='LAST_UPDATED_ON'
        )
    )
)
{
    "event_uuid": "EVENT_UUID",
    "operation": "OPERATION",
    "order": {
        "status": "ORDER_STATUS",
        "id": "ORDER_ID",
        "name": "ORDER_NAME",
        "display_name": "ORDER_DISPLAY_NAME",
        "description": "ORDER_DESCRIPTION",
        "order_type": "ORDER_TYPE",
        "currency": {
            "uuid": "CURRENCY_UUID",
            "name": "CURRENCY_NAME"
        },
        "time_zone": {
            "uuid": "TIMEZONE_UUID",
            "name": "TIMEZONE_NAME"
        },
        "billing_start_date": "BILLING_START_DATE",
        "order_start_date": "ORDER_START_DATE",
        "next_billing_from_date": "NEXT_BILLING_FROM_DATE",
        "price_tax_inclusive": "PRICE_TAX_INCLUSIVE",
        "account_id": "ACCOUNT_ID",
        "account_name": "ACCOUNT_NAME",
        "created_by": "CREATED_BY",
        "created_on": "CREATED_ON",
        "last_updated_by": "LAST_UPDATED_BY",
        "last_updated_on": "LAST_UPDATED_ON",
        "uuid": "ORDER_UUID",
        "version": "VERSION",
        "lines": [
            {
                "item_uuid": "ITEM_UUID",
                "item_id": "ITEM_ID",
                "item_name": "ITEM_NAME",
                "item_order_quantity": "ITEM_ORDER_QUANTITY",
                "item_charge_type": "ITEM_CHARGE_TYPE",
                "subtotal": "LINE_SUBTOTAL",
                "tax": "LINE_TAX",
                "total": "LINE_TOTAL",
                "version": "LINE_VERSION"
            }
        ],
        "subtotal": "ORDER_SUBTOTAL",
        "tax": "ORDER_TAX",
        "total": "ORDER_TOTAL",
        "custom_attributes": [],
        "kpis": {
            "estimated_total": 0,
            "created_on": "CREATED_ON",
            "last_updated_on": "LAST_UPDATED_ON"
        }
    }
}

Listing Orders for a Specific Account

Function: account_list()

Purpose

This API retrieves the paginated list of orders bound to a specific account via GET /api/v3/accounts/{id}/orders. The request takes the account ID as a path parameter plus optional pagination and sorting controls (limit, offset, direction, order_by, query_params). The system resolves every order owned by the target account and returns them under an accounts.orders array, each entry exposing lifecycle status, identity, currency and time zone references, billing/start dates, totals, line items, custom attributes, KPIs, audit fields, UUID, and version. The SDK exposes this through order.account_list(id, limit, offset, direction, order_by, query_params) returning an AccountOrdersResponseDTO. The endpoint is read-only, idempotent, and safe to poll.

Parameters

Parameter nameTypeDescription
idStringAccount ID whose orders are to be retrieved.
limitIntegerOptional. Maximum number of orders to return.
offsetIntegerOptional. Number of records to skip for pagination.
directionSortDirectionOptional. Sort direction (asc/desc).

Use Case

Account-scoped order lists drive a wide range of customer-facing and back-office workflows. Customer service consoles render an account's order history when an agent opens the account record, with pagination controls for accounts that have hundreds of orders. Self-service portals call this endpoint to populate the customer's "My Orders" page without merging from a global order feed. Collections officers pull the list to identify which orders contribute to an outstanding balance and prioritise follow-up. Account managers reviewing churn or expansion accounts use it to reconstruct the ordering pattern over time. Integration platforms syncing into external CRM, accounting, or data warehousing systems consume it to keep downstream order data per account aligned with the source of truth in Exsited. The pagination and sort controls let callers iterate through long-running customer histories or fetch the most recent orders first for quick rendering. The SDK function order.account_list() mirrors the .NET SDK's ReadAccountOrdersAsync() and the PHP SDK's OrderData->readAccountOrders(), lending parity across language clients for account-history workflows.

Python
PHP
def test_get_order_by_account():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        response = exsited_sdk.order.account_list(id="ACCOUNT_ID", limit=10)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testReadAccountOrders()
{
    $accountID = '{account_id}';
    try {
        $response = $this->orderService->readAccountOrders($accountID, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an AccountOrdersResponseDTO carrying the resolved account-scoped order list. The wrapper exposes accounts with a nested orders array — each list entry an OrderDataDTO with lifecycle status, identity fields, currency and time zone references, billing/start/next-billing dates, account binding, line items with pricing snapshot and tax configuration, totals, custom attributes, KPIs, audit fields, UUID, and version. Pagination metadata is delivered alongside the orders array — the SDK exposes records, limit, offset, previous/next page URLs through the same DTO. Errors follow the standard envelope: 404 if the account ID does not exist, 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
AccountOrdersResponseDTO(
    accounts=AccountOrdersDataDTO(
        orders=[
            OrderDataDTO(
                status='ORDER_STATUS',
                id='ORDER_ID',
                name='ORDER_NAME',
                displayName='ORDER_DISPLAY_NAME',
                description='ORDER_DESCRIPTION',
                orderType='ORDER_TYPE',
                currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_NAME'),
                timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME'),
                billingStartDate='BILLING_START_DATE',
                orderStartDate='ORDER_START_DATE',
                nextBillingFromDate='NEXT_BILLING_FROM_DATE',
                priceTaxInclusive='PRICE_TAX_INCLUSIVE',
                accountId='ACCOUNT_ID',
                accountName='ACCOUNT_NAME',
                createdBy='CREATED_BY',
                createdOn='CREATED_ON',
                lastUpdatedBy='LAST_UPDATED_BY',
                lastUpdatedOn='LAST_UPDATED_ON',
                uuid='ORDER_UUID',
                version='VERSION',
                lines=[
                    OrderLineDTO(
                        itemUuid='ITEM_UUID',
                        itemId='ITEM_ID',
                        itemName='ITEM_NAME',
                        itemOrderQuantity='ITEM_ORDER_QUANTITY',
                        itemChargeType='ITEM_CHARGE_TYPE',
                        subtotal='LINE_SUBTOTAL',
                        tax='LINE_TAX',
                        total='LINE_TOTAL',
                        version='LINE_VERSION'
                    )
                ],
                subtotal='ORDER_SUBTOTAL',
                tax='ORDER_TAX',
                total='ORDER_TOTAL',
                customAttributes=[],
                kpis=KpisDTO(
                    estimatedTotal=0,
                    createdOn='CREATED_ON',
                    lastUpdatedOn='LAST_UPDATED_ON'
                )
            )
        ],
        pagination=PaginationDTO(
            records='TOTAL_RECORDS',
            limit='PAGE_LIMIT',
            offset='PAGE_OFFSET',
            previousPage='PREVIOUS_PAGE_URL',
            nextPage='NEXT_PAGE_URL'
        )
    )
)
{
  "account": {
    "orders": [
      {
        "status": "status",
        "id": "order_id",
        "pre_order": "boolean",
        "quote_order": "boolean",
        "name": "order_name",
        "display_name": "display_name",
        "description": "description",
        "manager": "manager_name",
        "referral_account": "referral_account",
        "customer_purchase_order_id": "customer_po_id",
        "shipping_profile": {},
        "shipping_cost": "shipping_cost",
        "discount_profile": "discount_profile",
        "origin": "origin",
        "custom_forms": {
          "uuid": "form_uuid",
          "name": "form_name"
        },
        "currency": {
          "uuid": "currency_uuid",
          "name": "currency_name",
          "link": "currency_link"
        },
        "time_zone": {
          "uuid": "timezone_uuid",
          "name": "timezone_name",
          "link": "timezone_link"
        },
        "invoice_note": "invoice_note",
        "communication_preference": [
          {
            "media": "communication_media",
            "isEnabled": "boolean"
          }
        ],
        "billing_start_date": "billing_start_date",
        "order_start_date": "order_start_date",
        "next_billing_from_date": "next_billing_from_date",
        "price_tax_inclusive": "boolean",
        "billing_address": {},
        "shipping_address": {},
        "created_by": "created_by",
        "created_on": "created_on",
        "last_updated_by": "last_updated_by",
        "last_updated_on": "last_updated_on",
        "uuid": "order_uuid",
        "version": "version",
        "account_id": "account_id",
        "account_name": "account_name",
        "allow_contract": "boolean",
        "custom_attributes": [
          {
            "name": "attribute_name",
            "value": "attribute_value"
          }
        ],
        "custom_objects": [],
        "currency_id": "currency_id",
        "properties": {
          "communication_profile": "communication_profile",
          "invoice_mode": "invoice_mode",
          "invoice_term": "invoice_term",
          "billing_period": "billing_period",
          "consolidate_invoice": "boolean",
          "payment_processor": "payment_processor",
          "payment_mode": "payment_mode",
          "payment_term": "payment_term",
          "payment_term_alignment": "payment_term_alignment",
          "fulfillment_mode": "fulfillment_mode",
          "fulfillment_term": "fulfillment_term"
        },
        "invoice_id": "invoice_id",
        "lines": [
          {
            "item_serial_or_batch_number": "serial_or_batch_number",
            "charge_item_uuid": "charge_item_uuid",
            "item_uuid": "item_uuid",
            "item_id": "item_id",
            "item_name": "item_name",
            "item_order_quantity": "item_order_quantity",
            "shipping_cost": "shipping_cost",
            "item_invoice_note": "item_invoice_note",
            "item_description": "item_description",
            "item_type": "item_type",
            "item_charge_type": "item_charge_type",
            "item_custom_attributes": [],
            "item_price_snapshot": {
              "pricing_rule": {
                "uuid": "pricing_rule_uuid",
                "version": "pricing_version",
                "price_type": "price_type",
                "price": "price",
                "uom": "uom",
                "pricing_method": "pricing_method",
                "warehouse": "warehouse"
              }
            },
            "item_sale_tax_configuration": {
              "sale_price_is_based_on": "sale_price_basis",
              "tax_code": {
                "uuid": "tax_uuid",
                "code": "tax_code",
                "rate": "tax_rate",
                "link": "tax_link"
              }
            },
            "isTaxExemptWhenSold": "boolean",
            "item_price_tax": {
              "uuid": "tax_uuid",
              "code": "tax_code",
              "rate": "tax_rate",
              "link": "tax_link"
            },
            "item_accounting_code": {
              "sales_revenue": "sales_revenue_code"
            },
            "version": "version",
            "expected_delivery_date": "expected_delivery_date",
            "purchase_order_id": "purchase_order_id",
            "purchase_invoice_id": "purchase_invoice_id",
            "discount": "discount",
            "total": "total",
            "subtotal": "subtotal",
            "tax": "tax"
          }
        ],
        "total": "total",
        "subtotal": "subtotal",
        "tax": "tax",
        "kpis": {
          "start_date": "start_date",
          "estimated_total": "estimated_total",
          "total_revenue": "total_revenue",
          "monthly_recurring_revenue": "mrr",
          "total_collected": "total_collected",
          "total_outstanding": "total_outstanding",
          "total_due": "total_due"
        },
        "line_items": []
      }
    ],
    "pagination": {
      "records": "records",
      "limit": "limit",
      "offset": "offset",
      "previous_page": "previous_page",
      "next_page": "next_page"
    }
  }
}

Previewing an Order Change

Function: change_preview()

Purpose

This API simulates the impact of a proposed order change without committing it via POST /api/v2/orders/{id}/change/preview. The request takes the order ID as a path parameter plus an OrderChangePreviewRequestDTO wrapping the proposed change — an effective_date, a list of OrderChangePreviewLineDTO operations (each with op, charge_item_uuid, optional new quantity and pricing snapshot), and an optional OrderChangePreviewPropertiesDTO for order-level adjustments such as billing_period. The system simulates the change against the live order state and returns the post-change projection wrapped under a preview key, accompanied by an operation marker. The SDK exposes this through order.change_preview(order_id, request_data) returning an OrderChangePreviewResponseDTO. The endpoint is read-only on the live order — no persisted state changes — and safe to call repeatedly while iterating on a proposed change.

Parameters

Parameter nameTypeDescription
order_idStringThe order ID whose change is being previewed.

Use Case

Order amendments are high-stakes operations: changing a quantity, swapping a price, or adjusting a billing period can ripple through invoices, revenue recognition, and customer-facing totals in ways difficult to undo cleanly. Sales-ops, customer success, and finance teams rely on a preview step to surface those downstream effects before committing the change. Self-service portals call this endpoint when a customer adjusts a subscription so the UI can show the new totals, prorations, and next-billing impact alongside a confirmation button — only after explicit acceptance does the client invoke the matching change endpoint to persist the amendment. CRM workflows pipe proposed changes through the preview to validate that pricing logic, tax configuration, and billing cadence behave as expected before pushing the change live. Integrations syncing from external systems use the preview to confirm a translated change request resolves cleanly on the Exsited side, avoiding partial commits if any line item fails validation. Because the response carries the same shape as a full order details fetch, callers can render the projected order state with existing rendering logic without a separate code path.

Python
PHP
def test_order_change_preview():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        change_line = OrderChangePreviewLineDTO(
            op="change",
            uuid="CHARGE_ITEM_UUID",
            itemOrderQuantity="ITEM_ORDER_QUANTITY"
        )

        properties = OrderChangePreviewPropertiesDTO(billingPeriod="BILLING_PERIOD")

        order_data = OrderChangePreviewRequestDataDTO(
            effectiveDate="EFFECTIVE_DATE",
            lines=[change_line],
            properties=properties
        )

        request_data = OrderChangePreviewRequestDTO(order=order_data)

        response = exsited_sdk.order.change_preview(
            order_id="ORDER_UUID",
            request_data=request_data
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testChangePreview()
{
    $id = '{order_id}';
    $params = [
        "order" => [
            "effective_date" => "{YYYY-MM-DD}",
            "properties" => [
                "billing_period" => "{period}"
            ],
            "lines" => [
                [
                    "op" => "change",
                    "uuid" => "{line_uuid}",
                    "item_order_quantity" => "{quantity}",
                    "item_price_snapshot" => [
                        "pricing_rule" => [
                            "price" => "{price}"
                        ]
                    ]
                ]
            ]
        ]
    ];
    try {
        $response = $this->orderService->changePreview($params, $id, 'v2');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderChangePreviewResponseDTO carrying the post-change projection under the preview field as an OrderDataDTO, plus an operation marker describing the simulated lifecycle event. The embedded preview block exposes lifecycle status, identity fields, currency and time zone references, billing/start/next-billing dates, account binding, properties block reflecting the proposed change, line items with updated pricing snapshot and tax configuration, totals, KPIs, audit fields, UUID, and version. No persisted state changes occur on the live order. Errors follow the standard envelope: 404 if the order ID does not exist, 422 for validation failures (invalid charge_item_uuid, malformed effective_date, conflicting line operations), 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
OrderChangePreviewResponseDTO(
    operation='OPERATION',
    preview=OrderDataDTO(
        status='ORDER_STATUS',
        id='ORDER_ID',
        uuid='ORDER_UUID',
        version='VERSION',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        orderType='ORDER_TYPE',
        currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_NAME', link='CURRENCY_LINK'),
        timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME', link='TIMEZONE_LINK'),
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_DATE',
        nextBillingFromDate='NEXT_BILLING_FROM_DATE',
        priceTaxInclusive='PRICE_TAX_INCLUSIVE',
        accountId='ACCOUNT_ID',
        accountName='ACCOUNT_NAME',
        properties=OrderPropertiesDTO(
            billingPeriod='BILLING_PERIOD',
            invoiceMode='INVOICE_MODE',
            invoiceTerm='INVOICE_TERM',
            paymentProcessor='PAYMENT_PROCESSOR',
            paymentMode='PAYMENT_MODE',
            paymentTerm='PAYMENT_TERM',
            fulfillmentMode='FULFILLMENT_MODE',
            fulfillmentTerm='FULFILLMENT_TERM'
        ),
        lines=[
            OrderLineDTO(
                chargeItemUuid='CHARGE_ITEM_UUID',
                itemUuid='ITEM_UUID',
                itemId='ITEM_ID',
                itemName='ITEM_NAME',
                itemOrderQuantity='ITEM_ORDER_QUANTITY',
                itemChargeType='ITEM_CHARGE_TYPE',
                itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                    pricingRule=OrderItemPricingRuleDTO(
                        uuid='PRICING_RULE_UUID',
                        version='PRICING_VERSION',
                        priceType='PRICE_TYPE',
                        price='PRICE',
                        uom='UOM'
                    )
                ),
                itemPriceTax=TaxDTO(uuid='TAX_UUID', code='TAX_CODE', rate='TAX_RATE', link='TAX_LINK'),
                subtotal='LINE_SUBTOTAL',
                tax='LINE_TAX',
                total='LINE_TOTAL',
                version='LINE_VERSION'
            )
        ],
        subtotal='ORDER_SUBTOTAL',
        tax='ORDER_TAX',
        total='ORDER_TOTAL',
        kpis=KpisDTO(
            estimatedTotal=0,
            createdOn='CREATED_ON',
            lastUpdatedOn='LAST_UPDATED_ON'
        )
    )
)
{
    "operation": "OPERATION",
    "preview": {
        "status": "ORDER_STATUS",
        "id": "ORDER_ID",
        "uuid": "ORDER_UUID",
        "version": "VERSION",
        "name": "ORDER_NAME",
        "display_name": "ORDER_DISPLAY_NAME",
        "description": "ORDER_DESCRIPTION",
        "order_type": "ORDER_TYPE",
        "currency": {
            "uuid": "CURRENCY_UUID",
            "name": "CURRENCY_NAME",
            "link": "CURRENCY_LINK"
        },
        "time_zone": {
            "uuid": "TIMEZONE_UUID",
            "name": "TIMEZONE_NAME",
            "link": "TIMEZONE_LINK"
        },
        "billing_start_date": "BILLING_START_DATE",
        "order_start_date": "ORDER_START_DATE",
        "next_billing_from_date": "NEXT_BILLING_FROM_DATE",
        "price_tax_inclusive": "PRICE_TAX_INCLUSIVE",
        "account_id": "ACCOUNT_ID",
        "account_name": "ACCOUNT_NAME",
        "properties": {
            "billing_period": "BILLING_PERIOD",
            "invoice_mode": "INVOICE_MODE",
            "invoice_term": "INVOICE_TERM",
            "payment_processor": "PAYMENT_PROCESSOR",
            "payment_mode": "PAYMENT_MODE",
            "payment_term": "PAYMENT_TERM",
            "fulfillment_mode": "FULFILLMENT_MODE",
            "fulfillment_term": "FULFILLMENT_TERM"
        },
        "lines": [
            {
                "charge_item_uuid": "CHARGE_ITEM_UUID",
                "item_uuid": "ITEM_UUID",
                "item_id": "ITEM_ID",
                "item_name": "ITEM_NAME",
                "item_order_quantity": "ITEM_ORDER_QUANTITY",
                "item_charge_type": "ITEM_CHARGE_TYPE",
                "item_price_snapshot": {
                    "pricing_rule": {
                        "uuid": "PRICING_RULE_UUID",
                        "version": "PRICING_VERSION",
                        "price_type": "PRICE_TYPE",
                        "price": "PRICE",
                        "uom": "UOM"
                    }
                },
                "item_price_tax": {
                    "uuid": "TAX_UUID",
                    "code": "TAX_CODE",
                    "rate": "TAX_RATE",
                    "link": "TAX_LINK"
                },
                "subtotal": "LINE_SUBTOTAL",
                "tax": "LINE_TAX",
                "total": "LINE_TOTAL",
                "version": "LINE_VERSION"
            }
        ],
        "subtotal": "ORDER_SUBTOTAL",
        "tax": "ORDER_TAX",
        "total": "ORDER_TOTAL",
        "kpis": {
            "estimated_total": 0,
            "created_on": "CREATED_ON",
            "last_updated_on": "LAST_UPDATED_ON"
        }
    }
}

Upgrading an Order

Function: upgrade()

Purpose

This API upgrades an active order to a higher-tier plan or package via POST /api/v3/orders/{id}/upgrade. The request takes the order ID as a path parameter plus an OrderUpgradeDTO carrying effectiveDate, optional effectiveImmediately/redemptionCode/discountPercentage/discountAmount/billingPeriod, a list of OrderLineDTO describing the new pricing snapshot for each upgraded charge item, and an optional list of UpgradeDowngradePaymentInformationDTO settling any prorated charge. The system applies the upgrade and returns the post-upgrade record under an order wrapper accompanied by eventUuid and operation correlation tokens. The SDK exposes this through order.upgrade(order_id, request_data) returning an OrderDetailsDTO. Distinct from the upgrade preview which simulates without persisting.

Parameters

Parameter nameTypeDescription
order_idStringThe order ID being upgraded.

Use Case

Plan upgrades are the most common revenue-expansion motion for subscription products: customers move from basic to pro, add seats, swap to higher service levels, or activate premium features. This SDK function is the canonical commit point for those transitions. Self-service portals call it after the customer accepts the upgrade quote rendered from the matching upgrade-preview response. Sales-ops and customer success automation triggers it from CRM workflows when an account hits an expansion trigger — usage threshold, contract renewal, manual upsell. Migration scripts use it during tenant cutovers to bulk-upgrade orders that need to land on a new plan structure aligned with the agreed activation schedule. The redemptionCode, discountPercentage, and discountAmount fields support promotional pricing during the upgrade, while paymentInformation lets callers settle any prorated charge in the same call rather than chaining a separate payment request.

Python
PHP
def test_order_family_upgrade():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_line = OrderLineDTO(
            chargeItemUuid="CHARGE_ITEM_UUID",
            itemUuid="ITEM_UUID",
            packageName="PACKAGE_NAME",
            quantity="QUANTITY",
            itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                pricingRule=OrderItemPricingRuleDTO(price="PRICE")
            ),
            isTaxExemptWhenSold="false"
        )

        request_data = OrderUpgradeDTO(
            effectiveDate="EFFECTIVE_DATE",
            lines=[order_line]
        )

        response = exsited_sdk.order.upgrade(order_id="ORDER_ID", request_data=request_data)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testUpgrade()
{
    $id = '{order_id}';
    $params = [
        "effective_date" => "{YYYY-MM-DD}",
        "effective_immediately" => true,
        "billing_period" => "{period}",
        "note" => "{note}",
        "lines" => [
            [
                "charge_item_uuid" => "{charge_item_uuid}",
                "package_name" => "{package_name}",
                "quantity" => "{quantity}",
                "item_price_snapshot" => [
                    "pricing_rule" => [
                        "price" => "{price}"
                    ]
                ],
                "discount" => "{discount}",
                "shipping_cost" => "{shipping_cost}",
                "uom" => "{uom}",
                "warehouse" => "{warehouse}",
                "is_tax_exempt_when_sold" => "false",
                "item_price_tax" => [
                    "uuid" => "{tax_uuid}",
                    "code" => "{tax_code}",
                    "rate" => "{tax_rate}"
                ],
                "accounting_code" => "{accounting_code}",
                "item_invoice_note" => "{invoice_note}",
                "item_description" => "{description}",
                "item_custom_attributes" => [
                    ["name" => "{attr_name}", "value" => "{attr_value}"]
                ]
            ]
        ]
    ];

    try {
        $response = $this->orderService->upgrade($id, $params);
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderDetailsDTO carrying the resolved OrderDataDTO under the order field plus eventUuid and operation correlation tokens for the upgrade lifecycle event. The embedded order block exposes lifecycle status, identity fields, currency and time zone references, billing/start/next-billing dates, account binding, line items reflecting the upgraded pricing snapshot, totals, KPIs, audit fields, UUID, and version. Errors follow the standard envelope: 404 if the order ID does not exist, 422 for validation failures (invalid charge_item_uuid, malformed effective_date, unsupported upgrade path), 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
OrderDetailsDTO(
    eventUuid='EVENT_UUID',
    operation='OPERATION',
    order=OrderDataDTO(
        status='ORDER_STATUS',
        id='ORDER_ID',
        uuid='ORDER_UUID',
        version='VERSION',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        orderType='ORDER_TYPE',
        currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_NAME'),
        timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME'),
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_DATE',
        nextBillingFromDate='NEXT_BILLING_FROM_DATE',
        priceTaxInclusive='PRICE_TAX_INCLUSIVE',
        accountId='ACCOUNT_ID',
        accountName='ACCOUNT_NAME',
        createdBy='CREATED_BY',
        createdOn='CREATED_ON',
        lastUpdatedBy='LAST_UPDATED_BY',
        lastUpdatedOn='LAST_UPDATED_ON',
        lines=[
            OrderLineDTO(
                itemUuid='ITEM_UUID',
                itemId='ITEM_ID',
                itemName='ITEM_NAME',
                itemOrderQuantity='ITEM_ORDER_QUANTITY',
                itemChargeType='ITEM_CHARGE_TYPE',
                subtotal='LINE_SUBTOTAL',
                tax='LINE_TAX',
                total='LINE_TOTAL',
                version='LINE_VERSION'
            )
        ],
        subtotal='ORDER_SUBTOTAL',
        tax='ORDER_TAX',
        total='ORDER_TOTAL',
        kpis=KpisDTO(estimatedTotal=0, createdOn='CREATED_ON', lastUpdatedOn='LAST_UPDATED_ON')
    )
)
{
    "event_uuid": "EVENT_UUID",
    "operation": "OPERATION",
    "order": {
        "status": "ORDER_STATUS",
        "id": "ORDER_ID",
        "uuid": "ORDER_UUID",
        "version": "VERSION",
        "name": "ORDER_NAME",
        "display_name": "ORDER_DISPLAY_NAME",
        "description": "ORDER_DESCRIPTION",
        "order_type": "ORDER_TYPE",
        "currency": {
            "uuid": "CURRENCY_UUID",
            "name": "CURRENCY_NAME"
        },
        "time_zone": {
            "uuid": "TIMEZONE_UUID",
            "name": "TIMEZONE_NAME"
        },
        "billing_start_date": "BILLING_START_DATE",
        "order_start_date": "ORDER_START_DATE",
        "next_billing_from_date": "NEXT_BILLING_FROM_DATE",
        "price_tax_inclusive": "PRICE_TAX_INCLUSIVE",
        "account_id": "ACCOUNT_ID",
        "account_name": "ACCOUNT_NAME",
        "created_by": "CREATED_BY",
        "created_on": "CREATED_ON",
        "last_updated_by": "LAST_UPDATED_BY",
        "last_updated_on": "LAST_UPDATED_ON",
        "lines": [
            {
                "item_uuid": "ITEM_UUID",
                "item_id": "ITEM_ID",
                "item_name": "ITEM_NAME",
                "item_order_quantity": "ITEM_ORDER_QUANTITY",
                "item_charge_type": "ITEM_CHARGE_TYPE",
                "subtotal": "LINE_SUBTOTAL",
                "tax": "LINE_TAX",
                "total": "LINE_TOTAL",
                "version": "LINE_VERSION"
            }
        ],
        "subtotal": "ORDER_SUBTOTAL",
        "tax": "ORDER_TAX",
        "total": "ORDER_TOTAL",
        "kpis": {
            "estimated_total": 0,
            "created_on": "CREATED_ON",
            "last_updated_on": "LAST_UPDATED_ON"
        }
    }
}

Previewing an Order Upgrade

Function: upgrade_preview()

Purpose

This API simulates the financial impact of a proposed upgrade without committing it via POST /api/v3/orders/{id}/upgrade/preview. The request takes the order ID as a path parameter plus an OrderUpgradePreviewDTO carrying effectiveDate, optional discount and promotional fields, lines describing the new pricing snapshot, optional paymentInformation, and an optional OrderPropertiesDTO for order-level adjustments. The system simulates the upgrade against the live order state and returns a slim totals projection under a preview field. The SDK exposes this through order.upgrade_preview(order_id, request_data) returning an OrderUpgradeDowngradeDTO. Read-only on the live order — no persisted state changes — and safe to repeat while iterating on a proposed upgrade.

Parameters

Parameter nameTypeDescription
order_idStringThe order ID whose upgrade is being previewed.

Use Case

Plan upgrades change customer-facing totals in non-trivial ways: prorated charges, swapped pricing rules, new billing cadences, and applied discounts all combine to produce a new total customers and operators want to see before committing. Self-service portals call this SDK function when a user picks a higher tier so the UI can render the projected new total, the prorated amount due now, and the post-upgrade billing structure alongside a confirmation button — only after explicit acceptance does the client invoke the matching upgrade method to persist. Sales-ops automation pipes proposed upgrades through the preview to validate that promotional codes resolve cleanly and that the resulting total matches what the operator quoted manually. CRM integrations use it to refresh expansion forecasts during pipeline reviews. Because the response is a slim totals object rather than a full order record, the call is fast and cheap to repeat as the user iterates on quantity or package selection.

Python
PHP
def test_order_family_upgrade_preview():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_line = OrderLineDTO(
            chargeItemUuid="CHARGE_ITEM_UUID",
            itemUuid="ITEM_UUID",
            packageName="PACKAGE_NAME",
            quantity="QUANTITY",
            itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                pricingRule=OrderItemPricingRuleDTO(price="PRICE")
            ),
            isTaxExemptWhenSold="false"
        )

        request_data = OrderUpgradePreviewDTO(
            effectiveDate="EFFECTIVE_DATE",
            lines=[order_line]
        )

        response = exsited_sdk.order.upgrade_preview(order_id="ORDER_ID", request_data=request_data)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testUpgradePreview()
{
    $id = '{order_id}';
    $params = [
        "effective_date" => "{YYYY-MM-DD}",
        "effective_immediately" => true,
        "billing_period" => "{period}",
        "note" => "{note}",
        "lines" => [
            [
                "charge_item_uuid" => "{charge_item_uuid}",
                "package_name" => "{package_name}",
                "quantity" => "{quantity}",
                "item_price_snapshot" => [
                    "pricing_rule" => [
                        "price" => "{price}"
                    ]
                ],
                "discount" => "{discount}",
                "shipping_cost" => "{shipping_cost}",
                "uom" => "{uom}",
                "warehouse" => "{warehouse}",
                "is_tax_exempt_when_sold" => "false",
                "item_price_tax" => [
                    "uuid" => "{tax_uuid}",
                    "code" => "{tax_code}",
                    "rate" => "{tax_rate}"
                ],
                "accounting_code" => "{accounting_code}",
                "item_invoice_note" => "{invoice_note}",
                "item_description" => "{description}",
                "item_custom_attributes" => [
                    ["name" => "{attr_name}", "value" => "{attr_value}"]
                ]
            ]
        ]
    ];

    try {
        $response = $this->orderService->upgradePreview($id, $params);
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderUpgradeDowngradeDTO carrying a UpgradeDowngradePreviewDTO under the preview field plus an operation marker for the simulated event. The preview block exposes subTotal, taxTotal, discountTotal, shippingTotal, total, currency, oldTotal (pre-upgrade total for comparison), totalChanged (the delta), and totalDue (the prorated amount payable now). No persisted state changes occur on the live order. Errors follow the standard envelope: 404 if the order ID does not exist, 422 for validation failures, 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
OrderUpgradeDowngradeDTO(
    operation='OPERATION',
    preview=UpgradeDowngradePreviewDTO(
        subTotal='SUB_TOTAL',
        taxTotal='TAX_TOTAL',
        discountTotal='DISCOUNT_TOTAL',
        shippingTotal='SHIPPING_TOTAL',
        total='TOTAL',
        currency='CURRENCY',
        oldTotal='OLD_TOTAL',
        totalChanged='TOTAL_CHANGED',
        totalDue='TOTAL_DUE'
    )
)
{
    "operation": "OPERATION",
    "preview": {
        "sub_total": "SUB_TOTAL",
        "tax_total": "TAX_TOTAL",
        "discount_total": "DISCOUNT_TOTAL",
        "shipping_total": "SHIPPING_TOTAL",
        "total": "TOTAL",
        "currency": "CURRENCY",
        "old_total": "OLD_TOTAL",
        "total_changed": "TOTAL_CHANGED",
        "total_due": "TOTAL_DUE"
    }
}

Downgrading an Order

Function: downgrade()

Purpose

This API downgrades an active order to a lower-tier plan or package via POST /api/v3/orders/{id}/downgrade. The request takes the order ID as a path parameter plus an OrderDowngradeDTO carrying effectiveDate, optional effectiveImmediately/redemptionCode/discountPercentage/discountAmount/billingPeriod, a list of OrderLineDTO describing the new lower-tier pricing snapshot for each downgraded charge item, optional paymentInformation, and an optional OrderPropertiesDTO. The system applies the downgrade and returns the post-downgrade record under an order wrapper accompanied by eventUuid and operation correlation tokens. The SDK exposes this through order.downgrade(order_id, request_data) returning an OrderDowngradeDetailsDTO. Downgrades typically take effect at the next billing cycle by default unless effectiveImmediately is set.

Parameters

Parameter nameTypeDescription
order_idStringThe order ID being downgraded.

Use Case

Plan downgrades are the counterpart to upgrades and are equally important to support cleanly: customers reducing seats, switching to a basic tier, or stepping down from premium features must be able to do so without operator intervention or risk of incorrect billing. Self-service portals call this SDK function after the customer confirms the downgrade rendered from the matching downgrade-preview. Customer success workflows trigger it during retention conversations when a downgrade prevents churn. Billing automation may invoke it from automated rules — for example, dropping seat count after extended inactivity. The endpoint also supports refund or credit issuance via paymentInformation when downgrade-related credits need to be applied immediately. The properties block lets callers adjust order-level fields (such as billingPeriod) atomically with the downgrade rather than chaining a separate change call.

Python
PHP
def test_order_family_downgrade():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_line = OrderLineDTO(
            chargeItemUuid="CHARGE_ITEM_UUID",
            itemUuid="ITEM_UUID",
            packageName="PACKAGE_NAME",
            quantity="QUANTITY",
            itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                pricingRule=OrderItemPricingRuleDTO(price="PRICE")
            ),
            isTaxExemptWhenSold="false"
        )

        request_data = OrderDowngradeDTO(
            effectiveDate="EFFECTIVE_DATE",
            lines=[order_line]
        )

        response = exsited_sdk.order.downgrade(order_id="ORDER_ID", request_data=request_data)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testDowngrade()
{
    $id = '{order_id}';
    $params = [
        "effective_date" => "{YYYY-MM-DD}",
        "lines" => [
            [
                "charge_item_uuid" => "{charge_item_uuid}",
                "package_name" => "{package_name}",
                "quantity" => "{quantity}",
                "item_price_snapshot" => [
                    "pricing_rule" => [
                        "price" => "{price}"
                    ]
                ],
                "discount" => "{discount}",
                "discount_type" => "PERCENTAGE",
                "shipping_cost" => "{shipping_cost}",
                "uom" => "{uom}",
                "warehouse" => "{warehouse}",
                "is_tax_exempt_when_sold" => "false",
                "item_price_tax" => [
                    "uuid" => "{tax_uuid}",
                    "code" => "{tax_code}",
                    "rate" => "{tax_rate}"
                ],
                "accounting_code" => "{accounting_code}",
                "item_invoice_note" => "{invoice_note}",
                "item_description" => "{description}",
                "item_custom_attributes" => [
                    ["name" => "{attr_name}", "value" => "{attr_value}"]
                ]
            ]
        ]
    ];

    try {
        $response = $this->orderService->downgrade($id, $params);
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderDowngradeDetailsDTO carrying the resolved OrderDataDTO under the order field plus eventUuid and operation correlation tokens for the downgrade lifecycle event. The embedded order block exposes lifecycle status, identity fields, currency and time zone references, billing/start/next-billing dates, account binding, line items reflecting the downgraded pricing snapshot, totals, KPIs, audit fields, UUID, and version. Errors follow the standard envelope: 404 if the order ID does not exist, 422 for validation failures (invalid charge_item_uuid, malformed effective_date, unsupported downgrade path), 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
OrderDowngradeDetailsDTO(
    eventUuid='EVENT_UUID',
    operation='OPERATION',
    order=OrderDataDTO(
        status='ORDER_STATUS',
        id='ORDER_ID',
        uuid='ORDER_UUID',
        version='VERSION',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        orderType='ORDER_TYPE',
        currency=CurrencyDTO(uuid='CURRENCY_UUID', name='CURRENCY_NAME'),
        timeZone=TimeZoneDTO(uuid='TIMEZONE_UUID', name='TIMEZONE_NAME'),
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_DATE',
        nextBillingFromDate='NEXT_BILLING_FROM_DATE',
        priceTaxInclusive='PRICE_TAX_INCLUSIVE',
        accountId='ACCOUNT_ID',
        accountName='ACCOUNT_NAME',
        createdBy='CREATED_BY',
        createdOn='CREATED_ON',
        lastUpdatedBy='LAST_UPDATED_BY',
        lastUpdatedOn='LAST_UPDATED_ON',
        lines=[
            OrderLineDTO(
                itemUuid='ITEM_UUID',
                itemId='ITEM_ID',
                itemName='ITEM_NAME',
                itemOrderQuantity='ITEM_ORDER_QUANTITY',
                itemChargeType='ITEM_CHARGE_TYPE',
                subtotal='LINE_SUBTOTAL',
                tax='LINE_TAX',
                total='LINE_TOTAL',
                version='LINE_VERSION'
            )
        ],
        subtotal='ORDER_SUBTOTAL',
        tax='ORDER_TAX',
        total='ORDER_TOTAL',
        kpis=KpisDTO(estimatedTotal=0, createdOn='CREATED_ON', lastUpdatedOn='LAST_UPDATED_ON')
    )
)
{
    "event_uuid": "EVENT_UUID",
    "operation": "OPERATION",
    "order": {
        "status": "ORDER_STATUS",
        "id": "ORDER_ID",
        "uuid": "ORDER_UUID",
        "version": "VERSION",
        "name": "ORDER_NAME",
        "display_name": "ORDER_DISPLAY_NAME",
        "description": "ORDER_DESCRIPTION",
        "order_type": "ORDER_TYPE",
        "currency": {
            "uuid": "CURRENCY_UUID",
            "name": "CURRENCY_NAME"
        },
        "time_zone": {
            "uuid": "TIMEZONE_UUID",
            "name": "TIMEZONE_NAME"
        },
        "billing_start_date": "BILLING_START_DATE",
        "order_start_date": "ORDER_START_DATE",
        "next_billing_from_date": "NEXT_BILLING_FROM_DATE",
        "price_tax_inclusive": "PRICE_TAX_INCLUSIVE",
        "account_id": "ACCOUNT_ID",
        "account_name": "ACCOUNT_NAME",
        "created_by": "CREATED_BY",
        "created_on": "CREATED_ON",
        "last_updated_by": "LAST_UPDATED_BY",
        "last_updated_on": "LAST_UPDATED_ON",
        "lines": [
            {
                "item_uuid": "ITEM_UUID",
                "item_id": "ITEM_ID",
                "item_name": "ITEM_NAME",
                "item_order_quantity": "ITEM_ORDER_QUANTITY",
                "item_charge_type": "ITEM_CHARGE_TYPE",
                "subtotal": "LINE_SUBTOTAL",
                "tax": "LINE_TAX",
                "total": "LINE_TOTAL",
                "version": "LINE_VERSION"
            }
        ],
        "subtotal": "ORDER_SUBTOTAL",
        "tax": "ORDER_TAX",
        "total": "ORDER_TOTAL",
        "kpis": {
            "estimated_total": 0,
            "created_on": "CREATED_ON",
            "last_updated_on": "LAST_UPDATED_ON"
        }
    }
}

Previewing an Order Downgrade

Function: downgrade_preview()

Purpose

This API simulates the financial impact of a proposed downgrade without committing it via POST /api/v3/orders/{id}/downgrade/preview. The request takes the order ID as a path parameter plus an OrderDowngradePreviewDTO carrying effectiveDate, optional discount and promotional fields, lines describing the new lower-tier pricing snapshot, optional paymentInformation, and an optional properties block. The system simulates the downgrade against the live order state and returns a slim totals projection under a preview field. The SDK exposes this through order.downgrade_preview(order_id, request_data) returning an OrderUpgradeDowngradeDTO. Read-only on the live order — no persisted state changes — and safe to repeat while iterating on a proposed downgrade.

Parameters

Parameter nameTypeDescription
order_idStringThe order ID whose downgrade is being previewed.

Use Case

Downgrade previews surface the same totals math as upgrade previews but with the polarity inverted: the customer-facing total drops, the prorated credit (if any) appears as a negative on totalDue, and the difference between the old and new total reflects the lost revenue. Self-service portals call this SDK function when a user picks a lower tier so the UI can render the new total, any credit due to the customer, and the post-downgrade billing structure alongside a confirmation button. Customer success teams use it during retention conversations to show customers the financial impact of downgrading rather than churning. Finance teams pipe proposed downgrades through the preview to validate that downgrade-related credits resolve cleanly before pushing the change live. Because the response is a slim totals object, the call is fast and cheap to repeat as the user iterates on tier selection.

Python
PHP
def test_order_family_downgrade_preview():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_line = OrderLineDTO(
            chargeItemUuid="CHARGE_ITEM_UUID",
            itemUuid="ITEM_UUID",
            packageName="PACKAGE_NAME",
            quantity="QUANTITY",
            itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                pricingRule=OrderItemPricingRuleDTO(price="PRICE")
            ),
            isTaxExemptWhenSold="false"
        )

        request_data = OrderDowngradePreviewDTO(
            effectiveDate="EFFECTIVE_DATE",
            lines=[order_line]
        )

        response = exsited_sdk.order.downgrade_preview(order_id="ORDER_ID", request_data=request_data)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testDowngradePreview()
{
    $id = '{order_id}';
    $params = [
        "effective_date" => "{YYYY-MM-DD}",
        "lines" => [
            [
                "charge_item_uuid" => "{charge_item_uuid}",
                "package_name" => "{package_name}",
                "quantity" => "{quantity}",
                "item_price_snapshot" => [
                    "pricing_rule" => [
                        "price" => "{price}"
                    ]
                ],
                "discount" => "{discount}",
                "discount_type" => "PERCENTAGE",
                "shipping_cost" => "{shipping_cost}",
                "uom" => "{uom}",
                "warehouse" => "{warehouse}",
                "is_tax_exempt_when_sold" => "false",
                "item_price_tax" => [
                    "uuid" => "{tax_uuid}",
                    "code" => "{tax_code}",
                    "rate" => "{tax_rate}"
                ],
                "accounting_code" => "{accounting_code}",
                "item_invoice_note" => "{invoice_note}",
                "item_description" => "{description}",
                "item_custom_attributes" => [
                    ["name" => "{attr_name}", "value" => "{attr_value}"]
                ]
            ]
        ]
    ];

    try {
        $response = $this->orderService->downgradePreview($id, $params);
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderUpgradeDowngradeDTO carrying a UpgradeDowngradePreviewDTO under the preview field plus an operation marker for the simulated event. The preview block exposes subTotal, taxTotal, discountTotal, shippingTotal, total, currency, oldTotal (pre-downgrade total for comparison), totalChanged (the delta — typically negative for a downgrade), and totalDue (the prorated amount payable or refundable). No persisted state changes occur on the live order. Errors follow the standard envelope: 404 if the order ID does not exist, 422 for validation failures, 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
OrderUpgradeDowngradeDTO(
    operation='OPERATION',
    preview=UpgradeDowngradePreviewDTO(
        subTotal='SUB_TOTAL',
        taxTotal='TAX_TOTAL',
        discountTotal='DISCOUNT_TOTAL',
        shippingTotal='SHIPPING_TOTAL',
        total='TOTAL',
        currency='CURRENCY',
        oldTotal='OLD_TOTAL',
        totalChanged='TOTAL_CHANGED',
        totalDue='TOTAL_DUE'
    )
)
{
    "operation": "OPERATION",
    "preview": {
        "sub_total": "SUB_TOTAL",
        "tax_total": "TAX_TOTAL",
        "discount_total": "DISCOUNT_TOTAL",
        "shipping_total": "SHIPPING_TOTAL",
        "total": "TOTAL",
        "currency": "CURRENCY",
        "old_total": "OLD_TOTAL",
        "total_changed": "TOTAL_CHANGED",
        "total_due": "TOTAL_DUE"
    }
}

Applying a Contract Adjustment

Function: contract_adjustment()

Purpose

This API applies a contract adjustment to an active order via POST /api/v3/orders/{id}/contract-adjustment. The request takes the order ID as a path parameter plus a ContractAdjustmentRequestDTO carrying effectiveDate, optional effectiveImmediately/ redemptionCode/ discountPercentage/ discountAmount/ billingPeriod, a list of OrderLineDTO describing the adjusted pricing snapshot for each charge item, optional paymentInformation, and an optional OrderPropertiesDTO. The system commits the contract adjustment, recalculates totals against the live contract state, and returns a slim totals projection under a preview field. The SDK exposes this through order.contract_adjustment(order_id, request_data) returning a ContractAdjustmentResponseDTO. Contract adjustments differ from upgrade/ downgrade in that the underlying contract remains intact, only pricing, quantities, or packages change.

Parameters

Parameter nameTypeDescription
order_idStringThe order ID receiving the contract adjustment.

Use Case

Contract adjustments support mid-term changes to live contractual orders without the disruption of cancelling and reissuing the contract. Customers on multi-month or multi-year contracts often request package upgrades, quantity changes, or promotional pricing partway through their term — finance, customer success, and sales-ops teams use this SDK function to commit those changes cleanly. The endpoint differs from upgrade/downgrade in that the contract remains intact: the adjustment is recorded against the existing contract rather than creating a new lifecycle event. Self-service portals call it after the customer accepts the change rendered from the matching contract-adjustment-preview. CRM workflows trigger it when an account hits a renegotiation milestone. Migration scripts use it during tenant cutovers when contractual orders need pricing or package realignment without breaking continuity. The slim totals response lets callers immediately render the new financial state without an additional fetch.

Python
PHP
def test_order_family_contract_adjustment():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_line = OrderLineDTO(
            chargeItemUuid="CHARGE_ITEM_UUID",
            itemUuid="ITEM_UUID",
            packageName="PACKAGE_NAME",
            quantity="QUANTITY",
            itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                pricingRule=OrderItemPricingRuleDTO(price="PRICE")
            ),
            isTaxExemptWhenSold="false"
        )

        request_data = ContractAdjustmentRequestDTO(
            effectiveDate="EFFECTIVE_DATE",
            lines=[order_line]
        )

        response = exsited_sdk.order.contract_adjustment(order_id="ORDER_ID", request_data=request_data)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testContractAdjustment()
{
    $id = '{order_id}';
    $params = [
        "effective_date" => "{YYYY-MM-DD}",
        "effective_immediately" => true,
        "lines" => [
            [
                "item_uuid" => "{item_uuid}",
                "charge_item_uuid" => "{charge_item_uuid}",
                "package_name" => "{package_name}",
                "quantity" => "{quantity}",
                "item_price_snapshot" => [
                    "pricing_rule" => [
                        "price" => "{price}"
                    ]
                ],
                "discount" => "{discount}",
                "shipping_cost" => "{shipping_cost}"
            ]
        ]
    ];

    try {
        $response = $this->orderService->contractAdjustment($id, $params);
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns a ContractAdjustmentResponseDTO carrying a ContractAdjustmentDataDTO under the preview field plus an operation marker for the lifecycle event. The preview block exposes subTotal, taxTotal, discountTotal, shippingTotal, total, currency, oldTotal (pre-adjustment total for comparison), totalChanged (the delta), and totalDue (the prorated amount payable now). Errors follow the standard envelope: 404 if the order ID does not exist, 422 for validation failures (invalid charge_item_uuid, malformed effective_date, unsupported adjustment path), 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
ContractAdjustmentResponseDTO(
    operation='OPERATION',
    preview=ContractAdjustmentDataDTO(
        subTotal='SUB_TOTAL',
        taxTotal='TAX_TOTAL',
        discountTotal='DISCOUNT_TOTAL',
        shippingTotal='SHIPPING_TOTAL',
        total='TOTAL',
        currency='CURRENCY',
        oldTotal='OLD_TOTAL',
        totalChanged='TOTAL_CHANGED',
        totalDue='TOTAL_DUE'
    )
)
{
    "operation": "OPERATION",
    "preview": {
        "sub_total": "SUB_TOTAL",
        "tax_total": "TAX_TOTAL",
        "discount_total": "DISCOUNT_TOTAL",
        "shipping_total": "SHIPPING_TOTAL",
        "total": "TOTAL",
        "currency": "CURRENCY",
        "old_total": "OLD_TOTAL",
        "total_changed": "TOTAL_CHANGED",
        "total_due": "TOTAL_DUE"
    }
}

Previewing a Contract Adjustment

Function: contract_adjustment_preview()

Purpose

This API simulates the financial impact of a proposed contract adjustment without committing it via POST /api/v3/orders/{id}/contract-adjustment/preview. The request takes the order ID as a path parameter plus a ContractAdjustmentPreviewRequestDTO mirroring the contract-adjustment shape — effectiveDate, optional discount and promotional fields, lines describing the new pricing snapshot, optional paymentInformation, and an optional properties block. The system simulates the adjustment against the live contract state and returns a slim totals projection under a preview field. The SDK exposes this through order.contract_adjustment_preview(order_id, request_data) returning a ContractAdjustmentPreviewResponseDTO. Read-only on the live order — no persisted state changes — and safe to repeat while iterating on a proposed adjustment.

Parameters

Parameter nameTypeDescription
order_idStringThe order ID whose contract adjustment is being previewed.

Use Case

Contract adjustments change customer-facing totals mid-contract: package upgrades, quantity changes, and applied promotional pricing all combine to produce a new total that customers and operators want to see before committing. Self-service portals call this SDK function when a customer requests a mid-term change so the UI can render the projected new total, the prorated amount due, and the post-adjustment billing structure alongside a confirmation button — only after explicit acceptance does the client invoke the matching contract-adjustment method. Sales-ops automation pipes proposed adjustments through the preview to validate that promotional codes resolve cleanly and that the resulting total matches what the operator quoted manually. Finance teams use it during renegotiation conversations to surface the financial impact before commitments are made. Because the response is a slim totals object, the call is fast and cheap to repeat as the customer iterates on package or quantity selection.

Python
PHP
def test_order_family_contract_adjustment_preview():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        order_line = OrderLineDTO(
            chargeItemUuid="CHARGE_ITEM_UUID",
            itemUuid="ITEM_UUID",
            packageName="PACKAGE_NAME",
            quantity="QUANTITY",
            itemPriceSnapshot=OrderItemPriceSnapshotDTO(
                pricingRule=OrderItemPricingRuleDTO(price="PRICE")
            )
        )

        request_data = ContractAdjustmentPreviewRequestDTO(
            effectiveDate="EFFECTIVE_DATE",
            lines=[order_line]
        )

        response = exsited_sdk.order.contract_adjustment_preview(order_id="ORDER_ID", request_data=request_data)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testContractAdjustmentPreview()
{
    $id = '{order_id}';
    $params = [
        "effective_date" => "{YYYY-MM-DD}",
        "lines" => [
            [
                "item_uuid" => "{item_uuid}",
                "charge_item_uuid" => "{charge_item_uuid}",
                "package_name" => "{package_name}",
                "quantity" => "{quantity}",
                "item_price_snapshot" => [
                    "pricing_rule" => [
                        "price" => "{price}"
                    ]
                ],
                "discount" => "{discount}",
                "shipping_cost" => "{shipping_cost}",
                "uom" => "{uom}",
                "warehouse" => "{warehouse}",
                "is_tax_exempt_when_sold" => "false",
                "item_price_tax" => [
                    "uuid" => "{tax_uuid}",
                    "code" => "{tax_code}",
                    "rate" => "{tax_rate}"
                ],
                "accounting_code" => "{accounting_code}",
                "item_invoice_note" => "{invoice_note}",
                "item_description" => "{description}",
                "item_custom_attributes" => [
                    ["name" => "{attr_name}", "value" => "{attr_value}"]
                ]
            ]
        ]
    ];

    try {
        $response = $this->orderService->contractAdjustmentPreview($id, $params);
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns a ContractAdjustmentPreviewResponseDTO carrying a ContractAdjustmentPreviewDTO under the preview field plus an operation marker for the simulated event. The preview block exposes subTotal, taxTotal, discountTotal, shippingTotal, total, currency, oldTotal (pre-adjustment total for comparison), totalChanged (the delta), and totalDue (the prorated amount payable now). No persisted state changes occur on the live order. Errors follow the standard envelope: 404 if the order ID does not exist, 422 for validation failures, 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
ContractAdjustmentPreviewResponseDTO(
    operation='OPERATION',
    preview=ContractAdjustmentPreviewDTO(
        subTotal='SUB_TOTAL',
        taxTotal='TAX_TOTAL',
        discountTotal='DISCOUNT_TOTAL',
        shippingTotal='SHIPPING_TOTAL',
        total='TOTAL',
        currency='CURRENCY',
        oldTotal='OLD_TOTAL',
        totalChanged='TOTAL_CHANGED',
        totalDue='TOTAL_DUE'
    )
)
{
    "operation": "OPERATION",
    "preview": {
        "sub_total": "SUB_TOTAL",
        "tax_total": "TAX_TOTAL",
        "discount_total": "DISCOUNT_TOTAL",
        "shipping_total": "SHIPPING_TOTAL",
        "total": "TOTAL",
        "currency": "CURRENCY",
        "old_total": "OLD_TOTAL",
        "total_changed": "TOTAL_CHANGED",
        "total_due": "TOTAL_DUE"
    }
}

Relinquishing an Order

Function: relinquish()

Purpose

This API relinquishes an active order via POST /api/v3/orders/{id}/relinquish — typically applied to rental or asset-backed orders when the customer formally returns the asset or terminates the rental commitment before the natural end of the contract. The request takes the order ID as a path parameter plus an OrderCreateDTO wrapping an OrderDataDTO carrying just an effectiveDate controlling when the relinquishment takes effect. The system records the customer's return of the asset, triggers any downstream prorations or refunds tied to early termination, and transitions the order to a relinquished lifecycle state. The SDK exposes this through order.relinquish(id, request_data) returning an OrderDetailsDTO.

Parameters

Parameter nameTypeDescription
idStringThe order ID being relinquished.

Use Case

Asset-backed and rental orders carry obligations on both sides — the customer commits to a billing schedule, the operator delivers an asset for use. When the customer wants to return the asset early, relinquishment is the formal mechanism that captures that act and updates billing accordingly. Equipment rental businesses use this SDK function when customers return rented equipment ahead of the contract end date, with the effectiveDate setting the precise return time for proration. Subscription services with hardware components (set-top boxes, IoT devices) call it when the customer returns the hardware as part of a cancellation flow. Operations teams use it during fleet recovery operations to record the formal return of assets. The endpoint differs from cancellation in that relinquishment specifically tracks asset return rather than just lifecycle termination, downstream automation may key off the relinquish event to trigger inspection, refurbishment, or restocking workflows that wouldn't fire on a generic cancel.

Python
PHP
def test_order_relinquish():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        request_data = OrderCreateDTO(
            order=OrderDataDTO(effectiveDate="EFFECTIVE_DATE")
        )

        response = exsited_sdk.order.relinquish(id="ORDER_ID", request_data=request_data)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testPreOrderRelinquish()
{
    $id = '{order_id}';
    $params = [
        "order" => [
            "effective_date" => "{YYYY-MM-DD}"
        ]
    ];

    try {
        $response = $this->orderService->preOrderRelinquish($params, $id, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderDetailsDTO carrying the resolved OrderDataDTO under the order field plus eventUuid and operation correlation tokens for the relinquish lifecycle event. The embedded order block exposes lifecycle status (typically relinquished), identity fields, currency and time zone references, billing/start dates, account binding, line items, totals, custom attributes, KPIs, audit fields, UUID, and version. Errors follow the standard envelope: 404 if the order ID does not exist, 409/422 if the order is not in a relinquishable state, 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
OrderDetailsDTO(
    eventUuid='EVENT_UUID',
    operation='OPERATION',
    order=OrderDataDTO(
        status='ORDER_STATUS',
        id='ORDER_ID',
        uuid='ORDER_UUID',
        version='VERSION',
        name='ORDER_NAME',
        displayName='ORDER_DISPLAY_NAME',
        description='ORDER_DESCRIPTION',
        orderType='ORDER_TYPE',
        accountId='ACCOUNT_ID',
        accountName='ACCOUNT_NAME',
        billingStartDate='BILLING_START_DATE',
        orderStartDate='ORDER_START_DATE',
        createdBy='CREATED_BY',
        createdOn='CREATED_ON',
        lastUpdatedBy='LAST_UPDATED_BY',
        lastUpdatedOn='LAST_UPDATED_ON',
        lines=[
            OrderLineDTO(
                itemUuid='ITEM_UUID',
                itemId='ITEM_ID',
                itemName='ITEM_NAME',
                itemOrderQuantity='ITEM_ORDER_QUANTITY',
                subtotal='LINE_SUBTOTAL',
                tax='LINE_TAX',
                total='LINE_TOTAL',
                version='LINE_VERSION'
            )
        ],
        subtotal='ORDER_SUBTOTAL',
        tax='ORDER_TAX',
        total='ORDER_TOTAL',
        kpis=KpisDTO(estimatedTotal=0, createdOn='CREATED_ON', lastUpdatedOn='LAST_UPDATED_ON')
    )
)
{
    "event_uuid": "EVENT_UUID",
    "operation": "OPERATION",
    "order": {
        "status": "ORDER_STATUS",
        "id": "ORDER_ID",
        "uuid": "ORDER_UUID",
        "version": "VERSION",
        "name": "ORDER_NAME",
        "display_name": "ORDER_DISPLAY_NAME",
        "description": "ORDER_DESCRIPTION",
        "order_type": "ORDER_TYPE",
        "currency": {
            "uuid": "CURRENCY_UUID",
            "name": "CURRENCY_NAME"
        },
        "time_zone": {
            "uuid": "TIMEZONE_UUID",
            "name": "TIMEZONE_NAME"
        },
        "billing_start_date": "BILLING_START_DATE",
        "order_start_date": "ORDER_START_DATE",
        "next_billing_from_date": "NEXT_BILLING_FROM_DATE",
        "price_tax_inclusive": "PRICE_TAX_INCLUSIVE",
        "account_id": "ACCOUNT_ID",
        "account_name": "ACCOUNT_NAME",
        "created_by": "CREATED_BY",
        "created_on": "CREATED_ON",
        "last_updated_by": "LAST_UPDATED_BY",
        "last_updated_on": "LAST_UPDATED_ON",
        "lines": [
            {
                "item_uuid": "ITEM_UUID",
                "item_id": "ITEM_ID",
                "item_name": "ITEM_NAME",
                "item_order_quantity": "ITEM_ORDER_QUANTITY",
                "item_charge_type": "ITEM_CHARGE_TYPE",
                "subtotal": "LINE_SUBTOTAL",
                "tax": "LINE_TAX",
                "total": "LINE_TOTAL",
                "version": "LINE_VERSION"
            }
        ],
        "subtotal": "ORDER_SUBTOTAL",
        "tax": "ORDER_TAX",
        "total": "ORDER_TOTAL",
        "kpis": {
            "estimated_total": 0,
            "created_on": "CREATED_ON",
            "last_updated_on": "LAST_UPDATED_ON"
        }
    }
}

Previewing an Order Before Creation

Function: create_order_preview()

Purpose

This API simulates the financial totals of an order before committing to creation via POST /api/v3/orders/preview. The request takes an OrderCreateDTO wrapping an OrderDataDTO with accountId, priceTaxInclusive, and a list of OrderLineDTO carrying itemId, quantity, and price for each line — the same shape used by the standard order-creation method, but no persisted order is created. The system evaluates the proposed order against the live pricing engine, tax configuration, and discount rules, then returns a slim totals projection under a cart field. The SDK exposes this through order.create_order_preview(request_data) returning an OrderPreviewResponseDTO. Read-only against persistent state — safe to repeat while iterating on a draft order.

Parameters

This endpoint does not require path parameters.

Use Case

Order capture flows commonly need to surface the projected total to the customer before submission so the customer can review pricing, tax, and discount application without committing to the purchase. Checkout pages call this SDK function after every line change so the displayed totals stay in sync with the cart contents — the customer adds or removes items, adjusts quantities, or applies a discount, and the UI re-renders the projected cart totals without writing anything to the order ledger. Sales-quoting tools use it to validate that a proposed order's totals match the operator's manual quote before the order is committed. Integration systems pipe candidate orders through the preview to detect mis-priced items, missing tax codes, or rule conflicts before they hit production data. Because the response is a slim cart object containing only totals and activity logs, the call is fast and cheap to repeat as the customer iterates on item selection and quantity.

Python
PHP
def test_order_create_preview():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

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

    try:
        request_data = OrderCreateDTO(
            order=OrderDataDTO(
                accountId="ACCOUNT_ID",
                priceTaxInclusive="PRICE_TAX_INCLUSIVE",
            ).add_line(item_id="ITEM_ID", quantity="QUANTITY", price="PRICE")
        )

        response = exsited_sdk.order.create_order_preview(request_data=request_data)
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)
public function testCreateOrderPreview()
{
    $params = [
        "order" => [
            "account_id" => "{account_id}",
            "price_tax_inclusive" => "{true|false}",
            "lines" => [
                [
                    "item_id" => "{item_id}",
                    "quantity" => "{quantity}",
                    "price" => "{price}"
                ]
            ]
        ]
    ];

    try {
        $response = $this->orderService->createOrderPreview($params, 'v3');
        echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
    } catch (Exception $e) {
        echo 'Error: ' . $e->getMessage();
    }
}

Response

On success, the function returns an OrderPreviewResponseDTO carrying an OrderPreviewCartDTO under the cart field. The cart block exposes subtotal, taxtotal, discounttotal, shippingtotal, total, and currency code, alongside an activityLogs array carrying any informational messages produced during pricing evaluation (e.g., applied discounts, pricing rule traces, or warnings about missing tax codes). No persisted state changes occur — the live order ledger is untouched. Errors follow the standard envelope: 422 for validation failures (missing accountId, invalid itemId, malformed pricing), 401/403 for authorisation failures, and 5xx for server-side issues.

Python
PHP
OrderPreviewResponseDTO(
    cart=OrderPreviewCartDTO(
        subtotal='SUBTOTAL',
        taxtotal='TAX_TOTAL',
        discounttotal='DISCOUNT_TOTAL',
        shippingtotal='SHIPPING_TOTAL',
        total='TOTAL',
        currency='CURRENCY',
        activityLogs=[]
    )
)
{
    "cart": {
        "subtotal": "SUBTOTAL",
        "taxtotal": "TAX_TOTAL",
        "discounttotal": "DISCOUNT_TOTAL",
        "shippingtotal": "SHIPPING_TOTAL",
        "total": "TOTAL",
        "currency": "CURRENCY",
        "activity_logs": []
    }
}

Looking to build your next big project?

With our robust set of tools and resources, you can create custom solutions that integrate seamlessly with our system and take your business to the next level.

Join Our Partner Program
APIs
SDK
Help Center
Community
Contact Us

©2026 Exsited. All rights reserved.

Terms and Conditions | Privacy Policy

Follow Us: