Link a client to a transaction
curl --request POST \
--url https://api.artu.ai/transactions/{transactionId}/clients/{clientId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Environment: <api-key>' \
--data '{
"metadata": {}
}'import requests
url = "https://api.artu.ai/transactions/{transactionId}/clients/{clientId}"
payload = { "metadata": {} }
headers = {
"Authorization": "Bearer <token>",
"X-Environment": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Environment': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({metadata: {}})
};
fetch('https://api.artu.ai/transactions/{transactionId}/clients/{clientId}', 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.artu.ai/transactions/{transactionId}/clients/{clientId}",
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([
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Environment: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.artu.ai/transactions/{transactionId}/clients/{clientId}"
payload := strings.NewReader("{\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Environment", "<api-key>")
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("https://api.artu.ai/transactions/{transactionId}/clients/{clientId}")
.header("Authorization", "Bearer <token>")
.header("X-Environment", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.artu.ai/transactions/{transactionId}/clients/{clientId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Environment"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"relatedClientIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"scopes": [
"base"
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isAlerted": true,
"alertedAt": "2023-11-07T05:31:56Z",
"status": "not_applicable",
"amount": "<unknown>",
"currency": "<unknown>",
"exchangeRates": {},
"externalId": "<string>",
"description": "<string>",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"scopeData": {
"MX": {
"actividadVulnerable": {
"ARI": {
"property": {
"type": "1",
"leaseStartDate": "2023-12-25",
"leaseEndDate": "2023-12-25",
"colonia": "<string>",
"calle": "<string>",
"numeroExterior": "<string>",
"postalCode": "<string>",
"folioReal": "<string>",
"value": "<unknown>",
"numeroInterior": "<string>"
},
"payments": [
{
"paymentForm": "1",
"monetaryInstrument": "1",
"currency": "<string>",
"paymentDate": "2023-12-25",
"amount": "<unknown>"
}
],
"operationType": "1501"
},
"AVI": {
"operationType": "buy",
"cryptoCurrency": "<string>",
"hash": "<unknown>",
"cryptoAmount": "<unknown>"
},
"INM": {
"figuraCliente": "1",
"figuraSO": "1",
"inmuebles": [
{
"type": "1",
"colonia": "<string>",
"calle": "<string>",
"numeroExterior": "<string>",
"postalCode": "<string>",
"folioReal": "<string>",
"value": "<unknown>",
"numeroInterior": "<string>",
"dimensionTerreno": "<unknown>",
"dimensionConstruido": "<unknown>"
}
],
"contract": {
"type": "notarial",
"instrumentNumber": "<string>",
"instrumentDate": "2023-12-25",
"notaryNumber": "<string>",
"notaryStateCode": "1",
"cadastralValue": "<unknown>"
},
"operationType": "501",
"payments": [
{
"paymentForm": "1",
"monetaryInstrument": "1",
"currency": "<string>",
"paymentDate": "2023-12-25",
"amount": "<unknown>"
}
]
},
"JYS": {
"branchInformation": {
"type": "own",
"postalCode": "<string>"
},
"operationType": "101",
"businessLine": "1",
"operationMethod": "1",
"settlementType": "cash",
"monetaryInstrument": "1"
},
"MJR": {
"operationPostalCode": "<string>",
"goods": [
{
"goodType": "1",
"unit": "1",
"quantity": "<unknown>"
}
],
"payments": [
{
"paymentForm": "1",
"monetaryInstrument": "1",
"currency": "<string>",
"paymentDate": "2023-12-25",
"amount": "<unknown>"
}
],
"operationType": "601"
},
"MPC": {
"operationType": "401",
"postalCode": "<string>",
"disbursements": [
{
"monetaryInstrument": "1",
"currency": "<string>",
"disbursementDate": "2023-12-25",
"amount": "<unknown>"
}
],
"collateral": [
{
"tipoGarantia": "2",
"bienMutuo": {
"kind": "inmueble",
"tipoInmueble": "1",
"valorReferencia": "<string>",
"postalCode": "<string>",
"folioReal": "<string>"
},
"guarantorClientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"TSC": {
"cardType": "1",
"idNumber": "<string>",
"operationType": "211"
},
"VEH": {
"operationType": "801",
"postalCode": "<string>",
"vehicles": [
{
"kind": "terrestre",
"marcaFabricante": "<string>",
"modelo": "<string>",
"anio": "<string>",
"nivelBlindaje": "1",
"vin": "<string>",
"repuve": "<string>",
"placas": "<string>"
}
],
"operationDate": "2023-12-25",
"payments": [
{
"paymentForm": "1",
"currency": "<string>",
"paymentDate": "2023-12-25",
"monetaryInstrument": "1",
"amount": "<unknown>"
}
]
}
},
"cnbv": {
"TRANSMISOR": {
"tipoOperacion": "00",
"instrumentoMonetario": "00",
"sucursal": "<string>",
"localidad": "10100005"
}
}
},
"US": "<unknown>"
},
"relatedClients": [
{
"clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "base",
"metadata": {}
}
],
"riskAssessments": {},
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"color": "<string>"
}
]
}Transactions
Link a client to a transaction
POST
/
transactions
/
{transactionId}
/
clients
/
{clientId}
Link a client to a transaction
curl --request POST \
--url https://api.artu.ai/transactions/{transactionId}/clients/{clientId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Environment: <api-key>' \
--data '{
"metadata": {}
}'import requests
url = "https://api.artu.ai/transactions/{transactionId}/clients/{clientId}"
payload = { "metadata": {} }
headers = {
"Authorization": "Bearer <token>",
"X-Environment": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Environment': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({metadata: {}})
};
fetch('https://api.artu.ai/transactions/{transactionId}/clients/{clientId}', 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.artu.ai/transactions/{transactionId}/clients/{clientId}",
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([
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Environment: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.artu.ai/transactions/{transactionId}/clients/{clientId}"
payload := strings.NewReader("{\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Environment", "<api-key>")
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("https://api.artu.ai/transactions/{transactionId}/clients/{clientId}")
.header("Authorization", "Bearer <token>")
.header("X-Environment", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.artu.ai/transactions/{transactionId}/clients/{clientId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Environment"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"relatedClientIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"scopes": [
"base"
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isAlerted": true,
"alertedAt": "2023-11-07T05:31:56Z",
"status": "not_applicable",
"amount": "<unknown>",
"currency": "<unknown>",
"exchangeRates": {},
"externalId": "<string>",
"description": "<string>",
"productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {},
"scopeData": {
"MX": {
"actividadVulnerable": {
"ARI": {
"property": {
"type": "1",
"leaseStartDate": "2023-12-25",
"leaseEndDate": "2023-12-25",
"colonia": "<string>",
"calle": "<string>",
"numeroExterior": "<string>",
"postalCode": "<string>",
"folioReal": "<string>",
"value": "<unknown>",
"numeroInterior": "<string>"
},
"payments": [
{
"paymentForm": "1",
"monetaryInstrument": "1",
"currency": "<string>",
"paymentDate": "2023-12-25",
"amount": "<unknown>"
}
],
"operationType": "1501"
},
"AVI": {
"operationType": "buy",
"cryptoCurrency": "<string>",
"hash": "<unknown>",
"cryptoAmount": "<unknown>"
},
"INM": {
"figuraCliente": "1",
"figuraSO": "1",
"inmuebles": [
{
"type": "1",
"colonia": "<string>",
"calle": "<string>",
"numeroExterior": "<string>",
"postalCode": "<string>",
"folioReal": "<string>",
"value": "<unknown>",
"numeroInterior": "<string>",
"dimensionTerreno": "<unknown>",
"dimensionConstruido": "<unknown>"
}
],
"contract": {
"type": "notarial",
"instrumentNumber": "<string>",
"instrumentDate": "2023-12-25",
"notaryNumber": "<string>",
"notaryStateCode": "1",
"cadastralValue": "<unknown>"
},
"operationType": "501",
"payments": [
{
"paymentForm": "1",
"monetaryInstrument": "1",
"currency": "<string>",
"paymentDate": "2023-12-25",
"amount": "<unknown>"
}
]
},
"JYS": {
"branchInformation": {
"type": "own",
"postalCode": "<string>"
},
"operationType": "101",
"businessLine": "1",
"operationMethod": "1",
"settlementType": "cash",
"monetaryInstrument": "1"
},
"MJR": {
"operationPostalCode": "<string>",
"goods": [
{
"goodType": "1",
"unit": "1",
"quantity": "<unknown>"
}
],
"payments": [
{
"paymentForm": "1",
"monetaryInstrument": "1",
"currency": "<string>",
"paymentDate": "2023-12-25",
"amount": "<unknown>"
}
],
"operationType": "601"
},
"MPC": {
"operationType": "401",
"postalCode": "<string>",
"disbursements": [
{
"monetaryInstrument": "1",
"currency": "<string>",
"disbursementDate": "2023-12-25",
"amount": "<unknown>"
}
],
"collateral": [
{
"tipoGarantia": "2",
"bienMutuo": {
"kind": "inmueble",
"tipoInmueble": "1",
"valorReferencia": "<string>",
"postalCode": "<string>",
"folioReal": "<string>"
},
"guarantorClientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
},
"TSC": {
"cardType": "1",
"idNumber": "<string>",
"operationType": "211"
},
"VEH": {
"operationType": "801",
"postalCode": "<string>",
"vehicles": [
{
"kind": "terrestre",
"marcaFabricante": "<string>",
"modelo": "<string>",
"anio": "<string>",
"nivelBlindaje": "1",
"vin": "<string>",
"repuve": "<string>",
"placas": "<string>"
}
],
"operationDate": "2023-12-25",
"payments": [
{
"paymentForm": "1",
"currency": "<string>",
"paymentDate": "2023-12-25",
"monetaryInstrument": "1",
"amount": "<unknown>"
}
]
}
},
"cnbv": {
"TRANSMISOR": {
"tipoOperacion": "00",
"instrumentoMonetario": "00",
"sucursal": "<string>",
"localidad": "10100005"
}
}
},
"US": "<unknown>"
},
"relatedClients": [
{
"clientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "base",
"metadata": {}
}
],
"riskAssessments": {},
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"color": "<string>"
}
]
}Authorizations
API key authentication. Obtain your API key from the dashboard.
Target environment for the request. Must be "test" or "live".
Body
application/json
Response
200 - application/json
OK
Available options:
base, MX:AV, MX:AV:ARI, MX:AV:AVI, MX:AV:INM, MX:AV:JYS, MX:AV:MJR, MX:AV:MPC, MX:AV:TSC, MX:AV:VEH, MX:CNBV, MX:CNBV:TRANSMISOR, MX Status
Available options:
not_applicable, pending, completed, failed, cancelled Amount
Currency
Exchange Rates
Show child attributes
Show child attributes
External ID
Description
Metadata
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
