Getting customer list

Function: admin_customers_get_list()

Purpose

The admin_customers_get_list function is designed to retrieve a list of customers from the WebCommander system based on specified filter criteria. This function is particularly useful for administrators who need to search for customers using specific attributes such as email. 

Parameters

Parameter
Type
Description
param_filters
dictionary
A dictionary containing the filters for the customer list retrieval. Currently, this function uses an email filter.
email
string
The email address of the customer used as a filter to fetch specific customer details.

Use Case

This function is used in administrative operations where customer records need to be retrieved based on specific filters. For example, an admin may need to fetch a list of customers based on their registered email addresses. The SDK handles the request and response process efficiently while also providing debugging capabilities in case of errors.

def admin_customers_get_list():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True

    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        # Email Filter
        email = "ADMIN_EMAIL"
        param_filters = {"email": email}
        response = webcommander_sdk.admin_customers.list(param_filters=param_filters)
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

If the request is successful, the response contains a list of customers that match the provided filter criteria. Each customer record includes details such as their unique ID, name, email, and the date they were created. If no customers match the given filter, the response will return an empty list.

In the event of an error, such as an invalid email format or an issue with authentication, the response will contain an error message, error code, and details about what went wrong. The function catches these errors and prints both the error message and the raw API response for troubleshooting.

CustomersListResponseDTO(
    customers=[
        CustomerDataDTO(
            id="CUSTOMER_ID",
            displayId="DISPLAY_ID",
            status="STATUS",
            firstName="FIRST_NAME",
            lastName="LAST_NAME",
            email="EMAIL",
            sex="SEX",
            parent={
                "id": "PARENT_ID",
                "name": "PARENT_NAME"
            },
            company="IS_COMPANY",
            companyName="COMPANY_NAME",
            timezone="TIMEZONE",
            abn="ABN",
            abnBranch="ABN_BRANCH",
            shippingProfile="SHIPPING_PROFILE",
            transactionNumber="TRANSACTION_NUMBER",
            referralCode="REFERRAL_CODE",
            usedReferralCode="USED_REFERRAL_CODE",
            countReferralCodeUsed="COUNT_REFERRAL_CODE_USED",
            allowCreditLimit="ALLOW_CREDIT_LIMIT",
            storeCredit="STORE_CREDIT",
            creditLimit="CREDIT_LIMIT",
            howDoYouKnow="HOW_DO_YOU_KNOW",
            customerPasswordExpired="CUSTOMER_PASSWORD_EXPIRED",
            hidePrice="HIDE_PRICE",
            defaultTaxCode="DEFAULT_TAX_CODE",
            source="SOURCE",
            baseUrl="BASE_URL",
            backgroundImage="BACKGROUND_IMAGE",
            profilePicture="PROFILE_PICTURE",
            createdAt="CREATED_AT",
            version="VERSION",
            addresses=[
                CustomerAddressDTO(
                    id="ADDRESS_ID_1",
                    type="ADDRESS_TYPE_1",
                    firstName="FIRST_NAME_1",
                    lastName="LAST_NAME_1",
                    email="EMAIL_1",
                    companyName="COMPANY_NAME_1",
                    addressLine1="ADDRESS_LINE1_1",
                    addressLine2="ADDRESS_LINE2_1",
                    country=CountryDTO(
                        id="COUNTRY_ID_1",
                        name="COUNTRY_NAME_1",
                        code="COUNTRY_CODE_1"
                    ),
                    state=StateDTO(
                        id="STATE_ID_1",
                        name="STATE_NAME_1",
                        code="STATE_CODE_1"
                    ),
                    city="CITY_1",
                    postCode="POST_CODE_1",
                    mobile="MOBILE_1",
                    phone="PHONE_1",
                    fax="FAX_1"
                ),
                CustomerAddressDTO(
                    id="ADDRESS_ID_2",
                    type="ADDRESS_TYPE_2",
                    firstName="FIRST_NAME_2",
                    lastName="LAST_NAME_2",
                    email="EMAIL_2",
                    companyName="COMPANY_NAME_2",
                    addressLine1="ADDRESS_LINE1_2",
                    addressLine2="ADDRESS_LINE2_2",
                    country=CountryDTO(
                        id="COUNTRY_ID_2",
                        name="COUNTRY_NAME_2",
                        code="COUNTRY_CODE_2"
                    ),
                    state=StateDTO(
                        id="STATE_ID_2",
                        name="STATE_NAME_2",
                        code="STATE_CODE_2"
                    ),
                    city="CITY_2",
                    postCode="POST_CODE_2",
                    mobile="MOBILE_2",
                    phone="PHONE_2",
                    fax="FAX_2"
                ),
                CustomerAddressDTO(
                    id="ADDRESS_ID_3",
                    type="ADDRESS_TYPE_3",
                    firstName="FIRST_NAME_3",
                    lastName="LAST_NAME_3",
                    email="EMAIL_3",
                    companyName="COMPANY_NAME_3",
                    addressLine1="ADDRESS_LINE1_3",
                    addressLine2="ADDRESS_LINE2_3",
                    country=CountryDTO(
                        id="COUNTRY_ID_3",
                        name="COUNTRY_NAME_3",
                        code="COUNTRY_CODE_3"
                    ),
                    state=StateDTO(
                        id="STATE_ID_3",
                        name="STATE_NAME_3",
                        code="STATE_CODE_3"
                    ),
                    city="CITY_3",
                    postCode="POST_CODE_3",
                    mobile="MOBILE_3",
                    phone="PHONE_3",
                    fax="FAX_3"
                )
            ],
            activeBillingAddress="ACTIVE_BILLING_ADDRESS",
            activeShippingAddress="ACTIVE_SHIPPING_ADDRESS",
            isInTrash="IS_IN_TRASH"
        )
    ],
    pagination=PaginationDTO(
        records="PAGINATION_RECORDS",
        limit="PAGINATION_LIMIT",
        offset="PAGINATION_OFFSET",
        nextPage="PAGINATION_NEXT_PAGE",
        previousPage="PAGINATION_PREVIOUS_PAGE"
    )
)

