### Retrieve a Task - GET Request Examples Source: https://auvoapiv2.docs.apiary.io/reference/tasks/task/retrieve-a-task Examples for making a GET request to retrieve a specific task using its ID. Includes various programming languages for making the API call. ```cURL curl -X GET https://api.auvo.com.br/v2/tasks/{id} ``` ```JavaScript fetch('https://api.auvo.com.br/v2/tasks/{id}', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_TOKEN' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` ```Python import requests url = "https://api.auvo.com.br/v2/tasks/{id}" headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_TOKEN' } response = requests.get(url, headers=headers) print(response.json()) ``` ```Java import okhttp3.*; import java.io.IOException; public class GetTask { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.auvo.com.br/v2/tasks/{id}") .get() .addHeader("Content-Type", "application/json") .addHeader("Authorization", "Bearer YOUR_TOKEN") .build(); Response response = client.newCall(request).execute(); System.out.println(response.body().string()); } } ``` ```Node.js const axios = require('axios'); const url = 'https://api.auvo.com.br/v2/tasks/{id}'; const headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_TOKEN' }; axios.get(url, { headers: headers }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); }); ``` -------------------------------- ### Retrieve a Ticket - GET Request Examples Source: https://auvoapiv2.docs.apiary.io/reference/tasks/task/retrieve-a-task Examples for making a GET request to retrieve a single ticket. Includes various programming languages for making the API call. ```cURL curl -X GET https://api.auvo.com.br/v2/tickets/{id} ``` ```JavaScript fetch('https://api.auvo.com.br/v2/tickets/{id}', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_TOKEN' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` ```Python import requests url = "https://api.auvo.com.br/v2/tickets/{id}" headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_TOKEN' } response = requests.get(url, headers=headers) print(response.json()) ``` ```Java import okhttp3.*; import java.io.IOException; public class GetTicket { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.auvo.com.br/v2/tickets/{id}") .get() .addHeader("Content-Type", "application/json") .addHeader("Authorization", "Bearer YOUR_TOKEN") .build(); Response response = client.newCall(request).execute(); System.out.println(response.body().string()); } } ``` ```Node.js const axios = require('axios'); const url = 'https://api.auvo.com.br/v2/tickets/{id}'; const headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_TOKEN' }; axios.get(url, { headers: headers }) .then(response => { console.log(response.data); }) .catch(error => { console.error('Error:', error); }); ``` -------------------------------- ### Example Go Request for Quotations Source: https://auvoapiv2.docs.apiary.io/reference/quotations/quotation/retrieves-a-list-of-quotations Example of how to make a GET request to retrieve a list of quotations using Go's 'net/http' package, including setting headers. ```Go package main import ( "fmt" "net/http" ) func main() { url := "https://api.auvo.com.br/v2/quotations/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order" req, err := http.NewRequest("GET", url, nil) if err != nil { fmt.Printf("Error creating request: %s\n", err) return } req.Header.Set("Content-Type", "application/json") req.Header.Set("Authorization", "Bearer YOUR_TOKEN") client := &http.Client{} res, err := client.Do(req) if err != nil { fmt.Printf("Error sending request: %s\n", err) return } defer res.Body.Close() // Process response body here fmt.Println("Response Status:", res.Status) } ``` -------------------------------- ### Example Java Request for Quotations Source: https://auvoapiv2.docs.apiary.io/reference/quotations/quotation/retrieves-a-list-of-quotations Example of how to make a GET request to retrieve a list of quotations using Java, demonstrating how to construct the URL and headers. ```Java String url = "https://api.auvo.com.br/v2/quotations/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order"; // Add headers like Content-Type and Authorization // Execute GET request ``` -------------------------------- ### Retrieve Teams List - Java Example Source: https://auvoapiv2.docs.apiary.io/reference/teams/team/retrieve-a-list-of-teams Example of how to retrieve a list of teams using Java. This snippet illustrates making an HTTP GET request with appropriate headers. ```Java // Java code example for retrieving teams would go here. // This would typically involve using libraries like Apache HttpClient or OkHttp. ``` -------------------------------- ### Retrieve Teams List - C# Example Source: https://auvoapiv2.docs.apiary.io/reference/teams/team/retrieve-a-list-of-teams Example of how to retrieve a list of teams using C#. This snippet demonstrates making an HTTP GET request using HttpClient. ```C# using System; using System.Net.Http; using System.Threading.Tasks; public class TeamsClient { public static async Task GetTeamsAsync() { using (var client = new HttpClient()) { var url = "https://api.auvo.com.br/v2/teams/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order"; var request = new HttpRequestMessage(HttpMethod.Get, url); request.Headers.Add("Content-Type", "application/json"); request.Headers.Add("Authorization", "Bearer token"); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); var responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } } } ``` -------------------------------- ### Retrieve a list of Users - Node.js Example Source: https://auvoapiv2.docs.apiary.io/reference/users/user/retrieve-a-list-of-users Example of how to retrieve a list of users using Node.js with the 'node-fetch' library. This shows how to make an HTTP GET request and process the response. ```JavaScript const fetch = require('node-fetch'); fetch('https://api.auvo.com.br/v2/users/?paramFilter=%7B%0D%0A%22name%22%3A%22a%22%0D%0A%7D&Page=1&PageSize=1&Order=Asc', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer token' } }) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` -------------------------------- ### Retrieve Teams List - Go Example Source: https://auvoapiv2.docs.apiary.io/reference/teams/team/retrieve-a-list-of-teams Example of how to retrieve a list of teams using Go. This snippet demonstrates making an HTTP GET request using the 'net/http' package. ```Go package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.auvo.com.br/v2/teams/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order" client := &http.Client{} req, err := http.NewRequest("GET", url, nil) if err != nil { fmt.Println(err) return } req.Header.Add("Content-Type", "application/json") req.Header.Add("Authorization", "Bearer token") 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(string(body)) } ``` -------------------------------- ### Example JavaScript Request for Quotations Source: https://auvoapiv2.docs.apiary.io/reference/quotations/quotation/retrieves-a-list-of-quotations Example of how to make a GET request to retrieve a list of quotations using JavaScript (Fetch API), showing how to set up the request with headers. ```JavaScript fetch('https://api.auvo.com.br/v2/quotations/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_TOKEN' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ``` -------------------------------- ### Example Swift Request for Quotations Source: https://auvoapiv2.docs.apiary.io/reference/quotations/quotation/retrieves-a-list-of-quotations Example of how to make a GET request to retrieve a list of quotations using Swift with URLSession, demonstrating modern asynchronous programming patterns. ```Swift import Foundation func getQuotations() { guard let url = URL(string: "https://api.auvo.com.br/v2/quotations/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order") else { return } var request = URLRequest(url: url) request.httpMethod = "GET" request.setValue("application/json", forHTTPHeaderField: "Content-Type") request.setValue("Bearer YOUR_TOKEN", forHTTPHeaderField: "Authorization") URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error.localizedDescription)\n") return } guard let data = data else { return } if let responseString = String(data: data, encoding: .utf8) { print("Response: \(responseString)\n") } }.resume() } ``` -------------------------------- ### Example C# Request for Quotations Source: https://auvoapiv2.docs.apiary.io/reference/quotations/quotation/retrieves-a-list-of-quotations Example of how to make a GET request to retrieve a list of quotations using C#'s HttpClient, demonstrating asynchronous operations and header configuration. ```C# using System; using System.Net.Http; using System.Threading.Tasks; public class QuotationsClient { public static async Task GetQuotationsAsync() { using (var client = new HttpClient()) { client.BaseAddress = new Uri("https://api.auvo.com.br/v2/"); client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "YOUR_TOKEN"); HttpResponseMessage response = await client.GetAsync("quotations/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order"); if (response.IsSuccessStatusCode) { string result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); } else { Console.WriteLine($"Error: {response.StatusCode}"); } } } } ``` -------------------------------- ### Retrieve Segments List - Go Example Source: https://auvoapiv2.docs.apiary.io/reference/segments/segments/retrieves-a-list-of-segments Example of how to retrieve a list of segments using Go. This snippet demonstrates using the 'net/http' package to make an HTTP GET request. ```Go package main import ( "fmt" "io/ioutil" "net/http" ) func main() { url := "https://api.auvo.com.br/v2/segments/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order" client := &http.Client{} req, err := http.NewRequest("GET", url, nil) if err != nil { fmt.Println("Error creating request:", err) return } req.Header.Add("Content-Type", "application/json") req.Header.Add("Authorization", "Bearer token") res, err := client.Do(req) if err != nil { fmt.Println("Error sending request:", err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println("Error reading response body:", err) return } fmt.Println(string(body)) } ``` -------------------------------- ### Example Objective-C Request for Quotations Source: https://auvoapiv2.docs.apiary.io/reference/quotations/quotation/retrieves-a-list-of-quotations Example of how to make a GET request to retrieve a list of quotations using Objective-C with NSURLSession, demonstrating network request setup and data handling. ```Objective-C #import - (void)getQuotations { NSString *urlString = @"https://api.auvo.com.br/v2/quotations/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order"; NSURL *url = [NSURL URLWithString:urlString]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; request.HTTPMethod = @"GET"; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setValue:[NSString stringWithFormat:@"Bearer %@", @"YOUR_TOKEN"] forHTTPHeaderField:@"Authorization"]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"Error: %@\n", error.localizedDescription); return; } NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSLog(@"Response: %@\n", responseString); }]; [task resume]; } ``` -------------------------------- ### Webhook Go Example Source: https://auvoapiv2.docs.apiary.io/reference/webhooks/webhook/retrieve-a-list-of-webhooks Example of how to retrieve a list of webhooks using Go. This snippet would typically involve using the `net/http` package. ```Go // Go code to make a GET request to the webhooks endpoint ``` -------------------------------- ### Add a new Service - Example Source: https://auvoapiv2.docs.apiary.io/reference/equipments/equipment/retrieve-a-equipment This section describes how to add a new service. It specifies that the request body requires minimum attributes and directs users to 'Attributes' or 'Json Schema' for comprehensive information. ```text Add a new Service The body example describes the minimum required attributes to successfully add a service. See the **Atributes** or **Json Schema** in the Example section for all allowed attributes. ``` -------------------------------- ### Login Request - GET Example Source: https://auvoapiv2.docs.apiary.io/reference/equipment-categories/create-api Example demonstrating the minimum required query parameters for a GET request to retrieve an authentication token. ```http GET /login?apiKey=&apiToken= HTTP/1.1 ``` -------------------------------- ### Retrieves a list of Projects - Example Source: https://auvoapiv2.docs.apiary.io/reference/equipments/equipment/retrieve-a-equipment This section describes how to retrieve a list of projects. It implies a GET request to a project listing endpoint. ```text Retrieves a list of Projects ``` -------------------------------- ### Login Request - GET Example Source: https://auvoapiv2.docs.apiary.io/reference/teams Example of query parameters required for a GET request to the /login endpoint to retrieve an authentication token. The 'authenticated' property indicates success. ```text # Example query parameters for GET /login API key=&API Token= ``` -------------------------------- ### Retrieve a Project - Example Source: https://auvoapiv2.docs.apiary.io/reference/equipments/equipment/retrieve-a-equipment This section describes how to retrieve a single project. It implies a GET request to a specific project endpoint, likely using an ID. ```text Retrieve a Project ``` -------------------------------- ### Auvo API V2.0 Login - GET Request Example Source: https://auvoapiv2.docs.apiary.io/reference/expenses/expense/add-a-new-expense Example of query parameters required for a GET request to authenticate with the Auvo API V2.0. The response indicates the success of the authentication. ```text GET /login?apiKey=&apiToken= ``` -------------------------------- ### Add Service (JSON Example) Source: https://auvoapiv2.docs.apiary.io/reference/customer-groups/customer-group/retrieves-a-list-of-clients-of-the-customer-group Example JSON body for adding a new service. It includes the minimum required attributes for a successful service creation. Refer to the 'Attributes' or 'Json Schema' for a complete list of allowed attributes. ```json { "name": "New Service Name", "description": "Description for the new service" } ``` -------------------------------- ### Add New Customer Request Body Example Source: https://auvoapiv2.docs.apiary.io/reference/customer-groups/customer-group Provides an example of the minimum required attributes for successfully adding a new customer. Consult the Attributes or JSON Schema for a complete list of allowed attributes. ```json { "name": "Example Customer", "email": "customer@example.com", "phone": "123-456-7890", "address": { "street": "Example Street", "number": "456", "city": "Example City", "state": "EX", "zipCode": "98765-432" } } ``` -------------------------------- ### Example cURL Request for Quotations Source: https://auvoapiv2.docs.apiary.io/reference/quotations/quotation/retrieves-a-list-of-quotations Example of how to make a GET request to retrieve a list of quotations using cURL, including parameters for filtering, pagination, and ordering. ```Shell curl -X GET \ 'https://api.auvo.com.br/v2/quotations/?paramFilter=%7B%22publicId%22%3A123%7D&page=1&pageSize=10&order=asc' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_TOKEN' ``` -------------------------------- ### Retrieve Teams List - Swift Example Source: https://auvoapiv2.docs.apiary.io/reference/teams/team/retrieve-a-list-of-teams Example of how to retrieve a list of teams using Swift. This snippet demonstrates making an HTTP GET request using URLSession. ```Swift import Foundation func getTeams() { guard let url = URL(string: "https://api.auvo.com.br/v2/teams/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order") else { return } var request = URLRequest(url: url) request.httpMethod = "GET" request.setValue("application/json", forHTTPHeaderField: "Content-Type") request.setValue("Bearer token", forHTTPHeaderField: "Authorization") URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error.localizedDescription)\n") return } guard let data = data else { return } let responseString = String(data: data, encoding: .utf8) print("Response: \(responseString ?? "")\n") }.resume() } ``` -------------------------------- ### Retrieve Equipment by ID - Python Source: https://auvoapiv2.docs.apiary.io/reference/equipments/equipment/retrieve-a-equipment This Python example demonstrates how to retrieve equipment details using its ID via a GET request. It uses the `requests` library and includes basic error handling for non-200 status codes. ```Python import requests url = "https://api.auvo.com.br/v2/equipments/id" params = { "id": "123" } headers = { "Content-Type": "application/json", "Authorization": "Bearer token" } response = requests.get(url, params=params, headers=headers) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") ``` -------------------------------- ### Retrieves a list of Services - Example Source: https://auvoapiv2.docs.apiary.io/reference/equipments/equipment/retrieve-a-equipment This section describes how to retrieve a list of services. It implies a GET request to a service listing endpoint. ```text Retrieves a list of Services ``` -------------------------------- ### Retrieve Teams List - Objective-C Example Source: https://auvoapiv2.docs.apiary.io/reference/teams/team/retrieve-a-list-of-teams Example of how to retrieve a list of teams using Objective-C. This snippet demonstrates making an HTTP GET request using NSURLSession. ```Objective-C #import - (void)getTeams { NSString *urlString = @"https://api.auvo.com.br/v2/teams/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order"; NSURL *url = [NSURL URLWithString:urlString]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; request.HTTPMethod = "GET"; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setValue:@"Bearer token" forHTTPHeaderField:@"Authorization"]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"Error: %@\n", error.localizedDescription); return; } NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSLog(@"Response: %@\n", responseString); }]; [task resume]; } ``` -------------------------------- ### Retrieve Keyword Example Response - 200 OK Source: https://auvoapiv2.docs.apiary.io/reference/keywords/keywords/retrieve-a-keyword Example successful response for retrieving a keyword. Includes the keyword's ID, description, and registration date. ```JSON { "result":{ "id": 42, "description": "TerĂªscio", "registrationDate": "2016-03-23T18:10:00" } } ``` -------------------------------- ### Retrieve Equipment by ID - Ruby Source: https://auvoapiv2.docs.apiary.io/reference/equipments/equipment/retrieve-a-equipment This Ruby example shows how to retrieve equipment information by its ID. It uses the `net/http` library to perform the GET request and includes basic error handling. ```Ruby require 'net/http' require 'uri' uri = URI.parse('https://api.auvo.com.br/v2/equipments/id?id=123') request = Net::HTTP::Get.new(uri) request['Content-Type'] = 'application/json' request['Authorization'] = 'Bearer token' response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http| http.request(request) end puts response.body ``` -------------------------------- ### Retrieve Segments List - Swift Example Source: https://auvoapiv2.docs.apiary.io/reference/segments/segments/retrieves-a-list-of-segments Example of how to retrieve a list of segments using Swift. This snippet demonstrates using URLSession to make an HTTP GET request. ```Swift import Foundation func getSegments() { guard let url = URL(string: "https://api.auvo.com.br/v2/segments/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order") else { return } var request = URLRequest(url: url) request.httpMethod = "GET" request.setValue("application/json", forHTTPHeaderField: "Content-Type") request.setValue("Bearer token", forHTTPHeaderField: "Authorization") URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error.localizedDescription)\n") } else if let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200 { if let data = data, let dataString = String(data: data, encoding: .utf8) { print("Response: \(dataString)\n") } } }.resume() } ``` -------------------------------- ### Edit a Product using Swift Source: https://auvoapiv2.docs.apiary.io/reference/products/product/edit-a-product Shows a Swift example for editing a product. This typically uses `URLSession` to send an HTTP PATCH request with a JSON Patch body. ```Swift // Swift code example for editing a product would go here. // This would involve using URLSession to send a PATCH request. ``` -------------------------------- ### Retrieve Segments List - Objective-C Example Source: https://auvoapiv2.docs.apiary.io/reference/segments/segments/retrieves-a-list-of-segments Example of how to retrieve a list of segments using Objective-C. This snippet demonstrates using NSURLSession to make an HTTP GET request. ```Objective-C #import - (void)getSegments { NSString *urlString = @"https://api.auvo.com.br/v2/segments/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order"; NSURL *url = [NSURL URLWithString:urlString]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; request.HTTPMethod = @"GET"; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setValue:@"Bearer token" forHTTPHeaderField:@"Authorization"]; NSURLSession *session = [NSURLSession sharedSession]; NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { if (error) { NSLog(@"Error: %@\n", error.localizedDescription); } else { NSString *responseString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; NSLog(@"Response: %@\n", responseString); } }]; [dataTask resume]; } ``` -------------------------------- ### Retrieve Segments List - C# Example Source: https://auvoapiv2.docs.apiary.io/reference/segments/segments/retrieves-a-list-of-segments Example of how to retrieve a list of segments using C#. This snippet demonstrates using HttpClient to make an HTTP GET request. ```C# using System; using System.Net.Http; using System.Threading.Tasks; public class ApiClient { public static async Task GetSegmentsAsync() { using (var client = new HttpClient()) { var url = "https://api.auvo.com.br/v2/segments/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order"; var request = new HttpRequestMessage(HttpMethod.Get, url); request.Headers.Add("Content-Type", "application/json"); request.Headers.Add("Authorization", "Bearer token"); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); var responseBody = await response.Content.ReadAsStringAsync(); Console.WriteLine(responseBody); } } } ``` -------------------------------- ### Retrieve Segments List - PHP Example Source: https://auvoapiv2.docs.apiary.io/reference/segments/segments/retrieves-a-list-of-segments Example of how to retrieve a list of segments using PHP. This snippet demonstrates using cURL to make an HTTP GET request. ```PHP ``` -------------------------------- ### Retrieve Segments List - Python Example Source: https://auvoapiv2.docs.apiary.io/reference/segments/segments/retrieves-a-list-of-segments Example of how to retrieve a list of segments using Python. This snippet uses the 'requests' library to make an HTTP GET request. ```Python import requests url = "https://api.auvo.com.br/v2/segments/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order" headers = { "Content-Type": "application/json", "Authorization": "Bearer token" } response = requests.get(url, headers=headers) if response.status_code == 200: print(response.json()) else: print(f"Error: {response.status_code}") ``` -------------------------------- ### Resource Not Found Response Example Source: https://auvoapiv2.docs.apiary.io/reference/customer-groups/customer-group/retrieve-a-list-of-customers-group This example shows a response (status code 404) when the requested resource is not found. The body provides a description of the scenario. ```Text When the resource with the specified id does not exist. ``` -------------------------------- ### Retrieve Segments List - cURL Example Source: https://auvoapiv2.docs.apiary.io/reference/segments/segments/retrieves-a-list-of-segments Example of how to retrieve a list of segments using cURL. This demonstrates making a GET request to the segments endpoint with specified parameters. ```cURL curl -X GET "https://api.auvo.com.br/v2/segments/?paramFilter=paramFilter&page=page&pageSize=pageSize&order=order" -H "Content-Type: application/json" -H "Authorization: Bearer token" ``` -------------------------------- ### Register a ticket - Example Source: https://auvoapiv2.docs.apiary.io/reference/equipments/equipment/retrieve-a-equipment This section describes how to register a new ticket. It mentions that the request body requires minimum attributes, and provides references to 'Attributes' or 'Json Schema' for complete details. ```text Register a ticket The body example describes the minimum required attributes to successfully add a ticket. See the **Atributes** or **Json Schema** in the Example section for all allowed attributes. ``` -------------------------------- ### Example Groovy Request for Quotations Source: https://auvoapiv2.docs.apiary.io/reference/quotations/quotation/retrieves-a-list-of-quotations Example of how to make a GET request to retrieve a list of quotations using Groovy, utilizing the HTTPBuilder library for concise HTTP requests. ```Groovy @Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.7.1') import groovyx.net.http.* def http = new HTTPBuilder('https://api.auvo.com.br/v2/') http.get( path: 'quotations/', query: [ paramFilter: 'paramFilter', page: 1, pageSize: 10, order: 'asc' ], headers: [ 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_TOKEN' ], contentType: 'application/json' ) { response, json -> println "Success: $json" } http.errorHandler = { exception -> println "Error: ${exception.message}" } ``` -------------------------------- ### Retrieve a list of Users - Python Example Source: https://auvoapiv2.docs.apiary.io/reference/users/user/retrieve-a-list-of-users Example of how to retrieve a list of users using Python's 'requests' library. This demonstrates sending a GET request with appropriate headers and handling the JSON response. ```Python import requests import json url = "https://api.auvo.com.br/v2/users/?paramFilter=%7B%0D%0A%22name%22%3A%22a%22%0D%0A%7D&Page=1&PageSize=1&Order=Asc" headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer token' } response = requests.get(url, headers=headers) print(response.json()) ``` -------------------------------- ### Retrieve Equipment by ID - JavaScript Source: https://auvoapiv2.docs.apiary.io/reference/equipments/equipment/retrieve-a-equipment This JavaScript example illustrates how to retrieve equipment information by its ID using the `fetch` API. It demonstrates setting up the request headers and processing the JSON response, including error handling for invalid IDs. ```JavaScript fetch('https://api.auvo.com.br/v2/equipments/id?id=123', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer token' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error)); ```