Update Withdraw Settings
curl --request PATCH \
--url https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-store-domain: <x-store-domain>' \
--data '
{
"full_name": "João da Silva",
"pix_key": "[email protected]",
"pix_key_type": "EMAIL",
"cpf_cnpj": "12345678900"
}
'import requests
url = "https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings"
payload = {
"full_name": "João da Silva",
"pix_key": "[email protected]",
"pix_key_type": "EMAIL",
"cpf_cnpj": "12345678900"
}
headers = {
"x-store-domain": "<x-store-domain>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-store-domain': '<x-store-domain>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
full_name: 'João da Silva',
pix_key: '[email protected]',
pix_key_type: 'EMAIL',
cpf_cnpj: '12345678900'
})
};
fetch('https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings', 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.centralcart.io/v1/webstore/affiliate/withdraw_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => 'João da Silva',
'pix_key' => '[email protected]',
'pix_key_type' => 'EMAIL',
'cpf_cnpj' => '12345678900'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-store-domain: <x-store-domain>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings"
payload := strings.NewReader("{\n \"full_name\": \"João da Silva\",\n \"pix_key\": \"[email protected]\",\n \"pix_key_type\": \"EMAIL\",\n \"cpf_cnpj\": \"12345678900\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-store-domain", "<x-store-domain>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings")
.header("x-store-domain", "<x-store-domain>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"João da Silva\",\n \"pix_key\": \"[email protected]\",\n \"pix_key_type\": \"EMAIL\",\n \"cpf_cnpj\": \"12345678900\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-store-domain"] = '<x-store-domain>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"João da Silva\",\n \"pix_key\": \"[email protected]\",\n \"pix_key_type\": \"EMAIL\",\n \"cpf_cnpj\": \"12345678900\"\n}"
response = http.request(request)
puts response.read_body{
"withdraw_settings": {
"full_name": "<string>",
"pix_key": "<string>",
"pix_key_type": "CPF",
"cpf_cnpj": "<string>"
}
}{
"errors": [
{
"message": "Sessão inválida ou expirada.",
"code": "CUSTOMER_UNAUTHENTICATED"
}
]
}{
"errors": [
{
"message": "Afiliado não encontrado"
}
]
}{
"errors": [
{
"message": "<string>",
"code": "<string>",
"ref": "<string>"
}
]
}Afiliados
Update Withdraw Settings
Grava os dados de PIX que a loja vai usar para pagar o afiliado.
Preencher isto é pré-requisito para pedir saque: sem
full_name, pix_key e cpf_cnpj, POST /webstore/affiliate/withdrawals recusa.PATCH
/
webstore
/
affiliate
/
withdraw_settings
Update Withdraw Settings
curl --request PATCH \
--url https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-store-domain: <x-store-domain>' \
--data '
{
"full_name": "João da Silva",
"pix_key": "[email protected]",
"pix_key_type": "EMAIL",
"cpf_cnpj": "12345678900"
}
'import requests
url = "https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings"
payload = {
"full_name": "João da Silva",
"pix_key": "[email protected]",
"pix_key_type": "EMAIL",
"cpf_cnpj": "12345678900"
}
headers = {
"x-store-domain": "<x-store-domain>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-store-domain': '<x-store-domain>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
full_name: 'João da Silva',
pix_key: '[email protected]',
pix_key_type: 'EMAIL',
cpf_cnpj: '12345678900'
})
};
fetch('https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings', 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.centralcart.io/v1/webstore/affiliate/withdraw_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => 'João da Silva',
'pix_key' => '[email protected]',
'pix_key_type' => 'EMAIL',
'cpf_cnpj' => '12345678900'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-store-domain: <x-store-domain>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings"
payload := strings.NewReader("{\n \"full_name\": \"João da Silva\",\n \"pix_key\": \"[email protected]\",\n \"pix_key_type\": \"EMAIL\",\n \"cpf_cnpj\": \"12345678900\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-store-domain", "<x-store-domain>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings")
.header("x-store-domain", "<x-store-domain>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"João da Silva\",\n \"pix_key\": \"[email protected]\",\n \"pix_key_type\": \"EMAIL\",\n \"cpf_cnpj\": \"12345678900\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/webstore/affiliate/withdraw_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-store-domain"] = '<x-store-domain>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"João da Silva\",\n \"pix_key\": \"[email protected]\",\n \"pix_key_type\": \"EMAIL\",\n \"cpf_cnpj\": \"12345678900\"\n}"
response = http.request(request)
puts response.read_body{
"withdraw_settings": {
"full_name": "<string>",
"pix_key": "<string>",
"pix_key_type": "CPF",
"cpf_cnpj": "<string>"
}
}{
"errors": [
{
"message": "Sessão inválida ou expirada.",
"code": "CUSTOMER_UNAUTHENTICATED"
}
]
}{
"errors": [
{
"message": "Afiliado não encontrado"
}
]
}{
"errors": [
{
"message": "<string>",
"code": "<string>",
"ref": "<string>"
}
]
}Autorizações
access_token do comprador, devolvido por POST /webstore/auth/verify.
Cabeçalhos
Domínio da sua loja (ex: sualoja.centralcart.ai)
Corpo
application/json
Resposta
Dados gravados
Show child attributes
Show child attributes
⌘I