Chilkat Online Tools

Foxpro / Salesforce Platform APIs / Create a Record

Back to Collection Items

LOCAL loHttp
LOCAL lnSuccess
LOCAL loJson
LOCAL loResp
LOCAL loSbResponseBody
LOCAL loJResp
LOCAL lnRespStatusCode
LOCAL lcApiName
LOCAL lcETag
LOCAL lcDisplayValue
LOCAL lcValue
LOCAL lcActive__cDisplayValue
LOCAL lcActive__cValue
LOCAL lcAnnualRevenueDisplayValue
LOCAL lcAnnualRevenueValue
LOCAL lcBillingCityDisplayValue
LOCAL lcBillingCityValue
LOCAL lcBillingCountryDisplayValue
LOCAL lcBillingCountryValue
LOCAL lcBillingPostalCodeDisplayValue
LOCAL lcBillingPostalCodeValue
LOCAL lcBillingStateDisplayValue
LOCAL lcBillingStateValue
LOCAL lcBillingStreetDisplayValue
LOCAL lcBillingStreetValue
LOCAL lcCreatedByDisplayValue
LOCAL lcApiName
LOCAL lcETag
LOCAL lcIdDisplayValue
LOCAL lcIdValue
LOCAL lcNameDisplayValue
LOCAL lcNameValue
LOCAL lcId
LOCAL lcLastModifiedById
LOCAL lcLastModifiedDate
LOCAL lcRecordTypeId
LOCAL lcRecordTypeInfo
LOCAL lcSystemModstamp
LOCAL lnWeakEtag
LOCAL lcCreatedByIdDisplayValue
LOCAL lcCreatedByIdValue
LOCAL lcCreatedDateDisplayValue
LOCAL lcCreatedDateValue
LOCAL lcCustomerPriority__cDisplayValue
LOCAL lcCustomerPriority__cValue
LOCAL lcDescriptionDisplayValue
LOCAL lcDescriptionValue
LOCAL lcFaxDisplayValue
LOCAL lcFaxValue
LOCAL lcIndustryDisplayValue
LOCAL lcIndustryValue
LOCAL lcLastModifiedByDisplayValue
LOCAL lcValueApiName
LOCAL lcValueETag
LOCAL lcValueId
LOCAL lcValueLastModifiedById
LOCAL lcValueLastModifiedDate
LOCAL lcValueRecordTypeId
LOCAL lcValueRecordTypeInfo
LOCAL lcValueSystemModstamp
LOCAL lnValueWeakEtag
LOCAL lcLastModifiedByIdDisplayValue
LOCAL lcLastModifiedByIdValue
LOCAL lcLastModifiedDateDisplayValue
LOCAL lcLastModifiedDateValue
LOCAL lcNumberOfEmployeesDisplayValue
LOCAL lcNumberOfEmployeesValue
LOCAL lcNumberofLocations__cDisplayValue
LOCAL lcNumberofLocations__cValue
LOCAL lcOwnerDisplayValue
LOCAL lcOwnerIdDisplayValue
LOCAL lcOwnerIdValue
LOCAL lcOwnershipDisplayValue
LOCAL lcOwnershipValue
LOCAL lcParentDisplayValue
LOCAL lcParentValue
LOCAL lcParentIdDisplayValue
LOCAL lcParentIdValue
LOCAL lcPhoneDisplayValue
LOCAL lcPhoneValue
LOCAL lcRatingDisplayValue
LOCAL lcRatingValue
LOCAL lcSLAExpirationDate__cDisplayValue
LOCAL lcSLAExpirationDate__cValue
LOCAL lcSLASerialNumber__cDisplayValue
LOCAL lcSLASerialNumber__cValue
LOCAL lcSLA__cDisplayValue
LOCAL lcSLA__cValue
LOCAL lcShippingCityDisplayValue
LOCAL lcShippingCityValue
LOCAL lcShippingCountryDisplayValue
LOCAL lcShippingCountryValue
LOCAL lcShippingPostalCodeDisplayValue
LOCAL lcShippingPostalCodeValue
LOCAL lcShippingStateDisplayValue
LOCAL lcShippingStateValue
LOCAL lcShippingStreetDisplayValue
LOCAL lcShippingStreetValue
LOCAL lcSicDisplayValue
LOCAL lcSicValue
LOCAL lcSiteDisplayValue
LOCAL lcSiteValue
LOCAL lcTickerSymbolDisplayValue
LOCAL lcTickerSymbolValue
LOCAL lcTypeDisplayValue
LOCAL lcTypeValue
LOCAL lcUpsellOpportunity__cDisplayValue
LOCAL lcUpsellOpportunity__cValue
LOCAL lcWebsiteDisplayValue
LOCAL lcWebsiteValue
LOCAL lcId
LOCAL lcLastModifiedById
LOCAL lcLastModifiedDate
LOCAL lcRecordTypeId
LOCAL lcRecordTypeInfo
LOCAL lcSystemModstamp
LOCAL lnWeakEtag

* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http')
loHttp = CreateObject('Chilkat.Http')

* Use this online tool to generate code from sample JSON: Generate Code to Create JSON

* The following JSON is sent in the request body.

* {
*   "allowSaveOnDuplicate": false,
*   "apiName": "Object",
*   "fields": {
*     "FieldAPIName": "FieldValue"
*   }
* }

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJson = CreateObject('Chilkat.JsonObject')
loJson.UpdateBool("allowSaveOnDuplicate",0)
loJson.UpdateString("apiName","Object")
loJson.UpdateString("fields.FieldAPIName","FieldValue")

* Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"
loHttp.SetRequestHeader("Content-Type","application/json")

loResp = loHttp.PostJson3("https://domain.com/services/data/v{{version}}/ui-api/records","application/json",loJson)
IF (loHttp.LastMethodSuccess = 0) THEN
    ? loHttp.LastErrorText
    RELEASE loHttp
    RELEASE loJson
    CANCEL
ENDIF

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder')
loSbResponseBody = CreateObject('Chilkat.StringBuilder')
loResp.GetBodySb(loSbResponseBody)

* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJResp = CreateObject('Chilkat.JsonObject')
loJResp.LoadSb(loSbResponseBody)
loJResp.EmitCompact = 0

? "Response Body:"
? loJResp.Emit()

lnRespStatusCode = loResp.StatusCode
? "Response Status Code = " + STR(lnRespStatusCode)
IF (lnRespStatusCode >= 400) THEN
    ? "Response Header:"
    ? loResp.Header
    ? "Failed."
    RELEASE loResp
    RELEASE loHttp
    RELEASE loJson
    RELEASE loSbResponseBody
    RELEASE loJResp
    CANCEL
ENDIF

RELEASE loResp

* Sample JSON response:
* (Sample code for parsing the JSON response is shown below)

