Retrieve a sale
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.koibox.cloud/api/ventas/1/"), Headers = { { "X-Koibox-Key", "<X-Koibox-Key>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.koibox.cloud/api/ventas/1/")) .header("X-Koibox-Key", "<X-Koibox-Key>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.koibox.cloud/api/ventas/1/") .get() .addHeader("X-Koibox-Key", "<X-Koibox-Key>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.koibox.cloud/api/ventas/1/', headers: {'X-Koibox-Key': '<X-Koibox-Key>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.koibox.cloud/api/ventas/1/';const options = {method: 'GET', headers: {'X-Koibox-Key': '<X-Koibox-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.koibox.cloud/api/ventas/1/ \ --header 'X-Koibox-Key: <X-Koibox-Key>'Retrieves a sale by specifying its ID
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”The requested sale
object
Read-only
Read-only
Read-only
Datetime of the sale
Taxable base of the sale
Total of the sale, including taxes and discounts
Discount percentage applied to the sale
Absolute discount amount applied to the sale
Withheld IRPF amount
Observations of the sale
Read-only
The amount the client pays
In case of a mixed sale, the amount the client pays in cash
In case of a mixed sale, the amount the client pays by card
object
Identifier of the user
Name of the user
object
Identifier of the user
Name of the user
object
Name of the client
Identifier of the client
Mobile number of the client
object
Identifier of the gift card
Name of the gift card
Price of the gift card
object
Identifier of the loyalty card
Name of the loyalty card
Price of the loyalty card
Identifier of the appointment
Rectified sale by this one
The access key has not been provided in the X-Koibox-Key header
Headers
Section titled “Headers”Indicates the required header for authentication
No valid access key has been provided
