Files
sdk/docs/OrdersApi.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

23 KiB

OrdersApi

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

Method HTTP request Description
commerceAuthorizeOrder POST /v1/commerce/order/{orderid}/authorize Authorize payment for order
commerceCaptureOrder POST /v1/commerce/order/{orderid}/capture Capture authorized payment
commerceChargeOrder POST /v1/commerce/order/{orderid}/charge Authorize and capture payment (single step)
commerceCreateOrder POST /v1/commerce/order Create order
commerceDeleteOrder DELETE /v1/commerce/order/{orderid} Delete order
commerceGetOrder GET /v1/commerce/order/{orderid} Get order
commerceGetOrderPayments GET /v1/commerce/order/{orderid}/payments Get order payments
commerceGetOrderReturns GET /v1/commerce/order/{orderid}/returns Get order returns
commerceGetOrderStatus GET /v1/commerce/order/{orderid}/status Get order status
commerceListOrders GET /v1/commerce/order List orders
commercePatchOrder PATCH /v1/commerce/order/{orderid} Partially update order
commerceRefundOrder POST /v1/commerce/order/{orderid}/refund Refund order
commerceSendFulfillmentConfirmation GET /v1/commerce/order/{orderid}/sendfulfillmentconfirmation Send fulfillment confirmation email
commerceSendOrderConfirmation GET /v1/commerce/order/{orderid}/sendorderconfirmation Send order confirmation email
commerceSendRefundConfirmation GET /v1/commerce/order/{orderid}/sendrefundconfirmation Send refund confirmation email
commerceUpdateOrder PUT /v1/commerce/order/{orderid} Update order

commerceAuthorizeOrder

CommerceOrder commerceAuthorizeOrder(orderid, commercePaymentRequest)

Authorize payment for order

Example

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

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

Parameters

| orderid | kotlin.String| | |

Name Type Description Notes
commercePaymentRequest CommercePaymentRequest [optional]

Return type

CommerceOrder

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

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

commerceCaptureOrder

CommerceOrder commerceCaptureOrder(orderid)

Capture authorized payment

Example

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