* {
*   "apiName": "Account",
*   "childRelationships": {},
*   "eTag": "057ae0953591faed613c5e19a086f7a8",
*   "fields": {
*     "AccountNumber": {
*       "displayValue": null,
*       "value": null
*     },
*     "Active__c": {
*       "displayValue": null,
*       "value": null
*     },
*     "AnnualRevenue": {
*       "displayValue": null,
*       "value": null
*     },
*     "BillingCity": {
*       "displayValue": null,
*       "value": null
*     },
*     "BillingCountry": {
*       "displayValue": null,
*       "value": null
*     },
*     "BillingPostalCode": {
*       "displayValue": null,
*       "value": null
*     },
*     "BillingState": {
*       "displayValue": null,
*       "value": null
*     },
*     "BillingStreet": {
*       "displayValue": null,
*       "value": null
*     },
*     "CreatedBy": {
*       "displayValue": "Philippe Ozil",
*       "value": {
*         "apiName": "User",
*         "childRelationships": {},
*         "eTag": "cc07f7ef1b08ddbd75074c69512dd388",
*         "fields": {
*           "Id": {
*             "displayValue": null,
*             "value": "005B0000003TOI6IAO"
*           },
*           "Name": {
*             "displayValue": null,
*             "value": "Philippe Ozil"
*           }
*         },
*         "id": "005B0000003TOI6IAO",
*         "lastModifiedById": "005B0000003TOI6IAO",
*         "lastModifiedDate": "2023-02-02T10:32:12.000Z",
*         "recordTypeId": null,
*         "recordTypeInfo": null,
*         "systemModstamp": "2023-09-27T15:47:51.000Z",
*         "weakEtag": 1695829671000
*       }
*     },
*     "CreatedById": {
*       "displayValue": null,
*       "value": "005B0000003TOI6IAO"
*     },
*     "CreatedDate": {
*       "displayValue": "27/09/2023 18:01",
*       "value": "2023-09-27T16:01:14.000Z"
*     },
*     "CustomerPriority__c": {
*       "displayValue": null,
*       "value": null
*     },
*     "Description": {
*       "displayValue": null,
*       "value": null
*     },
*     "Fax": {
*       "displayValue": null,
*       "value": null
*     },
*     "Industry": {
*       "displayValue": null,
*       "value": null
*     },
*     "LastModifiedBy": {
*       "displayValue": "Philippe Ozil",
*       "value": {
*         "apiName": "User",
*         "childRelationships": {},
*         "eTag": "cc07f7ef1b08ddbd75074c69512dd388",
*         "fields": {
*           "Id": {
*             "displayValue": null,
*             "value": "005B0000003TOI6IAO"
*           },
*           "Name": {
*             "displayValue": null,
*             "value": "Philippe Ozil"
*           }
*         },
*         "id": "005B0000003TOI6IAO",
*         "lastModifiedById": "005B0000003TOI6IAO",
*         "lastModifiedDate": "2023-02-02T10:32:12.000Z",
*         "recordTypeId": null,
*         "recordTypeInfo": null,
*         "systemModstamp": "2023-09-27T15:47:51.000Z",
*         "weakEtag": 1695829671000
*       }
*     },
*     "LastModifiedById": {
*       "displayValue": null,
*       "value": "005B0000003TOI6IAO"
*     },
*     "LastModifiedDate": {
*       "displayValue": "27/09/2023 18:01",
*       "value": "2023-09-27T16:01:14.000Z"
*     },
*     "Name": {
*       "displayValue": null,
*       "value": "My New Account"
*     },
*     "NumberOfEmployees": {
*       "displayValue": null,
*       "value": null
*     },
*     "NumberofLocations__c": {
*       "displayValue": null,
*       "value": null
*     },
*     "Owner": {
*       "displayValue": "Philippe Ozil",
*       "value": {
*         "apiName": "User",
*         "childRelationships": {},
*         "eTag": "cc07f7ef1b08ddbd75074c69512dd388",
*         "fields": {
*           "Id": {
*             "displayValue": null,
*             "value": "005B0000003TOI6IAO"
*           },
*           "Name": {
*             "displayValue": null,
*             "value": "Philippe Ozil"
*           }
*         },
*         "id": "005B0000003TOI6IAO",
*         "lastModifiedById": "005B0000003TOI6IAO",
*         "lastModifiedDate": "2023-02-02T10:32:12.000Z",
*         "recordTypeId": null,
*         "recordTypeInfo": null,
*         "systemModstamp": "2023-09-27T15:47:51.000Z",
*         "weakEtag": 1695829671000
*       }
*     },
*     "OwnerId": {
*       "displayValue": null,
*       "value": "005B0000003TOI6IAO"
*     },
*     "Ownership": {
*       "displayValue": null,
*       "value": null
*     },
*     "Parent": {
*       "displayValue": null,
*       "value": null
*     },
*     "ParentId": {
*       "displayValue": null,
*       "value": null
*     },
*     "Phone": {
*       "displayValue": null,
*       "value": null
*     },
*     "Rating": {
*       "displayValue": null,
*       "value": null
*     },
*     "SLAExpirationDate__c": {
*       "displayValue": null,
*       "value": null
*     },
*     "SLASerialNumber__c": {
*       "displayValue": null,
*       "value": null
*     },
*     "SLA__c": {
*       "displayValue": null,
*       "value": null
*     },
*     "ShippingCity": {
*       "displayValue": null,
*       "value": null
*     },
*     "ShippingCountry": {
*       "displayValue": null,
*       "value": null
*     },
*     "ShippingPostalCode": {
*       "displayValue": null,
*       "value": null
*     },
*     "ShippingState": {
*       "displayValue": null,
*       "value": null
*     },
*     "ShippingStreet": {
*       "displayValue": null,
*       "value": null
*     },
*     "Sic": {
*       "displayValue": null,
*       "value": null
*     },
*     "Site": {
*       "displayValue": null,
*       "value": null
*     },
*     "TickerSymbol": {
*       "displayValue": null,
*       "value": null
*     },
*     "Type": {
*       "displayValue": null,
*       "value": null
*     },
*     "UpsellOpportunity__c": {
*       "displayValue": null,
*       "value": null
*     },
*     "Website": {
*       "displayValue": null,
*       "value": null
*     }
*   },
*   "id": "0011Q00002Z2P5jQAF",
*   "lastModifiedById": "005B0000003TOI6IAO",
*   "lastModifiedDate": "2023-09-27T16:01:14.000Z",
*   "recordTypeId": "012000000000000AAA",
*   "recordTypeInfo": null,
*   "systemModstamp": "2023-09-27T16:01:14.000Z",
*   "weakEtag": 1695830474000
* }

