Recuperar detalhes de um vendedor
curl --request GET \
--url https://api.malga.io/v1/vendors/{id} \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'import requests
url = "https://api.malga.io/v1/vendors/{id}"
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/vendors/{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.malga.io/v1/vendors/{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>",
"X-Client-Id: <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.malga.io/v1/vendors/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
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.malga.io/v1/vendors/{id}")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.malga.io/v1/vendors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "db56bd6a-10d7-4039-9c68-fc4405a1a3e1",
"referenceId": "12345",
"identityType": "CNPJ",
"identity": "12.345.678/0001-99",
"mcc": "1234",
"name": "Empresa Exemplo Ltda",
"email": "contato@empresaexemplo.com",
"phoneNumber": "5511999999999",
"website": "https://www.empresaexemplo.com",
"address": {
"country": "BR",
"state": "SP",
"city": "São Paulo",
"district": "Centro",
"zipCode": "01001-000",
"street": "Avenida Paulista",
"streetNumber": "1000",
"complement": "Apto 101"
},
"updatedAt": "2024-06-26T12:34:56Z",
"createdAt": "2024-06-01T08:00:00Z"
}{
"error": {
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}Vendors
Recuperar detalhes de um vendedor
GET
/
v1
/
vendors
/
{id}
Recuperar detalhes de um vendedor
curl --request GET \
--url https://api.malga.io/v1/vendors/{id} \
--header 'X-Api-Key: <api-key>' \
--header 'X-Client-Id: <api-key>'import requests
url = "https://api.malga.io/v1/vendors/{id}"
headers = {
"X-Client-Id": "<api-key>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Client-Id': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://api.malga.io/v1/vendors/{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.malga.io/v1/vendors/{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>",
"X-Client-Id: <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.malga.io/v1/vendors/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Client-Id", "<api-key>")
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.malga.io/v1/vendors/{id}")
.header("X-Client-Id", "<api-key>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.malga.io/v1/vendors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Client-Id"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "db56bd6a-10d7-4039-9c68-fc4405a1a3e1",
"referenceId": "12345",
"identityType": "CNPJ",
"identity": "12.345.678/0001-99",
"mcc": "1234",
"name": "Empresa Exemplo Ltda",
"email": "contato@empresaexemplo.com",
"phoneNumber": "5511999999999",
"website": "https://www.empresaexemplo.com",
"address": {
"country": "BR",
"state": "SP",
"city": "São Paulo",
"district": "Centro",
"zipCode": "01001-000",
"street": "Avenida Paulista",
"streetNumber": "1000",
"complement": "Apto 101"
},
"updatedAt": "2024-06-26T12:34:56Z",
"createdAt": "2024-06-01T08:00:00Z"
}{
"error": {
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}{
"error": {
"code": 123,
"declinedCode": "<string>",
"key": "<string>",
"businessCode": "<string>",
"message": "<string>",
"details": "<array>"
}
}Path Parameters
Id do vendedor
Response
Successful Response
Identificador do vendedor na malga
Identificador do vendedor no seu sistema
Tipo de documento
Available options:
CPF, CNPJ Número do documento formato conforme tipo selecionado
Código de segmento do lojista no adquirente, solicite ao seu provedor caso não saiba qual o seu Merchant Category Code.
Nome Completo / Razão Social
Email do vendedor
Telefone de contato do vendedor
identificação do merchant id a ser utilizado
Show child attributes
Show child attributes
Data de alteração do vendedor
Data de criação do vendedor
Was this page helpful?
⌘I