val apiInstance = OrdersApi()
val orderid : kotlin.String = orderid_example // kotlin.String | 
try {
    val result : CommerceOrder = apiInstance.commerceCaptureOrder(orderid)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling OrdersApi#commerceCaptureOrder")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling OrdersApi#commerceCaptureOrder")
    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

commerceChargeOrder

CommerceOrder commerceChargeOrder(orderid, commercePaymentRequest)

Authorize and capture payment (single step)

Example

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

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

Parameters

| orderid | kotlin.String| | |

Name Type Description Notes
commercePaymentRequest CommercePaymentRequest [optional]

Return type

CommerceOrder

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

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

commerceCreateOrder

CommerceOrder commerceCreateOrder(commerceOrder)

Create order

Example

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

val apiInstance = OrdersApi()
val commerceOrder : CommerceOrder =  // CommerceOrder | 
try {
    val result : CommerceOrder = apiInstance.commerceCreateOrder(commerceOrder)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling OrdersApi#commerceCreateOrder")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling OrdersApi#commerceCreateOrder")
    e.printStackTrace()
}

Parameters

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

commerceDeleteOrder

commerceDeleteOrder(orderid)

Delete order

Example

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

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

Parameters

Name Type Description Notes
orderid kotlin.String

Return type

null (empty response body)

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

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

commerceGetOrder

CommerceOrder commerceGetOrder(orderid)

Get order

Example

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

val apiInstance = OrdersApi()
val orderid : kotlin.String = orderid_example // kotlin.String | 
try {
    val result : CommerceOrder = apiInstance.commerceGetOrder(orderid)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling OrdersApi#commerceGetOrder")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling OrdersApi#commerceGetOrder")
    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

commerceGetOrderPayments

kotlin.collections.List<CommercePayment> commerceGetOrderPayments(orderid)

Get order payments

Example

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

val apiInstance = OrdersApi()
val orderid : kotlin.String = orderid_example // kotlin.String | 
try {
    val result : kotlin.collections.List<CommercePayment> = apiInstance.commerceGetOrderPayments(orderid)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling OrdersApi#commerceGetOrderPayments")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling OrdersApi#commerceGetOrderPayments")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
orderid kotlin.String

Return type

kotlin.collections.List<CommercePayment>

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

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

commerceGetOrderReturns

kotlin.collections.List<CommerceReturn> commerceGetOrderReturns(orderid)

Get order returns

Example

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

val apiInstance = OrdersApi()
val orderid : kotlin.String = orderid_example // kotlin.String | 
try {
    val result : kotlin.collections.List<CommerceReturn> = apiInstance.commerceGetOrderReturns(orderid)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling OrdersApi#commerceGetOrderReturns")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling OrdersApi#commerceGetOrderReturns")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
orderid kotlin.String

Return type

kotlin.collections.List<CommerceReturn>

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

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

commerceGetOrderStatus

CommerceGetOrderStatus200Response commerceGetOrderStatus(orderid)

Get order status

Example

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

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

Parameters

Name Type Description Notes
orderid kotlin.String

Return type

CommerceGetOrderStatus200Response

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

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

commerceListOrders

CommercePaginatedOrders commerceListOrders(page, display, sort, q)

List orders

Example

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

val apiInstance = OrdersApi()
val page : kotlin.Int = 56 // kotlin.Int | Page number (1-indexed)
val display : kotlin.Int = 56 // kotlin.Int | Number of items per page
val sort : kotlin.String = sort_example // kotlin.String | Sort field (prefix with - for descending)
val q : kotlin.String = q_example // kotlin.String | Search query
try {
    val result : CommercePaginatedOrders = apiInstance.commerceListOrders(page, display, sort, q)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling OrdersApi#commerceListOrders")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling OrdersApi#commerceListOrders")
    e.printStackTrace()
}

Parameters

| page | kotlin.Int| Page number (1-indexed) | [optional] [default to 1] | | display | kotlin.Int| Number of items per page | [optional] [default to 20] | | sort | kotlin.String| Sort field (prefix with - for descending) | [optional] [default to "-UpdatedAt"] |

Name Type Description Notes
q kotlin.String Search query [optional]

Return type

CommercePaginatedOrders

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

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

commercePatchOrder

CommerceOrder commercePatchOrder(orderid, commerceOrder)

Partially update order

Example

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

val apiInstance = OrdersApi()
val orderid : kotlin.String = orderid_example // kotlin.String | 
val commerceOrder : CommerceOrder =  // CommerceOrder | 
try {
    val result : CommerceOrder = apiInstance.commercePatchOrder(orderid, commerceOrder)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling OrdersApi#commercePatchOrder")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling OrdersApi#commercePatchOrder")
    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

commerceRefundOrder

CommerceOrder commerceRefundOrder(orderid, commerceRefundOrderRequest)

Refund order

Example

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

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

Parameters

| orderid | kotlin.String| | |

Name Type Description Notes
commerceRefundOrderRequest CommerceRefundOrderRequest [optional]

Return type

CommerceOrder

Authorization

Configure bearerAuth statically:

ApiClient.accessToken = ""

Configure bearerAuth dynamically:

apiInstance.accessTokenProvider = { "" }

HTTP request headers

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

commerceSendFulfillmentConfirmation

kotlin.Any commerceSendFulfillmentConfirmation(orderid)

Send fulfillment confirmation email

Example

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

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

Parameters

Name Type Description Notes
orderid 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

commerceSendOrderConfirmation

kotlin.Any commerceSendOrderConfirmation(orderid)

Send order confirmation email

Example

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

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

Parameters

Name Type Description Notes
orderid 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

commerceSendRefundConfirmation

kotlin.Any commerceSendRefundConfirmation(orderid)

Send refund confirmation email

Example

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

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

Parameters

Name Type Description Notes
orderid 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

commerceUpdateOrder

CommerceOrder commerceUpdateOrder(orderid, commerceOrder)

Update order

Example

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

val apiInstance = OrdersApi()
val orderid : kotlin.String = orderid_example // kotlin.String | 
val commerceOrder : CommerceOrder =  // CommerceOrder | 
try {
    val result : CommerceOrder = apiInstance.commerceUpdateOrder(orderid, commerceOrder)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling OrdersApi#commerceUpdateOrder")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling OrdersApi#commerceUpdateOrder")
    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