* Sample code for parsing the JSON response...
* Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

lcApiName = loJResp.StringOf("apiName")
lcETag = loJResp.StringOf("eTag")
lcDisplayValue = loJResp.StringOf("fields.AccountNumber.displayValue")
lcValue = loJResp.StringOf("fields.AccountNumber.value")
lcActive__cDisplayValue = loJResp.StringOf("fields.Active__c.displayValue")
lcActive__cValue = loJResp.StringOf("fields.Active__c.value")
lcAnnualRevenueDisplayValue = loJResp.StringOf("fields.AnnualRevenue.displayValue")
lcAnnualRevenueValue = loJResp.StringOf("fields.AnnualRevenue.value")
lcBillingCityDisplayValue = loJResp.StringOf("fields.BillingCity.displayValue")
lcBillingCityValue = loJResp.StringOf("fields.BillingCity.value")
lcBillingCountryDisplayValue = loJResp.StringOf("fields.BillingCountry.displayValue")
lcBillingCountryValue = loJResp.StringOf("fields.BillingCountry.value")
lcBillingPostalCodeDisplayValue = loJResp.StringOf("fields.BillingPostalCode.displayValue")
lcBillingPostalCodeValue = loJResp.StringOf("fields.BillingPostalCode.value")
lcBillingStateDisplayValue = loJResp.StringOf("fields.BillingState.displayValue")
lcBillingStateValue = loJResp.StringOf("fields.BillingState.value")
lcBillingStreetDisplayValue = loJResp.StringOf("fields.BillingStreet.displayValue")
lcBillingStreetValue = loJResp.StringOf("fields.BillingStreet.value")
lcCreatedByDisplayValue = loJResp.StringOf("fields.CreatedBy.displayValue")
lcApiName = loJResp.StringOf("fields.CreatedBy.value.apiName")
lcETag = loJResp.StringOf("fields.CreatedBy.value.eTag")
lcIdDisplayValue = loJResp.StringOf("fields.CreatedBy.value.fields.Id.displayValue")
lcIdValue = loJResp.StringOf("fields.CreatedBy.value.fields.Id.value")
lcNameDisplayValue = loJResp.StringOf("fields.CreatedBy.value.fields.Name.displayValue")
lcNameValue = loJResp.StringOf("fields.CreatedBy.value.fields.Name.value")
lcId = loJResp.StringOf("fields.CreatedBy.value.id")
lcLastModifiedById = loJResp.StringOf("fields.CreatedBy.value.lastModifiedById")
lcLastModifiedDate = loJResp.StringOf("fields.CreatedBy.value.lastModifiedDate")
lcRecordTypeId = loJResp.StringOf("fields.CreatedBy.value.recordTypeId")
lcRecordTypeInfo = loJResp.StringOf("fields.CreatedBy.value.recordTypeInfo")
lcSystemModstamp = loJResp.StringOf("fields.CreatedBy.value.systemModstamp")
lnWeakEtag = loJResp.IntOf("fields.CreatedBy.value.weakEtag")
lcCreatedByIdDisplayValue = loJResp.StringOf("fields.CreatedById.displayValue")
lcCreatedByIdValue = loJResp.StringOf("fields.CreatedById.value")
lcCreatedDateDisplayValue = loJResp.StringOf("fields.CreatedDate.displayValue")
lcCreatedDateValue = loJResp.StringOf("fields.CreatedDate.value")
lcCustomerPriority__cDisplayValue = loJResp.StringOf("fields.CustomerPriority__c.displayValue")
lcCustomerPriority__cValue = loJResp.StringOf("fields.CustomerPriority__c.value")
lcDescriptionDisplayValue = loJResp.StringOf("fields.Description.displayValue")
lcDescriptionValue = loJResp.StringOf("fields.Description.value")
lcFaxDisplayValue = loJResp.StringOf("fields.Fax.displayValue")
lcFaxValue = loJResp.StringOf("fields.Fax.value")
lcIndustryDisplayValue = loJResp.StringOf("fields.Industry.displayValue")
lcIndustryValue = loJResp.StringOf("fields.Industry.value")
lcLastModifiedByDisplayValue = loJResp.StringOf("fields.LastModifiedBy.displayValue")
lcValueApiName = loJResp.StringOf("fields.LastModifiedBy.value.apiName")
lcValueETag = loJResp.StringOf("fields.LastModifiedBy.value.eTag")
lcIdDisplayValue = loJResp.StringOf("fields.LastModifiedBy.value.fields.Id.displayValue")
lcIdValue = loJResp.StringOf("fields.LastModifiedBy.value.fields.Id.value")
lcNameDisplayValue = loJResp.StringOf("fields.LastModifiedBy.value.fields.Name.displayValue")
lcNameValue = loJResp.StringOf("fields.LastModifiedBy.value.fields.Name.value")
lcValueId = loJResp.StringOf("fields.LastModifiedBy.value.id")
lcValueLastModifiedById = loJResp.StringOf("fields.LastModifiedBy.value.lastModifiedById")
lcValueLastModifiedDate = loJResp.StringOf("fields.LastModifiedBy.value.lastModifiedDate")
lcValueRecordTypeId = loJResp.StringOf("fields.LastModifiedBy.value.recordTypeId")
lcValueRecordTypeInfo = loJResp.StringOf("fields.LastModifiedBy.value.recordTypeInfo")
lcValueSystemModstamp = loJResp.StringOf("fields.LastModifiedBy.value.systemModstamp")
lnValueWeakEtag = loJResp.IntOf("fields.LastModifiedBy.value.weakEtag")
lcLastModifiedByIdDisplayValue = loJResp.StringOf("fields.LastModifiedById.displayValue")
lcLastModifiedByIdValue = loJResp.StringOf("fields.LastModifiedById.value")
lcLastModifiedDateDisplayValue = loJResp.StringOf("fields.LastModifiedDate.displayValue")
lcLastModifiedDateValue = loJResp.StringOf("fields.LastModifiedDate.value")
lcNameDisplayValue = loJResp.StringOf("fields.Name.displayValue")
lcNameValue = loJResp.StringOf("fields.Name.value")
lcNumberOfEmployeesDisplayValue = loJResp.StringOf("fields.NumberOfEmployees.displayValue")
lcNumberOfEmployeesValue = loJResp.StringOf("fields.NumberOfEmployees.value")
lcNumberofLocations__cDisplayValue = loJResp.StringOf("fields.NumberofLocations__c.displayValue")
lcNumberofLocations__cValue = loJResp.StringOf("fields.NumberofLocations__c.value")
lcOwnerDisplayValue = loJResp.StringOf("fields.Owner.displayValue")
lcValueApiName = loJResp.StringOf("fields.Owner.value.apiName")
lcValueETag = loJResp.StringOf("fields.Owner.value.eTag")
lcIdDisplayValue = loJResp.StringOf("fields.Owner.value.fields.Id.displayValue")
lcIdValue = loJResp.StringOf("fields.Owner.value.fields.Id.value")
lcNameDisplayValue = loJResp.StringOf("fields.Owner.value.fields.Name.displayValue")
lcNameValue = loJResp.StringOf("fields.Owner.value.fields.Name.value")
lcValueId = loJResp.StringOf("fields.Owner.value.id")
lcValueLastModifiedById = loJResp.StringOf("fields.Owner.value.lastModifiedById")
lcValueLastModifiedDate = loJResp.StringOf("fields.Owner.value.lastModifiedDate")
lcValueRecordTypeId = loJResp.StringOf("fields.Owner.value.recordTypeId")
lcValueRecordTypeInfo = loJResp.StringOf("fields.Owner.value.recordTypeInfo")
lcValueSystemModstamp = loJResp.StringOf("fields.Owner.value.systemModstamp")
lnValueWeakEtag = loJResp.IntOf("fields.Owner.value.weakEtag")
lcOwnerIdDisplayValue = loJResp.StringOf("fields.OwnerId.displayValue")
lcOwnerIdValue = loJResp.StringOf("fields.OwnerId.value")
lcOwnershipDisplayValue = loJResp.StringOf("fields.Ownership.displayValue")
lcOwnershipValue = loJResp.StringOf("fields.Ownership.value")
lcParentDisplayValue = loJResp.StringOf("fields.Parent.displayValue")
lcParentValue = loJResp.StringOf("fields.Parent.value")
lcParentIdDisplayValue = loJResp.StringOf("fields.ParentId.displayValue")
lcParentIdValue = loJResp.StringOf("fields.ParentId.value")
lcPhoneDisplayValue = loJResp.StringOf("fields.Phone.displayValue")
lcPhoneValue = loJResp.StringOf("fields.Phone.value")
lcRatingDisplayValue = loJResp.StringOf("fields.Rating.displayValue")
lcRatingValue = loJResp.StringOf("fields.Rating.value")
lcSLAExpirationDate__cDisplayValue = loJResp.StringOf("fields.SLAExpirationDate__c.displayValue")
lcSLAExpirationDate__cValue = loJResp.StringOf("fields.SLAExpirationDate__c.value")
lcSLASerialNumber__cDisplayValue = loJResp.StringOf("fields.SLASerialNumber__c.displayValue")
lcSLASerialNumber__cValue = loJResp.StringOf("fields.SLASerialNumber__c.value")
lcSLA__cDisplayValue = loJResp.StringOf("fields.SLA__c.displayValue")
lcSLA__cValue = loJResp.StringOf("fields.SLA__c.value")
lcShippingCityDisplayValue = loJResp.StringOf("fields.ShippingCity.displayValue")
lcShippingCityValue = loJResp.StringOf("fields.ShippingCity.value")
lcShippingCountryDisplayValue = loJResp.StringOf("fields.ShippingCountry.displayValue")
lcShippingCountryValue = loJResp.StringOf("fields.ShippingCountry.value")
lcShippingPostalCodeDisplayValue = loJResp.StringOf("fields.ShippingPostalCode.displayValue")
lcShippingPostalCodeValue = loJResp.StringOf("fields.ShippingPostalCode.value")
lcShippingStateDisplayValue = loJResp.StringOf("fields.ShippingState.displayValue")
lcShippingStateValue = loJResp.StringOf("fields.ShippingState.value")
lcShippingStreetDisplayValue = loJResp.StringOf("fields.ShippingStreet.displayValue")
lcShippingStreetValue = loJResp.StringOf("fields.ShippingStreet.value")
lcSicDisplayValue = loJResp.StringOf("fields.Sic.displayValue")
lcSicValue = loJResp.StringOf("fields.Sic.value")
lcSiteDisplayValue = loJResp.StringOf("fields.Site.displayValue")
lcSiteValue = loJResp.StringOf("fields.Site.value")
lcTickerSymbolDisplayValue = loJResp.StringOf("fields.TickerSymbol.displayValue")
lcTickerSymbolValue = loJResp.StringOf("fields.TickerSymbol.value")
lcTypeDisplayValue = loJResp.StringOf("fields.Type.displayValue")
lcTypeValue = loJResp.StringOf("fields.Type.value")
lcUpsellOpportunity__cDisplayValue = loJResp.StringOf("fields.UpsellOpportunity__c.displayValue")
lcUpsellOpportunity__cValue = loJResp.StringOf("fields.UpsellOpportunity__c.value")
lcWebsiteDisplayValue = loJResp.StringOf("fields.Website.displayValue")
lcWebsiteValue = loJResp.StringOf("fields.Website.value")
lcId = loJResp.StringOf("id")
lcLastModifiedById = loJResp.StringOf("lastModifiedById")
lcLastModifiedDate = loJResp.StringOf("lastModifiedDate")
lcRecordTypeId = loJResp.StringOf("recordTypeId")
lcRecordTypeInfo = loJResp.StringOf("recordTypeInfo")
lcSystemModstamp = loJResp.StringOf("systemModstamp")
lnWeakEtag = loJResp.IntOf("weakEtag")

