Create products in Vlocity Product Console by specifying them in the request body.
POST /v2/epc/products
Remote Method
createProduct2
REST Handler
APIProductRestHandler
Apex Remote Service
PCAppHandler
Package
Communication (vlocity_cmt)
API Parameters and Response Format
For API parameter names and descriptions, see the Swagger (OpenAPI) reference documentation for Industries EPC REST APIs.
Resource Information
| Response Format | JSON |
|---|---|
| Resource URL | /services/apexrest/{namespace}/v2/epc/products |
Example Request
POST
{
"epcRequest": {
"entity": {
"vlocity_cmt__LifecycleStatus__c": "Draft",
"Name": "Product-0004",
"ProductCode": "Product-0004",
"Description": "Product-0004",
"vlocity_cmt__SpecificationType__c": "Offer",
"vlocity_cmt__SpecificationSubType__c": "Bundle",
"vlocity_cmt__Status__c": "Draft",
"vlocity_cmt__IsOrderable__c": true,
"vlocity_cmt__VersionLabel__c": "Version-1",
"IsActive": true,
"vlocity_cmt__EndOfLifeDate__c": 1769797800000
}
}
}
Example Result
{
"epcResponse": {
"entities": [
{
"entity": {
"attributes": {
"type": "Product2",
"url": "/services/data/v52.0/sobjects/Product2/01t3h000001gyCFAAY"
},
"vlocity_cmt__VersionLabel__c": "Version-1",
"Name": "Product-0004",
"ProductCode": "Product-0004",
"vlocity_cmt__SpecificationType__c": "Offer",
"vlocity_cmt__SpecificationSubType__c": "Bundle",
"vlocity_cmt__LifecycleStatus__c": "Draft",
"vlocity_cmt__GlobalGroupKey__c": "a4096cc5-8bbb-cfd5-7b93-869a7c2b4caf",
"RecordTypeId": "0123h000000slEnAAI",
"Id": "01t3h000001gyCFAAY",
"RecordType": {
"attributes": {
"type": "RecordType",
"url": "/services/data/v52.0/sobjects/RecordType/0123h000000slEnAAI"
},
"Id": "0123h000000slEnAAI",
"Name": "Product"
}
}
}
],
"overallResult": "success"
}
}