Jump to content

Sage Ledger account code/nominal code Filter issue


 Share

Recommended Posts

Hi, 
In our system user input the nominal code at the time of integration setup with Favrit. Based on their sales we generate a settlement z report and at the on the next day we post the sales ledgers in the accounting system. But here I found that I need to post with the id at https://api.accounting.sage.com/v3.1/journals api, Can you please guide me by using which API can get the id of the nominal code I have for the accounts. i.e. I  will input the like nominal_code(4000, 4001, 3000, 3001) response will be (id : xhsdsdrjjskkk, nominal_code: 4000 , id: kjhgdsdgsh, nominal_code: 4001, ....). Is this make sense? 

Regards,
Emon  

Link to comment
Share on other sites

  • 1 year later...
GET https://api.accounting.sage.com/v3.1/ledger_accounts?ledger_account_type_id=SALES

{
    "$total": 6,
    "$page": 1,
    "$next": null,
    "$back": null,
    "$itemsPerPage": 20,
    "$items": [
        {
            "id": "4af2ca6f2d1511edb2850279d0cc53c5",
            "displayed_as": "Sales - Contract Recrtuiment (4010)",
            "$path": "/ledger_accounts/4af2ca6f2d1511edb2850279d0cc53c5"
        },
        {
            "id": "4af313f12d1511edb2850279d0cc53c5",
            "displayed_as": "Sales Discounts (4045)",
            "$path": "/ledger_accounts/4af313f12d1511edb2850279d0cc53c5"
        },
        {
            "id": "4af3e5712d1511edb2850279d0cc53c5",
            "displayed_as": "Commissions Received (4070)",
            "$path": "/ledger_accounts/4af3e5712d1511edb2850279d0cc53c5"
        },
        {
            "id": "4afa33f02d1511edb2850279d0cc53c5",
            "displayed_as": "Sales - Permanent Recruitment (4000)",
            "$path": "/ledger_accounts/4afa33f02d1511edb2850279d0cc53c5"
        },
        {
            "id": "0cdb79874c3f441299a527ba63f73dca",
            "displayed_as": "Sales - Subscriptions (4030)",
            "$path": "/ledger_accounts/0cdb79874c3f441299a527ba63f73dca"
        },
        {
            "id": "f60fb179481646f3882d29cb4635e61f",
            "displayed_as": "Sales - Recharges (4040)",
            "$path": "/ledger_accounts/f60fb179481646f3882d29cb4635e61f"
        }
    ]
}

 

It looks as if you've passed the incorrect query parameter you're using ledger_account_type_id and it needs to be ledger_accounts_type_id

 

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...