How to use the API?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LabelKing
    Senior Blueparker
    • Jan 2012
    • 1062

    #1

    How to use the API?

    I'm looking at writing some code to use the BP API.

    Can anyone suggest the best way to set this up?

    From the API user guide it seems to use PHP which I understand is a server side language. I've not used PHP or other server side code before, but I've coded in compiled languages long in the past so figuring out how to code in PHP should be easy enough - I just need to know how/where I "run" it and on what.

    I assume I'd just buy a domain name and hosting? But then what? How do I access PHP in order to write/run the code? Do I remote access to the server? Do I have some software on my PC?
  • MooreSpeed
    Blueparker
    • Sep 2018
    • 47

    #2
    Very interested to see the response to this one!

    Comment

    • Neil
      Senior Blueparker
      • Nov 2008
      • 2330

      #3
      Honest Answer! - You pay someone who knows what they are doing to do it properly!
      Regards

      Neil.

      Comment

      • Loxta
        Senior Blueparker
        • Apr 2012
        • 533

        #4
        We use Google Apps Script to use the API. This helps us bring information from the site both into Google Sheets, but we also use it to place information into other places.

        Depending on what you are planning to do, there are probably better and more professional ways to do this, but as only a basic coder this is at least a working solution for us. I haven't used any functions to write back to BP, only reading information on orders and products.

        Morning All, I had asked BP to see if there were any chances for a few modifications to help us with some pinch points. The earliest point they can review these is early next year, so in the meantime I have tried to create some bridges to allow us to get through the next couple of months. My coding skills are not great, but


        Separately, we also use https://www.make.com/ to connect to certain other apps as well.

        Just wish we had API access to the Purchase Order and Despatch Tables...
        Shaun

        Loxta Hardware
        www.loxta.co.uk

        Comment

        • Bandanashop
          Senior Blueparker
          • Jun 2012
          • 236

          #5
          I have posted examples written in Python in the past within this forum category.
          www.herniapants.com

          Comment

          • Bandanashop
            Senior Blueparker
            • Jun 2012
            • 236

            #6
            Try using Python which will run on your own PC. Install Python onto your PC and run it from the command line as a script (which can be automated later). No domain name or hosting just an internet connection, nop compilation necessary.

            You will need to include use the json and requests libraries.
            www.herniapants.com

            Comment

            • LabelKing
              Senior Blueparker
              • Jan 2012
              • 1062

              #7
              Thanks, I looked into it at the time, and I figured out how to get the PHP working on a server and talking to the API at one end and writing out the EDI files at the other. Then life got in the way and it's all on hold at the moment.

              Comment

              Working...