frequently asked questions

All your questions in one place.

CPInfo

This method returns different pieces of information about a given account.

BODY - RAW

{
       "Method": "CPInfo",
       "Parameters": [
             [<cMethod>],
             <cAccount>,
             [<dDateEnd>]
             [, <dDateStart>]
             [, <cJournal>]
             [, <bNoStartingBalance>]
       ]
}

PARAMETERS

Parameters Description
cMethod

Type of information to be returned from an account. The possible values are:

solde: account balance in local currency;

solde monnaie: account balance in the currency specified in the account;

débit: account debit balance in local currency;

débit monnaie: account debit balance in the currency specified in the account;

crédit: account credit balance in local currency;

crédit monnaie: account credit balance in the currency specified in the account.

If cMethod is omitted, a complex class is returned, with all the possible values.

cAccount Account number.
dDateEnd

The recordings up to this date are considered. This parameter is optional. If the parameter is omitted, the recordings up to the end of the fiscal year are considered.

dDateStart

The recordings starting from this date are considered. The parameter is optional. If the parameter is omitted, the recordings starting from the beginning of the fiscal year are considered.

 cJournal

Only the recording for the specified ledger are considered. This parameter is optional. If the parameter is omitted no filter is applied to the journal and all the recordings are considered. The possible values are:

"d": entries not coming from auxiliary modules: manual entries;

"v": sales ledger;

"a": purchases ledger;

"s": wages ledger;

"b": closing entries;

"o": starting balances ledger;

"i": inventories ledger;

"m": amortizations ledger;

"x": reversals ledger.
bNoStartingBalance If the parameter is set to True, the starting balances are excluded. The parameter is optional. If the parameter is omitted its default value is false and the starting balances are included.

 

EXAMPLES

*/ Return the balance for the Account 1000.

{
       "Method": "CPInfo",
       "Parameters": [
             "solde",
             "1000"
       ]
}

*/ Return the debit balance for the Account 1000.

{
       "Method": "CPInfo",
       "Parameters": [
             "débit",
             "1000"
       ]
}

*/ Return the foreign currency balance at the 01.03.2017 for the Account 1000.

{
       "Method": "CPInfo",
       "Parameters": [
             "solde monnaie",
             "1000",
             "01.03.2017"
       ]
}

*/ Return the balance for the month of march 2017 for the Account 1000.

{
       "Method": "CPInfo",
       "Parameters": [
             "solde",
             "1000",
             "01.03.2017",
             "31.03.2017"
       ]
}

*/ Return the balance of the sales ledger for the month of march 2017 for the Account 1000.

{
       "Method": "CPInfo",
       "Parameters": [
             "solde",
             "1000",
             "01.03.2017",
             "31.03.2017",
             "v"
       ]
}

*/ Return the balance for the Account 1000 without the initial balance.

{
       "Method": "CPInfo",
       "Parameters": [
             "solde",
             "1000",
             false,
             false,
             false,
             true
       ]
}

RETURNED CLASS

The class is complex only when no method is passed in the parameter cMethod

 

Property Description
BalanceLocalCurrency account balance in local currency
BalanceForeignCurrency account balance in the currency specified in the account
DebitBalanceLocalCurrency account debit balance in local currency
DebitBalanceForeignCurrency account debit balance in the currency specified in the account
CreditBalanceLocalCurrency account credit balance in local currency
CreditBalanceForeignCurrency account credit balance in the currency specified in the account

 

Did you find this article useful?

0 out of 0 found this helpful