(reconciliation)
- createPolicy - Create a policy
- deletePolicy - Delete a policy
- getPolicy - Get a policy
- getReconciliation - Get a reconciliation
- listPolicies - List policies
- listReconciliations - List reconciliations
- reconcile - Reconcile using a policy
- reconciliationgetServerInfo - Get server info
Create a policy
import { SDK } from "@formance/formance-sdk";
const sdk = new SDK({
authorization: "<YOUR_AUTHORIZATION_HERE>",
});
async function run() {
const result = await sdk.reconciliation.createPolicy({
ledgerName: "default",
ledgerQuery: {
"key": "<value>",
},
name: "XXX",
paymentsPoolID: "XXX",
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
shared.PolicyRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<operations.CreatePolicyResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ReconciliationErrorResponse | default | application/json |
errors.SDKError | 4xx-5xx | / |
Delete a policy by its id.
import { SDK } from "@formance/formance-sdk";
const sdk = new SDK({
authorization: "<YOUR_AUTHORIZATION_HERE>",
});
async function run() {
const result = await sdk.reconciliation.deletePolicy({
policyID: "XXX",
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeletePolicyRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<operations.DeletePolicyResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ReconciliationErrorResponse | default | application/json |
errors.SDKError | 4xx-5xx | / |
Get a policy
import { SDK } from "@formance/formance-sdk";
const sdk = new SDK({
authorization: "<YOUR_AUTHORIZATION_HERE>",
});
async function run() {
const result = await sdk.reconciliation.getPolicy({
policyID: "XXX",
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetPolicyRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<operations.GetPolicyResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ReconciliationErrorResponse | default | application/json |
errors.SDKError | 4xx-5xx | / |
Get a reconciliation
import { SDK } from "@formance/formance-sdk";
const sdk = new SDK({
authorization: "<YOUR_AUTHORIZATION_HERE>",
});
async function run() {
const result = await sdk.reconciliation.getReconciliation({
reconciliationID: "XXX",
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetReconciliationRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<operations.GetReconciliationResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ReconciliationErrorResponse | default | application/json |
errors.SDKError | 4xx-5xx | / |
List policies
import { SDK } from "@formance/formance-sdk";
const sdk = new SDK({
authorization: "<YOUR_AUTHORIZATION_HERE>",
});
async function run() {
const result = await sdk.reconciliation.listPolicies({
cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==",
pageSize: 100,
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ListPoliciesRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<operations.ListPoliciesResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ReconciliationErrorResponse | default | application/json |
errors.SDKError | 4xx-5xx | / |
List reconciliations
import { SDK } from "@formance/formance-sdk";
const sdk = new SDK({
authorization: "<YOUR_AUTHORIZATION_HERE>",
});
async function run() {
const result = await sdk.reconciliation.listReconciliations({
cursor: "aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==",
pageSize: 100,
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ListReconciliationsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<operations.ListReconciliationsResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ReconciliationErrorResponse | default | application/json |
errors.SDKError | 4xx-5xx | / |
Reconcile using a policy
import { SDK } from "@formance/formance-sdk";
const sdk = new SDK({
authorization: "<YOUR_AUTHORIZATION_HERE>",
});
async function run() {
const result = await sdk.reconciliation.reconcile({
reconciliationRequest: {
reconciledAtLedger: new Date("2021-01-01T00:00:00.000Z"),
reconciledAtPayments: new Date("2021-01-01T00:00:00.000Z"),
},
policyID: "XXX",
});
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ReconcileRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<operations.ReconcileResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ReconciliationErrorResponse | default | application/json |
errors.SDKError | 4xx-5xx | / |
Get server info
import { SDK } from "@formance/formance-sdk";
const sdk = new SDK({
authorization: "<YOUR_AUTHORIZATION_HERE>",
});
async function run() {
const result = await sdk.reconciliation.reconciliationgetServerInfo();
// Handle the result
console.log(result)
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body , are allowed. |
Promise<operations.ReconciliationgetServerInfoResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ReconciliationErrorResponse | default | application/json |
errors.SDKError | 4xx-5xx | / |