switchon@lavalamp.biz
+27(0) 83 419 4851 / +27(0) 21 036 1165
Application & software development
Get A Quote

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact
    laravel logo
    Working With Eloquent: API Resources In Laravel
    Aug 27, 2019
    my java exceptionutil class
    My Java ExceptionUtil Class
    Sep 16, 2019

    Getting Your Sage One Company ID For API Integration

    Categories
    • Software Development
    • Web Development
    Tags
    • api
    • api intergration
    • sage
    • sage account
    • sage api
    • sage business cloud
    • software development
    • web development
    sage api
    sage api

    Note: Sage One has been renamed to Sage Business Cloud.

    If you’re looking to integrate into the Sage One API, you will need to get your company id. There is no clear explanation of where to find it, so I hope this helps you.

    We will be using curl in this tutorial to talk to the Sage API. If you are looking for more information about the API you can find it on their API help pages.

    1. https://www.sageone.co.za/developer-zone/
    2. https://accounting.sageone.co.za/api/2.0.0/Help
    3. https://www.sageone.co.za/api-methods/

    How to get your Company ID:


    You will obviously first need to have a company loaded on Sage. And secondly, you will need to have an API key. To get an API key, follow the instruction on link 1. above.

    Their API uses basic webforms authentication. You will need to add your username and password, separated by a semi-colon and Base64 encoded to your headers. E.g. example@company.com:Password123 becomes ZXhhbXBsZUBjb21wYW55LmNvbTpQYXNzd29yZDEyMw== 

    Then it’s just a matter of making a single GET request to their get companies endpoint which is currently

    curl -g -H 'Authorization: Basic ZXhhbXBsZUBjb21wYW55LmNvbTpQYXNzd29yZDEyMw==' 'https://resellers.accounting.sageone.co.za/api/1.1.3/company/Get?apikey={apiKey}'

    The above command is sending a GET request to https://resellers.accounting.sageone.co.za/api/1.1.3/company/Get?apikey={apiKey}. And it's also setting the headers to Authorization: Basic ZXhhbXBsZUBjb21wYW55LmNvbTpQYXNzd29yZDEyMw=='

    This will return a list of all companies on your account. You can get the company id from the body. It's just titled ID. The results look something like this:

    {
        "TotalResults": 1,
        "ReturnedResults": 1,
        "Results": [
            {
                "ID": 123456,
                "Name": "Example Company",
                "CurrencySymbol": "R",
                "CurrencyDecimalDigits": 2,
                ...
             },
             ....
         ]
    }
    

    Contact us


      Related posts:

      getting django to talk to mysql 8Getting Django To Talk To MySQL 8 laravel envoyer and forgeProvisioning A New Digital Ocean Server With Laravel Forge, And Deploying Code With Laravel Envoyer how to deploy a backend api to azureHow To Deploy A Backend API To Azure implementing laravel echoImplementing Laravel Echo And Socket.io With A Laravel API And Ionic Vue App
      Share
      95
      Hristo Mitev
      Hristo Mitev
      Hristo is a frontend developer with knowledge and experience in Laravel.

      Leave a Reply Cancel reply

      Your email address will not be published. Required fields are marked *

      Lava Lamp Lab


      Like technology, a lava lamp constantly changes form, producing new conditions with every passing moment



      lava lamp lab facebook   lava lamp lab twitter   lava lamp lab linkedin   lava lamp lab instgram

      Services


      Application & software development

      Outsourced software development

      Project based resourcing

      Digital marketing & consulting

      Graphic design & consulting

      UI / UX design & consulting

      Contact Us


      +27(0) 83 419 4851

      +27(0) 21 036 1165


      switchon@lavalamp.biz


      Unit 4 Monaco Square,
      14 Church Street,
      Durbanville,
      Cape Town, 7550

      NBConsult Group


      nbconsult
      nbconnect msp
      nbclearning
      river broadband
      designer needed
      © 2023 Lava Lamp Lab (Pty) Ltd | All Rights Reserved | Privacy Policy
      Contact us now

        Application & software development

          Outsourced software development

            Project based resourcing

              Digital marketing & consulting

                Graphic design & consulting

                  UI/UX design & consulting

                    Lease an expert

                      Recruitment services

                        We are using cookies to give you the best experience on our website.

                        You can find out more about which cookies we are using or switch them off in settings.

                        Lava Lamp Lab
                        Powered by  GDPR Cookie Compliance
                        Privacy Overview

                        This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

                        Strictly Necessary Cookies

                        Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

                        If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

                        3rd Party Cookies

                        This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

                        Keeping this cookie enabled helps us to improve our website.

                        Please enable Strictly Necessary Cookies first so that we can save your preferences!

                        Cookie Policy

                        More information about our Cookie Policy