Pricefx REST API Reference
The Pricefx Backend API
Request
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/Cendpoint.
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
dataobjects 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"
}
}
]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.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/integrate/C
- URL:https://companynode.pricefx.com/pricefx/companypartition/integrate/C
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/integrate/C \
-H 'Content-Type: application/json' \
-d '{
"data": {
"name": "Customer001",
"customerId": "2912.CX3",
"attribute1": "High Street 333, London"
}
}'- listCustomerResponseExample
- listCustomerResponseExample_resultFields
- listCustomerResponseExample_valueFields
{ "response": { "node": "string", "data": [ … ], "status": 0 } }
Request
Inserts a customer to the Master Data - Customers table.
Please note: The data sent in your request might be different from our sample request schema. The custom fields (attribute1..attribute30) can be retrieved using the /fetch/CAM operation.
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/add/C
- URL:https://companynode.pricefx.com/pricefx/companypartition/add/C
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/add/C \
-H 'Content-Type: application/json' \
-d '{
"data": {
"customerId": "123456",
"name": "Acme",
"attribute1": "High Street 23",
"attribute2": "+44 12345678",
"userGroupEdit": "Administrators"
},
"operation": "add"
}'- listCustomerResponseExample
- listCustomerResponseExample_resultFields
- listCustomerResponseExample_valueFields
{ "response": { "node": "string", "data": [ … ], "status": 0 } }
- Mock serverhttps://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/update/C
- URL:https://companynode.pricefx.com/pricefx/companypartition/update/C
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://api.pricefx.com/_mock/openapi/reference/pricefx-server_openapi/update/C \
-H 'Content-Type: application/json' \
-d '{
"data": {
"attribute1": "Derry Lane 11",
"attribute2": "+44123456789",
"typedId": "2147492216.C"
},
"oldValues": {
"version": 0,
"typedId": "2147492216.C",
"customerId": "00003",
"name": "Kate Smith",
"parentId": null,
"userGroupEdit": null,
"userGroupViewDetails": null,
"nodeId": 2147492216,
"createDate": "2021-09-22T12:56:16",
"createdBy": 2147490696,
"lastUpdateDate": "2021-09-22T12:56:16",
"lastUpdateBy": 2147490696,
"attribute1": "Derry Lane",
"attribute2": "123456789",
"attribute3": null,
"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,
"isParent": false
},
"operationType": "update",
"textMatchStyle": "exact"
}'- listCustomerResponseExample
- listCustomerResponseExample_resultFields
- listCustomerResponseExample_valueFields
{ "response": { "node": "string", "data": [ … ], "status": 0 } }
See the Key-Value Database Storage Knowledge Base article for more details.
Here you can find all fields of the corresponding entity (represented by the type code).
Use the /metadata.describe endpoint to find out the correct data type of the field that is used in your partition.
Comments