Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Some info for partners added as they are asking how something works + specified that even CRS name can be used instead of ID

...

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.

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

In request replace CRCIX with correct type depending on number of keys the item(s) have.

Example 1

In this example 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",
        {{CRSid}}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",
        {{CRSid}}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": [
         "120   2
        ],
        "status": 0
    }
}

Example 2

In this example 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",
        "
2025
2023-
10
08-31",
        "2026-
03
06-30",
        
{{CRSid}}
"CRSet1",
        1.
777
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": [
            
0
2
        ],
        "status": 0
    }
}

Info

See also: