How to Process AR Receipt Batch via API

Am using this endpoint to post AR Receipt Batch

http://localhost/Sage300WebApi/v1.0/-/CUHDAT/AR/ARReceiptAndAdjustmentBatches

with this payload upon successfully request, response is returned BatchStatus as "Entered", meanwhile I want to be posted automatically

How can I do so without using a long procedure of entering it as above, using another api to update it as ready to post and finally using another api to process it?

  • Hi  I don't know enough to help, all I can ask is are you doing this via a PATCH operation?  Perhaps PATCH can enter and post it.

    Otherwise it looks like you have to follow up with a small ARPostReceiptsAndAdjustments payload:

    Hopefully someone with more experience will see this. Good luck!

  • 0

    Hi,

    You need to set that record to 'Ready to Post', then send a POST request to the ARPostReceiptsAndAdjustments URI.

    For posting batch 38, something like:

    PATCH: /AR/ARReceiptAndAdjustmentBatches(BatchRecordType='CA',BatchNumber=38)
    BODY:
    {
        "BatchNumber": 38,
        "BatchStatus": "ReadyToPost"
    }

    Then:

    /AR/ARPostReceiptsAndAdjustments('$process')

    With a body of:

    {
      "BatchType": "CA",
      "PostAllBatches": "Donotpostallbatches",
      "PostBatchFrom": 38,
      "PostBatchTo": 38,
      "ActionSelector": "",
      "UpdateOperation": "Unspecified"
    }

  • 0

    Doh, my other post was flagged for abuse. Maybe this will pass:

    Assuming your batch number is 38.

    Set your batch to ReadyToPost:

    PATCH /AR/ARReceiptAndAdjustmentBatches(BatchRecordType='CA',BatchNumber=38)

    BODY:

    {
    "BatchNumber": 38,
    "BatchStatus": "ReadyToPost"
    }

    Then use the Process endpoint:

    POST: /AR/ARPostReceiptsAndAdjustments('$process')

    BODY:

    {
    "BatchType": "CA",
    "PostAllBatches": "Donotpostallbatches",
    "PostBatchFrom": 38,
    "PostBatchTo": 38,
    "ActionSelector": "",
    "UpdateOperation": "Unspecified"
    }

  • 0 in reply to SergioBAM

    Sorry which post,

    I know this method is the three step create, update <set ready to post> ,finally post it.

    I thought the same api used to create can post it like how we process OE invoices via API one field as flag to specify whether to just create order or process it as invoice.

    Sage should optimize their api, I receive thousands receipts from banks daily this method not fast as we want, the api should be optimize in such a way we can create and post via same api.

    Thanks

  • 0 in reply to Tim - Accsys Consulting

    Three steps create, updating <set ready to post> and finally posting, all using 3 different api, was thinking if their is possibility during creating can be a flag to command a system after creation then process/post it

  • 0 in reply to Ramadhan Ngallen

    I missed that part where you wanted to do it in a single hit. There isnt a one step process as far as I know.