Obter merchant
curl --request GET \
--url https://public-api.repediu.com.br/od/v2/merchants/{merchantId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://public-api.repediu.com.br/od/v2/merchants/{merchantId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.repediu.com.br/od/v2/merchants/{merchantId}', 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://public-api.repediu.com.br/od/v2/merchants/{merchantId}",
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://public-api.repediu.com.br/od/v2/merchants/{merchantId}"
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://public-api.repediu.com.br/od/v2/merchants/{merchantId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.repediu.com.br/od/v2/merchants/{merchantId}")
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": "07f3bb0c-927a-4d99-9ea3-c22ecce8721c",
"name": "Pastelaria do Luiz",
"status": "OPEN",
"basicInfo": {
"name": "Pastelaria do Luiz",
"address": {
"street": "Avenida João Amadeu",
"number": "1234",
"district": "Centro",
"city": "Jales",
"state": "SP",
"postalCode": "15700-082",
"country": "BR"
}
}
}{
"code": "UNAUTHORIZED",
"message": "Invalid client credentials.",
"details": null
}{
"code": "FORBIDDEN",
"message": "Application is not authorized to access any merchant.",
"details": null
}{
"code": "NOT_FOUND",
"message": "Merchant not found.",
"details": null
}Obter merchant
Detalhe de um estabelecimento do escopo da aplicação, com endereço quando cadastrado
GET
/
od
/
v2
/
merchants
/
{merchantId}
Obter merchant
curl --request GET \
--url https://public-api.repediu.com.br/od/v2/merchants/{merchantId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://public-api.repediu.com.br/od/v2/merchants/{merchantId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public-api.repediu.com.br/od/v2/merchants/{merchantId}', 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://public-api.repediu.com.br/od/v2/merchants/{merchantId}",
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://public-api.repediu.com.br/od/v2/merchants/{merchantId}"
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://public-api.repediu.com.br/od/v2/merchants/{merchantId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.repediu.com.br/od/v2/merchants/{merchantId}")
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": "07f3bb0c-927a-4d99-9ea3-c22ecce8721c",
"name": "Pastelaria do Luiz",
"status": "OPEN",
"basicInfo": {
"name": "Pastelaria do Luiz",
"address": {
"street": "Avenida João Amadeu",
"number": "1234",
"district": "Centro",
"city": "Jales",
"state": "SP",
"postalCode": "15700-082",
"country": "BR"
}
}
}{
"code": "UNAUTHORIZED",
"message": "Invalid client credentials.",
"details": null
}{
"code": "FORBIDDEN",
"message": "Application is not authorized to access any merchant.",
"details": null
}{
"code": "NOT_FOUND",
"message": "Merchant not found.",
"details": null
}Detalha um estabelecimento do escopo da sua aplicação. Além de
id, name e status, a resposta traz basicInfo com o nome e, quando o estabelecimento tem endereço cadastrado na Repediu, o objeto address.
Sem endereço cadastrado, o campo
address é omitido da resposta — nunca vem vazio ou com valores inventados. Trate a ausência do campo no seu lado.Um merchant que existe mas não está vinculado à sua aplicação responde
404, exatamente igual a um merchant inexistente — a API não revela a existência de estabelecimentos fora do seu escopo. Se um merchant que você acessava passou a responder 404, o motivo mais provável é a desativação da integração pelo estabelecimento.Status do merchant
status | Significado |
|---|---|
OPEN | Estabelecimento ativo na Repediu |
CLOSED | Estabelecimento inativo |
PAUSED | Faz parte do enum do protocolo, mas não é emitido atualmente |
Erros
| HTTP | code no corpo | Quando acontece | O que fazer |
|---|---|---|---|
401 | UNAUTHORIZED | Token ausente, inválido ou expirado | Gere um novo token em Obter token |
403 | FORBIDDEN | Aplicação sem nenhum merchant vinculado | Aguarde ao menos um estabelecimento ativar a integração |
404 | NOT_FOUND | Merchant inexistente ou fora do escopo | Confirme o id em Listar merchants |
Listar merchants
A lista completa do seu escopo — de onde vem o
merchantId usado aqui.Autorizações
Token de acesso emitido por POST /od/v2/oauth/token (fluxo client_credentials). Envie no header Authorization como Bearer <token>.
Parâmetros de caminho
Identificador (UUID) do merchant.
⌘I

