cURL
curl --request GET \
--url https://api-v2.vitau.mx/api/products/{id}/ \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api-v2.vitau.mx/api/products/{id}/"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api-v2.vitau.mx/api/products/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-v2.vitau.mx/api/products/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-v2.vitau.mx/api/products/{id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-v2.vitau.mx/api/products/{id}/")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.vitau.mx/api/products/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_supplier": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"supplier_products": [
{
"supplier": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"cost": "<string>",
"product": 123,
"id": 123
}
],
"album": {
"images": [
{
"id": 123,
"album": 123,
"image": "<string>",
"is_default": true
}
],
"id": 123
},
"product_variants": [
{
"variant": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"value": "<string>",
"id": 123
}
],
"base": {
"category": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"parent": 123
},
"pharmaceutical_company": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"diseases": [
{
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"tags": [
{
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"medical_information": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"active_ingredient": "<string>",
"is_generic": true,
"group_number": 1073741823,
"requires_prescription": true,
"base_product": 123
},
"name": "<string>",
"id": 123,
"is_medicine": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"created_by": 123,
"updated_by": 123
},
"price": "<string>",
"id": 123,
"cost": "<string>",
"presentation": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"has_iva": true,
"public_price": "<string>",
"average_cost": "<string>",
"is_active": true,
"sat_key": "<string>",
"sat_unit": "<string>",
"has_shortage": true,
"ean_key": "<string>",
"should_calculate_price": true,
"enlace_vital_description": "<string>",
"active_ingredient": "<string>",
"description": "<string>",
"group_number": 1073741823,
"image": "<string>",
"is_generic": true,
"name": "<string>",
"category": 123,
"medical_information": 123,
"pharmaceutical_company": 123,
"variants": [
123
],
"diseases": [
123
]
}API Reference
Get Product
GET
/
api
/
products
/
{id}
/
cURL
curl --request GET \
--url https://api-v2.vitau.mx/api/products/{id}/ \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api-v2.vitau.mx/api/products/{id}/"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api-v2.vitau.mx/api/products/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-v2.vitau.mx/api/products/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-v2.vitau.mx/api/products/{id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-v2.vitau.mx/api/products/{id}/")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-v2.vitau.mx/api/products/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"current_supplier": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"supplier_products": [
{
"supplier": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"cost": "<string>",
"product": 123,
"id": 123
}
],
"album": {
"images": [
{
"id": 123,
"album": 123,
"image": "<string>",
"is_default": true
}
],
"id": 123
},
"product_variants": [
{
"variant": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"value": "<string>",
"id": 123
}
],
"base": {
"category": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"parent": 123
},
"pharmaceutical_company": {
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"diseases": [
{
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"tags": [
{
"name": "<string>",
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"medical_information": {
"id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"active_ingredient": "<string>",
"is_generic": true,
"group_number": 1073741823,
"requires_prescription": true,
"base_product": 123
},
"name": "<string>",
"id": 123,
"is_medicine": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"created_by": 123,
"updated_by": 123
},
"price": "<string>",
"id": 123,
"cost": "<string>",
"presentation": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"has_iva": true,
"public_price": "<string>",
"average_cost": "<string>",
"is_active": true,
"sat_key": "<string>",
"sat_unit": "<string>",
"has_shortage": true,
"ean_key": "<string>",
"should_calculate_price": true,
"enlace_vital_description": "<string>",
"active_ingredient": "<string>",
"description": "<string>",
"group_number": 1073741823,
"image": "<string>",
"is_generic": true,
"name": "<string>",
"category": 123,
"medical_information": 123,
"pharmaceutical_company": 123,
"variants": [
123
],
"diseases": [
123
]
}Authorizations
APIKeyAuthJWTAuthCookieAuth
Path Parameters
Response
200 - application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum string length:
50Maximum string length:
100Maximum string length:
50Maximum string length:
10Maximum string length:
250Required range:
0 <= x <= 2147483647Maximum string length:
250Was this page helpful?
⌘I