Upsert a Customer

post/integrate/C

Updates or creates a customer.

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

To update an existing customer, specify the customerId or typedId parameter of the existing customer. 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 example below.

[
  {
    "data": {
      "name": "The Customer",
      "customerId": "c00001",
      "attribute1": "High Street 23, London"
    }
  },
  {
    "data": {
      "name": "The Customer 02",
      "customerId": "c00002",
      "attribute1": "Low Street 161, Chicago"
    }
  }
]

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

If the customer does not exist yet, at least the customerId must be specified in the payload.

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/CAM operation.

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

Returns customer record details.

Response Schema: application/json
object or object
Any of:
node
string non-empty
Array of objects (Customer) non-empty unique

The Customer object. The Type code is C.

Array (non-empty)
createDate
string <date-time>
createdBy
integer
customerId
string <= 255 characters
isParent
boolean or null
lastUpdateBy
integer
lastUpdateDate
string <date-time>
name
string <= 255 characters
nodeId
integer
parentId
integer
typedId
string
userGroupEdit
string <= 255 characters
userGroupViewDetails
string <= 255 characters
version
integer
attribute1
string <= 255 characters
attribute2
string <= 255 characters
attribute3
string <= 255 characters
attribute4
string <= 255 characters
attribute5
string <= 255 characters
attribute6
string <= 255 characters
attribute7
string <= 255 characters
attribute8
string <= 255 characters
attribute9
string <= 255 characters
attribute10
string <= 255 characters
attribute11
string <= 255 characters
attribute12
string <= 255 characters
attribute13
string <= 255 characters
attribute14
string <= 255 characters
attribute15
string <= 255 characters
attribute16
string <= 255 characters
attribute17
string <= 255 characters
attribute18
string <= 255 characters
attribute19
string <= 255 characters
attribute20
string <= 255 characters
attribute21
string <= 255 characters
attribute22
string <= 255 characters
attribute23
string <= 255 characters
attribute24
string <= 255 characters
attribute25
string <= 255 characters
attribute26
string <= 255 characters
attribute27
string <= 255 characters
attribute28
string <= 255 characters
attribute29
string <= 255 characters
attribute30
string <= 255 characters
status
number
Request samples
application/json
{
  • "data": {
    • "name": "Customer001",
    • "customerId": "2912.CX3",
    • "attribute1": "High Street 333, London"
    }
}
Response samples
application/json
{
  • "response": {
    • "node": "string",
    • "data": [
      • {
        • "createDate": "2019-08-24T14:15:22Z",
        • "createdBy": 0,
        • "customerId": "string",
        • "isParent": true,
        • "lastUpdateBy": 0,
        • "lastUpdateDate": "2019-08-24T14:15:22Z",
        • "name": "string",
        • "nodeId": 0,
        • "parentId": 0,
        • "typedId": "string",
        • "userGroupEdit": "string",
        • "userGroupViewDetails": "string",
        • "version": 0,
        • "attribute1": "string",
        • "attribute2": "string",
        • "attribute3": "string",
        • "attribute4": "string",
        • "attribute5": "string",
        • "attribute6": "string",
        • "attribute7": "string",
        • "attribute8": "string",
        • "attribute9": "string",
        • "attribute10": "string",
        • "attribute11": "string",
        • "attribute12": "string",
        • "attribute13": "string",
        • "attribute14": "string",
        • "attribute15": "string",
        • "attribute16": "string",
        • "attribute17": "string",
        • "attribute18": "string",
        • "attribute19": "string",
        • "attribute20": "string",
        • "attribute21": "string",
        • "attribute22": "string",
        • "attribute23": "string",
        • "attribute24": "string",
        • "attribute25": "string",
        • "attribute26": "string",
        • "attribute27": "string",
        • "attribute28": "string",
        • "attribute29": "string",
        • "attribute30": "string"
        }
      ],
    • "status": 0
    }
}