Files
sdk/docs/AccountApi.md
zeekayandHanzo Dev b55332704a feat: Hanzo Cloud SDK for Kotlin (generated from OpenAPI v8.0.0)
Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and
Android. Generated with openapi-generator kotlin (library=jvm-okhttp4,
useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-25 07:10:32 -07:00

18 KiB

AccountApi

All URIs are relative to https://api.hanzo.ai

Method HTTP request Description
commerceAccountExists GET /v1/commerce/account/exists/{emailorusername} Check if account exists
commerceAccountLogin POST /v1/commerce/account/login Login to account
commerceAccountWithdraw POST /v1/commerce/account/withdraw Withdraw funds
commerceConfirmPasswordReset POST /v1/commerce/account/confirm/{tokenid} Confirm password reset
commerceCreateAccount POST /v1/commerce/account/create Create new account
commerceCreatePaymentMethod POST /v1/commerce/account/paymentmethod/{paymentmethodtype} Create payment method
commerceEnableAccount POST /v1/commerce/account/enable/{tokenid} Enable account with token
commerceGetAccount GET /v1/commerce/account Get current account
commerceGetAccountOrder GET /v1/commerce/account/order/{orderid} Get account order
commercePatchAccount PATCH /v1/commerce/account Partially update account
commercePatchAccountOrder PATCH /v1/commerce/account/order/{orderid} Update account order
commerceRequestPasswordReset POST /v1/commerce/account/reset Request password reset
commerceUpdateAccount PUT /v1/commerce/account Update account

commerceAccountExists

CommerceAccountExists200Response commerceAccountExists(emailorusername)

Check if account exists

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val emailorusername : kotlin.String = emailorusername_example // kotlin.String | 
try {
    val result : CommerceAccountExists200Response = apiInstance.commerceAccountExists(emailorusername)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceAccountExists")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceAccountExists")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
emailorusername kotlin.String

Return type

CommerceAccountExists200Response

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

commerceAccountLogin

CommerceUser commerceAccountLogin(chatPostAuthLoginRequest)

Login to account

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val chatPostAuthLoginRequest : ChatPostAuthLoginRequest =  // ChatPostAuthLoginRequest | 
try {
    val result : CommerceUser = apiInstance.commerceAccountLogin(chatPostAuthLoginRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceAccountLogin")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceAccountLogin")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
chatPostAuthLoginRequest ChatPostAuthLoginRequest

Return type

CommerceUser

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

commerceAccountWithdraw

kotlin.Any commerceAccountWithdraw(commerceAccountWithdrawRequest)

Withdraw funds

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val commerceAccountWithdrawRequest : CommerceAccountWithdrawRequest =  // CommerceAccountWithdrawRequest | 
try {
    val result : kotlin.Any = apiInstance.commerceAccountWithdraw(commerceAccountWithdrawRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceAccountWithdraw")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceAccountWithdraw")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
commerceAccountWithdrawRequest CommerceAccountWithdrawRequest

Return type

kotlin.Any

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

commerceConfirmPasswordReset

kotlin.Any commerceConfirmPasswordReset(tokenid, commerceConfirmPasswordResetRequest)

Confirm password reset

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val tokenid : kotlin.String = tokenid_example // kotlin.String | 
val commerceConfirmPasswordResetRequest : CommerceConfirmPasswordResetRequest =  // CommerceConfirmPasswordResetRequest | 
try {
    val result : kotlin.Any = apiInstance.commerceConfirmPasswordReset(tokenid, commerceConfirmPasswordResetRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceConfirmPasswordReset")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceConfirmPasswordReset")
    e.printStackTrace()
}

Parameters

| tokenid | kotlin.String| | |

Name Type Description Notes
commerceConfirmPasswordResetRequest CommerceConfirmPasswordResetRequest

Return type

kotlin.Any

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

commerceCreateAccount

CommerceUser commerceCreateAccount(commerceCreateAccountRequest)

Create new account

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val commerceCreateAccountRequest : CommerceCreateAccountRequest =  // CommerceCreateAccountRequest | 
try {
    val result : CommerceUser = apiInstance.commerceCreateAccount(commerceCreateAccountRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceCreateAccount")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceCreateAccount")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
commerceCreateAccountRequest CommerceCreateAccountRequest

Return type

CommerceUser

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

commerceCreatePaymentMethod

CommercePaymentMethod commerceCreatePaymentMethod(paymentmethodtype, commercePaymentMethod)

Create payment method

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val paymentmethodtype : kotlin.String = paymentmethodtype_example // kotlin.String | 
val commercePaymentMethod : CommercePaymentMethod =  // CommercePaymentMethod | 
try {
    val result : CommercePaymentMethod = apiInstance.commerceCreatePaymentMethod(paymentmethodtype, commercePaymentMethod)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceCreatePaymentMethod")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceCreatePaymentMethod")
    e.printStackTrace()
}

Parameters

| paymentmethodtype | kotlin.String| | [enum: card, paypal, bank] |

Name Type Description Notes
commercePaymentMethod CommercePaymentMethod

Return type

CommercePaymentMethod

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

commerceEnableAccount

kotlin.Any commerceEnableAccount(tokenid)

Enable account with token

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val tokenid : kotlin.String = tokenid_example // kotlin.String | 
try {
    val result : kotlin.Any = apiInstance.commerceEnableAccount(tokenid)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceEnableAccount")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceEnableAccount")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
tokenid kotlin.String

Return type

kotlin.Any

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

commerceGetAccount

CommerceUser commerceGetAccount()

Get current account

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
try {
    val result : CommerceUser = apiInstance.commerceGetAccount()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceGetAccount")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceGetAccount")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

CommerceUser

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

commerceGetAccountOrder

CommerceOrder commerceGetAccountOrder(orderid)

Get account order

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val orderid : kotlin.String = orderid_example // kotlin.String | 
try {
    val result : CommerceOrder = apiInstance.commerceGetAccountOrder(orderid)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceGetAccountOrder")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceGetAccountOrder")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
orderid kotlin.String

Return type

CommerceOrder

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

commercePatchAccount

CommerceUser commercePatchAccount(commerceUser)

Partially update account

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val commerceUser : CommerceUser =  // CommerceUser | 
try {
    val result : CommerceUser = apiInstance.commercePatchAccount(commerceUser)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commercePatchAccount")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commercePatchAccount")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
commerceUser CommerceUser

Return type

CommerceUser

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

commercePatchAccountOrder

CommerceOrder commercePatchAccountOrder(orderid, commerceOrder)

Update account order

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val orderid : kotlin.String = orderid_example // kotlin.String | 
val commerceOrder : CommerceOrder =  // CommerceOrder | 
try {
    val result : CommerceOrder = apiInstance.commercePatchAccountOrder(orderid, commerceOrder)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commercePatchAccountOrder")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commercePatchAccountOrder")
    e.printStackTrace()
}

Parameters

| orderid | kotlin.String| | |

Name Type Description Notes
commerceOrder CommerceOrder

Return type

CommerceOrder

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

commerceRequestPasswordReset

kotlin.Any commerceRequestPasswordReset(chatPostAuthRequestpasswordresetRequest)

Request password reset

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val chatPostAuthRequestpasswordresetRequest : ChatPostAuthRequestpasswordresetRequest =  // ChatPostAuthRequestpasswordresetRequest | 
try {
    val result : kotlin.Any = apiInstance.commerceRequestPasswordReset(chatPostAuthRequestpasswordresetRequest)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceRequestPasswordReset")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceRequestPasswordReset")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
chatPostAuthRequestpasswordresetRequest ChatPostAuthRequestpasswordresetRequest

Return type

kotlin.Any

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

commerceUpdateAccount

CommerceUser commerceUpdateAccount(commerceUser)

Update account

Example

// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*

val apiInstance = AccountApi()
val commerceUser : CommerceUser =  // CommerceUser | 
try {
    val result : CommerceUser = apiInstance.commerceUpdateAccount(commerceUser)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AccountApi#commerceUpdateAccount")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AccountApi#commerceUpdateAccount")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
commerceUser CommerceUser

Return type

CommerceUser

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json