Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: PFUN-27324

...

The REST API now includes a feature that allows users to perform batch updates on condition records by providing the full key of the records. This functionality enables updates to non-key fields and non-validity period fields, including attributes and integration status fields. Users can leverage this capability to ensure all required attributes are correctly set. The feature utilizes the existing generic REST API endpoint loaddata.

The Condition record set Record Set can be identified by either ID (Example 1) or Name. And as per (Example 2). As per the general functionality of of the loaddata endpoint endpoint, the (non-key, non-validity) attributes not listed in the request are stay untouched.

In the actual request replace , replace CRCIX with  with the correct type depending on the number of keys the itemCondition Record Item(s) have (CRCI1..CRCI12).

Example 1
Anchor
Example_1
Example_1

In this example condition record set , Condition Record Set ID is provided.

Item

Value

Method

POST

URL

{{baseURL}}/pricefx/{{partition}}/loaddata/CRCIX

Request

Code Block
languagejson
{
  "data": {
    "header": [
      "key1",
      "key2",
      "key3",
      "key4",
      "validFrom",
      "validTo",
      "conditionRecordSetId",
      "conditionValue",
      "unitOfMeasure",
      "currency",
      "attribute1",
      "attribute2",
      "attribute31",
      "attribute32"
    ],
    "data": [
      [
        "101",
        "200",
        "300",
        "ZZ",
        "2023-08-31",
        "2026-06-30",
        1,
        1.77,
        "tons",
        "USD",
        "some changed value",
        "some changed value",
        "some changed value",
        "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure"
      ], [
        "110",
        "200",
        "300",
        "ZZ",
        "2024-10-31",
        "2027-03-30",
        1,
        1.77,
        "tons",
        "USD",
        "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure",
        "some changed value",
        "some changed value",
        "some changed value"
      ]
    ]
  }
}

Response

Code Block
languagejson
{
    "response": {
        "node": "pricefx-cluster-app-frontend-9d79b67cd-mdjbx",
        "csrfToken": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjc3JmIiwianRpIjoiMTNKY05XM0plRyIsImlzcyI6ImUyZS1nY3AiLCJleHAiOjE3MzcxNjg5NTF9.piftaQUdF4i8LhGtgdoRkB_ZTZH8tZzIGF2nOD5MV5T7NmbC8HTF4l_54D74CJmXq7tpn4NaC0LiV4P-LNGb5B2_yelyS6cKPa3bLRTjqa0L5Wkg3pm2mkDshNAqVocKkA4xC_N42KaFgARZ214nbZvVJEXp-UBQDGDqsBW01P2mAxpKYOda9lOfOx6E8S8IUolXCZOTsbnVUagJas8DvDNEtgkp5k0lyNBkWQz5pw1i48-4_YsDLE2QvIiRUpoF_zb7GFFGhgjKTohosASG3U79b5p9dURcLS_F4cFRXYzMYvFWBlEXxWMZL8OZbDu982PuutDUdzdeQYryCm0k-A",
        "data": [
            2
        ],
        "status": 0
    }
}

Example 2
Anchor
Example_2
Example_2

In this example condition record set , Condition Record Set Name is provided.

Item

Value

Method

POST

URL

{{baseURL}}/pricefx/{{partition}}/loaddata/CRCIX

Request

Code Block
languagejson
{
  "data": {
    "header": [
      "key1",
      "key2",
      "key3",
      "key4",
      "validFrom",
      "validTo",
      "conditionRecordSetName",
      "conditionValue",
      "unitOfMeasure",
      "currency",
      "attribute1",
      "attribute2",
      "attribute31",
      "attribute32"
    ],
    "data": [
      [
        "101",
        "200",
        "300",
        "ZZ",
        "2023-08-31",
        "2026-06-30",
        "CRSet1",
        1.77,
        "tons",
        "USD",
        "some changed value",
        "some changed value",
        "some changed value",
        "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure"
      ], [
        "110",
        "200",
        "300",
        "ZZ",
        "2024-10-31",
        "2027-03-30",
        "CRSet1",
        1.77,
        "tons",
        "USD",
        "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure",
        "some changed value",
        "some changed value",
        "some changed value"
      ]
    ]
  }
}

Response

Code Block
languagejson
{
    "response": {
        "node": "pricefx-cluster-app-frontend-9d79b67cd-mdjbx",
        "csrfToken": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjc3JmIiwianRpIjoiMTNKY05XM0plRyIsImlzcyI6ImUyZS1nY3AiLCJleHAiOjE3MzcxNjg5NTF9.piftaQUdF4i8LhGtgdoRkB_ZTZH8tZzIGF2nOD5MV5T7NmbC8HTF4l_54D74CJmXq7tpn4NaC0LiV4P-LNGb5B2_yelyS6cKPa3bLRTjqa0L5Wkg3pm2mkDshNAqVocKkA4xC_N42KaFgARZ214nbZvVJEXp-UBQDGDqsBW01P2mAxpKYOda9lOfOx6E8S8IUolXCZOTsbnVUagJas8DvDNEtgkp5k0lyNBkWQz5pw1i48-4_YsDLE2QvIiRUpoF_zb7GFFGhgjKTohosASG3U79b5p9dURcLS_F4cFRXYzMYvFWBlEXxWMZL8OZbDu982PuutDUdzdeQYryCm0k-A",
        "data": [
            2
        ],
        "status": 0
    }
}

...