Skip to main content
Version: 2024.2

Webservice

The CMF plugin has a built-in REST webservice. Access is handled via API-Keys, which can be configured for Pimcore Users in settings menu of CMF.

Add the API-Key as X-API-Key HTTP header (recommended) or apikey url parameter to your request.

The webservices also support session authentication, this means that it's not necessary to add the X-API-Key HTTP header or the apikey parameter to the request if you have a valid user session from the admin interface (eg. when testing in the browser).

Don't forget to setup the symfony firewall in your security.yml, details see installation instructions.

Webservice ConfigurationWebservice ConfigurationWebservice Configuration

API Reference

Customers API

The customers API implements standard REST calls for customer CRUD actions:

PathMethodDescription
/__customermanagementframework/webservice/customersGETFetch all customers
/__customermanagementframework/webservice/customers/{id}GETFetch a single customer
/__customermanagementframework/webservice/customersPOSTCreate a new customer
/__customermanagementframework/webservice/customers/{id}PATCHPartially update a customer
/__customermanagementframework/webservice/customers/{id}DELETEDelete a customer

The GET requests can be filtered by passing the following params as query params:

ParameterPossible ValuesDescription
includeActivitiestrue/falseinclude activities of customer into result set
segmentscomma-separated list of IDsfilter by segments
pageintpage number for paging
pageSizeintpage size for paging
modificationTimestampintfilter for customers with newer ModificationTimestamp

Activities API

The activities API implements standard REST calls for activity CRUD actions:

PathMethodDescription
/__customermanagementframework/webservice/activitiesGETFetch all activities
/__customermanagementframework/webservice/activities/{id}GETFetch a single activity
/__customermanagementframework/webservice/activitiesPOSTCreate a new activity
/__customermanagementframework/webservice/activities/{id}PATCHPartially update a activity
/__customermanagementframework/webservice/activities/{id}DELETEDelete a activity

The GET requests can be filtered by passing the following params as query params:

ParameterPossible ValuesDescription
typestringfilter by activity type
modifiedSinceTimestamptimestamp/intget activities which where modified since given timestamp
pageintpage number for paging
pageSizeintpage size for paging

Deletions API

The deletions API delivers information about deletions of customers and activities:

PathMethodDescription
/__customermanagementframework/webservice/deletionsGETFetch all segments

The request can be filtered by passing the following params as query params:

ParameterPossible ValuesDescription
entityTypecustomers/activitiesget deletions of customers or activities
deletionsSinceTimestamptimestamp/intget deletions since given timestamp only

Segments API

The segments API implements standard REST calls for customer segment CRUD actions:

PathMethodDescription
/__customermanagementframework/webservice/segmentsGETFetch all segments
/__customermanagementframework/webservice/segments/{id}GETFetch a single segment
/__customermanagementframework/webservice/segmentsPOSTCreate a new segment
/__customermanagementframework/webservice/segments/{id}PATCHPartially update a segment
/__customermanagementframework/webservice/segments/{id}DELETEDelete a segment

The GET requests can be filtered by passing the follwing params as query params:

ParameterPossible ValuesDescription
pageintpage number for paging
pageSizeintpage size for paging

Segment groups API

The segment groups API implements standard REST calls for customer segment group CRUD actions:

PathMethodDescription
/__customermanagementframework/webservice/segment-groupsGETFetch all segment groups
/__customermanagementframework/webservice/segment-groups/{id}GETFetch a single segment group
/__customermanagementframework/webservice/segment-groupsPOSTCreate a new segment group
/__customermanagementframework/webservice/segment-groups/{id}PATCHPartially update a segment group
/__customermanagementframework/webservice/segment-groups/{id}DELETEDelete a segment group

The GET requests can be filtered by passing the following params as query params:

ParameterPossible ValuesDescription
pageintpage number for paging
pageSizeintpage size for paging

Segments of customers API

The segments of customers API allows to add segments to customers and remove segments form customers:

PathMethodDescription
/__customermanagementframework/webservice/segments-of-customersPOSTAdd/remove segments
Example POST body JSON:
{
"customerId": 12345,
"addSegments": [123,456],
"removeSegments": [567,789]
}