Create TPA Transaction
curl --request POST \
--url https://api.stax.ai/tpa/transaction/create \
--header 'Content-Type: application/json' \
--cookie authToken= \
--data '
{
"statementId": "<string>",
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"amount": 123,
"txType": "<string>",
"txSubType": "<string>",
"page": 123
}
'import requests
url = "https://api.stax.ai/tpa/transaction/create"
payload = {
"statementId": "<string>",
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"amount": 123,
"txType": "<string>",
"txSubType": "<string>",
"page": 123
}
headers = {
"cookie": "authToken=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'authToken=', 'Content-Type': 'application/json'},
body: JSON.stringify({
statementId: '<string>',
date: '2023-11-07T05:31:56Z',
description: '<string>',
amount: 123,
txType: '<string>',
txSubType: '<string>',
page: 123
})
};
fetch('https://api.stax.ai/tpa/transaction/create', 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.stax.ai/tpa/transaction/create",
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([
'statementId' => '<string>',
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'amount' => 123,
'txType' => '<string>',
'txSubType' => '<string>',
'page' => 123
]),
CURLOPT_COOKIE => "authToken=",
CURLOPT_HTTPHEADER => [
"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.stax.ai/tpa/transaction/create"
payload := strings.NewReader("{\n \"statementId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"txType\": \"<string>\",\n \"txSubType\": \"<string>\",\n \"page\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "authToken=")
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.stax.ai/tpa/transaction/create")
.header("cookie", "authToken=")
.header("Content-Type", "application/json")
.body("{\n \"statementId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"txType\": \"<string>\",\n \"txSubType\": \"<string>\",\n \"page\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stax.ai/tpa/transaction/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'authToken='
request["Content-Type"] = 'application/json'
request.body = "{\n \"statementId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"txType\": \"<string>\",\n \"txSubType\": \"<string>\",\n \"page\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"transaction": {
"_id": "<string>",
"team": "<string>",
"plan": "<string>",
"account": "<string>",
"planId": "<string>",
"accountNumber": "<string>",
"statement": "<string>",
"row": "<string>",
"creator": "<string>",
"planYear": 123,
"page": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"amount": 123,
"txType": "<string>",
"txSubType": "<string>",
"confidence": 123,
"history": [
{
"user": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"changes": [
{
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
]
}
]
}
}TPA
Create TPA Transaction
Create a new transaction
POST
/
tpa
/
transaction
/
create
Create TPA Transaction
curl --request POST \
--url https://api.stax.ai/tpa/transaction/create \
--header 'Content-Type: application/json' \
--cookie authToken= \
--data '
{
"statementId": "<string>",
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"amount": 123,
"txType": "<string>",
"txSubType": "<string>",
"page": 123
}
'import requests
url = "https://api.stax.ai/tpa/transaction/create"
payload = {
"statementId": "<string>",
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"amount": 123,
"txType": "<string>",
"txSubType": "<string>",
"page": 123
}
headers = {
"cookie": "authToken=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'authToken=', 'Content-Type': 'application/json'},
body: JSON.stringify({
statementId: '<string>',
date: '2023-11-07T05:31:56Z',
description: '<string>',
amount: 123,
txType: '<string>',
txSubType: '<string>',
page: 123
})
};
fetch('https://api.stax.ai/tpa/transaction/create', 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.stax.ai/tpa/transaction/create",
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([
'statementId' => '<string>',
'date' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'amount' => 123,
'txType' => '<string>',
'txSubType' => '<string>',
'page' => 123
]),
CURLOPT_COOKIE => "authToken=",
CURLOPT_HTTPHEADER => [
"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.stax.ai/tpa/transaction/create"
payload := strings.NewReader("{\n \"statementId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"txType\": \"<string>\",\n \"txSubType\": \"<string>\",\n \"page\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "authToken=")
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.stax.ai/tpa/transaction/create")
.header("cookie", "authToken=")
.header("Content-Type", "application/json")
.body("{\n \"statementId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"txType\": \"<string>\",\n \"txSubType\": \"<string>\",\n \"page\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stax.ai/tpa/transaction/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'authToken='
request["Content-Type"] = 'application/json'
request.body = "{\n \"statementId\": \"<string>\",\n \"date\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"amount\": 123,\n \"txType\": \"<string>\",\n \"txSubType\": \"<string>\",\n \"page\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"transaction": {
"_id": "<string>",
"team": "<string>",
"plan": "<string>",
"account": "<string>",
"planId": "<string>",
"accountNumber": "<string>",
"statement": "<string>",
"row": "<string>",
"creator": "<string>",
"planYear": 123,
"page": 123,
"date": "2023-11-07T05:31:56Z",
"description": "<string>",
"amount": 123,
"txType": "<string>",
"txSubType": "<string>",
"confidence": 123,
"history": [
{
"user": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"changes": [
{
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
]
}
]
}
}Authorizations
cookieAuthbearerAuth
Cookie-based authentication using userId and authToken cookies
Body
application/json
⌘I