Jump to content

Ben Smith

Administrators
  • Posts

    189
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by Ben Smith

  1. Hi John,

    Apologies for the inconvenience, but Sage People also has its own community which you can find here: https://sagepeoplecommunity.sage.com/s/login/?ec=302&startURL=%2Fs%2F 

    I would start there by emailing [email protected] where you can request an account - and ask about the possibility of trial access. (I don't work with Sage People so I can't say unfortunately!) 

    Let me know if you don't get anywhere and I'll look for other options for you.

     

    Ben

    • Thanks 1
  2. Hi Lomax,

    Thanks for your question.

    Currently we do not have webhooks available, but hope to offer it in the future. At present all we can recommend is a reasonable polling cadence to obtain new data.

     

    We'll update the documentation as soon as we have more on new features.

     

    Ben

  3. Hi Saurabh,

    So if I'm understanding correctly,  and you are using Sage Business Cloud Accounting, you are interested in returning all invoices for a specific period of time? 

    This is indeed possible, and there are 2 different ways to achieve it, depending on the kind of data you need to return.

    You can make a GET request to the /sales_invoices endpoint using:

    https://api.accounting.sage.com/v3.1/sales_invoices?from_date=2022-01-01&to_date=2022-04-01

    Which will return all invoices between the dates specified in the from_date and to_date params. 

    Alternatively, a more efficient endpoint is /transactions (but holds less information), and can also return invoices.

    After first obtaining the transation_type_ids using the /transaction_types endpoint you can use the following request:

    https://api.accounting.sage.com/v3.1/transactions?transaction_type_id=SALES_INVOICE&from_date=2022-01-01&to_date=2022-01-04

    Hopefully that helps,

     

    Ben

  4. Hi Raman,

    So I've reviewed the body content, and its missing both a tax rate and tax rate id:

     

    {
       "sales_estimate": {
           "expiry_date": "2022-04-04",
           "date": "2022-01-04",
           "contact_id": "85b732ca9cda4c28ac580aa2c21c01e2",
           "estimate_lines": [
               {
                   "unit_price": 150.00,
                   "quantity": 100.00,
                   "product_id": "92b7697e4a9211e797950a57719b2edb",
                   "ledger_account_id": "bf15fce94a9111e797950a57719b2edb",
                   "discount_percentage": 10,
                   "description": "Test OLI Product",
                   "tax_rate": "20",
                   "tax_rate_id": "GB_STANDARD"
               }
           ]
       }
    }

    We are looking to make some updates to our API reference, as these are required fields and not marked as such - my apologies for this!

    The error you are receiving isn't one I've seen before, but if you can first try making a call to /tax_rates to see which rates are available, and pass that in for each estimate line and see if that changes anything.

     

    Ben

  5. 20 hours ago, Mary Hayden said:

    I totally agree, I have a few clients that I would like to suggest to move to SAGE 50.  but if I cannot get the information from SAGE Cloud, they are stuck. this is a huge cost to SAGE, as the price difference from one system to another is significant.  If you concentrate on this, its of huge value to SAGE.

     

    If you can provide me some more detail on those impacted clients I'd appreciate it Mary.

     

    Thanks

  6. Hi Mary, 

    If by project codes you are referring to analysis types,  all I can really update you on is that there is work going on currently and we'll be posting an update as soon as we have any updates. 

    Please accept my apologies that we aren't able to provide a better response.

     

    Ben

  7. Hi Steve, welcome to the community!

    Before I can guide you on registering as a developer etc. I'll need to know a couple of things - which Sage product are you looking to integrate with, and which region/countries are you targeting?

    Thanks

     

    Ben

  8. Hi Lori,

    Thanks for getting in touch.

    Can you confirm which Sage product this relates to? Is it Sage 50cloud Accounts? Can you also confirm which country this is, as the products can differ.

     

    Ben

  9. Hi Paul,

    So it looks to me that the only issue is that you are passing the tax_rate_id as an array. When making a POST request, use the attribute tax_rate_id, and pass your string as its value:

    {
       "sales_invoice":{
          "contact_id":"e69235e7f37e462dbc5e038b57b7d13d",
          "date":"2022-03-13",
          "net_amount":207.60,
          "tax_amount":26.99,
          "total_amount":234.59,
          "invoice_number":"1",
          "tax_address_region_id":"CA-ON",
          "invoice_lines":[
             {
                "description":"Test",
                "ledger_account_id":"29fc0490a21411ecbcc60e97dc3b579b",
                "product_id":null,
                "service_id":"0dc3d4f44f6e421b9e134b9fda48e793",
                "unit_price":173.0,
                "quantity":1.2,
                "net_amount":207.60,
                "tax_amount":26.99,
                "total_amount":234.59,
                "tax_rate_id":"CA_HST_ON"
             }
          ]
       }
    }

    When you view it on the API reference, you can open the arrays such as invoice_lines and see that the tax rate is specified as a tax_rate _id:

    image.png

    I'll update our documentation, as that is a required field and not marked as such! My apologies for that.

    Hope that makes things a bit clearer,

     

    Ben
     

  10. Hi Guillaume,

    That error basically means that the business you are querying hasn't been found in our database.

    Can you confirm you are passing the correct business_id in the X-Business header when making your API calls? I'd recommend making a call to /businesses and noting the id(s) of the business(es) returned.

     

    Ben

  11. Hi Lyle,

    There isn't a method of bypassing the login requirement, but you can maintain the connection indefinitely by using the refresh token. When token exchange occurs you will get a new refresh token, cache it and use when the access token expires or is used. Further details: https://gb-kb.sage.com/portal/app/portlets/results/viewsolution.jsp?solutionid=210226173239343

     

    Hope that helps!

     

    Ben

  12. Hi Frebin,

    Just to clarify - are you referring to Sage Business Cloud Accounting? This is our cloud native app with a RESTful API as opposed to Sage 50cloud Accounts which is a desktop application with a .NET SDK.

    I assume you mean Sage Business Cloud Accounting, and if so at present there's no way to extend the token lifetime. What we'd recommend is essentially maintaining a connection through the use of the refresh token, checking that your existing access token is valid prior to making your calls, and if not exchanging the refresh for a new access token. 

    You can read more on how to do that here.

     

    Ben

  13. Hi Daniel,

    Thanks for the feedback. 

    We are of course aware of the need for analysis types to be accessible via the API for a multitude of reasons. It is also something that our engineering teams have on the roadmap. I appreciate this has been a requested feature for a long time, and I'm hopeful we will have more detail on this in the coming months. 

    I'm really sorry that I can't provide a more positive response, but rest assured all feedback is being referred to our product managers, and we have stressed the importance of the feature.

     

    Ben

×
×
  • Create New...