Create transaction
curl --request POST \
--url https://api.projectcor.com/v1/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"date": "2023-12-25",
"type": "<string>",
"total": 123,
"currency_change_amount": 123,
"exchange": 123,
"source_id": 123,
"currency_id": 123,
"receipt_number": "<string>",
"is_income": true,
"client_id": 123,
"company_id": 123,
"can_update": true,
"can_delete": true
}
'import requests
url = "https://api.projectcor.com/v1/transactions"
payload = {
"date": "2023-12-25",
"type": "<string>",
"total": 123,
"currency_change_amount": 123,
"exchange": 123,
"source_id": 123,
"currency_id": 123,
"receipt_number": "<string>",
"is_income": True,
"client_id": 123,
"company_id": 123,
"can_update": True,
"can_delete": True
}
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({
date: '2023-12-25',
type: '<string>',
total: 123,
currency_change_amount: 123,
exchange: 123,
source_id: 123,
currency_id: 123,
receipt_number: '<string>',
is_income: true,
client_id: 123,
company_id: 123,
can_update: true,
can_delete: true
})
};
fetch('https://api.projectcor.com/v1/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.projectcor.com/v1/transactions';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
date: '2023-12-25',
type: '<string>',
total: 123,
currency_change_amount: 123,
exchange: 123,
source_id: 123,
currency_id: 123,
receipt_number: '<string>',
is_income: true,
client_id: 123,
company_id: 123,
can_update: true,
can_delete: true
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectcor.com/v1/transactions",
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([
'date' => '2023-12-25',
'type' => '<string>',
'total' => 123,
'currency_change_amount' => 123,
'exchange' => 123,
'source_id' => 123,
'currency_id' => 123,
'receipt_number' => '<string>',
'is_income' => true,
'client_id' => 123,
'company_id' => 123,
'can_update' => true,
'can_delete' => true
]),
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.projectcor.com/v1/transactions"
payload := strings.NewReader("{\n \"date\": \"2023-12-25\",\n \"type\": \"<string>\",\n \"total\": 123,\n \"currency_change_amount\": 123,\n \"exchange\": 123,\n \"source_id\": 123,\n \"currency_id\": 123,\n \"receipt_number\": \"<string>\",\n \"is_income\": true,\n \"client_id\": 123,\n \"company_id\": 123,\n \"can_update\": true,\n \"can_delete\": true\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))
}{
"id": 123,
"date": "2023-12-25",
"receipt_number": "<string>",
"type": "<string>",
"total": 123,
"currency_change_amount": 123,
"exchange": 123,
"source_id": 123,
"currency_id": 123,
"is_income": true,
"client_id": 123,
"company_id": 123
}Transactions
Create transaction
POST
/
transactions
Create transaction
curl --request POST \
--url https://api.projectcor.com/v1/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"date": "2023-12-25",
"type": "<string>",
"total": 123,
"currency_change_amount": 123,
"exchange": 123,
"source_id": 123,
"currency_id": 123,
"receipt_number": "<string>",
"is_income": true,
"client_id": 123,
"company_id": 123,
"can_update": true,
"can_delete": true
}
'import requests
url = "https://api.projectcor.com/v1/transactions"
payload = {
"date": "2023-12-25",
"type": "<string>",
"total": 123,
"currency_change_amount": 123,
"exchange": 123,
"source_id": 123,
"currency_id": 123,
"receipt_number": "<string>",
"is_income": True,
"client_id": 123,
"company_id": 123,
"can_update": True,
"can_delete": True
}
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({
date: '2023-12-25',
type: '<string>',
total: 123,
currency_change_amount: 123,
exchange: 123,
source_id: 123,
currency_id: 123,
receipt_number: '<string>',
is_income: true,
client_id: 123,
company_id: 123,
can_update: true,
can_delete: true
})
};
fetch('https://api.projectcor.com/v1/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.projectcor.com/v1/transactions';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
date: '2023-12-25',
type: '<string>',
total: 123,
currency_change_amount: 123,
exchange: 123,
source_id: 123,
currency_id: 123,
receipt_number: '<string>',
is_income: true,
client_id: 123,
company_id: 123,
can_update: true,
can_delete: true
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectcor.com/v1/transactions",
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([
'date' => '2023-12-25',
'type' => '<string>',
'total' => 123,
'currency_change_amount' => 123,
'exchange' => 123,
'source_id' => 123,
'currency_id' => 123,
'receipt_number' => '<string>',
'is_income' => true,
'client_id' => 123,
'company_id' => 123,
'can_update' => true,
'can_delete' => true
]),
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.projectcor.com/v1/transactions"
payload := strings.NewReader("{\n \"date\": \"2023-12-25\",\n \"type\": \"<string>\",\n \"total\": 123,\n \"currency_change_amount\": 123,\n \"exchange\": 123,\n \"source_id\": 123,\n \"currency_id\": 123,\n \"receipt_number\": \"<string>\",\n \"is_income\": true,\n \"client_id\": 123,\n \"company_id\": 123,\n \"can_update\": true,\n \"can_delete\": true\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))
}{
"id": 123,
"date": "2023-12-25",
"receipt_number": "<string>",
"type": "<string>",
"total": 123,
"currency_change_amount": 123,
"exchange": 123,
"source_id": 123,
"currency_id": 123,
"is_income": true,
"client_id": 123,
"company_id": 123
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Date
Type
Total
Currency change amount
Exchange
Source ID
Currency ID
Receipt number
Is income
Client ID
Company ID
Can update
Can delete
Was this page helpful?
⌘I

