### Go Native Example for POST Usage Source: https://docs.mykaarma.com/API_references/communication/API/API_reference/rate-controller Example using Go's native HTTP client to log a usage event. This demonstrates making a POST request with custom headers. ```go package main import ( "fmt" "net/http" "bytes" "io/ioutil" ) func main() { url := "/communications/department/:departmentUUID/feature/:feature/communicationvalue/:communicationValue/usage" client := &http.Client{} req, err := http.NewRequest("POST", url, bytes.NewBuffer([]byte{})) if err != nil { fmt.Println(err) return } req.Header.Set("Accept", "application/json") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(res.StatusCode) fmt.Println(string(body)) } ``` -------------------------------- ### Node.js - Get Invoice Source: https://docs.mykaarma.com/API_references/payments/API/API_reference/get-invoice Example using axios in Node.js to fetch invoice data. Make sure axios is installed (`npm install axios`). ```javascript const axios = require('axios'); const url = '/payment/v4/departments/:departmentUuid/invoices/:invoiceGuid'; const headers = { 'Accept': '*/*' }; axios.get(url, { headers: headers }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error fetching invoice:', error); }); ``` -------------------------------- ### Python - Get Invoice Source: https://docs.mykaarma.com/API_references/payments/API/API_reference/get-invoice Example using Python's requests library to fetch invoice data. Ensure you have the 'requests' library installed. ```python import requests url = "/payment/v4/departments/:departmentUuid/invoices/:invoiceGuid" headers = { 'Accept': '*/*' } response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### Go Native Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-service-subscriber-properties Example using Go's native 'net/http' package to send a GET request. Ensure proper error handling and response processing. ```go package main import ( "fmt" "net/http" "io/ioutil" ) func main() { client := &http.Client{} req, err := http.NewRequest("GET", "/manage/v2/servicesubscribers/:serviceSubscriberUUID/properties", nil) if err != nil { fmt.Println(err) return } req.Header.Add("Accept", "application/json") resp, err := client.Do(req) if err != nil { fmt.Println(err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) } ``` -------------------------------- ### Send API Request with Node.js (axios) Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-default-user-for-department-1 This Node.js example uses the 'axios' library to perform a GET request. Ensure you have 'axios' installed (`npm install axios`). The ':ServiceSubscriberDepartment' placeholder needs to be replaced with actual data. ```javascript const axios = require('axios'); const url = '/manage/v2/department/:ServiceSubscriberDepartment/dealerAssociate/default'; const headers = { 'Accept': 'application/json' }; axios.get(url, { headers: headers }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error making request:', error); }); ``` -------------------------------- ### Send API Request - Go Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/generate-calendar-for-all-resources-at-dealership This Go example shows how to make a POST request for migrating dealer data using the native http package. It details setting up the request body and headers. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "/manage/v2/calendar/migrate-data/dealer" data := map[string]interface{}{ "errors": []map[string]interface{}{ { "errorCode": 0, "errorTitle": "string", "errorMessage": "string" } }, "warnings": []map[string]interface{}{ { "warningCode": 0, "warningTitle": "string", "warningMessage": "string" } }, "apiRequestId": "string", "dealerUuids": []string{ "string" } } jsonData, err := json.Marshal(data) if err != nil { fmt.Println("Error marshaling JSON:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Accept", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer resp.Body.Close() fmt.Println("Status Code:", resp.StatusCode) } ``` -------------------------------- ### C# RestSharp Example for Fetching Dealer Device Source: https://docs.mykaarma.com/API_references/payments/API/API_reference/get-dealer-device This C# snippet uses RestSharp to make a GET request for a dealer device. Ensure you have RestSharp installed and replace placeholders. ```csharp using RestSharp; using System; public class Example { public static void Main(string[] args) { var client = new RestClient("/payment"); // Base URL var request = new RestRequest("/v4/dealers/:dealerUuid/devices/:deviceUuid", Method.GET); request.AddHeader("Accept", "*/*"); var response = client.Execute(request); if (response.IsSuccessful) { Console.WriteLine(response.Content); } else { Console.WriteLine("Error: " + response.ErrorMessage); } } } ``` -------------------------------- ### Go Native Example for Get Appointment User List Source: https://docs.mykaarma.com/API_references/transportation/mobile%20service/API_reference/get-appointment-user-list-using-post Example of making a POST request to the getAppointmentUserList endpoint using Go's native http package. This snippet shows how to construct the request and handle the response. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "//api.mykaarma.com/mobile-service/user/list" requestBody := map[string]interface{}{ "dealerDepartmentUuidList": []string{"string"}, "requesterUserUuid": "string", } jsonBody, err := json.Marshal(requestBody) if err != nil { fmt.Printf("Error marshaling JSON: %v\n", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonBody)) if err != nil { fmt.Printf("Error creating request: %v\n", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Accept", "application/json") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Printf("Error sending request: %v\n", err) return } defer res.Body.Close() var result map[string]interface{} err = json.NewDecoder(res.Body).Decode(&result) if err != nil { fmt.Printf("Error decoding response: %v\n", err) return } fmt.Printf("Status Code: %d\n", res.StatusCode) fmt.Printf("Response Body: %+v\n", result) } ``` -------------------------------- ### Product History API Go (native) Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-license-history-for-dealer Example of how to call the product history API using native Go HTTP client. ```go package main import ( "bytes" "fmt" "net/http" ) func main() { url := "/manage/v2/license/dealers/:ServiceSubscriberDealer/products/:productUuid/history" payload := []byte(`{ "changeTypes": [ "TOTAL" ] }`) req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload)) if err != nil { fmt.Println(err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Accept", "application/json") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() // Process response body here fmt.Println(res.Status) } ``` -------------------------------- ### Get Customer Predictions PowerShell Example Source: https://docs.mykaarma.com/API_references/communication/API/API_reference/get-customer-predictions-1 Example of how to make a GET request to the Get Customer Predictions API using PowerShell. Replace placeholder UUIDs. ```powershell Invoke-RestMethod -Method Get -Uri '/communications/departments/:departmentUUID/customers/:customerUUID/predictions' -Headers @{'Accept'='application/json'} ``` -------------------------------- ### cURL Request Example Source: https://docs.mykaarma.com/API_references/transportation/mobile%20service/API_reference/save-dealer-availabilities-using-put This example demonstrates how to make a GET request to the API using cURL. Note: The provided example is a GET request, but the endpoint is for PUT. ```bash curl -L -X GET '//api.mykaarma.com/mobile-service' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' ``` -------------------------------- ### Go Native API Request Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-dealers-subscriptionss This Go example shows how to make a POST request using the native 'net/http' package. It includes setting the request method, headers, and sending the JSON body. ```go package main import ( "bytes" "fmt" "net/http" "io/ioutil" ) func main() { url := "/manage/v2/dealer/subscription/list" requestBody := []byte(`{ "subscriptions": [ "string" ], "dealerUuids": [ "string" ], "validate": true }`) req, err := http.NewRequest("POST", url, bytes.NewBuffer(requestBody)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Accept", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println("Error reading response body:", err) return } fmt.Println("Response Status:", resp.Status) fmt.Println("Response Body:", string(body)) } ``` -------------------------------- ### Go Native Example for Creating Purpose Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/create-purpose Example of how to create a purpose using Go's native http package. This demonstrates making a POST request with a JSON body. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "/manage/v2/purpose" data := map[string]interface{}{ "key": "string", "name": "string", "authorities": []map[string]string{ { "authority": "string", "description": "string" } } } jsonData, err := json.Marshal(data) if err != nil { fmt.Println("Error marshalling JSON:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Accept", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer resp.Body.Close() fmt.Println("Status Code:", resp.StatusCode) } ``` -------------------------------- ### Get Customer Predictions PHP cURL Example Source: https://docs.mykaarma.com/API_references/communication/API/API_reference/get-customer-predictions-1 Example of how to make a GET request to the Get Customer Predictions API using PHP with cURL. Replace placeholder UUIDs. ```php ``` -------------------------------- ### Go Native HTTP Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-filtered-automated-templates-for-dealer This example demonstrates making a POST request to the automated templates endpoint using Go's native 'net/http' package. It shows how to set headers and send a JSON body. ```go package main import ( "bytes" "net/http" "io/ioutil" ) func main() { url := "/manage/v2/dealer/:ServiceSubscriberDealer/filtered/automatedTemplates" payload := []byte(`{ "featureCategoryList": [ "string" ], "onlyFreeMarker": true, "onlySettingsTab": true, "typeTemplate": "string" }`) req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload)) if err != nil { panic(err) } req.Header.Set("Content-Type", "application/json") req.Header.Set("Accept", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { panic(err) } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { panic(err) } println(string(body)) } ``` -------------------------------- ### Get All Domains API PowerShell RestMethod Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-domains-with-sso-partners Example of how to call the Get All Domains API using PowerShell with the `Invoke-RestMethod` cmdlet. This snippet demonstrates making a GET request. ```powershell Invoke-RestMethod -Uri '/manage/v2/domains' -Method Get -Headers @{ "Accept" = "application/json" } ``` -------------------------------- ### Get All Domains API Java OkHttp Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-domains-with-sso-partners Example of how to call the Get All Domains API using Java with the OkHttp library. This snippet demonstrates making a GET request. ```java import okhttp3.*; import java.io.IOException; public class Example { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("/manage/v2/domains") .header("Accept", "application/json") .build(); try (Response response = client.newCall(request).execute()) { System.out.println(response.body().string()); } } } ``` -------------------------------- ### Send GET Request with Go (native) Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-user-uuid-for-invite-uuid This Go example shows how to make a GET request using the native http package. It includes setting the Accept header to application/json. ```go package main import ( "fmt" "net/http" ) func main() { url := "/manage/v2/user/LatestInviteUUID/:LatestInviteUUID" req, err := http.NewRequest("GET", url, nil) if err != nil { fmt.Printf("Error creating request: %s\n", err) return } req.Header.Set("Accept", "application/json") client := &http.Client{} resp, err := client.Do(req) if err != nil { fmt.Printf("Error sending request: %s\n", err) return } defer resp.Body.Close() // Process response body here fmt.Printf("Status Code: %d\n", resp.StatusCode) } ``` -------------------------------- ### Get All Domains API PHP cURL Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-domains-with-sso-partners Example of how to call the Get All Domains API using PHP with cURL. This snippet shows how to set up and execute a GET request. ```php ``` -------------------------------- ### Java OkHttp Example for Get Appointment User List Source: https://docs.mykaarma.com/API_references/transportation/mobile%20service/API_reference/get-appointment-user-list-using-post Example of using OkHttp in Java to send a POST request to the getAppointmentUserList endpoint. Shows how to build the request with headers and JSON body. ```java import okhttp3.*; import java.io.IOException; public class GetAppointmentUserList { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); MediaType JSON = MediaType.get("application/json; charset=utf-8"); String requestBodyString = "{\"dealerDepartmentUuidList\": [\"string\"], \"requesterUserUuid\": \"string\"}"; RequestBody body = RequestBody.create(requestBodyString, JSON); Request request = new Request.Builder() .url("//api.mykaarma.com/mobile-service/user/list") .post(body) .addHeader("Content-Type", "application/json") .addHeader("Accept", "application/json") .build(); try (Response response = client.newCall(request).execute()) { System.out.println("Status Code: " + response.code()); System.out.println("Response Body: " + response.body().string()); } } } ``` -------------------------------- ### Get All Domains API C# RestSharp Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-domains-with-sso-partners Example of how to call the Get All Domains API using C# with the RestSharp library. This snippet demonstrates making a GET request. ```csharp using RestSharp; using System; public class Example { public void GetDomains() { var client = new RestClient("/manage/v2/domains"); var request = new RestRequest(Method.GET); request.AddHeader("Accept", "application/json"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } ``` -------------------------------- ### Send API Request - Go (native) Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/create-product This Go code example shows how to make a POST request using the native 'net/http' package. It details setting the request method, headers, and JSON body. ```go package main import ( "bytes" "encoding/json" "fmt" "net/http" ) func main() { url := "/manage/v2/products/" requestBody, err := json.Marshal(map[string]interface{}{ "key": "string", "name": "string", "externalKey": "string", "description": "string", "isValid": true, "authorityUUID": []string{ "string", }, "emailTemplateTypeUUID": []string{ "string", }, "preferenceUUID": []string{ "string", }, "roleUUID": []string{ "string", }, "optionKeyPromptUUID": []string{ "string", }, "featureUUID": []string{ "string", }, "apiScopeServiceSubscriberUUIDMap": map[string]interface{}{}, }) if err != nil { fmt.Println("Error marshalling JSON:", err) return } req, err := http.NewRequest("POST", url, bytes.NewBuffer(requestBody)) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Accept", "application/json") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() fmt.Println("Status Code:", res.StatusCode) } ``` -------------------------------- ### Product History API Java (OkHttp) Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-license-history-for-dealer Example of how to call the product history API using Java with OkHttp. ```java import okhttp3.*; import java.io.IOException; public class ProductHistory { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); MediaType JSON = MediaType.get("application/json; charset=utf-8"); String url = "/manage/v2/license/dealers/:ServiceSubscriberDealer/products/:productUuid/history"; String json = "{\"changeTypes\": [\"TOTAL\"]}"; RequestBody body = RequestBody.create(json, JSON); Request request = new Request.Builder() .url(url) .post(body) .addHeader("Content-Type", "application/json") .addHeader("Accept", "application/json") .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } } } ``` -------------------------------- ### Get All Domains API Node.js Axios Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-domains-with-sso-partners Example of how to call the Get All Domains API using Node.js with the Axios library. This snippet demonstrates making a GET request. ```javascript const axios = require('axios'); const url = '/manage/v2/domains'; const headers = { 'Accept': 'application/json' }; axios.get(url, { headers: headers }) .then(response => { console.log(response.data); }) .catch(error => { console.error(error); }); ``` -------------------------------- ### Go Native Example for Pre-Qualification Source: https://docs.mykaarma.com/API_references/payments/API/API_reference/get-pre-qualification This Go code snippet illustrates how to fetch pre-qualification data using native Go HTTP client. Remember to replace placeholder path parameters. ```go package main import ( "fmt" "io/ioutil" "net/http" ) func main() { client := &http.Client{} req, err := http.NewRequest("GET", "/payment/aggregator/v1/finance/departments/{departmentUuid}/orders/{dealerOrderUuid}/pre-qualification", nil) if err != nil { fmt.Println(err) return } req.Header.Add("Accept", "*/*") resp, err := client.Do(req) if err != nil { fmt.Println(err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) } ``` -------------------------------- ### GET /v2/ssopartner Request Example Source: https://docs.mykaarma.com/API_references/admin/manage/API_reference/get-sso-partner-for-domain Example of how to make a GET request to the /v2/ssopartner endpoint, specifying the Accept header for JSON. ```curl curl -L -X GET '/manage/v2/ssopartner' \ -H 'Accept: application/json' ``` ```python import requests url = "/manage/v2/ssopartner" headers = { 'Accept': 'application/json' } response = requests.get(url, headers=headers) print(response.text) ``` ```go package main import ( "fmt" "net/http" ) func main() { client := &http.Client{} req, err := http.NewRequest("GET", "/manage/v2/ssopartner", nil) if err != nil { fmt.Println(err) return } req.Header.Add("Accept", "application/json") resp, err := client.Do(req) if err != nil { fmt.Println(err) return } defer resp.Body.Close() // Process response body here fmt.Println(resp.Status) } ``` ```nodejs const axios = require('axios'); const url = '/manage/v2/ssopartner'; const headers = { 'Accept': 'application/json' }; axios.get(url, { headers: headers }) .then(response => { console.log(response.data); }) .catch(error => { console.error(error); }); ``` ```ruby require 'net/http' require 'uri' uri = URI.parse('/manage/v2/ssopartner') http = Net::HTTP.new(uri.host, uri.port) request = Net::HTTP::Get.new(uri.request_uri) request['Accept'] = 'application/json' response = http.request(request) puts response.body ``` ```csharp using RestSharp; using System; var client = new RestClient("/manage/v2/ssopartner"); var request = new RestRequest(Method.GET); request.AddHeader("Accept", "application/json"); var response = client.Execute(request); Console.WriteLine(response.Content); ``` ```php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, '/manage/v2/ssopartner'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Accept: application/json' )); $response = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } curl_close($ch); echo $response; ``` ```java import okhttp3.*; import java.io.IOException; public class ApiRequest { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("/manage/v2/ssopartner") .header("Accept", "application/json") .get() .build(); try (Response response = client.newCall(request).execute()) { if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); System.out.println(response.body().string()); } } } ``` ```powershell Invoke-RestMethod -Uri '/manage/v2/ssopartner' -Method Get -Headers @{"Accept" = "application/json"} ``` -------------------------------- ### Java OkHttp Example for POST Usage Source: https://docs.mykaarma.com/API_references/communication/API/API_reference/rate-controller Example using the OkHttp library in Java to log a usage event. Ensure OkHttp is included as a dependency. ```java import okhttp3.*; import java.io.IOException; public class PostUsage { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("/communications/department/:departmentUUID/feature/:feature/communicationvalue/:communicationValue/usage") .header("Accept", "application/json") .post(RequestBody.create(null, new byte[0])) // Empty body for POST .build(); try (Response response = client.newCall(request).execute()) { System.out.println(response.code()); System.out.println(response.body().string()); } } } ``` -------------------------------- ### Get Customer Predictions Java OkHttp Example Source: https://docs.mykaarma.com/API_references/communication/API/API_reference/get-customer-predictions-1 Example of how to make a GET request to the Get Customer Predictions API using Java with the OkHttp library. Replace placeholder UUIDs. ```java OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("/communications/departments/:departmentUUID/customers/:customerUUID/predictions") .addHeader("Accept", "application/json") .build(); try { Response response = client.newCall(request).execute(); System.out.println(response.body().string()); } catch (IOException e) { e.printStackTrace(); } ``` -------------------------------- ### Update Order Details (Go/Native) Source: https://docs.mykaarma.com/API_references/integration/order/API_reference/patch-dealer-order This example demonstrates updating order details using a native approach. It mirrors the functionality of the Python/Requests example. ```go curl -L -X PATCH '/order/v2/departments/:department_token/orders/:orderUUID' \ -H 'Content-Type: application/json' \ -H 'Accept: */*' \ --data-raw '{ \ "order": { \ "type": "string", \ "header": { \ "internal": true, \ "orderNumber": "string", \ "serviceAccount": "string", \ "accountingAccount": "string", \ "dmsStatus": "string", \ "status": "string", \ "deptType": "string", \ "advisorNumber": "string", \ "advisorName": "string", \ "appointmentNumber": "string", \ "tagNumber": "string", \ "mileageIn": 0, \ "mileageOut": 0, \ "createDate": "string", \ "createTime": "string", \ "promisedDate": "string", \ "promisedTime": "string", \ "voidDate": "string", \ "closeDate": "string", \ "closeTime": "string", \ "waiter": "string", \ "rental": "string", \ "soldHours": "string", \ "actualHours": "string", \ "laborCost": "string", \ "laborSale": "string", \ "laborSaleCustomer": "string", \ "laborSaleInternal": "string", \ "laborSaleWarranty": "string", \ "partsCost": "string", \ "partsCostCustomer": "string", \ "partsCostInternal": "string", \ "partsCostWarranty": "string", \ "partsSale": "string", \ "partsSaleCustomer": "string", \ "partsSaleInternal": "string", \ "partsSaleWarranty": "string", \ "lubeSale": "string", \ "lubeSaleCustomer": "string", \ "lubeSaleInternal": "string", \ "lubeSaleWarranty": "string", \ "miscSale": "string", \ "miscSaleCustomer": "string", \ "miscSaleInternal": "string", \ "miscSaleWarranty": "string", \ "subletSale": "string", \ "subletSaleCustomer": "string" \ } \ } \ }' ``` -------------------------------- ### Get Customer Predictions C# RestSharp Example Source: https://docs.mykaarma.com/API_references/communication/API/API_reference/get-customer-predictions-1 Example of how to make a GET request to the Get Customer Predictions API using C# with the RestSharp library. Replace placeholder UUIDs. ```csharp using RestSharp; using System; var client = new RestClient("/communications"); var request = new RestRequest("departments/:departmentUUID/customers/:customerUUID/predictions", Method.Get); request.AddHeader("Accept", "application/json"); var response = client.Execute(request); Console.WriteLine(response.Content); ``` -------------------------------- ### Java OkHttp Example for Device Purchase Order History Source: https://docs.mykaarma.com/API_references/payments/API/API_reference/get-device-purchase-order-history This Java code example uses the OkHttp library to make a GET request for the device purchase order history. It shows how to construct the request with the correct URL and headers. ```java import okhttp3.*; import java.io.IOException; public class GetDevicePurchaseOrderHistory { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("/payment/kpayment/v1/dealer/:ServiceSubscriberDealer/device/order") .get() .addHeader("Accept", "application/json") .build(); try (Response response = client.newCall(request).execute()) { System.out.println(response.body().string()); } } } ``` -------------------------------- ### Get Customer Predictions Node.js Axios Example Source: https://docs.mykaarma.com/API_references/communication/API/API_reference/get-customer-predictions-1 Example of how to make a GET request to the Get Customer Predictions API using Node.js with the axios library. Replace placeholder UUIDs. ```javascript const axios = require('axios'); const url = '/communications/departments/:departmentUUID/customers/:customerUUID/predictions'; const headers = { 'Accept': 'application/json' }; axios.get(url, { headers }) .then(response => { console.log(response.data); }) .catch(error => { console.error(error); }); ``` -------------------------------- ### Serve Common File API Request Example Source: https://docs.mykaarma.com/API_references/payments/API/API_reference/serve-common-file This example shows how to make a GET request to the serveCommonFile API endpoint. Ensure the 'fileKey' query parameter is provided. ```http GET /kpayment/v1/file ```