You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy Rest API message structure (JSON)

edited Apr 6, 2019 6:44AM in Sales 3 comments

Summary

Problem creating the message structure for OIC

Content

Hi,

I'm using rest API web service to send the message and having a hard time creating the message structure for OIC.

Below is the groovy script and sample payload. The problem is to make the correct hierarchy structure for origSystem as I'm not sure how to handle square and curly brackets.

 

***Groovy:

[delete :
                     [party_id : getAttribute("PartyId"),
                      first_name : getAttribute("PersonFirstName"),
                      last_name : getAttribute("PersonLastName"),
                      middle_name : getAttribute("PersonMiddleName"),
                      ssn : getAttribute("JgzzFiscalCode"),
                      taxId : taxIdValue,
                      origSystem : [
                       [
                        originSystem : origSystem_1
                       ],
                       [
                        originSystem : origSystem_2
                       ]                        
                      ]
                     ]]

 

 

***Sample OIC Payload:

{
   "delete": {
      "party_id": "1234",
      "first_name": "A",
      "last_name": "A",

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!