orderItemsListPartnerAmendments method

Future<AmendmentList?> orderItemsListPartnerAmendments({
  1. int? page,
  2. int? limit,
  3. List<String>? statuses,
  4. String? productType,
  5. String? amendmentMode,
  6. String? orderId,
  7. String? orderItemId,
  8. DateTime? from,
  9. DateTime? to,
  10. Future<void>? abortTrigger,
})

List partner amendments

Lists amendments across the authenticated partner's orders. Requires the read order permission. Includes manual and automatic amendments in all statuses. Optional repeated statuses, productType, amendmentMode, orderId, orderItemId and inclusive UTC from/to timestamps filter the result. Use flat page (default 1) and limit (default 10, maximum 100) query parameters. Nested paging keys return 400 with code 10001. Amounts retain their original currency; a quote does not imply settlement. Example response: {\"items\":[{\"id\":\"b7428a30-f760-46e8-b504-a670bf9bed19\",\"orderId\":\"a46ee792-287e-44ef-a641-48de1a0f72fd\",\"orderItemId\":\"cf4a49ac-b785-43d4-912a-4be3443e48bd\",\"productType\":\"hotel\",\"amendmentMode\":\"manual\",\"status\":\"quoted\",\"createdAt\":\"2026-11-03T09:00:00Z\",\"amountToPay\":{\"amount\":25,\"currency\":\"USD\"},\"amountToRefund\":{\"amount\":0,\"currency\":\"USD\"}}],\"pagination\":{\"currentCount\":1,\"totalCount\":1,\"skip\":0,\"limit\":10,\"hasMore\":false,\"page\":1,\"totalPages\":1}}

Parameters:

  • int page: One-based page number. Default 1.

  • int limit: Page size, 1 to 100. Default 10.

  • List<String> statuses: Repeat to match any of the requested statuses.

  • String productType:

  • String amendmentMode:

  • String orderId:

  • String orderItemId:

  • DateTime from: Inclusive creation timestamp with UTC offset.

  • DateTime to: Inclusive creation timestamp with UTC offset. Send the end of a UTC day to include that whole day.

Implementation

Future<AmendmentList?> orderItemsListPartnerAmendments({ int? page, int? limit, List<String>? statuses, String? productType, String? amendmentMode, String? orderId, String? orderItemId, DateTime? from, DateTime? to, Future<void>? abortTrigger, }) async {
  final response = await orderItemsListPartnerAmendmentsWithHttpInfo(page: page, limit: limit, statuses: statuses, productType: productType, amendmentMode: amendmentMode, orderId: orderId, orderItemId: orderItemId, from: from, to: to, abortTrigger: abortTrigger,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AmendmentList',) as AmendmentList;

  }
  return null;
}