Customer

All the endpoints that can be called on the Customer controller.

Endpoints that require the CUSTOMER_READ permission:

  • GET index

  • GET item

  • POST searchByPrimaryExternalId

  • GET timelineByCustomerExternalID

Endpoints that require the CUSTOMER_CUD permission:

  • POST index

  • PUT index

  • PUT item

  • DELETE item

  • POST addChannelOnly

  • PUT updateCustomer

  • DELETE itemChannel

  • DELETE itemPurgeData

  • POST externalEvent

  • POST syncWithCRM

  • POST createCustomerCRUD

index

get

Returns all the customers.

Authorizations
HTTPRequired
Responses
200

OK

application/json
Responseobject
get
/api/v2/customer
200

OK

index

post

Creates a new customer.

Most parameters are optional but depending on the presence of other parameters.

Authorizations
HTTPRequired
Body
channel_idstringOptional

type: ^([0-9]+|email|telephone|facebook|twitter)$ = ' ' Name or the ID of the channel e.g. email or telephone. Can only be processed if customer_link_channel is set.

customer_link_channelstringOptional

type: string The name of the address, depending on the channel e.g. a phone number or an email address.

brand_idstringOptional

type: number

primary_idstringOptional

type: string The external primary ID of the customer.

noSyncstringOptional

type: any Does not update the ticket with the new linked channel(s) if sent along with the request.

firstnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = ' '

lastnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = ' '

ticket_idstringOptional

type: number = null

extra_emailstringOptional

type: string = null Has to be a valid email address format.

extra_telephonestringOptional

type: ^\+[0-9]+$ = null

Responses
200

Successful response

application/json
post
/api/v2/customer
200

Successful response

index

put

Updates this customer's name.

PrimaryID, brandID and customerID are all optional, but dependent on the presence of at least one.

Authorizations
HTTPRequired
Body
primaryIDstringOptional

The external primary ID of the customer.

brandIDstringOptional

type: number = null

customerIDstringOptional

type: number = null

firstnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = null

lastnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = null

Responses
200

Successful response

application/json
put
/api/v2/customer
200

Successful response

item

get

Returns all the data of this customer.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Responses
200

Successful response

application/json
get
/api/v2/customer/{id}
200

Successful response

item

put

Updates any fields existing on this customer, including custom fields.

See the example for how to update custom fields. It should always follow the pattern of "custom_" followed by the name of the custom field.

If you want to update or add multiple customer channels at once, it should be done in 2 parameters:

  • customerChannelType_0 (corresponding to the channel type ID)

  • customerChannelValue_0 (corresponding to the address of the channel you want to add)

The 0 would be incremental if you choose to do multiple.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Body
brandIDstringOptional

type: number

firstnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = ' '

lastnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = ' '

Responses
200

OK

application/json
Responseobject
put
/api/v2/customer/{id}
200

OK

item

delete

Permanently deletes this customer.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Responses
200

Successful response

application/json
delete
/api/v2/customer/{id}
200

Successful response

searchByPrimaryExternalID

post

Searches for this customer by primary external ID.

Authorizations
HTTPRequired
Body
primary_idstringOptional

type: string

The external primary ID of the customer.

brand_idstringOptional

type: number

Responses
200

Successful response

application/json
post
/api/v2/customer/SearchByPrimaryExternalID
200

Successful response

searchByCustomerChannelValue

post

Searches for this customer by channel value.

Authorizations
HTTPRequired
Body
customerChannelValuestringOptional

type: string

The channel value of the customer.

brand_idstringOptional

type: number

Responses
200

Successful response

application/json
post
/api/v2/customer/SearchByCustomerChannelValue
200

Successful response

addChannelOnly

post

Adds a channel to a customer.

Authorizations
HTTPRequired
Body
customer_idstringOptional

type: number = null

primary_idstringOptional

type: string = null

The external primary ID of the customer.

brand_idstringOptional

type: number

extra_emailstringOptional

type: string = null

Should be in a valid email address format.

extra_telephonestringOptional

type: ^\+[0-9]+$ = null

extra_twitterstringOptional

type: ^[a-zA-Z0-9_ ]+$ = null

extra_facebookstringOptional

type: number = null

Responses
200

Successful response

application/json
post
/api/v2/customer/addChannelOnly
200

Successful response

updateCustomer

put

Updates the fields of this customer.

Similar to how PUT item works.

If you want to update custom fields, just put the name of the field you want to update as the key and the value of the field you want to update as the value.

Authorizations
HTTPRequired
Body
externalPrimaryIDstringOptional

type: string

brandIDstringOptional

type: number

firstnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$

lastnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$

Responses
200

Successful response

application/json
put
/api/v2/customer/updateCustomer
200

Successful response

itemChannel

delete

Permanently deletes a channel endpoint of this customer.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Responses
200

Successful response

application/json
delete
/api/v2/customer/channel/{id}
200

Successful response

timelineByCustomerExternalID

get

Returns the timeline from this customer by external primary ID.

Authorizations
HTTPRequired
Query parameters
brand_idstringOptional
external_idstringOptional

External primary ID of the customer.

Responses
200

Successful response

application/json
get
/api/v2/customer/timelineByCustomerExternalID
200

Successful response

itemPurgeData

delete

Permanently deletes customer data and related items/tickets.

Authorizations
HTTPRequired
Path parameters
idstringRequired
Responses
200

Successful response

application/json
delete
/api/v2/customer/purgeData/{id}
200

Successful response

externalEvent

post

Creates a new customer event e.g. an order or marketing mail to the customer timeline.

Authorizations
HTTPRequired
Body
customer_idstringOptional

type: number = null

external_idstringOptional

type: string = null

The external primary ID of the customer.

brand_idstringOptional

type: number

initiated_bystringOptional

type: string

messagestringOptional

type: string

source_urlstringOptional

type: string

Responses
200

Successful response

application/json
post
/api/v2/customer/externalEvent
200

Successful response

syncWithCRM

post

Synchronizes customer data for this customer with the CRM if a CRM lookup URL is configured for the brand.

Authorizations
HTTPRequired
Body
brandIDstringOptional

type: number

channelstringOptional

type: string

The name of the channel e.g. telephone or email

addressstringOptional

type: string = null

Responses
200

Successful response

application/json
post
/api/v2/customer/syncWithCRM
200

Successful response

createCustomerCRUD

post

Creates a customer using the CRUD.

Authorizations
HTTPRequired
Body
primaryIDstringOptional

type: string

The external primary ID of the customer.

brandIDstringOptional

type: number

firstnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$

lastnamestringOptional

type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$

Responses
200

Successful response

application/json
post
/api/v2/customer/createCustomerCRUD
200

Successful response

Last updated