i

Please enable JavaScript to view this site.

Documentation 8.7

The POST method is used to create a new resource to a collection.

 

It uses the HTTP POST verb.

The url only contains the name of the collection in which a new resource is created.

The values of the new resource attributes are specified in the request body, that is, the configuration declares a "body" clause.

The response body contains the information of the resource identifier created in the form:

name: Name of the resource identifier attribute (idObjectName).

value: Value of the resource identifier attribute (idObjectValue).

dtLastUpdate: Resource creation date.

 

Example: Create an  "Account" form instance.

 

    POST /forms/CRM_ACCOUNT/instances

 

The request body ("body" clause) contains:

 

 

{

 "cbIsPartner": false,

"cdInstanceOwner": "JPerez",

"cdStatus": "Active",

"cdType": "1",

"dsCompany": "Tenaris",

"dsDescription": "",

"dsHolding": "TECHINT",

"dsIndustry": "4",

"dsOwner": "Juan Perez",

"dsSource": "Referred",

"dtOpening": "1540782000000",

 "emails":"",

"flLogo": null,

"idPartnerCompany": null,

"nuIdentifNumber": "30-00000000-5",

"qtAnualRev": "1500000000",

 "qtEmployee": 1000,

"qtScore": 90,

"lsAddress": [

   {

    "lsAddress/dsAddress": "Della Paolera 333",

    "lsAddress/dsCity": "buenos aires",

    "lsAddress/dsCountry": "argentina",

    "lsAddress/dsState": "buenos aires",

    "lsAddress/tpAddress": "1"

   }

 ],

"lsFiles": [

          {

                  "lsFiles/dsFile": null,

                  "_nuSequence": 0

           }

 ],

 

"webSiteLine": [

   {

    "webSiteLine/dsWebsite": "www.tenaris.com",

    "webSiteLine/tpWebsite": "1"

   }

 ],

 "phoneLine": [

   {

    "phoneLine/tpPhone": "1",

    "phoneLine/nrPhone": "01137489236"

   }

 ],

"eMailLine": [

   {

    "eMailLine/tpEmail": "1",

    "eMailLine/dsEmail": "info@tenaris.com"

   }

 ]

}

Send us your comments
Share on X Share on Linkedin Send by Email Print