Ler loja
curl --request GET \
--url https://api-sandbox.beinfi.com/storefronts/{storefrontID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.beinfi.com/storefronts/{storefrontID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-sandbox.beinfi.com/storefronts/{storefrontID}', 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-sandbox.beinfi.com/storefronts/{storefrontID}",
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: Bearer <token>"
],
]);
$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-sandbox.beinfi.com/storefronts/{storefrontID}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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-sandbox.beinfi.com/storefronts/{storefrontID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.beinfi.com/storefronts/{storefrontID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"theme": {
"accent": "purple",
"mode": "light",
"layout": "grid",
"whatsapp": "<string>",
"instagram": "<string>"
},
"status": "active",
"fulfillmentMode": "pickup",
"requireAddress": true,
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"logoUrl": "<string>",
"logoObjectKey": "<string>",
"bannerUrl": "<string>",
"bannerObjectKey": "<string>",
"pickupNote": "<string>",
"shippingFlatAmount": "<string>"
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>",
"resource": "<string>"
}Lojas
Ler loja
GET
/
storefronts
/
{storefrontID}
Ler loja
curl --request GET \
--url https://api-sandbox.beinfi.com/storefronts/{storefrontID} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-sandbox.beinfi.com/storefronts/{storefrontID}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-sandbox.beinfi.com/storefronts/{storefrontID}', 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-sandbox.beinfi.com/storefronts/{storefrontID}",
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: Bearer <token>"
],
]);
$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-sandbox.beinfi.com/storefronts/{storefrontID}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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-sandbox.beinfi.com/storefronts/{storefrontID}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.beinfi.com/storefronts/{storefrontID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"theme": {
"accent": "purple",
"mode": "light",
"layout": "grid",
"whatsapp": "<string>",
"instagram": "<string>"
},
"status": "active",
"fulfillmentMode": "pickup",
"requireAddress": true,
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"logoUrl": "<string>",
"logoObjectKey": "<string>",
"bannerUrl": "<string>",
"bannerObjectKey": "<string>",
"pickupNote": "<string>",
"shippingFlatAmount": "<string>"
}{
"message": "<string>",
"error_code": "internal_error",
"tracer_id": "<string>",
"resource": "<string>"
}Autorizações
Chave secreta da conta: Authorization: Bearer sk_test_… ou sk_live_…. Use só no servidor.
Parâmetros de caminho
Resposta
A loja.
Uma loja da sua conta.
O endereço público da loja.
A aparência da loja, escolhida entre opções fixas.
Show child attributes
Show child attributes
active (no ar) ou disabled (fora do ar).
Opções disponíveis:
active, disabled Como o comprador recebe: pickup (retirada), shipping (envio) ou both.
Opções disponíveis:
pickup, shipping, both Se o endereço é pedido mesmo na retirada.
Endereço da imagem do logo. logoObjectKey traz a chave correspondente.
Chave da imagem do logo, de POST /catalog/images/presign.
Endereço da imagem do banner.
Chave da imagem do banner, de POST /catalog/images/presign.
Instruções de retirada mostradas ao comprador.
Frete fixo, em texto decimal. "0" é grátis; null é combinado por fora.