Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Unable to Implement GET API for MXAPIRECEIPT in eMaximo

    Posted Tue May 27, 2025 10:58 AM

    Hi all,

    I'm struggling to implement the GET API for the MXAPIRECEIPT object structure in eMaximo to get ExternalrefID and SourceID. I initially tried a GET request to retrieve specific PO data, but not able to do proper call, now that I need a proper GET call. Below are the details of my setup and the issues I'm facing.

    My Current API Call

    Questions

    Any example to get EXTERNALREFID and SOURCEID of specific PO Number?



    ------------------------------
    Rudra Uppe
    ------------------------------


  • 2.  RE: Unable to Implement GET API for MXAPIRECEIPT in eMaximo

    Posted Tue May 27, 2025 05:13 PM

    The best way to get receipts for a given PO would be to query the MXAPIPO object structure. Something like this should work:

    GET https://xyz-test.emaximo.com/maximo/oslc/os/mxapipo?lean=1&oslc.pageSize=10&oslc.select=ponum,description,receipts,revisionnum,siteid,rel.parentmatrectrans{*}&oslc.where=ponum="1M0013628"

    Hope this helps,



    ------------------------------
    Alex Walter
    CIO
    A3J Group
    Tampa FL
    ------------------------------



  • 3.  RE: Unable to Implement GET API for MXAPIRECEIPT in eMaximo

    Posted Tue May 27, 2025 11:52 PM

    Hi Alex,

    Thanks for your earlier response regarding the use of the MXAPIPO object structure to retrieve receipt details for a given PO number. I was able to get the API working as suggested.

    However, the response does not include the fields externalrefid and sourcesysid, which are essential for our use case [to create new service receipt record under "Purchasing > Receiving > Service Receipt > New row"]. If These two fields are not mandatory then can you please suggest workaround to create new service receipt. 

    I've also tried explicitly adding them to the oslc.select parameter, but they still do not appear in the output.



    ------------------------------
    Rudra Uppe
    ------------------------------



  • 4.  RE: Unable to Implement GET API for MXAPIRECEIPT in eMaximo

    Posted Wed May 28, 2025 07:32 AM

    Rudra,

    For api calls, if the field that you are selecting via the oslc.select is NULL, the api will not include it in the response. As for why it is null, it would presumably be because the record was created from within Maximo.

    The externalrefid and sourcesysid are meant to be provided by the caller when creating receipts via api. These fields are so that you could look up the corresponding record in another system that called the api to create the receipt. Thus, YOU must determine and provide the values for SOURCESYSID, and EXTERNALREFID. Maximo is not going to generate or provide these values for you.

    As an example, we have some records in our MAS instance that were converted from legacy records. In the sourcesysid we put an identifier of that old system (PMMS). In the externalrefid we have the identifier of that receipt in the PMMS system.

    As another example, when you create receipts from the Maximo Mobile application, the sourcesysid is INVRECEIVE, and the externalrefid is a UUID that was generated by the mobile application.

    So, if you too would like to create receipts via api call, provide a value for the sourcesysid that represents the system from which you are creating the receipts. And provide a UUID or similar for the externalrefid.



    ------------------------------
    Wesley Ellis
    ------------------------------



  • 5.  RE: Unable to Implement GET API for MXAPIRECEIPT in eMaximo

    Posted Wed May 28, 2025 09:34 AM

    @Wesley Ellis is correct. By default the API response skips any NULL value attributes. If the EXTERNALREFID is NULL for any of the PO's receipts that attribute will not appear in the response. This helps reduce the payload size. To force the response to add NULL value attributes, you can use the query parameter _dropnulls=0.

    The EXTERNALREFID and SOURCESYSID attributes are required for the MXAPIRECEIPT object structure to work via REST API, but they are not required if users enter a receipt record manually in the Maximo UI.



    ------------------------------
    Alex Walter
    CIO
    A3J Group
    Tampa FL
    ------------------------------