Getting specific Customer details

Function: admin_customers_get_details()

Purpose

The admin_customers_get_details() function retrieves detailed customer information using a unique customer ID. It is designed for administrators who need quick access to customer profiles, including name, email, phone number, and account status.

This function is essential for account verification, customer support, and fraud detection. By integrating with the WebCommander SDK, it ensures secure and seamless data retrieval. Debugging outputs are disabled to prevent unnecessary console logs, making it ideal for production environments. The function simplifies administrative tasks by providing structured customer details, allowing for informed decision-making, troubleshooting, and compliance checks without manually searching through extensive records.

Parameters

Parameter
Type
Description
id
string
The unique identifier of the customer whose details need to be retrieved.

Use Case

This function is useful for administrators handling customer-related operations.

A customer support representative can retrieve a customer’s details to verify their identity before assisting with queries. If a customer reports account access issues, an admin can check the account status and provide a resolution. Fraud detection teams can use this function to verify customer data when investigating suspicious activities.

In compliance audits, administrators may need to validate customer registration details and account history. This function also helps with manual data corrections by fetching up-to-date customer information from the system. By offering quick and accurate data retrieval, this function plays a critical role in maintaining customer records, ensuring security, and enhancing administrative efficiency.

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

    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        id = "CUSTOMER_ID"
        response = webcommander_sdk.admin_customers.details(id)
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

A successful request returns detailed customer information, including their unique ID, full name, email, phone number, and account status. This data helps administrators verify customer accounts and provide necessary support. If the provided customer ID is invalid or does not exist, the API returns an error message stating that the customer was not found. The function captures these errors and prints the raw API response, making troubleshooting easier.

