curl --request PUT \
--url https://api.paygentic.io/v0/merchantIntegrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchantId": "<string>",
"externalId": "<string>",
"config": {},
"metadata": {}
}
'import requests
url = "https://api.paygentic.io/v0/merchantIntegrations"
payload = {
"merchantId": "<string>",
"externalId": "<string>",
"config": {},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchantId: '<string>', externalId: '<string>', config: {}, metadata: {}})
};
fetch('https://api.paygentic.io/v0/merchantIntegrations', 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.paygentic.io/v0/merchantIntegrations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'merchantId' => '<string>',
'externalId' => '<string>',
'config' => [
],
'metadata' => [
]
]),
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 := "https://api.paygentic.io/v0/merchantIntegrations"
payload := strings.NewReader("{\n \"merchantId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.paygentic.io/v0/merchantIntegrations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchantId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/merchantIntegrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchantId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "merchantIntegration",
"merchantId": "<string>",
"provider": "salesforce",
"capabilities": {
"resolvesItemCodes": true,
"sendsItemCodes": true
},
"externalId": "<string>",
"status": "active",
"config": {},
"metadata": {},
"connectedAt": "2023-11-07T05:31:56Z",
"disconnectedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Upsert
Create or re-activate a merchant’s connection to a provider. Idempotent on (merchantId, provider) — connecting an already-connected provider re-activates the existing row, never creating a duplicate.
curl --request PUT \
--url https://api.paygentic.io/v0/merchantIntegrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"merchantId": "<string>",
"externalId": "<string>",
"config": {},
"metadata": {}
}
'import requests
url = "https://api.paygentic.io/v0/merchantIntegrations"
payload = {
"merchantId": "<string>",
"externalId": "<string>",
"config": {},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchantId: '<string>', externalId: '<string>', config: {}, metadata: {}})
};
fetch('https://api.paygentic.io/v0/merchantIntegrations', 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.paygentic.io/v0/merchantIntegrations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'merchantId' => '<string>',
'externalId' => '<string>',
'config' => [
],
'metadata' => [
]
]),
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 := "https://api.paygentic.io/v0/merchantIntegrations"
payload := strings.NewReader("{\n \"merchantId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.paygentic.io/v0/merchantIntegrations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"merchantId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/merchantIntegrations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchantId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"config\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "merchantIntegration",
"merchantId": "<string>",
"provider": "salesforce",
"capabilities": {
"resolvesItemCodes": true,
"sendsItemCodes": true
},
"externalId": "<string>",
"status": "active",
"config": {},
"metadata": {},
"connectedAt": "2023-11-07T05:31:56Z",
"disconnectedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Authorizations
API key authentication
Body
Unique identifier for an organization
^org_[a-zA-Z0-9]+$External provider a merchant can connect at the tenant level. netsuite and accountsiq are returned on reads wherever a connection exists, but connecting them is accepted only in local and development environments; elsewhere the connect request is refused with 404.
salesforce, netsuite, accountsiq Ampersand installation id.
255Connection lifecycle state. Live Ampersand health is separate and not stored here.
active, disconnected, error Response
Merchant integration upserted
A merchant's tenant-level connection to an external provider via Ampersand.
Unique identifier for a merchant integration
^mint_[a-zA-Z0-9]+$merchantIntegration Unique identifier for an organization
^org_[a-zA-Z0-9]+$External provider a merchant can connect at the tenant level. netsuite and accountsiq are returned on reads wherever a connection exists, but connecting them is accepted only in local and development environments; elsewhere the connect request is refused with 404.
salesforce, netsuite, accountsiq What this provider does with an item's external codes.
Two independent capabilities, not one direction: the behaviours are not alternatives. An integration can resolve an incoming item code and be sent a selected one on a different path, so a single inbound/outbound value would have to misdescribe it or forbid one of its operations.
A capability that is not declared is unavailable rather than inferred. Declaring one does not make a provider connectable — that still requires its credentials and connection lifecycle.
Show child attributes
Show child attributes
Ampersand installation id.
Connection lifecycle state. Live Ampersand health is separate and not stored here.
active, disconnected, error Was this page helpful?