How it Works SPRICESEARCH Representation

SOLVED

Hi all,

Maybe here there is some one can help us! 

Thanks to all!

https://www.sagecity.com/developer/enterprise-management-api/f/discussions/153320/how-it-works-spricesearch-representation

Sage X3: 2020 V12 P19

Parents
  • +1
    verified answer

    Hello,

    I managed to execute it with this (POST method):
    <server>:8124/api1/x3/erp/<endpoint NAME>/SPRICESEARCH('')/$services/PRICESEARCH?representation=SPRICESEARCH.$edit

    Body (edit the values for your context, SAUREF -> Sales unit):


    {
    "SALFCY": "<SALFCY - mandatory>",
    "STOFCY": "<STOFCY - mandatory>",
    "BPCORD": "<Customer - mandatory>",
    "ITMREF": "<Product - mandatory>",
    "QTYREF": 1,
    "SAUREF":"PCS",
    "PRITYP": 1,
    "DATEREF": "2020-11-13",
    "VACBPR":"",
    "BPAADD":"",
    "VACBPR":""
    }

    What you actually want to do is execute the method, hence you have to call the "service".

    You can check the available methods/links in the $prototypes:
    <server>:8124/api1/x3/erp/<folder>/$prototypes('SPRICESEARCH.$edit') -> I found the /$services/PRICESEARCH here

    EDIT: I used V11. Did some tests with Juliano in V12 with no sucess though...

    Regards,
    Roberto Nascimento

Reply
  • +1
    verified answer

    Hello,

    I managed to execute it with this (POST method):
    <server>:8124/api1/x3/erp/<endpoint NAME>/SPRICESEARCH('')/$services/PRICESEARCH?representation=SPRICESEARCH.$edit

    Body (edit the values for your context, SAUREF -> Sales unit):


    {
    "SALFCY": "<SALFCY - mandatory>",
    "STOFCY": "<STOFCY - mandatory>",
    "BPCORD": "<Customer - mandatory>",
    "ITMREF": "<Product - mandatory>",
    "QTYREF": 1,
    "SAUREF":"PCS",
    "PRITYP": 1,
    "DATEREF": "2020-11-13",
    "VACBPR":"",
    "BPAADD":"",
    "VACBPR":""
    }

    What you actually want to do is execute the method, hence you have to call the "service".

    You can check the available methods/links in the $prototypes:
    <server>:8124/api1/x3/erp/<folder>/$prototypes('SPRICESEARCH.$edit') -> I found the /$services/PRICESEARCH here

    EDIT: I used V11. Did some tests with Juliano in V12 with no sucess though...

    Regards,
    Roberto Nascimento

Children