CustomersDetailsResponseDTO(
    customer=CustomerDataDTO(
        id="CUSTOMER_ID",
        displayId="DISPLAY_ID",
        status="STATUS",
        firstName="FIRST_NAME",
        lastName="LAST_NAME",
        email="EMAIL",
        sex="SEX",
        parent=None,
        company="IS_COMPANY",
        companyName="COMPANY_NAME",
        timezone="TIMEZONE",
        abn="ABN",
        abnBranch="ABN_BRANCH",
        shippingProfile="SHIPPING_PROFILE",
        transactionNumber="TRANSACTION_NUMBER",
        referralCode="REFERRAL_CODE",
        usedReferralCode="USED_REFERRAL_CODE",
        countReferralCodeUsed="COUNT_REFERRAL_CODE_USED",
        allowCreditLimit="ALLOW_CREDIT_LIMIT",
        storeCredit="STORE_CREDIT",
        creditLimit="CREDIT_LIMIT",
        howDoYouKnow="HOW_DO_YOU_KNOW",
        customerPasswordExpired="CUSTOMER_PASSWORD_EXPIRED",
        hidePrice="HIDE_PRICE",
        defaultTaxCode="DEFAULT_TAX_CODE",
        source="SOURCE",
        baseUrl="BASE_URL",
        backgroundImage="BACKGROUND_IMAGE",
        profilePicture="PROFILE_PICTURE",
        createdAt="CREATED_AT",
        version="VERSION",
        addresses=[
            CustomerAddressDTO(
                id="ADDRESS_ID_1",
                type="ADDRESS_TYPE_1",
                firstName="FIRST_NAME_1",
                lastName="LAST_NAME_1",
                email="EMAIL_1",
                companyName="COMPANY_NAME_1",
                addressLine1="ADDRESS_LINE1_1",
                addressLine2="ADDRESS_LINE2_1",
                country=CountryDTO(
                    id="COUNTRY_ID_1",
                    name="COUNTRY_NAME_1",
                    code="COUNTRY_CODE_1"
                ),
                state=StateDTO(
                    id="STATE_ID_1",
                    name="STATE_NAME_1",
                    code="STATE_CODE_1"
                ),
                city="CITY_1",
                postCode="POST_CODE_1",
                mobile="MOBILE_1",
                phone="PHONE_1",
                fax="FAX_1"
            ),
            CustomerAddressDTO(
                id="ADDRESS_ID_2",
                type="ADDRESS_TYPE_2",
                firstName="FIRST_NAME_2",
                lastName="LAST_NAME_2",
                email="EMAIL_2",
                companyName="COMPANY_NAME_2",
                addressLine1="ADDRESS_LINE1_2",
                addressLine2="ADDRESS_LINE2_2",
                country=CountryDTO(
                    id="COUNTRY_ID_2",
                    name="COUNTRY_NAME_2",
                    code="COUNTRY_CODE_2"
                ),
                state=StateDTO(
                    id="STATE_ID_2",
                    name="STATE_NAME_2",
                    code="STATE_CODE_2"
                ),
                city="CITY_2",
                postCode="POST_CODE_2",
                mobile="MOBILE_2",
                phone="PHONE_2",
                fax="FAX_2"
            ),
            CustomerAddressDTO(
                id="ADDRESS_ID_3",
                type="ADDRESS_TYPE_3",
                firstName="FIRST_NAME_3",
                lastName="LAST_NAME_3",
                email="EMAIL_3",
                companyName="COMPANY_NAME_3",
                addressLine1="ADDRESS_LINE1_3",
                addressLine2="ADDRESS_LINE2_3",
                country=CountryDTO(
                    id="COUNTRY_ID_3",
                    name="COUNTRY_NAME_3",
                    code="COUNTRY_CODE_3"
                ),
                state=StateDTO(
                    id="STATE_ID_3",
                    name="STATE_NAME_3",
                    code="STATE_CODE_3"
                ),
                city="CITY_3",
                postCode="POST_CODE_3",
                mobile="MOBILE_3",
                phone="PHONE_3",
                fax="FAX_3"
            )
        ],
        activeBillingAddress="ACTIVE_BILLING_ADDRESS",
        activeShippingAddress="ACTIVE_SHIPPING_ADDRESS",
        isInTrash="IS_IN_TRASH"
    )
)