RELEASE loHttp
RELEASE loJson
RELEASE loSbResponseBody
RELEASE loJResp

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: application/json"
	-d '{
    "allowSaveOnDuplicate": false,
    "apiName": "Object",
    "fields": {
        "FieldAPIName": "FieldValue"
    }
}'
https://domain.com/services/data/v{{version}}/ui-api/records

Postman Collection Item JSON

{
  "name": "Create a Record",
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "exec": [
          ""
        ],
        "type": "text/javascript"
      }
    }
  ],
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "application/json",
        "type": "text"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n    \"allowSaveOnDuplicate\": false,\n    \"apiName\": \"Object\",\n    \"fields\": {\n        \"FieldAPIName\": \"FieldValue\"\n    }\n}"
    },
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/ui-api/records",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "ui-api",
        "records"
      ]
    },
    "description": "Create a record. First, make a request to the Clone Record Default or Create Record Default resources to get the default metadata and data for the record.\nAs of API version 43.0, if you pass read-only fields in a request body, the response is an Error with Output."
  },
  "response": [
    {
      "name": "Create a Record",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n    \"allowSaveOnDuplicate\": false,\n    \"apiName\": \"Account\",\n    \"fields\": {\n        \"Name\": \"My New Account\"\n    }\n}"
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/ui-api/records",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "ui-api",
            "records"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Wed, 27 Sep 2023 16:01:13 GMT"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000; includeSubDomains"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-XSS-Protection",
          "value": "1; mode=block"
        },
        {
          "key": "X-Robots-Tag",
          "value": "none"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache,must-revalidate,max-age=0,no-store,private"
        },
        {
          "key": "ETag",
          "value": "\"057ae0953591faed613c5e19a086f7a8--gzip\""
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=UTF-8"
        },
        {
          "key": "Vary",
          "value": "Accept-Encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"apiName\": \"Account\",\n    \"childRelationships\": {},\n    \"eTag\": \"057ae0953591faed613c5e19a086f7a8\",\n    \"fields\": {\n        \"AccountNumber\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Active__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"AnnualRevenue\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingCity\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingCountry\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingPostalCode\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingState\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"BillingStreet\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"CreatedBy\": {\n            \"displayValue\": \"Philippe Ozil\",\n            \"value\": {\n                \"apiName\": \"User\",\n                \"childRelationships\": {},\n                \"eTag\": \"cc07f7ef1b08ddbd75074c69512dd388\",\n                \"fields\": {\n                    \"Id\": {\n                        \"displayValue\": null,\n                        \"value\": \"005B0000003TOI6IAO\"\n                    },\n                    \"Name\": {\n                        \"displayValue\": null,\n                        \"value\": \"Philippe Ozil\"\n                    }\n                },\n                \"id\": \"005B0000003TOI6IAO\",\n                \"lastModifiedById\": \"005B0000003TOI6IAO\",\n                \"lastModifiedDate\": \"2023-02-02T10:32:12.000Z\",\n                \"recordTypeId\": null,\n                \"recordTypeInfo\": null,\n                \"systemModstamp\": \"2023-09-27T15:47:51.000Z\",\n                \"weakEtag\": 1695829671000\n            }\n        },\n        \"CreatedById\": {\n            \"displayValue\": null,\n            \"value\": \"005B0000003TOI6IAO\"\n        },\n        \"CreatedDate\": {\n            \"displayValue\": \"27/09/2023 18:01\",\n            \"value\": \"2023-09-27T16:01:14.000Z\"\n        },\n        \"CustomerPriority__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Description\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Fax\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Industry\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"LastModifiedBy\": {\n            \"displayValue\": \"Philippe Ozil\",\n            \"value\": {\n                \"apiName\": \"User\",\n                \"childRelationships\": {},\n                \"eTag\": \"cc07f7ef1b08ddbd75074c69512dd388\",\n                \"fields\": {\n                    \"Id\": {\n                        \"displayValue\": null,\n                        \"value\": \"005B0000003TOI6IAO\"\n                    },\n                    \"Name\": {\n                        \"displayValue\": null,\n                        \"value\": \"Philippe Ozil\"\n                    }\n                },\n                \"id\": \"005B0000003TOI6IAO\",\n                \"lastModifiedById\": \"005B0000003TOI6IAO\",\n                \"lastModifiedDate\": \"2023-02-02T10:32:12.000Z\",\n                \"recordTypeId\": null,\n                \"recordTypeInfo\": null,\n                \"systemModstamp\": \"2023-09-27T15:47:51.000Z\",\n                \"weakEtag\": 1695829671000\n            }\n        },\n        \"LastModifiedById\": {\n            \"displayValue\": null,\n            \"value\": \"005B0000003TOI6IAO\"\n        },\n        \"LastModifiedDate\": {\n            \"displayValue\": \"27/09/2023 18:01\",\n            \"value\": \"2023-09-27T16:01:14.000Z\"\n        },\n        \"Name\": {\n            \"displayValue\": null,\n            \"value\": \"My New Account\"\n        },\n        \"NumberOfEmployees\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"NumberofLocations__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Owner\": {\n            \"displayValue\": \"Philippe Ozil\",\n            \"value\": {\n                \"apiName\": \"User\",\n                \"childRelationships\": {},\n                \"eTag\": \"cc07f7ef1b08ddbd75074c69512dd388\",\n                \"fields\": {\n                    \"Id\": {\n                        \"displayValue\": null,\n                        \"value\": \"005B0000003TOI6IAO\"\n                    },\n                    \"Name\": {\n                        \"displayValue\": null,\n                        \"value\": \"Philippe Ozil\"\n                    }\n                },\n                \"id\": \"005B0000003TOI6IAO\",\n                \"lastModifiedById\": \"005B0000003TOI6IAO\",\n                \"lastModifiedDate\": \"2023-02-02T10:32:12.000Z\",\n                \"recordTypeId\": null,\n                \"recordTypeInfo\": null,\n                \"systemModstamp\": \"2023-09-27T15:47:51.000Z\",\n                \"weakEtag\": 1695829671000\n            }\n        },\n        \"OwnerId\": {\n            \"displayValue\": null,\n            \"value\": \"005B0000003TOI6IAO\"\n        },\n        \"Ownership\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Parent\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ParentId\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Phone\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Rating\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"SLAExpirationDate__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"SLASerialNumber__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"SLA__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingCity\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingCountry\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingPostalCode\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingState\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"ShippingStreet\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Sic\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Site\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"TickerSymbol\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Type\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"UpsellOpportunity__c\": {\n            \"displayValue\": null,\n            \"value\": null\n        },\n        \"Website\": {\n            \"displayValue\": null,\n            \"value\": null\n        }\n    },\n    \"id\": \"0011Q00002Z2P5jQAF\",\n    \"lastModifiedById\": \"005B0000003TOI6IAO\",\n    \"lastModifiedDate\": \"2023-09-27T16:01:14.000Z\",\n    \"recordTypeId\": \"012000000000000AAA\",\n    \"recordTypeInfo\": null,\n    \"systemModstamp\": \"2023-09-27T16:01:14.000Z\",\n    \"weakEtag\": 1695830474000\n}"
    }
  ]
}