Skip to main content
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

X-API-KEY
string
header
required

Path Parameters

id
string
required

Response

200 - application/json
current_supplier
object
required
supplier_products
object[]
required
album
object
required
product_variants
object[]
required
base
object
required
price
string<decimal>
required
id
integer
read-only
cost
string
read-only
presentation
string
read-only
created_at
string<date-time>
read-only
updated_at
string<date-time>
read-only
has_iva
boolean
public_price
string<decimal> | null
average_cost
string<decimal>
is_active
boolean
sat_key
string | null
Maximum string length: 50
sat_unit
string | null
Maximum string length: 100
has_shortage
boolean
ean_key
string | null
Maximum string length: 50
should_calculate_price
boolean
enlace_vital_description
string
Maximum string length: 10
active_ingredient
string | null
Maximum string length: 250
description
string | null
group_number
integer | null
Required range: 0 <= x <= 2147483647
image
string<uri> | null
read-only
is_generic
boolean | null
name
string | null
Maximum string length: 250
category
integer | null
medical_information
integer | null
pharmaceutical_company
integer | null
variants
integer[]
read-only
diseases
integer[]