Changing password of a Customer Account

Function: admin_customer_change_password()

Purpose

The admin_customer_change_password() function is designed to allow administrators to update a customer's password in the WebCommander system. This function ensures secure password management by verifying the old password before setting a new one.

It is particularly useful when customers request password resets, face login issues, or need security enhancements. The function integrates with the WebCommander SDK to process password change requests efficiently. Debugging outputs are enabled to provide visibility into request data and raw API responses, ensuring easy troubleshooting. This function enhances account security by enforcing password validation before making updates.

Parameters

Parameter
Type
Description
id
string
The unique identifier of the customer whose password is being changed.
password
string
The new password that will replace the old one.
email
string
The email associated with the customer’s account.
oldPassword
string
The current password of the customer, required for authentication before changing the password.

Use Case

This function is beneficial for administrators who need to reset or change a customer’s password securely.

A customer may reach out to support due to login difficulties, requiring an administrator to verify their credentials and initiate a password reset. In cases of suspected unauthorized access, an admin can enforce a password change as a security measure. When customers request password updates due to forgotten credentials, this function ensures the transition happens smoothly without compromising security.

It also aids in compliance with security policies that require periodic password changes or the enforcement of stronger passwords. By verifying the old password before applying the new one, this function prevents unauthorized modifications and maintains account integrity.

def admin_customer_change_password():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True

    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        password_data = CustomerChangePasswordDataDTO(
            password="NEW_SECURE_PASSWORD",
            email="CUSTOMER_EMAIL",
            oldPassword="OLD_PASSWORD"
        )
        request_obj = CustomerChangePasswordRequestDTO(customer=password_data)

        response = webcommander_sdk.admin_customers.change_password(id="CUSTOMER_ID", request_data=request_obj)
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

A successful request returns confirmation that the password has been changed. This response indicates that the customer's old password was verified, and the new password was successfully updated in the system. If an incorrect old password is provided or the request fails due to validation errors, the API returns an error message indicating the issue. The function captures these errors and logs both the error details and raw API response for debugging.

CommonMessageDTO(status='success', message='Password has been changed successfully')

Updating address to a customer account

Function: admin_customer_add_address()

Purpose

The admin_customer_add_address() function allows administrators to add multiple addresses for a specific customer in the WebCommander system. This function is essential for managing customer addresses, including primary, shipping, and billing addresses, ensuring that accurate information is stored for order fulfillment, invoicing, and communication.

By leveraging the WebCommander SDK, this function enables secure and efficient data entry without manual intervention. It supports structured address input, helping maintain consistency in customer records. Debugging outputs are disabled to prevent unnecessary logging, making the function more suitable for production use. This function simplifies the process of updating customer profiles with relevant address information.

Parameters

Parameter
Type
Description
id
string
The unique identifier of the customer to whom the addresses will be added.
type
string
The type of address being added. Possible values are "PRIMARY", "SHIPPING", or "BILLING".
firstName
string
The first name associated with the address.
lastName
string
The last name associated with the address.
companyName
string
The name of the company associated with the address (optional).
email
string
The email address linked to the address.
addressLine1
string
The primary address line for the location.
addressLine2
string
The secondary address line for additional details (optional).
country
string
The country identifier (numeric ID based on system records).
state
integer
The state or region identifier (numeric ID based on system records).
city
string
The name of the city for the address.
postCode
string
The postal or ZIP code of the location.
mobile
string
The mobile phone number associated with the address.
phone
string
The landline phone number for the address (optional).
fax
string
The fax number associated with the address (optional).

Use Case

This function is valuable in scenarios where customers need to have multiple addresses stored in their profiles.

An administrator managing customer profiles may need to add or update addresses for order shipping, billing, or communication purposes. For example, a customer may have a separate billing address and shipping address, requiring both to be stored in the system for seamless transactions. Businesses with international customers benefit from maintaining accurate address records for invoicing and regulatory compliance.

