create manual Treasury movement
curl --request POST \
--url https://api.lapyme.com.ar/api/v1/treasury/movements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"balance": {
"balance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"amount": 123,
"occurred_on": "2023-12-25",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"description": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"exchange_rate": 123,
"description": "<string>",
"reference": "<string>",
"note": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distributions": [
{
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.lapyme.com.ar/api/v1/treasury/movements"
payload = {
"balance": { "balance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"amount": 123,
"occurred_on": "2023-12-25",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"description": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"exchange_rate": 123,
"description": "<string>",
"reference": "<string>",
"note": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distributions": [
{
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
balance: {balance_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
amount: 123,
occurred_on: '2023-12-25',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
lines: [
{
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 123,
description: '<string>',
cost_center1_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center2_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center3_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
exchange_rate: 123,
description: '<string>',
reference: '<string>',
note: '<string>',
cost_center1_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center2_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center3_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
distributions: [{cost_center1_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount_cents: 123}],
updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.lapyme.com.ar/api/v1/treasury/movements', 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.lapyme.com.ar/api/v1/treasury/movements",
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([
'balance' => [
'balance_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'amount' => 123,
'occurred_on' => '2023-12-25',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'lines' => [
[
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'description' => '<string>',
'cost_center1_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center2_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center3_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'exchange_rate' => 123,
'description' => '<string>',
'reference' => '<string>',
'note' => '<string>',
'cost_center1_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center2_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center3_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'distributions' => [
[
'cost_center1_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount_cents' => 123
]
],
'updated_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.lapyme.com.ar/api/v1/treasury/movements"
payload := strings.NewReader("{\n \"balance\": {\n \"balance_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"amount\": 123,\n \"occurred_on\": \"2023-12-25\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"exchange_rate\": 123,\n \"description\": \"<string>\",\n \"reference\": \"<string>\",\n \"note\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"distributions\": [\n {\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123\n }\n ],\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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("https://api.lapyme.com.ar/api/v1/treasury/movements")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"balance\": {\n \"balance_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"amount\": 123,\n \"occurred_on\": \"2023-12-25\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"exchange_rate\": 123,\n \"description\": \"<string>\",\n \"reference\": \"<string>\",\n \"note\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"distributions\": [\n {\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123\n }\n ],\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lapyme.com.ar/api/v1/treasury/movements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"balance\": {\n \"balance_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"amount\": 123,\n \"occurred_on\": \"2023-12-25\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"exchange_rate\": 123,\n \"description\": \"<string>\",\n \"reference\": \"<string>\",\n \"note\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"distributions\": [\n {\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123\n }\n ],\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"object": "treasury_movement",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"balance": {
"balance_type": "bank_account",
"balance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"direction": "inflow",
"currency": "ARS",
"native_amount": 123,
"functional_amount": 123,
"functional_currency": "ARS",
"occurred_on": "2023-12-25",
"source_type": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"reference": "<string>",
"note": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distributions": [
{
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123
}
],
"statement_line": {
"source": "<string>",
"key": "<string>"
},
"lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
],
"rate": {
"value": "<string>",
"rate_date": "2023-12-25",
"source": "bcra"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}create manual Treasury movement
Use native currency cents. USD outflows use carrying value. The path ID is treasury_adjustments.id or treasury_movement_id from lists, not the unified row id. Payments and transfers require their own tools. Registers are excluded.
POST
/
api
/
v1
/
treasury
/
movements
create manual Treasury movement
curl --request POST \
--url https://api.lapyme.com.ar/api/v1/treasury/movements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"balance": {
"balance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"amount": 123,
"occurred_on": "2023-12-25",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"description": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"exchange_rate": 123,
"description": "<string>",
"reference": "<string>",
"note": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distributions": [
{
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.lapyme.com.ar/api/v1/treasury/movements"
payload = {
"balance": { "balance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"amount": 123,
"occurred_on": "2023-12-25",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"description": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"exchange_rate": 123,
"description": "<string>",
"reference": "<string>",
"note": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distributions": [
{
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
balance: {balance_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
amount: 123,
occurred_on: '2023-12-25',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
lines: [
{
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
amount: 123,
description: '<string>',
cost_center1_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center2_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center3_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
exchange_rate: 123,
description: '<string>',
reference: '<string>',
note: '<string>',
cost_center1_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center2_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_center3_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
distributions: [{cost_center1_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', amount_cents: 123}],
updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.lapyme.com.ar/api/v1/treasury/movements', 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.lapyme.com.ar/api/v1/treasury/movements",
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([
'balance' => [
'balance_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'amount' => 123,
'occurred_on' => '2023-12-25',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'lines' => [
[
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount' => 123,
'description' => '<string>',
'cost_center1_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center2_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center3_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'exchange_rate' => 123,
'description' => '<string>',
'reference' => '<string>',
'note' => '<string>',
'cost_center1_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center2_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_center3_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'distributions' => [
[
'cost_center1_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'amount_cents' => 123
]
],
'updated_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.lapyme.com.ar/api/v1/treasury/movements"
payload := strings.NewReader("{\n \"balance\": {\n \"balance_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"amount\": 123,\n \"occurred_on\": \"2023-12-25\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"exchange_rate\": 123,\n \"description\": \"<string>\",\n \"reference\": \"<string>\",\n \"note\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"distributions\": [\n {\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123\n }\n ],\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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("https://api.lapyme.com.ar/api/v1/treasury/movements")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"balance\": {\n \"balance_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"amount\": 123,\n \"occurred_on\": \"2023-12-25\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"exchange_rate\": 123,\n \"description\": \"<string>\",\n \"reference\": \"<string>\",\n \"note\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"distributions\": [\n {\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123\n }\n ],\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lapyme.com.ar/api/v1/treasury/movements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"balance\": {\n \"balance_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"amount\": 123,\n \"occurred_on\": \"2023-12-25\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"lines\": [\n {\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount\": 123,\n \"description\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"exchange_rate\": 123,\n \"description\": \"<string>\",\n \"reference\": \"<string>\",\n \"note\": \"<string>\",\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center2_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_center3_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"distributions\": [\n {\n \"cost_center1_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"amount_cents\": 123\n }\n ],\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"data": {
"object": "treasury_movement",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"balance": {
"balance_type": "bank_account",
"balance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"direction": "inflow",
"currency": "ARS",
"native_amount": 123,
"functional_amount": 123,
"functional_currency": "ARS",
"occurred_on": "2023-12-25",
"source_type": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>",
"reference": "<string>",
"note": "<string>",
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"distributions": [
{
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount_cents": 123
}
],
"statement_line": {
"source": "<string>",
"key": "<string>"
},
"lines": [
{
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"cost_center1_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center2_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_center3_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"description": "<string>"
}
],
"rate": {
"value": "<string>",
"rate_date": "2023-12-25",
"source": "bcra"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Incluí tu API key en el header Authorization con el prefijo Bearer.
Headers
Body
application/json
Show child attributes
Show child attributes
Available options:
inflow, outflow Required array length:
1 - 32 elementsShow child attributes
Show child attributes
Required range:
x <= 1000000000Show child attributes
Show child attributes
Maximum string length:
500Maximum string length:
255Maximum string length:
2000Required array length:
2 - 32 elementsShow child attributes
Show child attributes
Was this page helpful?

