Announcement

Collapse
No announcement yet.

POST Sales Order with Sales Order Items

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • POST Sales Order with Sales Order Items

    Hello,
    I'm newbee to ESPO and want to ask: is it possible to add full list of Sales Order Items to JSON Payload?
    If yes, can you advice how I can do it?
    I need to transmit order details to another system via rest api post request.
    Thank you in advace.


  • #2
    Yes, it's possible. You just have to define itemList param. The best way to reproduce proper API request is to look on already existing records.
    Here you have example of request which already exist:
    https://dubas.pro/c/?1c949d969e5bb32...VHnaLVQKphep1B

    You should remove unique parameters like id's and it'll work Also remove other useless params.
    It's working for 100% because i'm using it in my company EspoCRM

    Comment


    • #3
      Can you give me example of using itemList in espocrm. Cause I can't find it in documentation.

      Thank you

      Comment


      • #4
        smartinsar did you checked my link? There is itemList param with items.

        Comment


        • #5
          emillod sorry, I've meant code example, not json structure. I want to know how to get this itemList for each order that I have and send using httpRequest at Workflows.
          I need something like foreach in php I guess or maybe EspoCRM has own fucntion for it.

          Comment


          • #6
            You should use php array and then encode it to json. Here you have example how php array looks: https://dubas.pro/c/?d7625deb73e1985...zVxbFsvJvzvC1K
            Then you have to send it through cURL.

            Comment


            • #7
              Ok, thank you a lot for help.

              Comment

              Working...
              X