Sage300 Node js API

SOLVED

Hello, we built a web Point of sales app and we want to integrate some api from sage300  (sales api, inventory, customer info api). we only want some of our api to integrate with sage300. please how do i start ?

Parents Reply Children
  • +1 in reply to oneflare
    verified answer

    When you open the Swagger UI, you click the blue button, then you wait for the endpoints to load. Then you expand ARCustomers (for example), then open the first GET option and in that screen you will see a company text box. By default, it usually has SAMLTD, and that is what is shown on yours. Your screenshot shows you trying to configure SAMDAT. So, your Swagger UI is trying to make a connection to SAMLTD and you appear to be configuring SAMDAT for web API access. The quick option is when you open the Swagger UI, when you expand the endpoint you wish to use, just overwrite the company name with the one you have configured for access in Sage. If you want it to default to that company then edit the web config files and look for SAMLTD and change it to the one you want.

  • 0 in reply to Vega

    Thanks for the response, I've done that and I can now make request to the endpoints on the swagger ui.

    I tried making a request to any sage api with the given api link with ip address from sage on my nodejs web server but i get unauthorized error. It works fine when I call the apis from the swagger docs provided to us by sage. What could be doing wrong?

  • 0 in reply to oneflare

    If you're trying to connect to the IP address you gave in the earlier posts, it suggests you're looking to call the Sage endpoints over the open internet. I suspect that something is could be stripping the payload headers out. Trying running the requests via Postman and try using Fiddler to trace the request. If the request is working when you are using the Swagger UI, then Sage is working correctly. The issue is most likely outside of Sage now.

  • 0 in reply to Vega

    Thanks for the response the other day, I really appreciate that.
    Now, I'm to send data gotten from the response object upon creating a sale in my software to sage.

    Firstly, I can't find the endpoint on sage that accepts payload to create a sale, also, can I know the required payload to be sent to such endpoint.

    Secondly, to create a customer, from the sage docs on swagger, I would need to create a customer group and also required parameters which isn't available on my software, how do I get such required parameters in the payload.

    Likewise syncing inventories on my software to sage and vice versa.

    Thanks.

  • 0 in reply to Vega

    Hi,
    I'm trying to create a receipt adjustment batch with one of the data in the payload "BatchStatus": "Posted" but I get this error "Batch status cannot be manually changed to POSTINPROGRESS or POSTED. (3620 ARBTA1.C)."

    How can I resolve this?

    Also is there any endpoint that works for posting receipts alone and take the status of the batch from "Open" to "Posted" because taking the BatchStatus: "Open" works but the receipt is not posted.

    Pls how do i resolve this?