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.
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.
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.
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.
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
| Parameter | Type | Description |
|---|---|---|
| order_id | string | Unique identifier of the order for which notes are to be retrieved. |
| limit | integer | (Optional) Maximum number of notes to return in one response. |
| offset | integer | (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.
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.
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
| Parameter | Type | Description |
|---|---|---|
| order_id | string | Unique identifier of the order to which the note belongs. |
| note_uuid | string | Unique 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.
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.
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.
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.
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.
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.
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
| Parameter | Type | Description |
|---|---|---|
| order_id | String | Unique 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.
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.
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.
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.
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
| Parameter | Type | Description |
|---|---|---|
| order_id | String | Unique identifier of the order. |
Use Case
The function is used to programmatically remove an order from the system. This is useful in scenarios where orders were created by mistake, duplicated, or generated during testing. For example, a QA team might use this function to delete dummy orders after verifying order lifecycle features. The function confirms successful deletion through a 204 response code, ensuring no residual data is retained.
def order_delete():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = False
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.order.delete(id="ORDER_ID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
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.
{'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.
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.
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
| Parameter | Type | Description |
|---|---|---|
| order_id | String | Unique identifier of the order. |
| effective_date | String | Date (YYYY-MM-DD) to reactivate the order. |
Use Case
The function is used to reinstate an order in the Exsited system that has been marked as inactive. When executed, it triggers the reactivation process by sending the order ID and the effective_date. If the date is today's date, the order becomes active immediately. If the date is in the future, the system will queue the reactivation until the specified day arrives. This is particularly useful in scenarios where service continuity must be scheduled after a temporary cancellation.
def order_reactivate():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = False
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.order.reactivate(id="ORDER_ID", effective_date="EFFECTIVE_DATE")
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
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.
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.
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.
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
| Parameter | Type | Description |
|---|---|---|
| order_id | String | Unique identifier of the order |
Use Case
The function is used when an admin or billing system needs to view how an order is configured for invoicing and payment. . It helps determine key properties such as invoice mode, billing cycle, fulfillment terms, and payment processor. This is useful for displaying or verifying an order’s financial setup before triggering billing actions, syncing with external systems, or performing audits.
def order_get_billing_preferences():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = True
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.order.billing_preferences(id="ORDER_ID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
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.
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
| Parameter | Type | Description |
|---|---|---|
| order_id | String | Unique order ID to update preferences. |
| request_data | OrderCreateDTO | Contains the new properties object with updated billing configurations. |
Use Case
The function is used when an existing order's billing behavior needs to be modified. A business may want to change the invoice mode from automatic to manual, extend the billing period, update the payment processor, or align payment terms with the invoice date. This method allows such updates to be applied programmatically for precise control over invoicing and fulfillment policies.
def update_order_billing_preference():
SDKConfig.PRINT_REQUEST_DATA = 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.
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
| Attribute | Type | Description |
|---|---|---|
| order_id | String | Unique identifier of order. |
Use Case
The function is used to inspect the individual items included in an order. This includes the item ID, name, quantity, price per unit, total shipping cost, tax details, and any additional metadata such as custom attributes or expected delivery dates. It is especially helpful for reporting, invoicing, order audits, or fulfillment operations.
def order_get_lines():
SDKConfig.PRINT_REQUEST_DATA = False
SDKConfig.PRINT_RAW_RESPONSE = False
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.order.lines(id="ORDER_ID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
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.
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
| Parameter | Type | Description |
|---|---|---|
| order_id | String | The ID of the order . |
| charge_uuid | String | Unique identifier for the specific charge in the order. |
Use Case
The function is used to extract detailed charge information from a specific line in an order. Viewing a customer’s invoice or validating tax details for a particular item, this function helps isolate and retrieve the individual charge data identified by its charge_uuid, without fetching the entire order lines list.
def get_order_lines_by_charge_uuid():
SDKConfig.PRINT_REQUEST_DATA = False
SDKConfig.PRINT_RAW_RESPONSE = False
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.order.lines_charge(id="ORDER_ID",
charge_uuid="CHARGE_UUID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
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.
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.
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();
}
}
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.
{
"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"
}
}
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.
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.
"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.
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)
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.
"<ORDER_ID> <ORDER_DISPLAY_NAME>"
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.
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.
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.
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.
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
| 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 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.
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.
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
| Parameter | Type | Description |
|---|---|---|
| order_id | string | The 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.
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.
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.
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.
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": []
}