Skip to Content
Technical Articles
Author's profile photo Antonio Maradiaga

Posting messages to SAP Ariba Cloud Integration Gateway using Postman

In this blog post, I will show you how we can post messages to SAP Ariba Cloud Integration Gateway (CIG) from a REST client like Postman.

Why would we want to post messages directly to SAP Ariba Cloud Integration Gateway (CIG)?

We can simplify/accelerate testing different scenarios by modifying the payload directly, instead of creating multiple objects in the source system, e.g. ERP. This is perfect during development when we want to test different scenarios and will like to understand/test the different conditions taken in consideration when creating objects in SAP Ariba. We also can use this to test customisations in SAP Ariba or custom mappings in CIG.

To post a message to CIG from a REST client we will need the following:

  • SOAP URL of the SAP Ariba solution where the message will be posted to
  • User credentials
  • Sample payload

SOAP URL

The URL where we will POST the message will vary depending on the environment (test / production) and where the is located. The SAP Ariba Cloud Integration Gateway installation guide lists.

⚡ Go ahead and get familiar with the SOAP URLs of the different environments/instances/SAP Ariba solutions – https://help.sap.com/viewer/63a2629582ae40f1b7ff0f8b9b9b1c6f/latest/en-US/95b0402d2d97468088490e7962d218e3.html.

Below a sample of the SOAP URLs to communicate with the European instance of CIG:

SOAP URL for buying:

  • Transactional data – Test instance: https://testacig.ariba.com/cxf/receiveERPP2PSOAP

  • Master data – Test instance: https://testacig.ariba.com/cxf/receiveERPMD

    SOAP URL for sourcing:

    • Transactional data – Test instance: https://testacig.ariba.com/cxf/receiveSOAP
    • Master data – Test instance: https://testacig.ariba.com/cxf/receiveERPMD

    ⚠️ Although Production instance URLs are listed in the link shared before. I want to DISCOURAGE you from posting messages directly to a CIG production instance as this might negatively impact your procurement operations.

    User credentials

    The user credentials that we will need to set in Postman, are the same credentials configured in the ERP or middleware to communicate with CIG. The user credentials (P-user) are generated the first time CIG is activated in SAP Ariba Network or the SAP Ariba solution.

    Sample payload

    To get a sample payload, I recommend extracting a real payload from CIG. This will ensure that we have a valid payload to send in our requests.

    Once we have all the SOAP URL, user credentials and a sample payload of the message we want to send, we can go to Postman and configure a POST request to send the message to CIG.

    ⚡ Go to Postman and create a new request. Select POST as the HTTP method, set the URL of the SAP Ariba solution where we want to post the message, enter the user credentials (Basic Auth).

    POST%20request%20-%20URL%20and%20credentials

    POST request – URL and credentials

    The payload that we will set as the Body of our message will need to be wrapped in a SOAP envelope, as CIG expects a SOAP message. See sample payload below:

    <?xml version = "1.0"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
        <soap:Body>
            <n0:ERPRequisitionRequest xmlns:n0="http://sap.com/xi/ARBCIG1"
                xmlns:prx="urn:sap.com:proxy:XYZ:/1SAI/TASDFF28A5B0ABCDEFG:890"
                xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
                .......
            </n0:ERPRequisitionRequest>
        </soap:Body>
    </soap:Envelope>

     

    ⚡ Now let’s set our sample payload, wrapped in a SOAP envelope, as the Body of the request. Also, set the Content Type to XML and hit Send.

    Request%20body%20and%20content%20type

    Request body and content type

    The response received from SAP Ariba will be similar to the one below.

    Response%20message

    Response message

    ?️ The response payload (<soap:Body/>) is empty because most message are processed asynchronously in CIG.

    The principles explained before are not specific to Postman. Other REST clients, e.g. SoapUI, Insomnia, can be used to post messages to the endpoints above. Now go ahead and send some test messages to CIG to simplify/accelerate your testing.

    Assigned Tags

        2 Comments
        You must be Logged on to comment or reply to a post.
        Author's profile photo Shikha Ghodeshwar
        Shikha Ghodeshwar

        How can we connect postman to Ariba newtork ? For example i want to send the SES staus update on AN via postman ?

        Author's profile photo Varun Vichare
        Varun Vichare

        Hello Antonio,

        Could we send CSV attachments over CIG API ?