Getting Account List
Function: account_list_basic()
Purpose
This SDK function retrieves a list of all accounts available to the user by calling the list() method from the ExsitedSDK. It initializes the SDK using a valid authentication token and sends a request to the backend to fetch account records associated with the authenticated user or organization.
Parameters
This function does not require any input parameters.
Use Case
The user can apply this function to view all registered accounts under their access scope. This is useful in administrative panels, reporting dashboards, or account management modules where listing all accounts is essential. Upon execution, the function retrieves metadata and identifiers for each account, allowing further actions such as view, update, or delete. If the user lacks access or if there is a backend failure, an exception is raised with full details for analysis.
def account_list_basic():
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.account.list()
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadAll()
{
try {
$response = $this->accountService->readAll('v2');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
Returns a list of accounts with associated metadata such as account name, email address, account type, and UUID. The response structure is typically a JSON array or object containing paginated records. In case of failure—such as invalid authentication, permission denial, or service error—an ABException is thrown. The function handles the exception and prints the error message, backend error content, and raw response for debugging purposes.
AccountDetailsDTO(
account = AccountDataDTO(
name = "ACCOUNT_NAME",
emailAddress = "EMAIL_ADDRESS",
status = "ACCOUNT_STATUS",
id = "ACCOUNT_ID",
displayName = "DISPLAY_NAME",
description = "ACCOUNT_DESCRIPTION",
invoiceParentAccount = "BOOLEAN_STRING",
type = "ACCOUNT_TYPE",
imageUri = "IMAGE_URI",
grantPortalAccess = "BOOLEAN_STRING",
website = "WEBSITE_URL",
linkedin = "LINKEDIN_URL",
twitter = "TWITTER_URL",
facebook = "FACEBOOK_URL",
createdBy = "CREATED_BY",
createdOn = "CREATED_ON_ISO8601",
lastUpdatedBy = "LAST_UPDATED_BY",
lastUpdatedOn = "LAST_UPDATED_ON_ISO8601",
uuid = "ACCOUNT_UUID",
version = "VERSION",
parentAccount = None,
group = None,
manager = None,
referralTracking = None,
salesRep = None,
pricingLevel = None,
currency = CurrencyDTO(
uuid = "CURRENCY_UUID",
name = "CURRENCY_NAME",
link = "CURRENCY_LINK"
),
timeZone = TimeZoneDTO(
uuid = "TIMEZONE_UUID",
name = "TIMEZONE_NAME",
link = "TIMEZONE_LINK"
),
tax = TaxDTO(
uuid = None,
code = None,
rate = None,
link = None,
amount = None
),
accountingCode = AccountingCodeDTO(
accountReceivable = None
),
communicationPreference = [],
paymentMethods = [],
billingPreferences = BillingPreferencesDTO(
communicationProfile = "COMM_PROFILE",
invoiceMode = "INVOICE_MODE",
invoiceTerm = "INVOICE_TERM",
billingPeriod = "BILLING_PERIOD",
billingStartDate = "BILLING_START_DATE",
billingStartDayOfMonth = "DAY_OF_MONTH",
chargingAndBillingAlignment = "ALIGNMENT",
paymentProcessor = "PAYMENT_PROCESSOR",
paymentMode = "PAYMENT_MODE",
paymentTerm = "PAYMENT_TERM",
paymentTermAlignment = "TERM_ALIGNMENT"
),
customAttributes = [],
addresses = [],
contacts = [],
customForms = CustomFormsDTO(
uuid = "FORM_UUID",
name = "FORM_NAME"
),
eventUuid = None,
customObjects = [],
kpis = {
"total_revenue": 0,
"monthly_recurring_revenue": 0,
"total_collected": 0,
"total_refunded": 0,
"total_outstanding": 0,
"total_overdue": 0,
"total_balance": 0,
"total_credit_balance": 0,
"total_orders": 0,
"total_active_orders": 0,
"last_reactivated_on": "",
"last_cancelled_on": "",
"deleted_on": ""
}
),
pagination = PaginationDTO(
records = 0,
currentPage = 1,
limit = 10,
offset = 0,
orderBy = []
)
)
{
"accounts": [
{
"status": "ACTIVE",
"id": "ACCOUNT_ID_1",
"name": "ACCOUNT_NAME_1",
"display_name": "ACCOUNT_DISPLAY_NAME_1",
"description": "DESCRIPTION",
"invoice_parent_account": "false",
"type": "SUPPLIER",
"email_address": "EMAIL_ADDRESS",
"image_uri": "IMAGE_URI",
"custom_forms": {
"uuid": "CUSTOM_FORM_UUID",
"name": "CUSTOM_FORM_NAME"
},
"currency": {
"uuid": "CURRENCY_UUID",
"name": "CURRENCY_NAME",
"link": "CURRENCY_LINK"
},
"time_zone": {},
"grant_portal_access": "false",
"tax": {
"uuid": "TAX_UUID",
"code": "TAX_CODE",
"rate": "TAX_RATE",
"link": "TAX_LINK"
},
"accounting_code": {},
"pricing_level": {},
"communication_preference": [],
"addresses": [],
"website": "WEBSITE",
"linkedin": "LINKEDIN",
"twitter": "TWITTER",
"facebook": "FACEBOOK",
"created_by": "CREATOR_NAME",
"created_on": "CREATION_TIMESTAMP",
"last_updated_by": "LAST_UPDATER",
"last_updated_on": "LAST_UPDATE_TIMESTAMP",
"uuid": "ACCOUNT_UUID",
"version": "1",
"custom_attributes": [],
"custom_objects": [],
"billing_preferences": {
"communication_profile": "COMMUNICATION_PROFILE",
"invoice_mode": "INVOICE_MODE",
"invoice_term": "INVOICE_TERM",
"billing_period": "BILLING_PERIOD",
"billing_start_date": "BILLING_START_DATE",
"billing_start_day_of_month": "BILLING_START_DAY_OF_MONTH",
"charging_and_billing_alignment": "CHARGING_AND_BILLING_ALIGNMENT",
"payment_processor": "PAYMENT_PROCESSOR",
"payment_mode": "PAYMENT_MODE",
"payment_term": "PAYMENT_TERM",
"payment_term_alignment": "PAYMENT_TERM_ALIGNMENT"
},
"contacts": [],
"payment_methods": [
{
"processor_type": "OTHER",
"status": "STATUS",
"default": "false",
"processor": {},
"reference": "REFERENCE",
"payment_count": "PAYMENT_COUNT",
"last_used_on": "LAST_USED_ON",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "PAYMENT_METHOD_UUID",
"version": "VERSION",
"use_for_specified_orders": "false",
"specified_orders": "SPECIFIED_ORDERS"
}
],
"kpis": {
"totalRevenue": "TOTAL_REVENUE",
"monthlyRecurringRevenue": "MONTHLY_RECURRING_REVENUE",
"totalCollected": "TOTAL_COLLECTED",
"totalRefunded": "TOTAL_REFUNDED",
"totalOutstanding": "TOTAL_OUTSTANDING",
"totalOverdue": "TOTAL_OVERDUE",
"totalBalance": "TOTAL_BALANCE",
"totalCreditBalance": "TOTAL_CREDIT_BALANCE",
"totalOrders": "TOTAL_ORDERS",
"totalActiveOrders": "TOTAL_ACTIVE_ORDERS",
"lastReactivatedOn": "LAST_REACTIVATED_ON",
"lastCancelledOn": "LAST_CANCELLED_ON",
"deletedOn": "DELETED_ON"
}
},
{
"status": "ACTIVE",
"id": "ACCOUNT_ID_2",
"name": "ACCOUNT_NAME_2",
"display_name": "ACCOUNT_DISPLAY_NAME_2",
"description": "DESCRIPTION",
"invoice_parent_account": "false",
"type": "SUPPLIER",
"email_address": "EMAIL_ADDRESS",
"image_uri": "IMAGE_URI",
"custom_forms": {
"uuid": "CUSTOM_FORM_UUID",
"name": "CUSTOM_FORM_NAME"
},
"currency": {
"uuid": "CURRENCY_UUID",
"name": "CURRENCY_NAME",
"link": "CURRENCY_LINK"
},
"time_zone": {},
"grant_portal_access": "false",
"tax": {
"uuid": "TAX_UUID",
"code": "TAX_CODE",
"rate": "TAX_RATE",
"link": "TAX_LINK"
},
"accounting_code": {},
"pricing_level": {},
"communication_preference": [],
"addresses": [],
"website": "WEBSITE",
"linkedin": "LINKEDIN",
"twitter": "TWITTER",
"facebook": "FACEBOOK",
"created_by": "CREATOR_NAME",
"created_on": "CREATION_TIMESTAMP",
"last_updated_by": "LAST_UPDATER",
"last_updated_on": "LAST_UPDATE_TIMESTAMP",
"uuid": "ACCOUNT_UUID",
"version": "1",
"custom_attributes": [],
"custom_objects": [],
"billing_preferences": {
"communication_profile": "COMMUNICATION_PROFILE",
"invoice_mode": "INVOICE_MODE",
"invoice_term": "INVOICE_TERM",
"billing_period": "BILLING_PERIOD",
"billing_start_date": "BILLING_START_DATE",
"billing_start_day_of_month": "BILLING_START_DAY_OF_MONTH",
"charging_and_billing_alignment": "CHARGING_AND_BILLING_ALIGNMENT",
"payment_processor": "PAYMENT_PROCESSOR",
"payment_mode": "PAYMENT_MODE",
"payment_term": "PAYMENT_TERM",
"payment_term_alignment": "PAYMENT_TERM_ALIGNMENT"
},
"contacts": [],
"payment_methods": [
{
"processor_type": "OTHER",
"status": "STATUS",
"default": "false",
"processor": {},
"reference": "REFERENCE",
"payment_count": "PAYMENT_COUNT",
"last_used_on": "LAST_USED_ON",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "PAYMENT_METHOD_UUID",
"version": "VERSION",
"use_for_specified_orders": "false",
"specified_orders": "SPECIFIED_ORDERS"
}
],
"kpis": {
"totalRevenue": "TOTAL_REVENUE",
"monthlyRecurringRevenue": "MONTHLY_RECURRING_REVENUE",
"totalCollected": "TOTAL_COLLECTED",
"totalRefunded": "TOTAL_REFUNDED",
"totalOutstanding": "TOTAL_OUTSTANDING",
"totalOverdue": "TOTAL_OVERDUE",
"totalBalance": "TOTAL_BALANCE",
"totalCreditBalance": "TOTAL_CREDIT_BALANCE",
"totalOrders": "TOTAL_ORDERS",
"totalActiveOrders": "TOTAL_ACTIVE_ORDERS",
"lastReactivatedOn": "LAST_REACTIVATED_ON",
"lastCancelledOn": "LAST_CANCELLED_ON",
"deletedOn": "DELETED_ON"
}
}
]
}
Getting Account Details by ID
Function: account_details()
Purpose
This function is used to retrieve full details of a specific account in the Exsited platform using its unique account ID. It fetches and prints the complete account data, including core metadata, billing settings, financial KPIs, contacts, addresses, and supported payment methods, enabling deep insight into customer configurations.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | Unique ID of the account. |
Use Case
The function is used to fetch complete information about a specific account, which can be either a customer or a supplier. For instance, a billing analyst may need to confirm whether the account is set to manual invoicing or which payment processor is used. A support agent can retrieve the customer's primary contact, shipping address, or portal access status. Additionally, this function is useful for finance or operations teams that want to check monthly recurring revenue (MRR), total outstanding balance, credit balance, or past cancellation/reactivation history. This function supports systems that need to display or manage the full profile and operational data of an account.
def account_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.account.details(id="ACCOUNT_ID")
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadDetails()
{
$id='GE2O2Y';
try {
$response = $this->accountService->readDetails($id);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response includes complete account details such as the name, email address, account ID, display name, status, and a description. It also provides social media links including LinkedIn, Facebook, Twitter, and a profile image. Key configurations like the currency, timezone, and tax profile are included. Billing preferences are set to manual invoicing with a 1-month billing period, Net 30 payment term, and payment processor listed as “Cash.” The account has payment method, along with details like card number , expiry date, and processor info. Contact information includes a billing contact with full name, address, mobile number, and email preferences. An address is also provide, along with account KPIs such as total revenue, outstanding balance, and order statistics, all initialized to zero.
ACCOUNTDETAILSDTO(
ACCOUNT=ACCOUNTDATADTO(
NAME='ACCOUNT_NAME',
EMAILADDRESS='ACCOUNT_EMAIL',
STATUS='ACCOUNT_STATUS',
ID='ACCOUNT_ID',
DISPLAYNAME='ACCOUNT_DISPLAY_NAME',
DESCRIPTION='ACCOUNT_DESCRIPTION',
INVOICEPARENTACCOUNT='BOOLEAN',
TYPE='ACCOUNT_TYPE',
IMAGEURI='ACCOUNT_IMAGE_URL',
GRANTPORTALACCESS='BOOLEAN',
WEBSITE='WEBSITE_URL',
LINKEDIN='LINKEDIN_URL',
TWITTER='TWITTER_URL',
FACEBOOK='FACEBOOK_URL',
CREATEDBY='CREATED_BY_USER',
CREATEDON='TIMESTAMP',
LASTUPDATEDBY='UPDATED_BY_USER',
LASTUPDATEDON='TIMESTAMP',
UUID='ACCOUNT_UUID',
VERSION='VERSION_NUMBER',
PARENTACCOUNT='NULL',
GROUP='NULL',
MANAGER='NULL',
REFERRALTRACKING='NULL',
SALESREP='NULL',
PRICINGLEVEL='NULL',
CURRENCY=CURRENCYDTO(
UUID='CURRENCY_UUID',
NAME='CURRENCY_NAME',
LINK='CURRENCY_API_LINK'
),
TIMEZONE=TIMEZONEDTO(
UUID='TIMEZONE_UUID',
NAME='TIMEZONE_NAME',
LINK='TIMEZONE_API_LINK'
),
TAX=TAXDTO(
UUID='TAX_UUID',
CODE='TAX_CODE',
RATE='TAX_RATE',
LINK='TAX_API_LINK',
AMOUNT='NULL'
),
ACCOUNTINGCODE=ACCOUNTINGCODEDTO(
ACCOUNTRECEIVABLE='NULL'
),
COMMUNICATIONPREFERENCE=[
COMMUNICATIONPREFERENCEDTO(
MEDIA='COMMUNICATION_MEDIA',
ISENABLED='NULL'
)
],
PAYMENTMETHODS=[
PAYMENTMETHODSDATADTO(
PROCESSTORTYPE='PAYMENT_PROCESSOR_TYPE',
PAYMENTPROCESSOR='NULL',
STATUS='PAYMENT_METHOD_STATUS',
DEFAULT='BOOLEAN',
REFERENCE='PAYMENT_REFERENCE',
PAYMENTCOUNT='NUMBER',
LASTUSEDON='EMPTY',
CREATEDBY='CREATED_BY_USER',
CREATEDON='TIMESTAMP',
LASTUPDATEDBY='EMPTY',
LASTUPDATEDON='EMPTY',
UUID='PAYMENT_METHOD_UUID',
VERSION='VERSION_NUMBER',
SPECIFIEDORDERS='EMPTY',
USEFORSPECIFIEDORDERS='BOOLEAN',
PROCESSOR=PAYMENTPROCESSORDETAILSDTO(
UUID='PROCESSOR_UUID',
NAME='PROCESSOR_NAME',
LINK='PROCESSOR_API_LINK'
),
CARDTYPE='CARD_TYPE',
TOKEN='PAYMENT_TOKEN',
CARDNUMBER='CARD_NUMBER_MASKED',
EXPIRYMONTH='EXPIRY_MONTH',
EXPIRYYEAR='EXPIRY_YEAR',
CARDCVV='CARD_CVV_MASKED',
NAMEONCARD='EMPTY',
LASTUSEDRESULT='EMPTY',
ERRORCOUNTSINCELASTSUCCESS='EMPTY'
)
],
BILLINGPREFERENCES=BILLINGPREFERENCESDTO(
COMMUNICATIONPROFILE='BILLING_PROFILE',
INVOICEMODE='INVOICE_MODE',
INVOICETERM='INVOICE_TERM',
BILLINGPERIOD='BILLING_PERIOD',
BILLINGSTARTDATE='BILLING_START_DATE',
BILLINGSTARTDAYOFMONTH='EMPTY',
CHARGINGANDBILLINGALIGNMENT='BOOLEAN',
PAYMENTPROCESSOR='PAYMENT_PROCESSOR',
PAYMENTMODE='PAYMENT_MODE',
PAYMENTTERM='PAYMENT_TERM',
PAYMENTTERMALIGNMENT='PAYMENT_ALIGNMENT'
),
CUSTOMATTRIBUTES=[],
ADDRESSES=[
ACCCOUNTADDRESSDTO(
ADDRESSLINE1='ADDRESS_LINE_1',
ADDRESSLINE2='ADDRESS_LINE_2',
ADDRESSLINE3='ADDRESS_LINE_3',
ADDRESSLINE4='ADDRESS_LINE_4',
ADDRESSLINE5='ADDRESS_LINE_5',
POSTCODE='POST_CODE',
UUID='ADDRESS_UUID',
CITY='CITY',
STATE='STATE',
COUNTRY='COUNTRY',
ISDEFAULTBILLING='NULL',
ISDEFAULTSHIPPING='NULL'
)
],
CONTACTS=[
CONTACTDTO(
TYPE='CONTACT_TYPE',
TYPEDISPLAYNAME='CONTACT_TYPE_NAME',
BILLINGCONTACT='BOOLEAN',
SHIPPINGCONTACT='BOOLEAN',
SALUTATION=SALUTATIONDTO(ID='NULL', NAME='NULL', LINK='NULL'),
DESIGNATION=DESIGNATIONDTO(ID='NULL', NAME='NULL', LINK='NULL'),
FIRSTNAME='CONTACT_FIRST_NAME',
MIDDLENAME='CONTACT_MIDDLE_NAME',
LASTNAME='CONTACT_LAST_NAME',
EMAIL=EMAILDTO(
ADDRESS='CONTACT_EMAIL',
DONOTEMAIL='BOOLEAN'
),
ADDRESSLINE1='CONTACT_ADDRESS_1',
ADDRESSLINE2='CONTACT_ADDRESS_2',
ADDRESSLINE3='CONTACT_ADDRESS_3',
ADDRESSLINE4='CONTACT_ADDRESS_4',
ADDRESSLINE5='CONTACT_ADDRESS_5',
POSTCODE='CONTACT_POST_CODE',
CITY='CONTACT_CITY',
STATE='CONTACT_STATE',
COUNTRY='CONTACT_COUNTRY',
PHONE=PHONEDTO(
COUNTRYCODE='PHONE_COUNTRY_CODE',
AREACODE='PHONE_AREA_CODE',
NUMBER='PHONE_NUMBER',
FULL='PHONE_FULL',
DONOTEMAIL='NULL',
DONOTCALL='BOOLEAN'
),
FAX=PHONEDTO(
COUNTRYCODE='NULL',
AREACODE='NULL',
NUMBER='NULL',
FULL='NULL',
DONOTEMAIL='NULL',
DONOTCALL='NULL'
),
MOBILE=PHONEDTO(
COUNTRYCODE='MOBILE_COUNTRY_CODE',
AREACODE='NULL',
NUMBER='MOBILE_NUMBER',
FULL='MOBILE_FULL',
DONOTEMAIL='NULL',
DONOTCALL='BOOLEAN'
),
RECEIVEBILLINGINFORMATION='BOOLEAN',
CREATEDBY='CREATED_BY_USER',
CREATEDON='TIMESTAMP',
LASTUPDATEDBY='UPDATED_BY_USER',
LASTUPDATEDON='TIMESTAMP',
UUID='CONTACT_UUID',
VERSION='VERSION_NUMBER',
CUSTOMATTRIBUTES=[]
)
],
CUSTOMFORMS=CUSTOMFORMSDTO(
UUID='FORM_UUID',
NAME='FORM_NAME'
),
EVENTUUID='NULL',
CUSTOMOBJECTS=[],
KPIS={
'TOTAL_REVENUE': 'NUMBER',
'MONTHLY_RECURRING_REVENUE': 'NUMBER',
'TOTAL_COLLECTED': 'NUMBER',
'TOTAL_REFUNDED': 'NUMBER',
'TOTAL_OUTSTANDING': 'NUMBER',
'TOTAL_OVERDUE': 'NUMBER',
'TOTAL_BALANCE': 'NUMBER',
'TOTAL_CREDIT_BALANCE': 'NUMBER',
'TOTAL_ORDERS': 'NUMBER',
'TOTAL_ACTIVE_ORDERS': 'NUMBER',
'LAST_REACTIVATED_ON': 'EMPTY',
'LAST_CANCELLED_ON': 'EMPTY',
'DELETED_ON': 'EMPTY'
}
)
)
{
"account": {
"status": "ACTIVE",
"id": "ACCOUNT_ID",
"name": "ACCOUNT_NAME",
"display_name": "ACCOUNT_DISPLAY_NAME",
"description": "ACCOUNT_DESCRIPTION",
"invoice_parent_account": "INVOICE_PARENT_ACCOUNT",
"type": "ACCOUNT_TYPE",
"email_address": "EMAIL_ADDRESS",
"image_uri": "IMAGE_URI",
"custom_forms": {
"uuid": "CUSTOM_FORM_UUID",
"name": "CUSTOM_FORM_NAME"
},
"currency": {
"uuid": "CURRENCY_UUID",
"name": "CURRENCY_NAME",
"link": "CURRENCY_LINK"
},
"time_zone": {
"uuid": "TIMEZONE_UUID",
"name": "TIMEZONE_NAME",
"link": "TIMEZONE_LINK"
},
"grant_portal_access": "GRANT_PORTAL_ACCESS",
"tax": {
"uuid": "TAX_UUID",
"code": "TAX_CODE",
"rate": "TAX_RATE",
"link": "TAX_LINK"
},
"accounting_code": {},
"pricing_level": {
"name": "PRICING_LEVEL_NAME",
"uuid": "PRICING_LEVEL_UUID"
},
"communication_preference": [
{
"media": "MEDIA_TYPE",
"isEnabled": "IS_ENABLED"
}
],
"addresses": [
{
"address_line_1": "ADDRESS_LINE_1",
"address_line_2": "ADDRESS_LINE_2",
"address_line_3": "ADDRESS_LINE_3",
"address_line_4": "ADDRESS_LINE_4",
"address_line_5": "ADDRESS_LINE_5",
"city": "CITY",
"country": "COUNTRY",
"isDefaultBilling": "IS_DEFAULT_BILLING",
"isDefaultShipping": "IS_DEFAULT_SHIPPING",
"post_code": "POST_CODE",
"state": "STATE",
"uuid": "ADDRESS_UUID"
},
{
"address_line_1": "ADDRESS_LINE_1",
"address_line_2": "ADDRESS_LINE_2",
"address_line_3": "ADDRESS_LINE_3",
"address_line_4": "ADDRESS_LINE_4",
"address_line_5": "ADDRESS_LINE_5",
"city": "CITY",
"country": "COUNTRY",
"isDefaultBilling": "IS_DEFAULT_BILLING",
"isDefaultShipping": "IS_DEFAULT_SHIPPING",
"post_code": "POST_CODE",
"state": "STATE",
"uuid": "ADDRESS_UUID"
}
],
"website": "WEBSITE_URL",
"linkedin": "LINKEDIN_URL",
"twitter": "TWITTER_URL",
"facebook": "FACEBOOK_URL",
"kpis": {},
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "ACCOUNT_UUID",
"version": "ACCOUNT_VERSION",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
}
],
"custom_objects": [
{
"uuid": "CUSTOM_OBJECT_UUID",
"name": "CUSTOM_OBJECT_NAME",
"link": "CUSTOM_OBJECT_LINK"
}
],
"billing_preferences": {
"communication_profile": "COMMUNICATION_PROFILE",
"invoice_mode": "INVOICE_MODE",
"invoice_term": "INVOICE_TERM",
"billing_period": "BILLING_PERIOD",
"billing_start_date": "BILLING_START_DATE",
"billing_start_day_of_month": "BILLING_START_DAY_OF_MONTH",
"charging_and_billing_alignment": "CHARGING_BILLING_ALIGNMENT",
"payment_processor": "PAYMENT_PROCESSOR",
"payment_mode": "PAYMENT_MODE",
"payment_term": "PAYMENT_TERM",
"payment_term_alignment": "PAYMENT_TERM_ALIGNMENT"
},
"contacts": [
{
"type": "CONTACT_TYPE",
"type_display_name": "CONTACT_TYPE_DISPLAY_NAME",
"billing_contact": "BILLING_CONTACT",
"shipping_contact": "SHIPPING_CONTACT",
"salutation": {
"id": "SALUTATION_ID",
"name": "SALUTATION_NAME",
"link": "SALUTATION_LINK"
},
"designation": {
"id": "DESIGNATION_ID",
"name": "DESIGNATION_NAME",
"link": "DESIGNATION_LINK"
},
"first_name": "FIRST_NAME",
"middle_name": "MIDDLE_NAME",
"last_name": "LAST_NAME",
"email": {
"address": "EMAIL_ADDRESS",
"do_not_email": "DO_NOT_EMAIL"
},
"address_line_1": "ADDRESS_LINE_1",
"address_line_2": "ADDRESS_LINE_2",
"address_line_3": "ADDRESS_LINE_3",
"address_line_4": "ADDRESS_LINE_4",
"address_line_5": "ADDRESS_LINE_5",
"post_code": "POST_CODE",
"city": "CITY",
"state": "STATE",
"country": "COUNTRY",
"phone": {
"country_code": "COUNTRY_CODE",
"area_code": "AREA_CODE",
"number": "PHONE_NUMBER",
"full": "FULL_PHONE",
"do_not_call": "DO_NOT_CALL"
},
"fax": {
"country_code": "COUNTRY_CODE",
"area_code": "AREA_CODE",
"number": "FAX_NUMBER",
"full": "FULL_FAX",
"do_not_call": "DO_NOT_CALL"
},
"mobile": {
"country_code": "COUNTRY_CODE",
"area_code": "AREA_CODE",
"number": "MOBILE_NUMBER",
"full": "FULL_MOBILE",
"do_not_call": "DO_NOT_CALL"
},
"receive_billing_information": "RECEIVE_BILLING_INFORMATION",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "CONTACT_UUID",
"version": "CONTACT_VERSION",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
}
]
}
]
}
}
Getting Account Information
Function: account_details_information()
Purpose
The function retrieves comprehensive details for a specific account using its unique ID. This includes metadata, contact information, preferences, and configuration settings like currency, timezone, and tax.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | Unique short identifier of the account. |
Use Case
This function is used to fetch the complete profile of a single account, whether it is a customer or a supplier. It helps in displaying account details on dashboards, verifying profile settings, and integrating account data with other modules like billing, taxation, and communication preferences.
def account_details_information():
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.account.details_information(id="ACCOUNT_ID")
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadDetailsInformation()
{
$id="FKITFZ";
try {
$response = $this->accountService->readDetailsInformation($id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The SDK response returns all the key information related to the requested account. It includes identity data (UUID, ID, name), account type (CUSTOMER or SUPPLIER), and configuration settings like assigned tax, currency, timezone, and communication preferences. It also provides metadata such as creation and update timestamps, social media links, and system associations like custom forms and accounting codes. This ensures visibility into both the functional and descriptive details of the account.
ACCOUNTDETAILSDTO(
ACCOUNT=ACCOUNTDATADTO(
NAME='ACCOUNT_NAME',
EMAILADDRESS='ACCOUNT_EMAIL',
STATUS='ACCOUNT_STATUS_ACTIVE',
ID='ACCOUNT_ID',
DISPLAYNAME='ACCOUNT_DISPLAY_NAME',
DESCRIPTION='ACCOUNT_DESCRIPTION',
INVOICEPARENTACCOUNT='BOOLEAN_FALSE',
TYPE='ACCOUNT_TYPE_CUSTOMER',
IMAGEURI='ACCOUNT_IMAGE_URL',
GRANTPORTALACCESS='BOOLEAN_TRUE',
WEBSITE='WEBSITE_URL',
LINKEDIN='LINKEDIN_PROFILE_URL',
TWITTER='TWITTER_PROFILE_URL',
FACEBOOK='FACEBOOK_PROFILE_URL',
CREATEDBY='CREATED_BY_IMPLEMENTER',
CREATEDON='TIMESTAMP_2025_06_16',
LASTUPDATEDBY='UPDATED_BY_IMPLEMENTER',
LASTUPDATEDON='TIMESTAMP_2025_06_16',
UUID='ACCOUNT_UUID',
VERSION='ACCOUNT_VERSION_5',
PARENTACCOUNT='NULL',
GROUP='NULL',
MANAGER='NULL',
REFERRALTRACKING='NULL',
SALESREP='NULL',
PRICINGLEVEL='NULL',
CURRENCY=CURRENCYDTO(
UUID='CURRENCY_UUID',
NAME='CURRENCY_AUD',
LINK='CURRENCY_API_LINK'
),
TIMEZONE=TIMEZONEDTO(
UUID='TIMEZONE_UUID',
NAME='TIMEZONE_AUSTRALIA_MELBOURNE',
LINK='TIMEZONE_API_LINK'
),
TAX=TAXDTO(
UUID='TAX_UUID',
CODE='TAX_CODE_NO_TAX',
RATE='TAX_RATE_ZERO',
LINK='TAX_API_LINK',
AMOUNT='NULL'
),
ACCOUNTINGCODE=ACCOUNTINGCODEDTO(
ACCOUNTRECEIVABLE='NULL'
),
COMMUNICATIONPREFERENCE=[
COMMUNICATIONPREFERENCEDTO(
MEDIA='COMMUNICATION_MEDIA_EMAIL',
ISENABLED='NULL'
)
],
PAYMENTMETHODS='NULL',
BILLINGPREFERENCES='NULL',
CUSTOMATTRIBUTES=[],
ADDRESSES='NULL',
CONTACTS='NULL',
CUSTOMFORMS=CUSTOMFORMSDTO(
UUID='CUSTOM_FORM_UUID',
NAME='DEFAULT_FORM_NAME'
),
EVENTUUID='NULL',
CUSTOMOBJECTS=[],
KPIS='NULL'
)
)
{
"account": {
"status": "ACCOUNT_STATUS",
"id": "ACCOUNT_ID",
"name": "ACCOUNT_NAME",
"display_name": "ACCOUNT_DISPLAY_NAME",
"description": "ACCOUNT_DESCRIPTION",
"invoice_parent_account": "INVOICE_PARENT_ACCOUNT",
"type": "ACCOUNT_TYPE",
"email_address": "ACCOUNT_EMAIL",
"image_uri": "ACCOUNT_IMAGE_URI",
"custom_forms": {
"uuid": "CUSTOM_FORM_UUID",
"name": "CUSTOM_FORM_NAME"
},
"currency": {
"uuid": "CURRENCY_UUID",
"name": "CURRENCY_NAME",
"link": "CURRENCY_API_LINK"
},
"time_zone": {},
"grant_portal_access": "PORTAL_ACCESS",
"tax": {
"uuid": "TAX_UUID",
"code": "TAX_CODE",
"rate": TAX_RATE,
"link": "TAX_API_LINK"
},
"accounting_code": {},
"pricing_level": {
"uuid": "PRICING_LEVEL_UUID",
"name": "PRICING_LEVEL_NAME"
},
"communication_preference": [
{
"media": "COMMUNICATION_MEDIA",
"enabled": "COMMUNICATION_ENABLED"
}
],
"website": "ACCOUNT_WEBSITE",
"linkedin": "ACCOUNT_LINKEDIN",
"twitter": "ACCOUNT_TWITTER",
"facebook": "ACCOUNT_FACEBOOK",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "ACCOUNT_UUID",
"version": "ACCOUNT_VERSION",
"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": "CUSTOM_ATTRIBUTE_VALUE_3"
},
{
"name": "CUSTOM_ATTRIBUTE_NAME_4",
"value": "CUSTOM_ATTRIBUTE_VALUE_4"
},
{
"name": "CUSTOM_ATTRIBUTE_NAME_5",
"value": "CUSTOM_ATTRIBUTE_VALUE_5"
},
{
"name": "CUSTOM_DATE_ATTRIBUTE",
"value": "CUSTOM_DATE_VALUE"
},
{
"name": "CUSTOM_DATE_TIME_ATTRIBUTE",
"value": "CUSTOM_DATE_TIME_VALUE"
},
{
"name": "CUSTOM_TEXT_ATTRIBUTE",
"value": "CUSTOM_TEXT_VALUE"
},
{
"name": "CUSTOM_MONEY_ATTRIBUTE",
"value": "CUSTOM_MONEY_VALUE"
},
{
"name": "CUSTOM_QUANTITY_ATTRIBUTE",
"value": "CUSTOM_QUANTITY_VALUE"
},
{
"name": "CUSTOM_FILE_ATTRIBUTE",
"value": [
{
"id": "FILE_ID",
"name": "FILE_NAME",
"size": "FILE_SIZE",
"link": "FILE_API_LINK"
}
]
},
{
"name": "CUSTOM_DROPDOWN_ATTRIBUTE",
"value": "DROPDOWN_VALUE"
},
{
"name": "CUSTOM_RADIO_BUTTON_ATTRIBUTE",
"value": "RADIO_BUTTON_VALUE"
},
{
"name": "CUSTOM_CHECKBOXES_ATTRIBUTE",
"value": [
"CHECKBOX_VALUE_1"
]
},
{
"name": "CUSTOM_MULTISELECT_DROPDOWN_ATTRIBUTE",
"value": []
}
],
"custom_objects": [
{
"uuid": "CUSTOM_OBJECT_UUID_1",
"name": "CUSTOM_OBJECT_NAME_1",
"link": "CUSTOM_OBJECT_API_LINK_1"
},
{
"uuid": "CUSTOM_OBJECT_UUID_2",
"name": "CUSTOM_OBJECT_NAME_2",
"link": "CUSTOM_OBJECT_API_LINK_2"
}
]
}
}
Creating Basic Account
Function: account_create_basic()
Purpose
This SDK function creates a new account using the create_v3 method of the ExsitedSDK. It prepares and submits basic account information such as name and email address through a properly structured request object. This function demonstrates how to initiate a minimal account creation flow using the V3 endpoint.
Parameters
Parameter | Type | Description |
---|---|---|
name | String | The name of the account being created. Example: "SDKtest" |
emailAddress | String | The email address to associate with the account. Example: "user@example.com" |
Use Case
This function is used to register a new account using minimal required fields. It is applicable in workflows such as onboarding new customers, partners, or system users. The function builds the required payload using AccountCreateDTO, sends it to the backend, and handles both success and failure responses. If the account already exists or validation fails, appropriate error information is returned for review.
def account_create_basic():
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:
request_data = AccountCreateDTO(
account=AccountDataDTO(name="ACCOUNT_NAME", emailAddress="EMAIL_ADDRESS"))
response = exsited_sdk.account.create_v3(request_data=request_data)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testCreate()
{
$params = [
"name" => "abcd",
"email_address" => "basicinformationsami123@gmail.com",
];
try {
$response = $this->accountService->create($params,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
If successful, the function returns a structured response indicating the account has been created. This may include the account UUID, name, email, and status fields. If the account creation fails—due to invalid email, duplicate account, or missing data—an ABException is raised. The function captures and prints the exception message, backend error list, and raw server response to assist with debugging and resolution.
AccountDetailsDTO(
account = AccountDataDTO(
name = "ACCOUNT_NAME",
emailAddress = "EMAIL_ADDRESS",
status = "ACCOUNT_STATUS",
id = "ACCOUNT_ID",
displayName = "DISPLAY_NAME",
description = "ACCOUNT_DESCRIPTION",
invoiceParentAccount = "IS_INVOICE_PARENT",
type = "ACCOUNT_TYPE",
imageUri = "ACCOUNT_IMAGE_URI",
grantPortalAccess = "GRANT_PORTAL_ACCESS",
website = "WEBSITE_URL",
linkedin = "LINKEDIN_URL",
twitter = "TWITTER_URL",
facebook = "FACEBOOK_URL",
createdBy = "CREATED_BY",
createdOn = "CREATED_ON_TIMESTAMP",
lastUpdatedBy = "LAST_UPDATED_BY",
lastUpdatedOn = "LAST_UPDATED_ON_TIMESTAMP",
uuid = "ACCOUNT_UUID",
version = "ACCOUNT_VERSION",
parentAccount = None,
group = None,
manager = None,
referralTracking = None,
salesRep = None,
pricingLevel = None,
currency = CurrencyDTO(
uuid = "CURRENCY_UUID",
name = "CURRENCY_NAME",
link = "CURRENCY_LINK"
),
timeZone = TimeZoneDTO(
uuid = "TIMEZONE_UUID",
name = "TIMEZONE_NAME",
link = "TIMEZONE_LINK"
),
tax = TaxDTO(
uuid = None,
code = None,
rate = None,
link = None,
amount = None
),
accountingCode = AccountingCodeDTO(accountReceivable = None),
communicationPreference = [],
paymentMethods = [],
billingPreferences = BillingPreferencesDTO(
communicationProfile = "COMM_PROFILE",
invoiceMode = "INVOICE_MODE",
invoiceTerm = "INVOICE_TERM",
billingPeriod = "BILLING_PERIOD",
billingStartDate = "BILLING_START_DATE",
billingStartDayOfMonth = "BILLING_START_DAY",
chargingAndBillingAlignment = "CHARGE_BILL_ALIGN",
paymentProcessor = "PAYMENT_PROCESSOR",
paymentMode = "PAYMENT_MODE",
paymentTerm = "PAYMENT_TERM",
paymentTermAlignment = "TERM_ALIGNMENT"
),
customAttributes = [],
addresses = [],
contacts = [],
customForms = CustomFormsDTO(
uuid = "CUSTOM_FORM_UUID",
name = "CUSTOM_FORM_NAME"
),
eventUuid = None,
customObjects = [],
kpis = {
"total_revenue": 0,
"monthly_recurring_revenue": 0,
"total_collected": 0,
"total_refunded": 0,
"total_outstanding": 0,
"total_overdue": 0,
"total_balance": 0,
"total_credit_balance": 0,
"total_orders": 0,
"total_active_orders": 0,
"last_reactivated_on": "",
"last_cancelled_on": "",
"deleted_on": ""
}
)
)
{
"account": {
"status": "STATUS",
"id": "ACCOUNT_ID",
"name": "NAME",
"display_name": "DISPLAY_NAME",
"description": "DESCRIPTION",
"invoice_parent_account": "INVOICE_PARENT_ACCOUNT",
"type": "TYPE",
"email_address": "EMAIL_ADDRESS",
"image_uri": "IMAGE_URI",
"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"
},
"grant_portal_access": "GRANT_PORTAL_ACCESS",
"tax": "TAX",
"accounting_code": "ACCOUNTING_CODE",
"pricing_level": "PRICING_LEVEL",
"communication_preference": "COMMUNICATION_PREFERENCE",
"addresses": "ADDRESSES",
"website": "WEBSITE",
"linkedin": "LINKEDIN",
"twitter": "TWITTER",
"facebook": "FACEBOOK",
"kpis": "KPIS",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "UUID",
"version": "VERSION",
"custom_attributes": "CUSTOM_ATTRIBUTES",
"custom_objects": "CUSTOM_OBJECTS",
"billing_preferences": {
"communication_profile": "COMMUNICATION_PROFILE",
"invoice_mode": "INVOICE_MODE",
"invoice_term": "INVOICE_TERM",
"billing_period": "BILLING_PERIOD",
"billing_start_date": "BILLING_START_DATE",
"billing_start_day_of_month": "BILLING_START_DAY_OF_MONTH",
"charging_and_billing_alignment": "CHARGING_AND_BILLING_ALIGNMENT",
"payment_processor": "PAYMENT_PROCESSOR",
"payment_mode": "PAYMENT_MODE",
"payment_term": "PAYMENT_TERM",
"payment_term_alignment": "PAYMENT_TERM_ALIGNMENT"
},
"contacts": "CONTACTS",
"payment_methods": [
{
"processor_type": "PROCESSOR_TYPE",
"status": "STATUS",
"default": "DEFAULT",
"processor": "PROCESSOR",
"reference": "REFERENCE",
"payment_count": "PAYMENT_COUNT",
"last_used_on": "LAST_USED_ON",
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON",
"uuid": "PAYMENT_METHOD_UUID",
"version": "PAYMENT_METHOD_VERSION",
"use_for_specified_orders": "USE_FOR_SPECIFIED_ORDERS",
"specified_orders": "SPECIFIED_ORDERS"
}
]
}
}
Updating Account Information
Function: account_update_info()
Purpose
This function is used to update the basic profile information of an existing account through the SDK. It sends updated values such as the account's name, email address, display name, and description to the Exsited platform. This allows for keeping account records accurate and aligned with current business or user details.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | The short ID of the account to be updated. |
request_data | AccountUpdateInformationDTO | DTO object containing the new values for name, emailAddress, displayName, and description. |
Use Case
This function is typically used to modifies key identity fields for an account such as correcting a display name, updating an outdated email address, or modifying the public description associated with the account. It is especially useful for account management features where keeping up-to-date contact details is essential. After the function executes successfully, it returns the complete, updated account profile with all related metadata including tax, timezone, communication preferences, and version control information.
def account_update_info():
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:
request_data = AccountUpdateInformationDTO(
account=AccountDataDTO(
name="ACCOUNT_NAME_UPDATE",
emailAddress="TEST_EMAIL_UPDATE",
displayName="ACCOUNT_DISPLAY_NAME_UPDATE",
description="ACCOUNT_DESCRIPTION_UPDATE"
)
)
response = exsited_sdk.account.update_information(
id="ACCOUNT_ID",
request_data=request_data
)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testUpdate()
{
$params = [
"name" => "ABCD",
"display_name" => "ABCD",
"description" => "updated description",
"email_address" => "bhai3@abc.com"
];
$id='GE2O2Y';
try {
$response = $this->accountService->update($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 that contains the updated account profile. This includes the new values for name, emailAddress, displayName, and description, along with other account metadata like status, type, uuid, version, currency, tax, and communication settings. Social media links, timestamps, and audit trail fields (createdBy, lastUpdatedBy) are also preserved. This response ensures that the account information has been updated.
ACCOUNTDETAILSDTO(
ACCOUNT=ACCOUNTDATADTO(
NAME='ACCOUNT_NAME_UPDATE',
EMAILADDRESS='TEST_EMAIL_UPDATE',
STATUS='ACCOUNT_STATUS_ACTIVE',
ID='ACCOUNT_ID',
DISPLAYNAME='ACCOUNT_DISPLAY_NAME_UPDATE',
DESCRIPTION='ACCOUNT_DESCRIPTION_UPDATE',
INVOICEPARENTACCOUNT='BOOLEAN_FALSE',
TYPE='ACCOUNT_TYPE_CUSTOMER',
IMAGEURI='ACCOUNT_IMAGE_URL',
GRANTPORTALACCESS='BOOLEAN_TRUE',
WEBSITE='WEBSITE_URL',
LINKEDIN='LINKEDIN_PROFILE_URL',
TWITTER='TWITTER_PROFILE_URL',
FACEBOOK='FACEBOOK_PROFILE_URL',
CREATEDBY='CREATED_BY_USER',
CREATEDON='TIMESTAMP_CREATED',
LASTUPDATEDBY='UPDATED_BY_USER',
LASTUPDATEDON='TIMESTAMP_UPDATED',
UUID='ACCOUNT_UUID',
VERSION='ACCOUNT_VERSION',
PARENTACCOUNT='NULL',
GROUP='NULL',
MANAGER='NULL',
REFERRALTRACKING='NULL',
SALESREP='NULL',
PRICINGLEVEL='NULL',
CURRENCY=CURRENCYDTO(
UUID='CURRENCY_UUID',
NAME='CURRENCY_AUD',
LINK='CURRENCY_API_URL'
),
TIMEZONE=TIMEZONEDTO(
UUID='TIMEZONE_UUID',
NAME='TIMEZONE_AUSTRALIA_MELBOURNE',
LINK='TIMEZONE_API_URL'
),
TAX=TAXDTO(
UUID='TAX_UUID',
CODE='TAX_CODE_NO_TAX',
RATE='TAX_RATE_ZERO',
LINK='TAX_API_URL',
AMOUNT='NULL'
),
ACCOUNTINGCODE=ACCOUNTINGCODEDTO(
ACCOUNTRECEIVABLE='NULL'
),
COMMUNICATIONPREFERENCE=[
COMMUNICATIONPREFERENCEDTO(
MEDIA='COMMUNICATION_MEDIA_EMAIL',
ISENABLED='NULL'
)
],
PAYMENTMETHODS='NULL',
BILLINGPREFERENCES='NULL',
CUSTOMATTRIBUTES=[],
ADDRESSES='NULL',
CONTACTS='NULL',
CUSTOMFORMS=CUSTOMFORMSDTO(
UUID='CUSTOM_FORM_UUID',
NAME='DEFAULT_ACCOUNT_FORM'
),
EVENTUUID='NULL',
CUSTOMOBJECTS=[],
KPIS={}
)
)
{
"account": {
"status": "ACTIVE",
"id": "account_id",
"name": "account_name",
"display_name": "account_display_name",
"description": "account_description",
"parent_account": "",
"invoice_parent_account": "false",
"type": "CUSTOMER",
"email_address": "account_email",
"image_uri": "",
"group": [],
"manager": "account_manager",
"referral_tracking": "",
"custom_forms": {
"uuid": "custom_form_uuid",
"name": "custom_form_name"
},
"sales_rep": [],
"currency": {
"uuid": "currency_uuid",
"name": "currency_name",
"link": "currency_link"
},
"time_zone": {
"uuid": "time_zone_uuid",
"name": "time_zone_name",
"link": "time_zone_link"
},
"grant_portal_access": "false",
"tax": {
"uuid": "tax_uuid",
"code": "tax_code",
"rate": "tax_rate",
"link": "tax_link"
},
"accounting_code": [],
"pricing_level": {
"name": "pricing_level_name",
"uuid": "pricing_level_uuid"
},
"communication_preference": "",
"website": "website_url",
"linkedin": "linkedin_url",
"twitter": "twitter_url",
"facebook": "facebook_url",
"kpis": [],
"created_by": "created_by_user",
"created_on": "created_on_date",
"last_updated_by": "last_updated_by_user",
"last_updated_on": "last_updated_on_date",
"uuid": "account_uuid",
"version": "version_number",
"custom_attributes": [
{
"name": "Radio_Button",
"value": "radio_button_value"
},
{
"name": "Quantityy",
"value": "quantity_value"
},
{
"name": "Text_att",
"value": "text_value"
},
{
"name": "DR_with_multi_select",
"value": []
},
{
"name": "Checkbox",
"value": []
},
{
"name": "Boolean",
"value": "boolean_value"
},
{
"name": "Number_att",
"value": "number_value"
},
{
"name": "String",
"value": "string_value"
}
],
"custom_objects": []
}
}
Getting all Contacts of an Account
Function: account_contacts()
Purpose
This SDK function retrieves all contact records associated with a specific account by calling the get_contacts() method of the ExsitedSDK. It uses the provided account ID to query backend records and return linked contact information such as phone, email, and address details.
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The unique identifier of the account for which contacts are requested. Example: ACCOUNT_ID |
Use Case
This function is applicable when a user wants to view or manage contact information linked to a particular account. It can be used in account profile views, customer records, or CRM modules. Upon providing a valid account ID, the backend returns all related contacts. If the account ID is invalid or the user lacks access, an exception is triggered.
def account_contacts():
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.account.get_contacts(id="ACCOUNT_ID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadContactDetails()
{
$id="FKITFZ";
try {
$response = $this->accountService->readContactDetails($id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response contains a list of contact objects associated with the specified account. Each contact record typically includes the contact type, salutation, name, phone, email, and address. If the request fails due to authorization issues or an invalid account ID, an ABException is raised. The function captures the exception, displays the error message, structured validation feedback, and the raw backend response to aid troubleshooting.
AccountContactsDTO(
account = AccountContacts(
id = "ACCOUNT_ID",
contacts = [
ContactDTO(
type = "CONTACT_TYPE_1",
typeDisplayName = "CONTACT_DISPLAY_NAME_1",
billingContact = "true",
shippingContact = "false",
salutation = SalutationDTO(
id = None,
name = "SALUTATION_NAME_1",
link = "SALUTATION_LINK_1"
),
designation = DesignationDTO(
id = None,
name = "DESIGNATION_NAME_1",
link = "DESIGNATION_LINK_1"
),
firstName = "FIRST_NAME_1",
middleName = "MIDDLE_NAME_1",
lastName = "LAST_NAME_1",
email = EmailDTO(
address = "EMAIL_ADDRESS_1",
doNotEmail = "false"
),
addressLine1 = "ADDRESS_LINE_1",
addressLine2 = "ADDRESS_LINE_2",
addressLine3 = "ADDRESS_LINE_3",
addressLine4 = "ADDRESS_LINE_4",
addressLine5 = "ADDRESS_LINE_5",
postCode = "POST_CODE_1",
city = "CITY_1",
state = "STATE_1",
country = "COUNTRY_1",
phone = PhoneDTO(
countryCode = "+61",
areaCode = "AREA_CODE_1",
number = "PHONE_NUMBER_1",
full = "FULL_PHONE_1",
doNotEmail = None,
doNotCall = "true"
),
fax = PhoneDTO(
countryCode = "+61",
areaCode = "AREA_CODE_2",
number = "FAX_NUMBER_1",
full = "FULL_FAX_1",
doNotEmail = None,
doNotCall = "true"
),
mobile = PhoneDTO(
countryCode = "+61",
areaCode = "AREA_CODE_3",
number = "MOBILE_NUMBER_1",
full = "FULL_MOBILE_1",
doNotEmail = None,
doNotCall = "true"
),
receiveBillingInformation = "true",
createdBy = "CREATED_BY_1",
createdOn = "CREATED_ON_1",
lastUpdatedBy = "LAST_UPDATED_BY_1",
lastUpdatedOn = "LAST_UPDATED_ON_1",
uuid = "UUID_1",
version = "VERSION_1",
customAttributes = []
),
ContactDTO(
type = "CONTACT_TYPE_2",
typeDisplayName = "CONTACT_DISPLAY_NAME_2",
billingContact = "false",
shippingContact = "true",
salutation = SalutationDTO(
id = None,
name = "SALUTATION_NAME_2",
link = "SALUTATION_LINK_2"
),
designation = DesignationDTO(
id = None,
name = "DESIGNATION_NAME_2",
link = "DESIGNATION_LINK_2"
),
firstName = "FIRST_NAME_2",
middleName = "MIDDLE_NAME_2",
lastName = "LAST_NAME_2",
email = EmailDTO(
address = "EMAIL_ADDRESS_2",
doNotEmail = "true"
),
addressLine1 = "ADDRESS_LINE_6",
addressLine2 = "ADDRESS_LINE_7",
addressLine3 = "ADDRESS_LINE_8",
addressLine4 = "ADDRESS_LINE_9",
addressLine5 = "ADDRESS_LINE_10",
postCode = "POST_CODE_2",
city = "CITY_2",
state = "STATE_2",
country = "COUNTRY_2",
phone = PhoneDTO(
countryCode = "+61",
areaCode = "AREA_CODE_4",
number = "PHONE_NUMBER_2",
full = "FULL_PHONE_2",
doNotEmail = None,
doNotCall = "true"
),
fax = PhoneDTO(
countryCode = None,
areaCode = None,
number = None,
full = None,
doNotEmail = None,
doNotCall = None
),
mobile = PhoneDTO(
countryCode = None,
areaCode = None,
number = None,
full = None,
doNotEmail = None,
doNotCall = None
),
receiveBillingInformation = "true",
createdBy = "CREATED_BY_2",
createdOn = "CREATED_ON_2",
lastUpdatedBy = "LAST_UPDATED_BY_2",
lastUpdatedOn = "LAST_UPDATED_ON_2",
uuid = "UUID_2",
version = "VERSION_2",
customAttributes = []
)
]
)
)
{
"account": {
"id": "ACCOUNT_ID",
"contacts": [
{
"type": "CONTACT_TYPE_1",
"type_display_name": "CONTACT_TYPE_DISPLAY_NAME_1",
"billing_contact": "BILLING_CONTACT_STATUS",
"shipping_contact": "SHIPPING_CONTACT_STATUS",
"salutation": {
"id": SALUTATION_ID_1,
"name": "SALUTATION_NAME_1",
"link": "SALUTATION_LINK_1"
},
"designation": {
"id": DESIGNATION_ID_1,
"name": "DESIGNATION_NAME_1",
"link": "DESIGNATION_LINK_1"
},
"first_name": "FIRST_NAME_1",
"middle_name": "MIDDLE_NAME_1",
"last_name": "LAST_NAME_1",
"email": {
"address": "EMAIL_ADDRESS_1",
"do_not_email": "EMAIL_OPT_OUT_1"
},
"address_line_1": "ADDRESS_LINE_1_1",
"address_line_2": "ADDRESS_LINE_2_1",
"address_line_3": "ADDRESS_LINE_3_1",
"address_line_4": "ADDRESS_LINE_4_1",
"address_line_5": "ADDRESS_LINE_5_1",
"post_code": "POST_CODE_1",
"city": "CITY_1",
"state": "STATE_1",
"country": "COUNTRY_1",
"phone": {
"country_code": "PHONE_COUNTRY_CODE_1",
"area_code": "PHONE_AREA_CODE_1",
"number": "PHONE_NUMBER_1",
"full": "PHONE_FULL_NUMBER_1",
"do_not_call": "PHONE_OPT_OUT_1"
},
"fax": {
"country_code": "FAX_COUNTRY_CODE_1",
"area_code": "FAX_AREA_CODE_1",
"number": "FAX_NUMBER_1",
"full": "FAX_FULL_NUMBER_1",
"do_not_call": "FAX_OPT_OUT_1"
},
"mobile": {
"country_code": "MOBILE_COUNTRY_CODE_1",
"area_code": "MOBILE_AREA_CODE_1",
"number": "MOBILE_NUMBER_1",
"full": "MOBILE_FULL_NUMBER_1",
"do_not_call": "MOBILE_OPT_OUT_1"
},
"receive_billing_information": "RECEIVE_BILLING_INFO_1",
"created_by": "CREATED_BY_1",
"created_on": "CREATED_ON_1",
"last_updated_by": "LAST_UPDATED_BY_1",
"last_updated_on": "LAST_UPDATED_ON_1",
"uuid": "UUID_1",
"version": "VERSION_1",
"custom_attributes": [
{
"name": "CUSTOM_ATTRIBUTE_NAME_1",
"value": "CUSTOM_ATTRIBUTE_VALUE_1"
},
{
"name": "CUSTOM_ATTRIBUTE_NAME_2",
"value": "CUSTOM_ATTRIBUTE_VALUE_2"
}
]
},
{
"type": "CONTACT_TYPE_2",
"type_display_name": "CONTACT_TYPE_DISPLAY_NAME_2",
"billing_contact": "BILLING_CONTACT_STATUS_2",
"shipping_contact": "SHIPPING_CONTACT_STATUS_2",
"salutation": {
"id": SALUTATION_ID_2,
"name": "SALUTATION_NAME_2",
"link": "SALUTATION_LINK_2"
},
"designation": {
"id": DESIGNATION_ID_2,
"name": "DESIGNATION_NAME_2",
"link": "DESIGNATION_LINK_2"
},
"first_name": "FIRST_NAME_2",
"middle_name": "MIDDLE_NAME_2",
"last_name": "LAST_NAME_2",
"email": {
"address": "EMAIL_ADDRESS_2",
"do_not_email": "EMAIL_OPT_OUT_2"
},
"address_line_1": "ADDRESS_LINE_1_2",
"address_line_2": "ADDRESS_LINE_2_2",
"address_line_3": "ADDRESS_LINE_3_2",
"address_line_4": "ADDRESS_LINE_4_2",
"address_line_5": "ADDRESS_LINE_5_2",
"post_code": "POST_CODE_2",
"city": "CITY_2",
"state": "STATE_2",
"country": "COUNTRY_2",
"phone": {
"country_code": "PHONE_COUNTRY_CODE_2",
"area_code": "PHONE_AREA_CODE_2",
"number": "PHONE_NUMBER_2",
"full": "PHONE_FULL_NUMBER_2",
"do_not_call": "PHONE_OPT_OUT_2"
},
"fax": {
"country_code": "FAX_COUNTRY_CODE_2",
"area_code": "FAX_AREA_CODE_2",
"number": "FAX_NUMBER_2",
"full": "FAX_FULL_NUMBER_2",
"do_not_call": "FAX_OPT_OUT_2"
},
"mobile": {
"country_code": "MOBILE_COUNTRY_CODE_2",
"area_code": "MOBILE_AREA_CODE_2",
"number": "MOBILE_NUMBER_2",
"full": "MOBILE_FULL_NUMBER_2",
"do_not_call": "MOBILE_OPT_OUT_2"
},
"receive_billing_information": "RECEIVE_BILLING_INFO_2",
"created_by": "CREATED_BY_2",
"created_on": "CREATED_ON_2",
"last_updated_by": "LAST_UPDATED_BY_2",
"last_updated_on": "LAST_UPDATED_ON_2",
"uuid": "UUID_2",
"version": "VERSION_2",
"custom_attributes": [
{
"name": "CUSTOM_ATTRIBUTE_NAME_3",
"value": "CUSTOM_ATTRIBUTE_VALUE_3"
},
{
"name": "CUSTOM_ATTRIBUTE_NAME_4",
"value": "CUSTOM_ATTRIBUTE_VALUE_4"
}
]
}
]
}
}
Updating Account Specific Contact
Function: account_contact_update()
Purpose
This SDK function is used to update contact details for a specific contact type within an account using the update_contact() method of the ExsitedSDK. It constructs the contact update payload and sends it to the backend associated with the given account ID and contact type.
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The unique identifier of the account for which the contact is being updated. Example: ACCOUNT_ID |
contact_type | String | The type of contact to update. Example: CONTACT_1 |
firstName | String | First name of the contact. Example: "JohnXXX" |
lastName | String | Last name of the contact. Example: "DoeXXX" |
email.address | String | Email address of the contact. Example: "johnXXX@yopmail.com" |
phone.number | String | Contact phone number. Example: "1234567890" |
Use Case
This function is applied when an existing contact's information under a specific account needs to be edited. A user can use this to modify personal details such as name, email, or phone number. Once the request is successfully submitted, the backend updates the relevant contact information. If any field is invalid or permissions are insufficient, an exception is raised and handled accordingly.
def account_contact_update():
SDKConfig.PRINT_REQUEST_DATA = False
SDKConfig.PRINT_RAW_RESPONSE = False
exsited_sdk = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
contact_dto = ContactDTO(firstName="FIRST_NAME", lastName="LAST_NAME", email=EmailDTO(address="EMAIL_ADDRESS"),
phone=PhoneDTO(number="PHONE_NUMBER"))
request_data = AccountContactUpdateDTO(account=AccountContactUpdate(contact=contact_dto))
print("Request Data:", request_data)
response = exsited_sdk.account.update_contact(id="ACCOUNT_ID", contact_type="CONTACT_TYPE",
request_data=request_data)
print("Response Data:", response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testUpdateContactTypeDetails()
{
$params = [
"account" => [
"contact" => [
"salutation" => "Fraulein",
"designation" => "CEO",
"first_name" => "Roza",
"middle_name" => "rrTabassum",
"email" => [
"address" => "abc@yopmail.com",
"do_not_email" => "false"
],
"address_line_1" => "9 Yarra",
"address_line_2" => "10 Yarra",
"address_line_3" => "11 Yarra",
"address_line_4" => "12 Yarraaa",
"address_line_5" => "13 Yarra",
"post_code" => "3737",
"city" => "Abbeyard",
"state" => "Victoria",
"country" => "Australia",
"phone" => [
"country_code" => "+61",
"area_code" => "03",
"number" => "546464",
"do_not_call" => "true"
],
"fax" => [
"country_code" => "+61",
"area_code" => "03",
"number" => "5464",
"do_not_call" => "true"
],
"mobile" => [
"country_code" => "+61",
"area_code" => "03",
"number" => "5464",
"do_not_call" => "true"
],
"receive_billing_information" => "true"
]
]
];
$id="FKITFZ";
$contactType= "CONTACT_1";
try {
$response = $this->accountService->updateContactTypeDetails($params, $id,$contactType,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
If the update is successful, the API returns a confirmation response reflecting the updated contact information. The returned object may include identifiers and updated fields. If the update fails due to validation, authorization, or input format issues, an ABException is raised. The exception block prints the error message, detailed backend validation feedback, and the full raw response for debugging.
AccountContactsUpdateDTO(
account = AccountContactsUpdate(
contacts = ContactDTO(
type = "CONTACT_TYPE",
typeDisplayName = "CONTACT_DISPLAY_NAME",
billingContact = "true",
shippingContact = "false",
salutation = SalutationDTO(
id = None,
name = "SALUTATION_NAME",
link = "SALUTATION_LINK"
),
designation = DesignationDTO(
id = None,
name = "DESIGNATION_NAME",
link = "DESIGNATION_LINK"
),
firstName = "FIRST_NAME",
middleName = "MIDDLE_NAME",
lastName = "LAST_NAME",
email = EmailDTO(
address = "EMAIL_ADDRESS",
doNotEmail = "false"
),
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",
phone = PhoneDTO(
countryCode = None,
areaCode = None,
number = None,
full = None,
doNotEmail = None,
doNotCall = None
),
fax = PhoneDTO(
countryCode = None,
areaCode = None,
number = None,
full = None,
doNotEmail = None,
doNotCall = None
),
mobile = PhoneDTO(
countryCode = None,
areaCode = None,
number = None,
full = None,
doNotEmail = None,
doNotCall = None
),
receiveBillingInformation = "",
createdBy = "CREATED_BY",
createdOn = "CREATED_ON",
lastUpdatedBy = "LAST_UPDATED_BY",
lastUpdatedOn = "LAST_UPDATED_ON",
uuid = "CONTACT_UUID",
version = "VERSION",
customAttributes = []
),
id = "ACCOUNT_ID"
)
)
{
"account": {
"contacts": {
"type": "CONTACT_1",
"type_display_name": "Billing Contact",
"billing_contact": "true",
"shipping_contact": "false",
"salutation": {
"id": 7,
"name": "Mr.",
"link": "https://api-stage.exsited.com/api/v2/salutations/7"
},
"designation": {
"id": 10,
"name": "Manager",
"link": "https://api-stage.exsited.com/api/v2/designations/10"
},
"first_name": "James",
"middle_name": "Andrew",
"last_name": "Smith",
"email": {
"address": "james.smith" + Math.floor(Math.random() * 1000) + "@randommail.com",
"do_not_email": "false"
},
"address_line_1": "123 Elm Street",
"address_line_2": "Apt 101",
"address_line_3": "Building B",
"address_line_4": "New York",
"address_line_5": "Near Central Park",
"post_code": "10001",
"city": "New York",
"state": "New York",
"country": "USA",
"phone": {
"country_code": "+1",
"area_code": "212",
"number": "5551234567",
"full": "+1 212 555 1234",
"do_not_call": "true"
},
"fax": {
"country_code": "+1",
"area_code": "212",
"number": "5551234568",
"full": "+1 212 555 1234",
"do_not_call": "true"
},
"mobile": {
"country_code": "+1",
"area_code": "917",
"number": "5559876543",
"full": "+1 917 555 9876",
"do_not_call": "true"
},
"receive_billing_information": "true",
"created_by": "SystemAdmin",
"created_on": "2024-05-07T10:39:33Z",
"last_updated_by": "TestUser",
"last_updated_on": "2024-11-13T12:34:15Z",
"uuid": "a82e62fc-b12c-4205-957a-f7f13c56a1e5",
"version": "1",
"custom_attributes": [
{
"name": "Boolean",
"value": "true"
},
{
"name": "Quantityy",
"value": "150"
},
{
"name": "Number_att",
"value": "5678"
},
{
"name": "Text_att",
"value": "Sample Text"
},
{
"name": "Radio_Button",
"value": "Option 1"
},
{
"name": "Checkbox",
"value": ["Option 1", "Option 2"]
}
]
},
"id": "account123456"
}
}
Getting Account Address Details
Function: account_address_details()
Purpose
This SDK function is used to retrieve the full address details of a specific account using the address_details() method of the ExsitedSDK. It provides structured location data such as city, state, post code, and street address linked to the specified account ID.
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The unique identifier of the account whose address details are requested. Example: ACCOUNT_ID |
Use Case
This function can be used to fetch address data for any valid account for display in dashboards, billing modules, shipping forms, or verification tools. A user can pass an account ID to get associated address entries, including multiple address lines, city, state, country, and postal code. The response is useful for confirming or utilizing stored address data in downstream systems.
def account_address_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.account.address_details(id="ACCOUNT_ID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadAddresses()
{
$id="76GOU2";
try {
$response = $this->accountService->readAddresses($id);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response includes one or more address records linked to the specified account. Each record typically contains fields like address lines, city, state, post code, and country. If the account does not exist or access is restricted, an ABException is raised, and the exception block logs the detailed error message, validation feedback, and raw backend response.
AccountAddressDetailsDTO(
account = AccountAddressDataDTO(
id = "ACCOUNT_ID",
addresses = [
AcccountAddressDTO(
addressLine1 = "ADDRESS_LINE_1",
addressLine2 = "ADDRESS_LINE_2",
addressLine3 = "ADDRESS_LINE_3",
addressLine4 = "ADDRESS_LINE_4",
addressLine5 = "ADDRESS_LINE_5",
postCode = "POST_CODE",
uuid = "ADDRESS_UUID_1",
city = "CITY_1",
state = "STATE_1",
country = "COUNTRY_1",
isDefaultBilling = None,
isDefaultShipping = None
),
AcccountAddressDTO(
addressLine1 = "ADDRESS_LINE_1",
addressLine2 = "ADDRESS_LINE_2",
addressLine3 = "ADDRESS_LINE_3",
addressLine4 = "ADDRESS_LINE_4",
addressLine5 = "ADDRESS_LINE_5",
postCode = "POST_CODE",
uuid = "ADDRESS_UUID_2",
city = "CITY_2",
state = "STATE_2",
country = "COUNTRY_2",
isDefaultBilling = None,
isDefaultShipping = None
)
]
)
)
{
"account": {
"id": "ACCOUNT_ID",
"addresses": [
{
"address_line_1": "ADDRESS_LINE_1",
"address_line_2": "ADDRESS_LINE_2",
"address_line_3": "ADDRESS_LINE_3",
"address_line_4": "ADDRESS_LINE_4",
"address_line_5": "ADDRESS_LINE_5",
"post_code": "POST_CODE",
"city": "CITY",
"state": "STATE",
"country": "COUNTRY",
"is_default_billing": "BOOLEAN",
"is_default_shipping": "BOOLEAN",
"uuid": "UUID"
}
]
}
}
Getting Address Details for a Specific Account
Function: account_address_uuid_details()
Purpose
This SDK function retrieves the detailed address information of a specific account by using both the account ID and the address UUID via the address_uuid_details() method of the ExsitedSDK. It returns structured address data, including street, city, state, postal code, country, and additional metadata tied to that address record.
Parameters
Parameter | Type | Description |
---|---|---|
id | String | Unique identifier of the account. Example: "ACCOUNT_ID" |
uuid | String | Unique UUID of the specific address record. Example: "ADDRESS_UUID" |
Use Case
The account_address_uuid_details() function is used when precise address-level details are needed for a specific account, especially when multiple addresses may exist under a single account. This is essential for verifying delivery points, billing locations, or location-specific contact information. For example, logistics modules may use this to fetch delivery addresses before dispatching goods, or CRM systems may use it to display contact locations in client profiles. By requiring both the account ID and address UUID, this function ensures that address retrieval is unambiguous and secure, reducing the risk of accessing incorrect or outdated address records.
def account_address_uuid_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.account.address_uuid_details(
id = "ACCOUNT_ID",
uuid = "ADDRESS_UUID"
)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadAddressDetails()
{
$id="76GOU2";
$addressUUID="b2945101-d278-4149-9cf4-f110a1285d97";
try {
$response = $this->accountService->readAddressDetails($id,$addressUUID);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response includes detailed address information such as street, city, state, country, postal_code, type (e.g., billing or shipping), and possible contact details associated with the address. This structure allows client applications to confidently display or use addresses for invoicing, shipping, or compliance documentation. If the id or uuid is invalid or not found, the function raises an ABException, containing a list of validation errors and the backend’s raw response to assist in troubleshooting.
AccountAddressUuidDetailsDTO(
account = AccountAddressUuidDataDTO(
id = "ACCOUNT_ID",
addresses = AcccountAddressDTO(
addressLine1 = "ADDRESS_LINE_1",
addressLine2 = "ADDRESS_LINE_2",
addressLine3 = "ADDRESS_LINE_3",
addressLine4 = "ADDRESS_LINE_4",
addressLine5 = "ADDRESS_LINE_5",
postCode = "POST_CODE",
uuid = "ADDRESS_UUID",
city = "CITY_NAME",
state = "STATE_NAME",
country = "COUNTRY_NAME",
isDefaultBilling = None,
isDefaultShipping = None
)
)
)
{
"account": {
"id": "ACCOUNT_ID",
"addresses": {
"address_line_1": "ADDRESS_LINE_1",
"address_line_2": "ADDRESS_LINE_2",
"address_line_3": "ADDRESS_LINE_3",
"address_line_4": "ADDRESS_LINE_4",
"address_line_5": "ADDRESS_LINE_5",
"post_code": "POST_CODE",
"city": "CITY",
"state": "STATE",
"country": "COUNTRY",
"is_default_billing": "IS_DEFAULT_BILLING",
"is_default_shipping": "IS_DEFAULT_SHIPPING",
"uuid": "ADDRESS_UUID"
}
}
}
Modify Account Address by UUID
Function: account_update_address()
Purpose
This SDK function updates an existing address associated with an account using the update_address() method of the ExsitedSDK. It allows modifying all address-related fields including street lines, city, state, postal code, and country by providing the account ID and address UUID.
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The unique identifier of the account. Example: ACCOUNT_ID |
uuid | String | The UUID of the address to be updated. Example: ADDRESS_UUID |
address_line_1 | String | First line of the updated address. Example: "119 Yarra" |
address_line_2 | String | Second line of the updated address. Example: "10 Yarra" |
address_line_3 | String | Third line of the updated address. Example: "11 Yarra" |
address_line_4 | String | Fourth line of the updated address. Example: "12 Yarra" |
address_line_5 | String | Fifth line of the updated address. Example: "13 Yarra" |
postCode | String | Postal code of the address. Example: "3737" |
city | String | City name. Example: "Abbeyard" |
state | String | State name. Example: "Victoria" |
country | String | Country name. Example: "Australia" |
Use Case
This function is applicable when a user needs to change the stored address for a given account, such as relocating to a new place or correcting existing address data. The function takes both the account ID and address UUID to identify the target record and applies the new values to it. The updated address is then reflected in the backend system.
def account_update_address():
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:
request_data = AccountAddressRequestDTO(
account=AccountAddressRequestDetailsDTO(
address=AcccountAddressRequestDTO(
address_line_1="ADDRESS_LINE_1",
address_line_2="ADDRESS_LINE_2",
address_line_3="ADDRESS_LINE_3",
address_line_4="ADDRESS_LINE_4",
address_line_5="ADDRESS_LINE_5",
postCode="POSTCODE",
city="CITY",
state="STATE",
country="COUNTRY"
)
)
)
response = exsited_sdk.account.update_address(id="ACCOUNT_ID", uuid="ADDRESS_UUID", request_data=request_data)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testChangeAddress()
{
$id="76GOU2";
$addressUUID="6864c809-db5d-4681-a5a1-795deff9364f";
$params = [
'address' => [
'address_line_1' => 'House 15',
'address_line_2' => 'Road 20',
'address_line_3' => 'Block A',
'address_line_4' => 'Section 8',
'address_line_5' => 'Road 9',
'post_code' => '3737',
'city' => 'Abbeyard1',
'state' => 'Victoria',
'country' => 'Australia',
'isDefaultBilling' => 'false',
'isDefaultShipping' => 'false'
]
];
try {
$response = $this->accountService->changeAddresses($id, $params, $addressUUID,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response confirms the success of the address update, returning the updated address record or status message. If the address UUID or account ID is incorrect, or if access is denied, an ABException is triggered. The exception block then logs the detailed error output, validation summary, and raw API response for debugging purposes.
AccountAddressResponseDTO(
account = AccountAddressResponseDetailsDTO(
id = "ACCOUNT_ID",
addresses = AcccountAddressDTO(
addressLine1 = "ADDRESS_LINE_1",
addressLine2 = "ADDRESS_LINE_2",
addressLine3 = "ADDRESS_LINE_3",
addressLine4 = "ADDRESS_LINE_4",
addressLine5 = "ADDRESS_LINE_5",
postCode = "POST_CODE",
uuid = "ADDRESS_UUID",
city = "CITY",
state = "STATE",
country = "COUNTRY",
isDefaultBilling = None,
isDefaultShipping = None
)
)
)
{
"account": {
"id": "ACCOUNT-ID",
"addresses": {
"address_line_1": "ADDRESS-LINE-1",
"address_line_2": "ADDRESS-LINE-2",
"address_line_3": "ADDRESS-LINE-3",
"address_line_4": "ADDRESS-LINE-4",
"address_line_5": "ADDRESS-LINE-5",
"city": "CITY-NAME",
"country": "COUNTRY-NAME",
"isDefaultBilling": "BOOLEAN-VALUE",
"isDefaultShipping": "BOOLEAN-VALUE",
"post_code": "POST-CODE",
"state": "STATE-NAME",
"uuid": "UUID-PLACEHOLDER"
}
}
}
Getting All Payment Methods for an Account
Function: list_payment_methods()
Purpose
This function retrieves all payment methods associated with a specific account using the Exsited SDK. It supports both manual and electronic processors such as Cash, Cheque, Bank Deposit, and Credit Card . The function helps users view and manage active payment configurations under the account.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | Unique identifier of account |
Use Case
This function is used to retrieve and review all payment methods associated with a specific account. It supports both manual methods (like Cash, Cheque, and Bank Deposit) and digital processors (such as credit card payments via secure gateways). By calling this function, users can view which processors are active, which one is set as the default, and retrieve processor details such as names, UUIDs, creation timestamps, and other metadata. It is particularly useful for managing billing configurations, checking card expiration details, or auditing which methods are being used most frequently by the account.
def list_payment_methods():
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.account.list_payment_method(account_id="ACCOUNT_ID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadPaymentMethod()
{
$id="FKITFZ";
try {
$response = $this->accountService->readPaymentMethod($id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response returns the account ID along with a list of all payment methods linked to it. Each payment method contains key information such as the processor type (OTHER, DIRECT_CREDIT), current status, default flag, and a custom reference name. It also includes processor-specific details like the processor’s name, UUID, and API link. If the payment method involves a credit card, additional fields like card type, masked card number, expiry month and year, and a masked CVV are provided. Metadata such as creation date, last updated date, and user information (who created or modified it) are also included. The response ensures that all essential data is available to manage and audit payment setups tied to an account.
PAYMENTMETHODSLISTDTO(
ACCOUNT=PAYMENTMETHODLISTDTO(
ID='ACCOUNT_ID',
PAYMENTMETHODS=[
PAYMENTMETHODSDATADTO(
PROCESSTORTYPE='PAYMENT_PROCESSOR_TYPE_OTHER',
PAYMENTPROCESSOR='NULL',
STATUS='PAYMENT_METHOD_STATUS_ACTIVE',
DEFAULT='BOOLEAN_FALSE',
REFERENCE='PAYMENT_REFERENCE_CASH',
PAYMENTCOUNT='0',
LASTUSEDON='EMPTY',
CREATEDBY='CREATED_BY_IMPLEMENTER',
CREATEDON='TIMESTAMP_1',
LASTUPDATEDBY='EMPTY',
LASTUPDATEDON='EMPTY',
UUID='PAYMENT_METHOD_UUID_1',
VERSION='1',
SPECIFIEDORDERS='EMPTY',
USEFORSPECIFIEDORDERS='BOOLEAN_FALSE',
PROCESSOR=PAYMENTPROCESSORDETAILSDTO(
UUID='PAYMENT_PROCESSOR_UUID_1',
NAME='PAYMENT_PROCESSOR_CASH',
LINK='PAYMENT_PROCESSOR_API_URL_1'
),
CARDTYPE='NULL',
TOKEN='NULL',
CARDNUMBER='NULL',
EXPIRYMONTH='NULL',
EXPIRYYEAR='NULL',
CARDCVV='NULL',
NAMEONCARD='NULL',
LASTUSEDRESULT='NULL',
ERRORCOUNTSINCELASTSUCCESS='NULL'
),
PAYMENTMETHODSDATADTO(
PROCESSTORTYPE='PAYMENT_PROCESSOR_TYPE_OTHER',
PAYMENTPROCESSOR='NULL',
STATUS='PAYMENT_METHOD_STATUS_ACTIVE',
DEFAULT='BOOLEAN_FALSE',
REFERENCE='PAYMENT_REFERENCE_CHEQUE',
PAYMENTCOUNT='0',
LASTUSEDON='EMPTY',
CREATEDBY='CREATED_BY_IMPLEMENTER',
CREATEDON='TIMESTAMP_2',
LASTUPDATEDBY='EMPTY',
LASTUPDATEDON='EMPTY',
UUID='PAYMENT_METHOD_UUID_2',
VERSION='1',
SPECIFIEDORDERS='EMPTY',
USEFORSPECIFIEDORDERS='BOOLEAN_FALSE',
PROCESSOR=PAYMENTPROCESSORDETAILSDTO(
UUID='PAYMENT_PROCESSOR_UUID_2',
NAME='PAYMENT_PROCESSOR_CHEQUE',
LINK='PAYMENT_PROCESSOR_API_URL_2'
),
CARDTYPE='NULL',
TOKEN='NULL',
CARDNUMBER='NULL',
EXPIRYMONTH='NULL',
EXPIRYYEAR='NULL',
CARDCVV='NULL',
NAMEONCARD='NULL',
LASTUSEDRESULT='NULL',
ERRORCOUNTSINCELASTSUCCESS='NULL'
),
PAYMENTMETHODSDATADTO(
PROCESSTORTYPE='PAYMENT_PROCESSOR_TYPE_OTHER',
PAYMENTPROCESSOR='NULL',
STATUS='PAYMENT_METHOD_STATUS_ACTIVE',
DEFAULT='BOOLEAN_FALSE',
REFERENCE='PAYMENT_REFERENCE_BANK_DEPOSIT',
PAYMENTCOUNT='0',
LASTUSEDON='EMPTY',
CREATEDBY='CREATED_BY_IMPLEMENTER',
CREATEDON='TIMESTAMP_3',
LASTUPDATEDBY='EMPTY',
LASTUPDATEDON='EMPTY',
UUID='PAYMENT_METHOD_UUID_3',
VERSION='1',
SPECIFIEDORDERS='EMPTY',
USEFORSPECIFIEDORDERS='BOOLEAN_FALSE',
PROCESSOR=PAYMENTPROCESSORDETAILSDTO(
UUID='PAYMENT_PROCESSOR_UUID_3',
NAME='PAYMENT_PROCESSOR_BANK_DEPOSIT',
LINK='PAYMENT_PROCESSOR_API_URL_3'
),
CARDTYPE='NULL',
TOKEN='NULL',
CARDNUMBER='NULL',
EXPIRYMONTH='NULL',
EXPIRYYEAR='NULL',
CARDCVV='NULL',
NAMEONCARD='NULL',
LASTUSEDRESULT='NULL',
ERRORCOUNTSINCELASTSUCCESS='NULL'
),
PAYMENTMETHODSDATADTO(
PROCESSTORTYPE='PAYMENT_PROCESSOR_TYPE_DIRECT_CREDIT',
PAYMENTPROCESSOR='NULL',
STATUS='PAYMENT_METHOD_STATUS_ACTIVE',
DEFAULT='BOOLEAN_TRUE',
REFERENCE='PAYMENT_REFERENCE_VISA',
PAYMENTCOUNT='0',
LASTUSEDON='EMPTY',
CREATEDBY='CREATED_BY_IMPLEMENTER',
CREATEDON='TIMESTAMP_4',
LASTUPDATEDBY='UPDATED_BY_IMPLEMENTER',
LASTUPDATEDON='TIMESTAMP_5',
UUID='PAYMENT_METHOD_UUID_4',
VERSION='2',
SPECIFIEDORDERS='EMPTY',
USEFORSPECIFIEDORDERS='BOOLEAN_FALSE',
PROCESSOR=PAYMENTPROCESSORDETAILSDTO(
UUID='PAYMENT_PROCESSOR_UUID_4',
NAME='PAYMENT_PROCESSOR_SECURE_PAY',
LINK='PAYMENT_PROCESSOR_API_URL_4'
),
CARDTYPE='CARD_TYPE_VISA',
TOKEN='PAYMENT_TOKEN',
CARDNUMBER='CARD_NUMBER_MASKED',
EXPIRYMONTH='CARD_EXPIRY_MONTH',
EXPIRYYEAR='CARD_EXPIRY_YEAR',
CARDCVV='CARD_CVV_MASKED',
NAMEONCARD='EMPTY',
LASTUSEDRESULT='EMPTY',
ERRORCOUNTSINCELASTSUCCESS='EMPTY'
)
]
)
)
{
"account": {
"id": "PLACEHOLDER_ACCOUNT_ID",
"payment_methods": [
{
"processor_type": "PLACEHOLDER_PROCESSOR_TYPE",
"status": "ACTIVE",
"default": "false",
"processor": {
"uuid": "UUID-PLACEHOLDER",
"name": "PLACEHOLDER_NAME",
"link": "https://api-stage.exsited.com/api/v2/payment_processors/UUID-PLACEHOLDER"
},
"reference": "PLACEHOLDER_REFERENCE",
"payment_count": "0.000000",
"last_used_on": "",
"created_by": "PLACEHOLDER_CREATED_BY",
"created_on": "YYYY-MM-DDTHH:MM:SSZ",
"last_updated_by": "",
"last_updated_on": "",
"uuid": "UUID-PLACEHOLDER",
"version": "1",
"use_for_specified_orders": "false",
"specified_orders": ""
}
]
}
}
Getting Payment Method Details
Function: payment_method_details()
Purpose
This function retrieves detailed information for a specific payment method associated with an account, based on a unique reference string. It is used to inspect the configuration and metadata of the payment method, including processor details, card info, and audit history.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | The unique ID of the account holding the payment method. |
reference | String | A unique reference string to identify the specific payment method. |
Use Case
This function is useful to view the complete setup of a particular payment method linked to an account. By providing the account ID and the payment method’s reference, the function returns all stored data for that method, such as processor type, default status, card type and number, processor info, and timestamps related to creation or last update. It helps ensure accuracy and traceability for financial configurations within the system.
def payment_method_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.account.payment_method_details(account_id="ACCOUNT_ID", reference="REFERENCE")
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadDetailsPaymentMethod()
{
$id = "FKITFZ";
$ref = "Reference-Ch";
try {
$response = $this->accountService->readDetailsPaymentMethod($id, $ref,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response returns the account ID and complete details of the requested payment method. This includes the processor type ,the default flag, status , and full processor information (UUID, name, API link). If it's a card-based method, the masked card number, expiry date, card type, and CVV placeholder are returned. Additionally, metadata such as the reference string, payment count, creation and update timestamps, and UUID of the payment method is also provided. This enables backend systems to programmatically audit, validate, or display payment method records in admin dashboards or reconciliation tools.
PAYMENTMETHODSDETAILSDTO(
account=PaymentMethodsDTO(
id='ACCOUNT_ID',
paymentMethod=PaymentMethodsDataDTO(
processorType='PAYMENT_PROCESSOR_TYPE_DIRECT_CREDIT',
paymentProcessor=None,
status='PAYMENT_METHOD_STATUS_ACTIVE',
default=True,
reference='PAYMENT_REFERENCE',
paymentCount=0,
lastUsedOn=None,
createdBy='SYSTEM_USER',
createdOn='TIMESTAMP_CREATED',
lastUpdatedBy='SYSTEM_USER',
lastUpdatedOn='TIMESTAMP_UPDATED',
uuid='PAYMENT_METHOD_UUID',
version=2,
specifiedOrders=None,
useForSpecifiedOrders=False,
processor=PaymentProcessorDetailsDTO(
uuid='PAYMENT_PROCESSOR_UUID',
name='PAYMENT_PROCESSOR_NAME',
link='PAYMENT_PROCESSOR_API_ENDPOINT'
),
cardType='CARD_TYPE_VISA',
token='ENCRYPTED_PAYMENT_TOKEN',
cardNumber='MASKED_CARD_NUMBER',
expiryMonth='CARD_EXPIRY_MONTH',
expiryYear='CARD_EXPIRY_YEAR',
cardCvv='MASKED_CVV',
nameOnCard=None,
lastUsedResult=None,
errorCountSinceLastSuccess=None
)
)
)
public function testReadDetailsPaymentMethod()
{
$id = "FKITFZ";
$ref = "Reference-Ch";
try {
$response = $this->accountService->readDetailsPaymentMethod($id, $ref,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Adding Payment Method
Function:account_payment_methods_add()
Purpose
This function is add a new non-card payment method specifically , , or to a specified account in the system using the ExsitedSDK. These payment methods are categorized under the processor type and are primarily used for manual or offline payment handling.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | The unique identifier of the account to which the payment method will be added. |
request_data | PaymentMethodsAddDTO | An object that contains the payment method details to be added. |
Use Case
This function is used during billing setup or account configuration where customers or administrators need to define alternative payment options that are not processed via credit card gateways. For example, if a customer prefers to pay using a bank deposit or cash upon invoice, this method allows storing that choice in the system by assigning a name, reference label, and marking it as default (if needed).
def account_payment_methods_add():
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:
payment_method: PaymentMethodsDataDTO = PaymentMethodsDataDTO(
processorType="PROCESSOR_TYPE",
default="BOOLEAN",
paymentProcessor="PAYMENT_PROCESSOR",
reference="REFERENCE",
)
response = exsited_sdk.account.add_payment_method(account_id="ACCOUNT_ID",
request_data=PaymentMethodsAddDTO().method(
payment_method=payment_method))
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testCreatePaymentMethod()
{
$params= [
'processor_type' => 'OTHER',
'default' => true,
'payment_processor' => 'Cheque',
'reference' => 'Reference-Ch'
];
$id='FKITFZ';
try {
$response = $this->accountService->createPaymentMethod($params, $id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The function returns detailed information about the newly added payment method within the account. It confirms the processorType as OTHER, includes metadata such as creation time and version, and provides a nested object with the processor's name, UUID, and hyperlink. Since this is a non-card method, fields like card number, expiry, and token are omitted.
PaymentMethodsDetailsDTO(
account=PaymentMethodsDTO(
id='ACCOUNT_ID',
paymentMethod=PaymentMethodsDataDTO(
processorType='PROCESSOR_TYPE',
paymentProcessor='NULL',
status='STATUS',
default='BOOLEAN',
reference='REFERENCE',
paymentCount='NUMBER',
lastUsedOn='EMPTY',
createdBy='CREATED_BY',
createdOn='TIMESTAMP',
lastUpdatedBy='EMPTY',
lastUpdatedOn='EMPTY',
uuid='UUID',
version='VERSION',
specifiedOrders='EMPTY',
useForSpecifiedOrders='BOOLEAN',
processor=PaymentProcessorDetailsDTO(
uuid='UUID',
name='PROCESSOR_NAME',
link='PROCESSOR_LINK'
),
cardType='NULL',
token='NULL',
cardNumber='NULL',
expiryMonth='NULL',
expiryYear='NULL',
cardCvv='NULL',
nameOnCard='NULL',
lastUsedResult='NULL',
errorCountSinceLastSuccess='NULL'
)
)
)
{
"account": {
"payment_method": {
"processor_type": "PLACEHOLDER_PROCESSOR_TYPE",
"status": "ACTIVE",
"default": "true",
"processor": {
"uuid": "UUID-PLACEHOLDER",
"name": "PLACEHOLDER_NAME",
"link": "https://api-stage.exsited.com/api/v2/payment_processors/UUID-PLACEHOLDER"
},
"reference": "PLACEHOLDER_REFERENCE",
"payment_count": "0.000000",
"last_used_on": "",
"created_by": "PLACEHOLDER_CREATED_BY",
"created_on": "YYYY-MM-DDTHH:MM:SSZ",
"last_updated_by": "",
"last_updated_on": "",
"uuid": "UUID-PLACEHOLDER",
"version": "1",
"use_for_specified_orders": "false",
"specified_orders": ""
},
"id": "PLACEHOLDER_ACCOUNT_ID"
}
}
Adding Card Payment Method
Function:account_payment_card_methods_add()
Purpose
This function allows the addition of a card-based payment method to a specified account using the ExsitedSDK. It is used to securely register credit or debit card information such as card number, type, expiry, and token under a payment processor like bitmascot secure pay.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | Unique identifier of the account to which the card payment method will be added. |
request_data | PaymentCardMethodsAddDTO | Contains all the card-related details required to create the payment method. |
Use Case
This function is used during account setup or billing configuration to register payment options that will later be used for invoices or transactions. For card-based methods information is needed including card number, expiry details, token, and processor, allowing for automated payments via integrated gateways like "bitmascot secure pay". The function supports assigning default payment status and capturing tracking metadata such as creation timestamps and versioning.
def account_payment_card_methods_add():
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:
payment_method: PaymentCardMethodsDataDTO = PaymentCardMethodsDataDTO(
processorType="PAYMENT_PROCESSOR_TYPE",
default="BOOLEAN",
paymentProcessor="PAYMENT_PROCESSOR_NAME",
reference="PAYMENT_REFERENCE",
cardType="CARD_TYPE",
token="CARD_TOKEN",
cardNumber="CARD_NUMBER",
expiryMonth="EXPIRY_MONTH",
expiryYear="EXPIRY_YEAR",
)
response = exsited_sdk.account.add_payment_card_method(account_id="ACCOUNT_ID",
request_data=PaymentCardMethodsAddDTO().method(
payment_method=payment_method))
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testCreateCardPaymentMethod()
{
$params = [
'processor_type' => 'DIRECT_CREDIT',
'default' => true,
'payment_processor' => 'securepay',
'card_type' => 'Visa',
'token' => '1738992071975167',
'card_number' => '4242',
'expiry_month' => '12',
'expiry_year' => '2025',
'reference' => 'apiSecurepay',
];
$id='J51VQS';
try {
$response = $this->accountService->createCardPaymentMethod($params, $id);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The function returns a detailed response confirming that the card payment method has been successfully added to the account. The response includes the processor type (DIRECT_CREDIT), processor metadata (UUID, name, link), and key card attributes such as type, masked number (last 4 digits), expiry date, and token. It also captures metadata like creation timestamp, creator identity, and system-generated UUID. Sensitive information like the card CVV is masked for security. This structured response ensures clarity for client-side confirmation and provides useful references for backend auditing or error tracking.
PaymentMethodsDetailsDTO(
account=PaymentMethodsDTO(
id='ACCOUNT_ID',
paymentMethod=PaymentMethodsDataDTO(
processorType='PAYMENT_PROCESSOR_TYPE',
paymentProcessor='NULL',
status='STATUS',
default='BOOLEAN',
reference='PAYMENT_REFERENCE',
paymentCount='NUMBER',
lastUsedOn='EMPTY',
createdBy='CREATED_BY',
createdOn='TIMESTAMP',
lastUpdatedBy='EMPTY',
lastUpdatedOn='EMPTY',
uuid='UUID',
version='VERSION',
specifiedOrders='EMPTY',
useForSpecifiedOrders='BOOLEAN',
processor=PaymentProcessorDetailsDTO(
uuid='PROCESSOR_UUID',
name='PROCESSOR_NAME',
link='PROCESSOR_LINK'
),
cardType='CARD_TYPE',
token='CARD_TOKEN',
cardNumber='CARD_NUMBER_LAST4',
expiryMonth='EXPIRY_MONTH',
expiryYear='EXPIRY_YEAR',
cardCvv='CARD_CVV_MASKED',
nameOnCard='EMPTY',
lastUsedResult='EMPTY',
errorCountSinceLastSuccess='EMPTY'
)
)
)
{
"account": {
"payment_method": {
"processor_type": "PLACEHOLDER_PROCESSOR_TYPE",
"status": "ACTIVE",
"default": "true",
"processor": {
"uuid": "UUID-PLACEHOLDER",
"name": "PLACEHOLDER_NAME",
"link": "https://api-stage.exsited.com/api/v2/payment_processors/UUID-PLACEHOLDER"
},
"card_type": "PLACEHOLDER_CARD_TYPE",
"token": "PLACEHOLDER_TOKEN",
"card_number": "PLACEHOLDER_CARD_NUMBER",
"expiry_month": "PLACEHOLDER_EXPIRY_MONTH",
"expiry_year": "PLACEHOLDER_EXPIRY_YEAR",
"card_cvv": "PLACEHOLDER_CVV",
"name_on_card": "PLACEHOLDER_NAME_ON_CARD",
"reference": "PLACEHOLDER_REFERENCE",
"payment_count": "0.000000",
"last_used_on": "PLACEHOLDER_LAST_USED_ON",
"last_used_result": "PLACEHOLDER_LAST_USED_RESULT",
"error_count_since_last_success": "PLACEHOLDER_ERROR_COUNT",
"created_by": "PLACEHOLDER_CREATED_BY",
"created_on": "YYYY-MM-DDTHH:MM:SSZ",
"last_updated_by": "PLACEHOLDER_LAST_UPDATED_BY",
"last_updated_on": "PLACEHOLDER_LAST_UPDATED_ON",
"uuid": "UUID-PLACEHOLDER",
"version": "1",
"use_for_specified_orders": "false",
"specified_orders": "PLACEHOLDER_SPECIFIED_ORDERS"
},
"id": "PLACEHOLDER_ACCOUNT_ID"
}
}
Getting Billing Preferences for an Account
Function: get_billing_preferences()
Purpose
This function retrieves the billing preference settings for a specific account using its unique account ID. It returns structured configuration data that defines how invoices and payments are handled for that account, including invoice modes, payment methods, terms, alignment rules, and communication profiles.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | Unique identifier of account |
Use Case
This function is typically used when displaying or reviewing billing configuration within the account management interface or for audit and reporting purposes. For example, an admin user navigating to an account's settings can view current billing rules (such as invoice period, start date logic, and processor preferences) fetched by this function.
def get_billing_preferences():
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.account.billing_preference_details(
account_id="ACCOUNT_ID"
)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadBillingPreference()
{
$id = "J51VQS";
try {
$response = $this->accountService->readBillingPreference($id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response returns the billing preferences configured for the specified account. It includes details such as the selected communication profile , invoice generation mode , billing period , and the billing start conditions. It also provides information about the assigned payment processor, payment mode , payment terms, and how the payment term is aligned . This information helps determine how invoices and payments are managed for the account.
AccountDetailsDTO(
account=AccountDataDTO(
name='NULL',
emailAddress='NULL',
status='NULL',
id='ACCOUNT_ID',
displayName='NULL',
description='NULL',
invoiceParentAccount='NULL',
type='NULL',
imageUri='NULL',
grantPortalAccess='NULL',
website='NULL',
linkedin='NULL',
twitter='NULL',
facebook='NULL',
createdBy='NULL',
createdOn='NULL',
lastUpdatedBy='NULL',
lastUpdatedOn='NULL',
uuid='NULL',
version='NULL',
parentAccount='NULL',
group='NULL',
manager='NULL',
referralTracking='NULL',
salesRep='NULL',
pricingLevel='NULL',
currency='NULL',
timeZone='NULL',
tax='NULL',
accountingCode='NULL',
communicationPreference='NULL',
paymentMethods='NULL',
billingPreferences=BillingPreferencesDTO(
communicationProfile='COMMUNICATION_PROFILE_NAME',
invoiceMode='INVOICE_MODE',
invoiceTerm='INVOICE_TERM',
billingPeriod='BILLING_PERIOD',
billingStartDate='BILLING_START_DATE',
billingStartDayOfMonth='BILLING_START_DAY',
chargingAndBillingAlignment='BOOLEAN',
paymentProcessor='PAYMENT_PROCESSOR',
paymentMode='PAYMENT_MODE',
paymentTerm='PAYMENT_TERM',
paymentTermAlignment='PAYMENT_TERM_ALIGNMENT'
),
customAttributes='NULL',
addresses='NULL',
contacts='NULL',
customForms='NULL',
eventUuid='NULL',
customObjects='NULL',
kpis='NULL'
)
)
{
"account": {
"id": "ID-PLACEHOLDER",
"billing_preferences": {
"communication_profile": "COMMUNICATION_PROFILE_PLACEHOLDER",
"invoice_mode": "INVOICE_MODE_PLACEHOLDER",
"invoice_term": "INVOICE_TERM_PLACEHOLDER",
"billing_period": "BILLING_PERIOD_PLACEHOLDER",
"billing_start_date": "BILLING_START_DATE_PLACEHOLDER",
"billing_start_day_of_month": "DAY_PLACEHOLDER",
"charging_and_billing_alignment": "ALIGNMENT_PLACEHOLDER",
"payment_processor": "PROCESSOR_PLACEHOLDER",
"payment_mode": "PAYMENT_MODE_PLACEHOLDER",
"payment_term": "PAYMENT_TERM_PLACEHOLDER",
"payment_term_alignment": "TERM_ALIGNMENT_PLACEHOLDER"
}
}
}
Deleting an Account
Function: account_delete()
Purpose
This SDK function deletes an existing account by calling the delete() method of the ExsitedSDK. It is designed to permanently remove the specified account using its unique identifier. This operation is irreversible and must be used with appropriate access and caution.
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The unique identifier of the account to be deleted. Example: ACCOUNT_ID |
Use Case
This function is used when the user needs to permanently remove an account from the system, such as deactivating a customer, clearing test data, or managing lifecycle events. Upon execution, the backend processes the delete request and removes the record if authorized. Any failures—such as non-existent account ID, restricted access, or backend constraints—are handled via exceptions.
def account_delete():
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.account.delete(id="ACCOUNT_ID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testDelete()
{
$id="GE2O2Y";
try {
$response = $this->accountService->delete($id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
If successful, the response confirms the deletion status of the specified account, typically returning a status code and confirmation message. If the operation fails, the raised ABException provides insight into the issue via the message, validation error list, and full raw backend response for debugging.
{'success': True, 'status_code': 204}
null
Getting All Notes of an Account
Function: account_note_details()
Purpose
This function is used to retrieve all notes associated with a specific account by its unique identifier. It fetches both system-generated and manually added notes, allowing users to view rich text content, note history, and metadata such as the creator, version, timestamps, and any attached files.
Parameter
Parameter | Type | Description |
---|---|---|
account_id | String | The unique identifier of the account |
Use Case
This function is used to view all notes stored for a specific account. These notes may include manual entries, automated system logs, or uploaded file attachments and help maintain a timeline of events and references related to customer management or communication. It's particularly helpful for understanding account history during service calls or audits.
def account_note_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())
limit: int = None,
offset: int = None
try:
response = exsited_sdk.account.note_details(id="ACCOUNT_ID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadAllNotes()
{
$id="76GOU2";
try {
$response = $this->accountService->readAllNotes($id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response returns a list of all note entries linked to the account. Each note includes a unique UUID, a version number, and the content of the note, which may be plain or formatted HTML. It also includes metadata like the author, creation time, and last update details. Additionally, each note may optionally include a list of attached files. The notes are returned with pagination support, enabling clients to manage large volumes of records efficiently by controlling the page size (limit) and the current position in the dataset (offset).
AccountNoteDetailsDTO(
account=AccountNoteDataDTO(
notes=[
NoteDataDTO(
uuid='NOTE_UUID_1',
version='VERSION',
content='NOTE_CONTENT_1',
files=[],
createdBy='CREATED_BY',
createdOn='TIMESTAMP',
lastUpdatedBy='EMPTY',
lastUpdatedOn='EMPTY'
),
NoteDataDTO(
uuid='NOTE_UUID_2',
version='VERSION',
content='NOTE_CONTENT_2',
files=[],
createdBy='CREATED_BY',
createdOn='TIMESTAMP',
lastUpdatedBy='EMPTY',
lastUpdatedOn='EMPTY'
),
NoteDataDTO(
uuid='NOTE_UUID_3',
version='VERSION',
content='NOTE_CONTENT_3',
files=[],
createdBy='CREATED_BY',
createdOn='TIMESTAMP',
lastUpdatedBy='EMPTY',
lastUpdatedOn='EMPTY'
),
NoteDataDTO(
uuid='NOTE_UUID_4',
version='VERSION',
content='HTML_NOTE_CONTENT',
files=[],
createdBy='CREATED_BY',
createdOn='TIMESTAMP',
lastUpdatedBy='EMPTY',
lastUpdatedOn='EMPTY'
),
NoteDataDTO(
uuid='NOTE_UUID_5',
version='VERSION',
content='API_NOTE_CONTENT',
files=[],
createdBy='ALTERNATE_CREATED_BY',
createdOn='TIMESTAMP',
lastUpdatedBy='EMPTY',
lastUpdatedOn='EMPTY'
),
NoteDataDTO(
uuid='NOTE_UUID_6',
version='UPDATED_VERSION',
content='HTML_FORMATTED_NOTE',
files=[],
createdBy='CREATED_BY',
createdOn='TIMESTAMP',
lastUpdatedBy='UPDATED_BY',
lastUpdatedOn='UPDATE_TIMESTAMP'
)
],
pagination=PaginationDTO(
records='RECORD_COUNT',
limit='PAGE_LIMIT',
offset='PAGE_OFFSET',
previousPage='EMPTY',
nextPage='NULL'
)
)
)
{
"account": {
"notes": [
{
"uuid": "NOTE_UUID_1",
"version": "NOTE_VERSION_1",
"content": "NOTE_CONTENT_1",
"files": [
{
"uuid": "FILE_UUID_1",
"name": "FILE_NAME_1",
"version": "FILE_VERSION_1"
}
],
"created_by": "CREATED_BY_1",
"created_on": "CREATED_ON_TIMESTAMP_1",
"last_updated_by": "LAST_UPDATED_BY_1",
"last_updated_on": "LAST_UPDATED_ON_TIMESTAMP_1"
},
{
"uuid": "NOTE_UUID_2",
"version": "NOTE_VERSION_2",
"content": "NOTE_CONTENT_2",
"files": [
{
"uuid": "FILE_UUID_2",
"name": "FILE_NAME_2",
"version": "FILE_VERSION_2"
},
{
"uuid": "FILE_UUID_3",
"name": "FILE_NAME_3",
"version": "FILE_VERSION_3"
}
],
"created_by": "CREATED_BY_2",
"created_on": "CREATED_ON_TIMESTAMP_2",
"last_updated_by": "LAST_UPDATED_BY_2",
"last_updated_on": "LAST_UPDATED_ON_TIMESTAMP_2"
}
],
"pagination": {
"records": "TOTAL_RECORDS",
"limit": "LIMIT_PER_PAGE",
"offset": "OFFSET_VALUE",
"previous_page": "PREVIOUS_PAGE_URL",
"next_page": "NEXT_PAGE_URL"
}
}
}
Getting a Note Details
Function: account_note_uuid_details()
Purpose
This function retrieves the full details of a specific note associated with an account by its unique note UUID.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | Unique identifier of the account |
note_uuid | String | Unique identifier of the note to retrieve |
Use Case
The function is used when authenticate user interface needs to view the full content and metadata of a specific note within an account's communication history. A note created by an internal watcher (such as system) and sent it to an external watcher (such as customers or portal users). Notes may include rich HTML-formatted content, file attachments, or both. This endpoint supports scenarios like customer support reviews, audit trails, and documentation lookups, where accessing the full context of a particular note is essential.
def account_note_uuid_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.account.note_uuid_details(id="ACCOUNT_ID", uuid='NOTE_UUID')
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadNoteDetails()
{
$id="76GOU2";
$noteUUID="89f1130d-216a-4a46-9037-c2826860b2e5";
try {
$response = $this->accountService->readNoteDetails($id,$noteUUID,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response returns the complete structure of the specified note. It includes the content, version number, author (creator), timestamps of creation and last update, and any associated file attachments. This provides full visibility into the lifecycle and contents of a note, including who authored it and when it was last modified. File attachments in the response are listed with their UUID, name, and version for reference or download purposes.
{
"account": {
"note": {
"uuid": "NOTE_UUID",
"version": "VERSION",
"content": "HTML_FORMATTED_CONTENT",
"files": [
{
"uuid": "FILE_UUID",
"name": "FILE_NAME",
"version": "FILE_VERSION"
}
],
"created_by": "CREATED_BY",
"created_on": "CREATION_TIMESTAMP",
"last_updated_by": "UPDATED_BY",
"last_updated_on": "UPDATE_TIMESTAMP",
"custom_attributes": []
}
}
}
{
"account": {
"note": {
"uuid": "UUID",
"version": "VERSION",
"content": "CONTENT",
"files": [
{
"uuid": "FILE_UUID",
"name": "FILE_NAME",
"version": "FILE_VERSION"
}
],
"created_by": "CREATED_BY",
"created_on": "CREATED_ON",
"last_updated_by": "LAST_UPDATED_BY",
"last_updated_on": "LAST_UPDATED_ON"
}
}
}
Removing a Single Note
Function: account_note_uuid_delete()
Purpose
This function is used to delete a specific note from an account using the note's UUID. It helps in programmatically removing unwanted or obsolete notes that are no longer needed in the system.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | The unique identifier of the account |
note_uuid | String | The unique identifier of the note |
Use Case
This function is used when there are situations where notes added to an account are either no longer relevant, were mistakenly created, or need to be removed for confidentiality. This function facilitates automated deletion of such notes through the SDK. Since notes can contain content or files, removing them ensures they are no longer accessible to internal or external viewers.
def account_note_uuid_delete():
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.account.delete_note_uuid(id="ACCOUNT_ID", uuid='NOTE_UUID')
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testDeleteNote()
{
$id="76GOU2";
$noteUUID="89f1130d-216a-4a46-9037-c2826860b2e5";
try {
$response = $this->accountService->deleteNote($id,$noteUUID,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The function returns a dictionary with success: True and status_code: 204. The 204 status indicates that the operation completed successfully and there is no further content returned. This confirms the removal of the specified note from the account.
{'SUCCESS': TRUE, 'STATUS_CODE': 204}
null
Getting All Files of a Note
Function : account_note_uuid_files_details()
Purpose
This function retrieve all files attached to a specific note under a given account. It provides access to metadata for each file, such as filename, UUID, and version, allowing users to inspect or manage the documents associated with a note entry.
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The unique identifier of the account |
uuid | String | The unique identifier of the note |
Use Case
This function is used when authenticated user want to review or see the all type of files associated with a note they can use this to programmatically fetch all attachments linked to that note. This ensures that file records are properly accessible and auditable within the account's communication history.
def account_note_uuid_files_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.account.note_uuid_files_details(id="ACCOUNT_ID", uuid='NOTE_UUID')
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadNoteFiles()
{
$id="76GOU2";
$noteUUID="89f1130d-216a-4a46-9037-c2826860b2e5";
try {
$response = $this->accountService->readNoteFiles($id,$noteUUID,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response returns a list of file objects attached to the specified note. Each file includes its UUID, name, and version, allowing for file tracking and version control. If the note contains no files, the list will be empty. This structured response ensures all note-related documents are accessible in a reliable and standardized format.
AccountNoteUuidFileDetailsDTO(
account=AccountNoteUuidFileDataDTO(
note=NoteFileDataDTO(
files=[
FileDTO(
uuid='FILE_UUID_1',
name='IMAGE_FILE.jpg',
version='FILE_VERSION'
),
FileDTO(
uuid='FILE_UUID_2',
name='DATA_FILE.csv',
version='FILE_VERSION'
),
FileDTO(
uuid='FILE_UUID_3',
name='DOCUMENT_FILE.pdf',
version='FILE_VERSION'
),
FileDTO(
uuid='FILE_UUID_4',
name='TEXT_FILE.txt',
version='FILE_VERSION'
)
]
)
)
)
{
"account": {
"note": {
"files": [
{
"uuid": "FILE_UUID",
"name": "FILE_NAME",
"version": "FILE_VERSION"
}
]
}
}
}
Removing File from Account Note
Function: account_note_uuid_file_uuid_delete()
Purpose
This function is used to delete a specific file that is attached to a note within a given account. It helps manage note-related files by allowing precise removal of a file without affecting the note content or other files.
Parameters
Parameter | Type | Description |
---|---|---|
account__id | String | Unique identifier of the account |
note_uuid | String | Unique identifier of the note |
file_uuid | String | Unique identifier of the file to be deleted |
Use Case
This function allows authenticated user to target and remove one specific file from a note, keeping the rest of the note and its attachments intact. The operation is final and removes the file permanently.An account note may contain one or more attached files, such as images, PDFs, or documents. Over time, some of these attachments may become outdated, irrelevant, or accidentally uploaded.
def account_note_uuid_file_uuid_delete():
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.account.delete_note_uuid_file_uuid(
id="ACCOUNT_ID",
uuid='NOTE_UUID',
file_uuid='FILE_UUID'
)
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testDeleteNoteFile()
{
$id="76GOU2";
$noteUUID="89f1130d-216a-4a46-9037-c2826860b2e5";
$fileUUID="d80e699e-532a-4996-93d8-e3b513e8b50f";
try {
$response = $this->accountService->deleteNoteFile($id,$noteUUID,$fileUUID,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The function returns a dictionary with a success flag set to True and an HTTP status_code of 204, indicating that the file has been deleted and no further response content is provided. This confirms the file was removed as requested.
{'SUCCESS': TRUE, 'STATUS_CODE': 204}
null
Retrieving Specific File Details from a Note
Function: account_note_uuid_files_uuid_details()
Purpose
This function is used to fetch the details of a single file attached to a note within a specific account. It provides precise access to file metadata using the file's unique identifier, allowing verification of filename, version, and identity without retrieving the full note or all attached files.
Parameters
Parameter | Type | Description |
---|---|---|
account__id | String | Unique identifier of the account |
note_uuid | String | Unique identifier of the note |
file_uuid | String | Unique identifier of the file to be deleted |
Use Case
This function is used to fetch just one file’s details instead of retrieving all note files. When working with account-related notes that include file uploads (invoices, reports, images), users may need to inspect a single file for its version, name, or unique ID especially when verifying attachments, debugging sync issues, or displaying metadata.
def account_note_uuid_files_uuid_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.account.note_uuid_files_uuid_details(
id="ACCOUNT_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 testReadNoteFileDetails()
{
$id="76GOU2";
$noteUUID="89f1130d-216a-4a46-9037-c2826860b2e5";
$fileUUID="d80e699e-532a-4996-93d8-e3b513e8b50f";
try {
$response = $this->accountService->readNoteFileDetails($id,$noteUUID,$fileUUID,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response contains the file’s metadata, including its uuid, name (with extension), and version. This allows the user to confirm whether the correct file is being accessed or associated with the note. The response structure is focused and lightweight, making it ideal for user interfaces, validations, or file history lookups.
{
"account": {
"note": {
"files": [
{
"uuid": "FILE_UUID",
"name": "SPREADSHEET_FILE.xlsx",
"version": "FILE_VERSION"
}
],
"custom_attributes": []
}
}
}
{
"account": {
"note": {
"files": [
{
"uuid": "FILE_UUID",
"name": "FILE_NAME",
"version": "FILE_VERSION"
}
]
}
}
}
Retrieving Account Image
Function: account_image()
Purpose
This function is used to fetch the image associated with a given account by its ID. The image is typically used as a visual identifier or avatar for the account in various user interfaces.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | The unique identifier of the account |
Use Case
This function is used to retrieve the profile image of an account for display in dashboards, user portals, or account summaries. If no image has been set for the account, the image_uri field will return null. This function helps determine whether an image is associated with the account and provides the file path to access it.
def account_image():
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.account.get_image(id="ACCOUNT_ID")
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testGetImage()
{
$id="6MRG4C";
try {
$response = $this->accountService->getImage($id);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The function returns an object that contains two key pieces of information: the accountId and the imageUri. If the account has an image, the imageUri will point to the file path where the image is stored. If no image is associated with the account, the imageUri will be null. This allows frontend applications to dynamically decide whether to display the image or fall back to a default.
AccountImageDetailsDTO(
account=AccountImageDataDTO(
imageUri='RESOURCE_PATH/ACCOUNT_UUID.jpg',
accountId='ACCOUNT_ID'
)
)
{
"account": {
"image_uri": "IMAGE_URI",
"account_id": "ACCOUNT_ID"
}
}
Uploading Account Image
Function: account_add_image()
Purpose
This function uploads an image file to a specified account and sets it as the account’s profile image.
Parameters
Parameter | Type | Description |
---|---|---|
file_url | String | Local path to the image file to be uploaded |
account_id | String | Unique identifier of the account receiving image |
Use Case
The function is used to assign or update a profile image for a specific account by uploading an image from the local file system. This can be helpful for system admins or users managing account data who want to personalize or brand accounts with identifiable images such as business logos, user avatars, or customer photos. When invoked, the image is uploaded and stored, and the URI is returned to be used throughout the platform for visual reference.
def account_add_image():
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:
file_url = "FILE_PATH/IMAGE_FILE.jpg"
response = exsited_sdk.account.add_image(
file_url=file_url,
account_id="ACCOUNT_ID"
)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testAddImage()
{
$id = '6MRG4C';
$filePath = "C:\Users\Mehedi\Downloads\img.jpg";
try {
$response = $this->accountService->addimage($filePath, $id);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The function returns an object containing the imageUri, which represents the fully qualified URL where the uploaded image is stored. This URI can be used for rendering the image in front-end interfaces. If an image previously existed for the account, it will be replaced.
AccountImageDetailsDTO(
account=AccountImageDataDTO(
imageUri='RESOURCE_BASE_URL/RESOURCE_PATH/ACCOUNT_IMAGE_ID.jpeg',
accountId='NULL'
)
)
{
"account": {
"image_uri": "ACCOUNT_IMAGE_URI"
}
}
Adding Note to Account
Function: order_add_notes()
Purpose
This function is used to add a new note to a specific order, optionally including one or more file attachments. The note content is mandatory, while files are optional.
Parameters
Parameter | Type | Description |
---|---|---|
notes | String | The content of the note to be added |
file_urls | List | List of file paths to attach with the note |
order_id | String | The unique identifier of the order to which the note is attached |
Use Case
This API is used to submit notes tied to an account for recordkeeping, support communication, or customer management purposes. While the note field is mandatory to describe the content of the message or update, the file field can optionally include attachments such as screenshots, documents, or images that support the note's context.
def order_add_notes():
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:
datas = "NOTE_CONTENT_TEXT"
file_urls = [
"FILE_PATH_1/IMAGE_FILE_1.jpg",
"FILE_PATH_2/IMAGE_FILE_2.jpg"
]
response = exsited_sdk.notes.order_add_notes(
file_urls=file_urls,
datas=datas,
account_id="ACCOUNT_ID"
)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testAddNote()
{
$id = '76GOU2';
$filePaths = 'C:\Users\Mehedi\Downloads\n.txt';
$note = 'from v3 sdk';
try {
$response = $this->accountService->addNote($filePaths, $note, $id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The function successfully returns the UUID of the newly added note under the specified order. This UUID can later be used to retrieve, update, or delete the note if needed. If a file was included, it is linked with the note and accessible via note file-related APIs.
AccountNoteResponseDetailsDTO(
account=AccountNoteResponseDataDTO(
notes=NoteDataDTO(
uuid='NOTE_UUID',
version='NULL',
content='NULL',
files='NULL',
createdBy='NULL',
createdOn='NULL',
lastUpdatedBy='NULL',
lastUpdatedOn='NULL'
)
)
)
Deleting Account Address by UUID
Function: account_address_uuid_delete()
Purpose
This SDK function permanently deletes a specific address associated with an account by calling the delete_address_uuid() method of the ExsitedSDK. It uses the account ID and the address UUID to identify the address to be removed.
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The unique identifier of the account. Example: ACCOUNT_ID |
uuid | String | The unique UUID of the address to be deleted. Example: ADDRESS_UUID |
Use Case
This function is applicable when a user wants to remove a previously stored address from an account, such as deleting outdated or incorrect location information. Once executed, the address record is permanently removed from the system, and the response confirms the operation's success or failure.
def account_address_uuid_delete():
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.account.delete_address_uuid(id="ACCOUNT_ID", uuid="ADDRESS_UUID")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testDeleteAddress()
{
$id="76GOU2";
$addressUUID="b2945101-d278-4149-9cf4-f110a1285d97";
try {
$response = $this->accountService->deleteAddress($id,$addressUUID);
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
If the address is successfully deleted, the response contains a confirmation message or status. In cases where the UUID or account ID is invalid, or permission is denied, an ABException is raised, which provides a detailed error message, validation list, and the full backend raw response for troubleshooting.
{'success': True, 'status_code': 204}
null
Account specific Contact Delete
Function: account_contact_delete()
Purpose
This SDK function deletes a specific contact associated with an account using the contact_delete() method from the ExsitedSDK. It identifies the target contact using the account ID and contact type.
Parameters
Parameter | Type | Description |
---|---|---|
id | String | The unique identifier of the account. Example: ACCOUNT_ID |
contact_type | String | Type of the contact to be deleted. Example: "CONTACT_1" |
Use Case
This function is used when a user wants to remove a specific contact from an account, such as when the contact is outdated, incorrect, or no longer needed. By providing the account ID and contact type, the function executes a backend request to delete the corresponding contact entry.
def account_contact_delete():
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.account.contact_delete(id="ACCOUNT_ID", contact_type="CONTACT_TYPE")
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testDeleteContactTypeDetails()
{
$id="XA6J22";
$contactType= "CONTACT_1";
try {
$response = $this->accountService->deleteContactTypeDetails($id,$contactType,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
A successful response will confirm that the specified contact has been deleted from the account. If the provided account ID or contact type is invalid, or the operation is unauthorized, an ABException is raised, containing detailed validation errors and the backend's raw response for investigation.
{'success': True, 'status_code': 204}
null
Adding Files to an Existing Account Note
Function: account_add_notes_uuid()
Purpose
This function is attach one or more files to an already created note in a specific account. The maximum number of files allowed per note is eight.
Parameters
Parameter | Type | Description |
---|---|---|
file_urls | List | List of local file paths to be uploaded |
account_id | String | Unique identifier of the account |
note_uuid | String | UUID of the existing note to attach files to |
Use Case
The function is used to enhance an existing note under a given account by attaching one or more files. This is particularly useful when users want to add supporting documents, screenshots, or data files to a note after it has already been created. The function supports multiple file uploads, with a limit of up to 8 files per note. Files can include formats such as images, spreadsheets, and PDFs.
def account_add_notes_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:
file_urls = [
"FILE_PATH_1/IMAGE_FILE.jpg",
"FILE_PATH_2/DATA_FILE.csv"
]
response = exsited_sdk.notes.add_notes_uuid(
file_urls=file_urls,
account_id="ACCOUNT_ID",
note_uuid="NOTE_UUID"
)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testAddNoteFiles()
{
$id = '76GOU2';
$noteUUID='2c6724b5-37d6-4c11-96a0-6f8d155c30fd';
$filePath = 'C:\Users\Mehedi\Downloads\n.txt';
try {
$response = $this->accountService->addNoteFiles($filePath, $id,$noteUUID,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response returns a list of files successfully attached to the specified note. Each file contains metadata such as name and version. If the number of files exceeds the limit (8), the request will fail with an appropriate error message. On success, the response confirms the addition of files by listing them under the note data.
AccountNoteResponseDetailsDTO(
account=AccountNoteResponseDataDTO(
notes=NoteDataDTO(
uuid='NULL',
version='NULL',
content='NOTE_CONTENT_TEXT',
files=[
FileDTO(
uuid='NULL',
name='SPREADSHEET_FILE.xlsx',
version='NULL'
),
FileDTO(
uuid='NULL',
name='DATA_FILE.csv',
version='NULL'
),
FileDTO(
uuid='NULL',
name='IMAGE_FILE_1.jpg',
version='NULL'
),
FileDTO(
uuid='NULL',
name='ORDER_DOCUMENT.pdf',
version='NULL'
),
FileDTO(
uuid='NULL',
name='IMAGE_FILE_2.jpg',
version='NULL'
),
FileDTO(
uuid='NULL',
name='IMAGE_FILE_3.jpg',
version='NULL'
),
FileDTO(
uuid='NULL',
name='ORDER_DOCUMENT.pdf',
version='NULL'
),
FileDTO(
uuid='NULL',
name='IMAGE_FILE_4.jpg',
version='NULL'
)
],
createdBy='NULL',
createdOn='NULL',
lastUpdatedBy='NULL',
lastUpdatedOn='NULL'
)
)
{
"account": {
"notes": {
"files": [
{
"name": "FILE_NAME"
}
]
}
}
}
Canceling an Account
Function: account_cancel()
Purpose
This function is used to cancel (deactivate) an account by specifying an effective cancellation date.
Parameters
Parameter | Type | Description |
---|---|---|
ACCOUNT_ID | string | The unique identifier of the account |
EFFECTIVE_DATE | string | The date (YYYY-MM-DD) when the account cancellation becomes effective |
Use Case
The function is used to deactivate a specific account so that no further functional operations can be performed on it. It sends a cancellation request to the backend using the provided account_id and effectiveDate. Once executed, the account becomes inactive from the specified date, and a cancellation event UUID is returned for reference or auditing purposes.
def account_cancel():
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:
request_data = AccountCancelDataDTO(
effectiveDate="EFFECTIVE_DATE"
)
response = exsited_sdk.account.cancel(
id="ACCOUNT_ID",
request_data=request_data
)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testCancel()
{
$id = "GWU152";
$params = [
"account" => [
"effective_date" => "2024-12-17"
]
];
try {
$response = $this->accountService->cancel($id,$params,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response returns an AccountCancelResponseDTO containing a unique eventUuid . This UUID can be used for tracking or logging purposes.
AccountCancelResponseDTO(
eventUuid="EVENT_UUID"
)
{
"event_uuid": "EVENT_UUID"
}
Reactivating an Account
Function: account_reactivate()
Purpose
This function reactivate a previously deactivated account by specifying its unique identifier and the effective date on which the reactivation should begin.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | Unique identifier of the account |
request_data | Object (AccountReactivateDataDTO) | Contains the reactivation effectiveDate |
Use Case
The function is used to validate the reactivation workflow of a cancelled account. It is particularly useful in scenarios where customers return after cancellation, subscriptions are renewed, or an account was mistakenly deactivated.This function ensures that the reactivation can be scheduled ahead of time, preserving historical data and restoring operational access within the platform.
def account_reactivate_v3():
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:
request_data = AccountReactivateDataDTO(
effectiveDate="EFFECTIVE_DATE"
)
response = exsited_sdk.account.reactivate_v3(
id="ACCOUNT_ID",
request_data=request_data
)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReactivate()
{
$id = "GWU152";
$params = [
"account" => [
"effective_date" => "2024-12-17"
]
];
try {
$response = $this->accountService->reactivate($id,$params,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response successfully returns an object with a event UUID which confirms that the reactivation process was initiated and tracked. This UUID helps in linking the action with audit logs or follow-up workflows.
AccountCancelResponseDTO(
eventUuid='EVENT_UUID'
)
{
"event_uuid": "EVENT_UUID"
}
Deleting Payment Method
Function: delete_payment_methods()
Purpose
This function removes a specific payment method from an account using its unique reference. It is useful for cleaning up outdated or invalid payment credentials associated with the account.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | The unique identifier of the account |
reference | String | The reference identifier of the payment method to be deleted |
Use Case
The function is used to programmatically delete a payment method from a given account. This is particularly helpful in scenarios where accounts are being updated to reflect new billing details, remove expired cards, or comply with data hygiene policies. By using the payment method's reference ID, the system ensures the correct method is targeted for deletion without affecting other payment details.
def delete_payment_methods_v3():
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.account.delete_payment_method_v3(account_id="2YPA6C", reference="nmkjkjkj")
print(response)
# ResponseToObj().process(response=response["accounts"][0])
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testDeletePaymentMethod()
{
$id = "FKITFZ";
$ref = "Reference-Ch";
try {
$response = $this->accountService->deletePaymentMethod($id, $ref,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
On successful deletion, the function returns a dictionary confirming the operation, with a 204 status code and a success flag.
{'success': True, 'status_code': 204}
null
Updating Payment Method by Reference
Function: update_payment_methods()
Purpose
This function update an existing payment method for a specific account using its unique reference. It allows changes to be made to properties like default status, usage scope, and specified orders.
Parameters
Parameter | Type | Description |
---|---|---|
account_id | String | The unique identifier of the account |
reference | String | The unique reference of the payment method to be updated |
request_data | PaymentMethodsAddDTO | DTO containing the updated payment method details |
Use Case
The function is used to programmatically update the configuration of a stored payment method linked to an account. This is especially useful when there are business needs to assign a payment method to particular orders, toggle its default status, or update card metadata without replacing the method entirely. It supports maintaining flexible payment rules per order or customer, which is valuable in large billing and invoicing systems.
def update_payment_methods():
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:
payment_method = PaymentMethodsDataDTO(
default='BOOLEAN',
useForSpecifiedOrders='BOOLEAN',
reference="PAYMENT_REFERENCE",
specifiedOrders=[
SpecifiedOrdersDTO(orderId='ORDER_ID')
]
)
request_obj = PaymentMethodsAddDTO(
account=PaymentMethodsDTO(paymentMethod=payment_method)
)
response = exsited_sdk.account.update_payment_method(
id="ACCOUNT_ID",
reference="PAYMENT_REFERENCE",
request_data=request_obj
)
print(response)
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testUpdatesPaymentMethodAllData()
{
$params = [
"default" => "false",
"use_for_specified_orders" => "true",
"specified_orders" => [
[
"order_id" => "ORD-IE1DSN-1332"
]
],
"reference" => "uniReference"
];
$id='XA6J22';
$reference= "uniRef";
try {
$updatesPayment = $this->accountService->updatesPaymentMethodAllData($params, $id,$reference,'v3');
echo '<pre>' . json_encode($updatesPayment, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The function response contains the full updated information of the payment method, including processor type, status, card metadata, reference, and timestamps. It confirms the updated configuration was saved and returned by the backend.
PaymentMethodsDetailsDTO(
account=PaymentMethodsDTO(
id='ACCOUNT_ID',
paymentMethod=PaymentMethodsDataDTO(
processorType='PAYMENT_PROCESSOR_TYPE',
paymentProcessor=None,
status='STATUS',
default='BOOLEAN',
reference='PAYMENT_REFERENCE',
paymentCount='NUMBER',
lastUsedOn='EMPTY',
createdBy='CREATED_BY',
createdOn='TIMESTAMP',
lastUpdatedBy='UPDATED_BY',
lastUpdatedOn='UPDATE_TIMESTAMP',
uuid='PAYMENT_METHOD_UUID',
version='VERSION',
specifiedOrders='EMPTY',
useForSpecifiedOrders='BOOLEAN',
processor=PaymentProcessorDetailsDTO(
uuid='PROCESSOR_UUID',
name='PAYMENT_PROCESSOR_NAME',
link='PROCESSOR_API_LINK'
),
cardType='CARD_TYPE',
token='CARD_TOKEN',
cardNumber='CARD_NUMBER_LAST4',
expiryMonth='EXPIRY_MONTH',
expiryYear='EXPIRY_YEAR',
cardCvv='CARD_CVV_MASKED',
nameOnCard='EMPTY',
lastUsedResult='EMPTY',
errorCountSinceLastSuccess='EMPTY'
)
)
)
{
"account": {
"id": "ID-PLACEHOLDER",
"payment_method": {
"processor_type": "PROCESSOR_TYPE_PLACEHOLDER",
"status": "STATUS_PLACEHOLDER",
"default": "DEFAULT_PLACEHOLDER",
"processor": {
"uuid": "UUID-PLACEHOLDER",
"name": "PROCESSOR_NAME_PLACEHOLDER",
"link": "LINK_PLACEHOLDER"
},
"reference": "REFERENCE_PLACEHOLDER",
"payment_count": "PAYMENT_COUNT_PLACEHOLDER",
"last_used_on": "LAST_USED_ON_PLACEHOLDER",
"created_by": "CREATED_BY_PLACEHOLDER",
"created_on": "2024-11-21T12:29:18Z",
"last_updated_by": "LAST_UPDATED_BY_PLACEHOLDER",
"last_updated_on": "2024-11-27T06:07:00Z",
"uuid": "UUID-PLACEHOLDER",
"version": "VERSION_PLACEHOLDER",
"use_for_specified_orders": "USE_FOR_SPECIFIED_ORDERS_PLACEHOLDER",
"specified_orders": "SPECIFIED_ORDERS_PLACEHOLDER"
}
}
}