kfGetAddressesByPhone static method
Fetches saved addresses for a phone number. Uses muToken header for standalone (kwikforms) mode auth.
Implementation
static Future<dynamic> kfGetAddressesByPhone({
required String phone,
required String userAuthToken,
bool consent = true,
}) =>
_withRetry(() async {
final gokwik = DioClient().getClient();
final response = await gokwik.post(
cdnConfigInstance.getEndpoint(APIEndpointKeys.kfGetAddressesByPhone)!,
data: {'phone': phone, 'consent': consent},
options: Options(headers: {
APIHeader.muToken: userAuthToken,
}),
);
return response.data;
});