Get a product
curl --request GET \
--url https://api-global.fastpaybrasil.com/v1/products/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api-global.fastpaybrasil.com/v1/products/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api-global.fastpaybrasil.com/v1/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-global.fastpaybrasil.com/v1/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 => [
"Authorization: Basic <encoded-value>"
],
]);
$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-global.fastpaybrasil.com/v1/products/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-global.fastpaybrasil.com/v1/products/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-global.fastpaybrasil.com/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
"merchantId": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
"name": "Camiseta Preta P",
"description": "<string>",
"productLink": "<string>",
"price": 89.9,
"currency": "BRL",
"productType": "physical",
"sku": "<string>",
"trackStock": true,
"stock": 123,
"weight": 123,
"heightCm": 123,
"widthCm": 123,
"lengthCm": 123,
"status": "active",
"imageUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Products
Get a product
Returns a single product, including a signed imageUrl when set.
GET
/
v1
/
products
/
{id}
Get a product
curl --request GET \
--url https://api-global.fastpaybrasil.com/v1/products/{id} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api-global.fastpaybrasil.com/v1/products/{id}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api-global.fastpaybrasil.com/v1/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-global.fastpaybrasil.com/v1/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 => [
"Authorization: Basic <encoded-value>"
],
]);
$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-global.fastpaybrasil.com/v1/products/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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-global.fastpaybrasil.com/v1/products/{id}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-global.fastpaybrasil.com/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
"merchantId": "2RhQg9M7ZCg3X3nMb9W1kX8Q",
"name": "Camiseta Preta P",
"description": "<string>",
"productLink": "<string>",
"price": 89.9,
"currency": "BRL",
"productType": "physical",
"sku": "<string>",
"trackStock": true,
"stock": 123,
"weight": 123,
"heightCm": 123,
"widthCm": 123,
"lengthCm": 123,
"status": "active",
"imageUrl": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Authorizations
HTTP Basic authentication. Use your secret key as the username and an empty string as password. The API key should be base64 encoded in the format 'username:' when sending the Authorization header.
Path Parameters
Response
The product
Example:
"2RhQg9M7ZCg3X3nMb9W1kX8Q"
Example:
"2RhQg9M7ZCg3X3nMb9W1kX8Q"
Example:
"Camiseta Preta P"
Example:
89.9
Example:
"BRL"
Available options:
physical, digital Available options:
active, inactive Signed, short-lived URL for the product image. null when no
image was uploaded.