cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Commission REST API Error

Ron_Hagan
Product and Topic Expert
Product and Topic Expert
0 Likes
355

A colleague is using the Commission REST API to create a Contract version and is getting the following error in the Response:  {contracts":{"_ERROR_":"TCMP_09011:E: Attempted to modify a read-only value."}}

Unfortunately, the error doesn't tell us which value it's referring to.  Is there a way to determine which field/value is causing the error?

I can attach a copy of the Request Body if that would help.

Thanks in advance!

Ron

Accepted Solutions (1)

Accepted Solutions (1)

LukaKotur
Associate
Associate

Hello @Ron_Hagan,

Since there is no specific information about the payload, I'll treat this as a scenario that is most often the case when we get this error while contracts are being used.

Request cannot skip the first or the last version since the range will be affected in this case and this is strictly forbidden for all api/v2 implementations. Modifying ranges in-between the initial range is expected, and you can modify it as much as you want, you just CANNOT modify the initial range (the earliest start date and the latest end date)

Eg.
Contract has 3 versions:
01-01-2021 - 01-01-2022
01-01-2022 - 01-01.2023
01.01-2023 - 01-01-2150

Initial and global range for this Contract here would be 01-01-2021 to 01-01-2150. While modifying this Contract you can alter it however you want as long as you’re in that global range. Request cannot have a date that is before 01-01-2021 or after 01-01-2150 and BOTH of them have to be inside that POST request (they cannot be skipped).

Another thing to note, request cannot have any date range gaps when sending a POST request to api/v2 as the user will get an error since the application wouldn’t know exactly how to modify the existing versions.

With PUT request you can just send the specific, only modified, version. So, the request don’t need to have every possible version of the Contract.

Answers (0)