curl --request POST \
--url http://localhost:8090/internal/v1/installations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"provider_app_id": "<string>",
"external_store_id": "<string>",
"access_token": "<string>",
"scope": "<string>",
"store_profile": {
"name": "<string>",
"domain": "<string>",
"country": "<string>",
"language": "<string>",
"currency": "<string>"
},
"browser_proof_sha256": "<string>",
"attribution": {}
}
'import requests
url = "http://localhost:8090/internal/v1/installations"
payload = {
"provider": "<string>",
"provider_app_id": "<string>",
"external_store_id": "<string>",
"access_token": "<string>",
"scope": "<string>",
"store_profile": {
"name": "<string>",
"domain": "<string>",
"country": "<string>",
"language": "<string>",
"currency": "<string>"
},
"browser_proof_sha256": "<string>",
"attribution": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: '<string>',
provider_app_id: '<string>',
external_store_id: '<string>',
access_token: '<string>',
scope: '<string>',
store_profile: {
name: '<string>',
domain: '<string>',
country: '<string>',
language: '<string>',
currency: '<string>'
},
browser_proof_sha256: '<string>',
attribution: {}
})
};
fetch('http://localhost:8090/internal/v1/installations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8090",
CURLOPT_URL => "http://localhost:8090/internal/v1/installations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'provider' => '<string>',
'provider_app_id' => '<string>',
'external_store_id' => '<string>',
'access_token' => '<string>',
'scope' => '<string>',
'store_profile' => [
'name' => '<string>',
'domain' => '<string>',
'country' => '<string>',
'language' => '<string>',
'currency' => '<string>'
],
'browser_proof_sha256' => '<string>',
'attribution' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost:8090/internal/v1/installations"
payload := strings.NewReader("{\n \"provider\": \"<string>\",\n \"provider_app_id\": \"<string>\",\n \"external_store_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"store_profile\": {\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"country\": \"<string>\",\n \"language\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"browser_proof_sha256\": \"<string>\",\n \"attribution\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("http://localhost:8090/internal/v1/installations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"<string>\",\n \"provider_app_id\": \"<string>\",\n \"external_store_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"store_profile\": {\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"country\": \"<string>\",\n \"language\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"browser_proof_sha256\": \"<string>\",\n \"attribution\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8090/internal/v1/installations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"<string>\",\n \"provider_app_id\": \"<string>\",\n \"external_store_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"store_profile\": {\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"country\": \"<string>\",\n \"language\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"browser_proof_sha256\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{
"installation_id": "<string>",
"connection_id": "<string>",
"webhook_endpoint_id": "<string>",
"created": true
}{
"installation_id": "<string>",
"connection_id": "<string>",
"webhook_endpoint_id": "<string>",
"created": true
}Abrir la saga durable de instalación
Reemplaza a registerConnection + startBootstrap en el callback de OAuth: cuando contesta, el navegador puede irse y el runner termina el resto.
curl --request POST \
--url http://localhost:8090/internal/v1/installations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": "<string>",
"provider_app_id": "<string>",
"external_store_id": "<string>",
"access_token": "<string>",
"scope": "<string>",
"store_profile": {
"name": "<string>",
"domain": "<string>",
"country": "<string>",
"language": "<string>",
"currency": "<string>"
},
"browser_proof_sha256": "<string>",
"attribution": {}
}
'import requests
url = "http://localhost:8090/internal/v1/installations"
payload = {
"provider": "<string>",
"provider_app_id": "<string>",
"external_store_id": "<string>",
"access_token": "<string>",
"scope": "<string>",
"store_profile": {
"name": "<string>",
"domain": "<string>",
"country": "<string>",
"language": "<string>",
"currency": "<string>"
},
"browser_proof_sha256": "<string>",
"attribution": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
provider: '<string>',
provider_app_id: '<string>',
external_store_id: '<string>',
access_token: '<string>',
scope: '<string>',
store_profile: {
name: '<string>',
domain: '<string>',
country: '<string>',
language: '<string>',
currency: '<string>'
},
browser_proof_sha256: '<string>',
attribution: {}
})
};
fetch('http://localhost:8090/internal/v1/installations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8090",
CURLOPT_URL => "http://localhost:8090/internal/v1/installations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'provider' => '<string>',
'provider_app_id' => '<string>',
'external_store_id' => '<string>',
'access_token' => '<string>',
'scope' => '<string>',
'store_profile' => [
'name' => '<string>',
'domain' => '<string>',
'country' => '<string>',
'language' => '<string>',
'currency' => '<string>'
],
'browser_proof_sha256' => '<string>',
'attribution' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost:8090/internal/v1/installations"
payload := strings.NewReader("{\n \"provider\": \"<string>\",\n \"provider_app_id\": \"<string>\",\n \"external_store_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"store_profile\": {\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"country\": \"<string>\",\n \"language\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"browser_proof_sha256\": \"<string>\",\n \"attribution\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("http://localhost:8090/internal/v1/installations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"<string>\",\n \"provider_app_id\": \"<string>\",\n \"external_store_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"store_profile\": {\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"country\": \"<string>\",\n \"language\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"browser_proof_sha256\": \"<string>\",\n \"attribution\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8090/internal/v1/installations")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"<string>\",\n \"provider_app_id\": \"<string>\",\n \"external_store_id\": \"<string>\",\n \"access_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"store_profile\": {\n \"name\": \"<string>\",\n \"domain\": \"<string>\",\n \"country\": \"<string>\",\n \"language\": \"<string>\",\n \"currency\": \"<string>\"\n },\n \"browser_proof_sha256\": \"<string>\",\n \"attribution\": {}\n}"
response = http.request(request)
puts response.read_body{
"installation_id": "<string>",
"connection_id": "<string>",
"webhook_endpoint_id": "<string>",
"created": true
}{
"installation_id": "<string>",
"connection_id": "<string>",
"webhook_endpoint_id": "<string>",
"created": true
}Autorizaciones
El conector de plataforma y el operador. Registra conexiones, entrega webhooks, corre la saga de instalación y da de alta conexiones custom. Es el único principal obligatorio del proceso: los otros tres se apagan dejando su token vacío, y una puerta que no se monta no la abre ningún token.
Cuerpo
connectorprotocol.RegisterInstallationRequest. Es la mitad durable del callback de OAuth: sella la credencial y abre la saga en una transacción.
1111Lo no secreto y no personal que el conector leyó del proveedor al instalar. No lleva contacto del merchant.
Show child attributes
Show child attributes
SHA-256 en hexadecimal del proof que el conector le dejó al navegador. El proof en claro nunca viaja acá; sólo vuelve en el claim, y por header.
^[0-9a-fA-F]{64}$Marcas de campaña de la instalación. Clave de hasta 64 caracteres y valor de hasta 256; no es lugar para datos del merchant.
Show child attributes
Show child attributes