A retail company processing large orders may use this function to ensure multiple delivery locations are correctly mapped for logistics and distribution. If a customer changes their primary residence or company address, an admin can update these details efficiently. The function ensures that customer profiles remain updated with the correct address information, improving service accuracy and reducing delivery errors.

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

    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        address1 = AddressCreateDataDTO(
            type="PRIMARY",
            firstName="CUSTOMER_FIRST_NAME",
            lastName="CUSTOMER_LAST_NAME",
            companyName="COMPANY_NAME",
            email="CUSTOMER_EMAIL",
            addressLine1="PRIMARY_ADDRESS_LINE1",
            addressLine2="PRIMARY_ADDRESS_LINE2",
            country=12,
            state=2,
            city="PRIMARY_CITY",
            postCode="PRIMARY_POSTCODE",
            mobile="PRIMARY_MOBILE",
            phone="PRIMARY_PHONE",
            fax="PRIMARY_FAX"
        )
        address2 = AddressCreateDataDTO(
            type="SHIPPING",
            firstName="SHIPPING_FIRST_NAME",
            lastName="SHIPPING_LAST_NAME",
            companyName="",
            email="SHIPPING_EMAIL",
            addressLine1="SHIPPING_ADDRESS_LINE1",
            addressLine2="",
            country=12,
            state=3,
            city="SHIPPING_CITY",
            postCode="SHIPPING_POSTCODE",
            mobile="SHIPPING_MOBILE",
            phone="SHIPPING_PHONE",
            fax="SHIPPING_FAX"
        )
        address3 = AddressCreateDataDTO(
            type="BILLING",
            firstName="BILLING_FIRST_NAME",
            lastName="BILLING_LAST_NAME",
            email="BILLING_EMAIL",
            companyName="BILLING_COMPANY",
            addressLine1="BILLING_ADDRESS_LINE1",
            addressLine2="BILLING_ADDRESS_LINE2",
            country=12,
            state=3,
            city="BILLING_CITY",
            postCode="BILLING_POSTCODE",
            mobile="BILLING_MOBILE",
            phone="",
            fax=""
        )

        customer_address_create_dto = CustomerAddressCreateDTO(
            addresses=[address1, address2, address3]
        )

        customer_address_create_request_dto = CustomerAddressCreateRequestDTO(
            customer=customer_address_create_dto
        )

        response = webcommander_sdk.admin_customers.add_addresses(id="CUSTOMER_ID",
                                                                  request_data=customer_address_create_request_dto)
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

A successful request returns a confirmation that the customer’s addresses have been added successfully. The response includes the newly added address details, ensuring they are correctly recorded in the system. If an error occurs, such as invalid country or state IDs, missing required fields, or incorrect formatting, the API returns an error message detailing the issue. The function captures these errors and logs the raw API response for easy debugging.

