Update an Object

post/update/{TypeCode}

Updates an existing object.
Specify fields you want to update in the data property. Only one record can be updated per request (unless batched).

Securitybasic or X-PriceFx-jwt
Request
path Parameters
TypeCode
required
string

The object's type code. See the list of Type Codes.

Request Body schema: application/json

Please note: The update request should contain all old values in the oldValues property (especially the typedId and the version) and all values (along the typedId) you want to update in the data property.

Apart from the version checks, additional integrity checks are performed. E.g. if fields that are part of the business key are changed then it is checked that no other object already is defined with those key(s).

required
object

Enter new field values. Multiple values can be updated. In our example the unitOfMeasure and label properties were updated.

unitOfMeasure
string [ 1 .. 255 ] characters
typedId
required
string non-empty
label
string [ 1 .. 255 ] characters
required
object

Values of the object before the update. Especially important are typedId (to identify the object to update) and version (to detect date inconsistencies).

version
required
number
typedId
required
string non-empty
sku
string [ 1 .. 255 ] characters
label
string [ 1 .. 255 ] characters
unitOfMeasure
string [ 1 .. 255 ] characters
userGroupEdit
string or null [ 1 .. 255 ] characters
userGroupViewDetails
string or null [ 1 .. 255 ] characters
currency
string [ 1 .. 255 ] characters
formulaName
any
image
any
createDate
string non-empty
createdBy
number
lastUpdateDate
string non-empty
lastUpdateBy
number
attribute1
any
attribute2
any
attribute3
any
attribute4
any
attribute5
any
attribute6
any
attribute7
any
attribute8
any
attribute9
any
attribute10
any
attribute11
any
attribute12
any
attribute13
any
attribute14
any
attribute15
any
attribute16
any
attribute17
any
attribute18
any
attribute19
any
attribute20
any
attribute21
any
attribute22
any
attribute23
any
attribute24
any
attribute25
any
attribute26
any
attribute27
any
attribute28
any
attribute29
any
attribute30
any
operationType
string non-empty

Must be 'update' or null or omitted.

textMatchStyle
string non-empty
noEvent
string

Set to true when this operation should NOT trigger an update event (where applicable).

Responses
200

OK - contains the updated object.

Request samples
application/json
{
  • "data": {
    • "unitOfMeasure": "EA",
    • "typedId": "2147501222.P"
    },
  • "oldValues": {
    • "version": 5,
    • "typedId": "2147501222.P",
    • "sku": "33333",
    • "label": "Label Three",
    • "unitOfMeasure": "EA",
    • "userGroupEdit": "admin",
    • "userGroupViewDetails": null,
    • "currency": "CZK",
    • "formulaName": "PriceList",
    • "image": null,
    • "createDate": "2021-09-16T09:43:59",
    • "createdBy": 2147490696,
    • "lastUpdateDate": "2021-11-04T18:33:16",
    • "lastUpdateBy": 2147490696,
    • "attribute1": "56",
    • "attribute2": "3rd",
    • "attribute3": 4,
    • "attribute4": null,
    • "attribute5": null,
    • "attribute6": null,
    • "attribute7": null,
    • "attribute8": null,
    • "attribute9": null,
    • "attribute10": null,
    • "attribute11": null,
    • "attribute12": null,
    • "attribute13": null,
    • "attribute14": null,
    • "attribute15": null,
    • "attribute16": null,
    • "attribute17": null,
    • "attribute18": null,
    • "attribute19": null,
    • "attribute20": null,
    • "attribute21": null,
    • "attribute22": null,
    • "attribute23": null,
    • "attribute24": null,
    • "attribute25": null,
    • "attribute26": null,
    • "attribute27": null,
    • "attribute28": null,
    • "attribute29": null,
    • "attribute30": null
    },
  • "operationType": "update",
  • "textMatchStyle": "exact"
}