Upsert a Customer Extension

post/integrate/CX

Updates or creates a customer extension.

To add a new customer extension that does not exist, specify the customerId and name parameter in the request.

To update an existing customer extension, specify the name and customerId or typedId parameters of the existing customer extension. The /integrate method performs a partial update – it does not delete values from fields that have not been specified in the update request.

Use the /integrate/{TypeCode}/returnolddata endpoint to return also the data of the previous version in the response.


Please note

This method is intended to be used with one or two objects and it allows you to update particular fields. The request will overwrite the existing data of the record being updated, regardless of other changes. To work with more customers in bulk please use the /loaddata/C endpoint.


This operation is particularly useful if the caller does not (and should not) know about typed IDs and other internal data fields, i.e. typically in an integration scenario.

The only mandatory pre-requisite for this operation is that the object's defined business key fields (vary per object type) are present in every request. No typed ID or version fields are required. This also means that no version checking is performed, thus the request will overwrite existing data of that record, regardless of other changes.


Information

You can upsert multiple records using within request. To do so, add multiple data objects into your JSON. See the batchUpsertCustomerExample example.


Securitybasic or X-PriceFx-jwt
Request
Request Body schema: application/json

Please note: The data sent in your request might be different from our sample request schema. Custom fields (attribute1..attribute30) can be retrieved using the /fetch/CXAM operation.

required
object
name
required
string non-empty
customerId
required
string non-empty
attribute1
string non-empty
Responses
200

OK

Response Schema: application/json
required
object
node
required
string non-empty
csrfToken
required
string non-empty
required
Array of objects non-empty unique
Array (non-empty)
version
required
number
typedId
required
string non-empty
name
required
string non-empty
customerId
required
string non-empty
createDate
required
string non-empty
createdBy
required
number
lastUpdateDate
required
string non-empty
lastUpdateBy
required
number
attribute1
required
string non-empty
attribute2
any
attribute3
any
status
required
number
Request samples
application/json
{
  • "data": {
    • "name": "Customer001",
    • "customerId": "c00001",
    • "attribute1": "High Street 333, London"
    }
}
Response samples
application/json
{
  • "response": {
    • "node": "<node>",
    • "csrfToken": "<token>",
    • "data": [
      • {
        • "version": 2,
        • "typedId": "2912.CX3",
        • "name": "Customer001",
        • "customerId": "c00001",
        • "createDate": "2021-09-21T15:53:20",
        • "createdBy": 2147490696,
        • "lastUpdateDate": "2021-09-21T16:00:14",
        • "lastUpdateBy": 2147490696,
        • "attribute1": "High Street 333, London",
        • "attribute2": null,
        • "attribute3": null
        }
      ],
    • "status": 0
    }
}