CustomersDetailsResponseDTO(
    customer=CustomerDataDTO(
        id="CUSTOMER_ID",
        displayId="DISPLAY_ID",
        status="STATUS",
        firstName="FIRST_NAME",
        lastName="LAST_NAME",
        email="EMAIL",
        sex="SEX",
        parent={
            "id": "PARENT_ID",
            "name": "PARENT_NAME"
        },
        company="IS_COMPANY",
        companyName="COMPANY_NAME",
        timezone="TIMEZONE",
        abn="ABN",
        abnBranch="ABN_BRANCH",
        shippingProfile="SHIPPING_PROFILE",
        transactionNumber="TRANSACTION_NUMBER",
        referralCode="REFERRAL_CODE",
        usedReferralCode="USED_REFERRAL_CODE",
        countReferralCodeUsed="COUNT_REFERRAL_CODE_USED",
        allowCreditLimit="ALLOW_CREDIT_LIMIT",
        storeCredit="STORE_CREDIT",
        creditLimit="CREDIT_LIMIT",
        howDoYouKnow="HOW_DO_YOU_KNOW",
        customerPasswordExpired="CUSTOMER_PASSWORD_EXPIRED",
        hidePrice="HIDE_PRICE",
        defaultTaxCode="DEFAULT_TAX_CODE",
        source="SOURCE",
        baseUrl="BASE_URL",
        backgroundImage="BACKGROUND_IMAGE",
        profilePicture="PROFILE_PICTURE",
        createdAt="CREATED_AT",
        version="VERSION",
        addresses=[
            CustomerAddressDTO(
                id="ADDRESS_ID_1",
                type="ADDRESS_TYPE_1",
                firstName="FIRST_NAME_1",
                lastName="LAST_NAME_1",
                email="EMAIL_1",
                companyName="COMPANY_NAME_1",
                addressLine1="ADDRESS_LINE1_1",
                addressLine2="ADDRESS_LINE2_1",
                country=CountryDTO(
                    id="COUNTRY_ID_1",
                    name="COUNTRY_NAME_1",
                    code="COUNTRY_CODE_1"
                ),
                state=StateDTO(
                    id="STATE_ID_1",
                    name="STATE_NAME_1",
                    code="STATE_CODE_1"
                ),
                city="CITY_1",
                postCode="POST_CODE_1",
                mobile="MOBILE_1",
                phone="PHONE_1",
                fax="FAX_1"
            ),
            CustomerAddressDTO(
                id="ADDRESS_ID_2",
                type="ADDRESS_TYPE_2",
                firstName="FIRST_NAME_2",
                lastName="LAST_NAME_2",
                email="EMAIL_2",
                companyName="COMPANY_NAME_2",
                addressLine1="ADDRESS_LINE1_2",
                addressLine2="ADDRESS_LINE2_2",
                country=CountryDTO(
                    id="COUNTRY_ID_2",
                    name="COUNTRY_NAME_2",
                    code="COUNTRY_CODE_2"
                ),
                state=StateDTO(
                    id="STATE_ID_2",
                    name="STATE_NAME_2",
                    code="STATE_CODE_2"
                ),
                city="CITY_2",
                postCode="POST_CODE_2",
                mobile="MOBILE_2",
                phone="PHONE_2",
                fax="FAX_2"
            )
        ],
        activeBillingAddress="ACTIVE_BILLING_ADDRESS",
        activeShippingAddress="ACTIVE_SHIPPING_ADDRESS",
        isInTrash="IS_IN_TRASH"
    )
)

Deleting a Customer

Function: admin_customer_delete()

Purpose

The admin_customer_delete() function is used to permanently delete a customer record from the WebCommander system based on the customer's unique ID. This function is essential in scenarios where customer data must be removed for reasons such as account deactivation requests, duplicate entries, or policy compliance with data protection laws.

The function is executed through the WebCommander SDK and performs the deletion securely by interacting with the platform’s API. Debugging options are enabled to print both the request data and raw response, providing greater visibility during testing or issue diagnosis. It is designed to streamline customer data management by offering a reliable method to remove unwanted or outdated customer entries.

Parameters

Parameter
Type
Description
id
string
The unique identifier of the customer to be deleted from the system.

Use Case

This function is particularly useful in administrative environments where maintaining clean and compliant customer databases is a priority.

An administrator may receive a request from a customer to permanently delete their account and personal data in compliance with privacy regulations. This function allows the admin to fulfill such requests efficiently.

It is also valuable in cases where duplicate customer records are discovered. The admin can delete redundant accounts to avoid confusion and maintain data integrity. If a customer account is associated with fraudulent or abusive behavior, the admin may choose to remove it from the system as part of risk mitigation and platform enforcement.

def admin_customer_delete():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True

    webcommander_sdk: WebCommanderSDK = WebCommanderSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = webcommander_sdk.admin_customers.delete(id="CUSTOMER_ID")
        print(response)
    except WCException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

If the request is successful, the function returns a confirmation that the customer has been deleted from the system. The response confirms that the specified customer ID is no longer associated with any data, ensuring proper removal.

If the customer ID does not exist, is invalid, or if there are restrictions preventing deletion (such as linked transactions or system protection rules), the API will return an error response. The function captures these exceptions and logs the raw API response to help the administrator identify the cause and take corrective action.

Request was successful, but there is no content to display.