Question

UBAQ REST Call from JitterBit Error 400

  • 17 February 2024
  • 0 replies
  • 27 views

I am using JitterBit to do a “PUT BAQ(UBAQ)”.  This is a native endpoint call they provide.  It is the only option for a UBAQ that they offer.  Prior to doing anything in JitterBit I used the Epicor swagger pages to test the UBAQ  here   /EPICORERP/api/help/v1/baq//RFID-UD24(CD)/index#!/OData/update.  I noticed they only have a PATCH but I was under the impression that the JitterBit “POST” would be similar?  In any case, may goal was to call the UBAQ. In Epicor it was configured to only return records in UD24 where Date01 IS NULL.  I set it to only allow updates to the Date01 field as well.  So the user/JitterBit would call the BAQ and provide a list of values that are stored in Key1 .  If there is a Match then update the Date01 filed which is also provided in the request.  This seems to work in the Epicor Swagger.  They provided the input and I filled in as needed and ran it.  The Date01 was updated as expected.  However I did notice that it “ADDED” records that it didn’t find a match more….but I wasn’t going to worry about that yet.  This is the input I used which exactly matched an Existing record in UD24 and updated the Date01 field.

{

  "UD24_Company": "CD",

  "UD24_Date01": "2024-02-20",

  "UD24_Key1": "5A303030303030303033353234373336",

  "UD24_Key2": "",

  "UD24_Key3": "",

  "UD24_Key4": "",

  "UD24_Key5": "",

  "RowMod": "U",

  "SysRowID": "00000000-0000-0000-0000-000000000000",

  "RowIdent": "00000000-0000-0000-0000-000000000000"

}

However in JitterBit I Input this

<?xml version="1.0" encoding="UTF-8"?>

<ns:INPUT xmlns:ns="urn:epicore-req:document:sn:entities">

    <RFID-UD24>

        <UD24_Company>CD</UD24_Company>

        <UD24_Key1>5A303030303030303033353234373336</UD24_Key1>

        <UD24_Key2></UD24_Key2>

        <UD24_Key3></UD24_Key3>

        <UD24_Key4></UD24_Key4>

        <UD24_Key5></UD24_Key5>

        <UD24_RowMod>U</UD24_RowMod>

        <UD24_Date01>02/15/24</UD24_Date01>

        <RowIdent>00000000-0000-0000-0000-000000000000</RowIdent>

        <SysRowID>00000000-0000-0000-0000-000000000000</SysRowID>

        <company>CD</company>

    </RFID-UD24>

</ns:INPUT>

 

This is the response from Epicor in JitterBit is

<?xml version="1.0" encoding="UTF-8"?>
<ns:OUTPUT xmlns:ns="urn:epicore-res:document:sn:entities">
    <RFID-UD24>
        <error>
            <ErrorType>null</ErrorType>
            <HttpStatus>400</HttpStatus>
            <ReasonPhrase>null</ReasonPhrase>
            <ErrorDetails>null</ErrorDetails>
            <ErrorMessage>The request is invalid.</ErrorMessage>
        </error>
    </RFID-UD24>
</ns:OUTPUT>

 

I have played around with the values.  I added “0” to all the keys values in UD24 and then added those to the input with no change.  I also played around with RowIdent and SysRowID.  Nothing seems to change in the JitterBit response from Epicor.  Interestingly however I can reduce the input in the Epicor swagger call to just the company, Date01, and Key1 and I still get the date to Update in UD24. I thought with UD tables you always need all of the Keys field even if you don’t have data in them


0 replies

Be the first to reply!

Reply