Customer
All the endpoints that can be called on the Customer controller.
Endpoints that require the CUSTOMER_READ permission:
GETindexGETitemPOSTsearchByPrimaryExternalIdGETtimelineByCustomerExternalID
Endpoints that require the CUSTOMER_CUD permission:
POSTindexPUTindexPUTitemDELETEitemPOSTaddChannelOnlyPUTupdateCustomerDELETEitemChannelDELETEitemPurgeDataPOSTexternalEventPOSTsyncWithCRMPOSTcreateCustomerCRUD
Returns all the customers.
OK
GET /api/v2/customer HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
OK
{
"type": "itemList",
"itemStart": 0,
"itemTotal": 8,
"itemLimit": 15,
"items": [
{
"id": 3,
"external_primary_id": "marco.test",
"brand_name": "Mars",
"firstname": "Marco",
"lastname": "Test",
"channels": []
},
{
"id": 4,
"external_primary_id": "karen.mcfarlane",
"brand_name": "Mercury",
"firstname": "Karen",
"lastname": "McFarlane",
"channels": [
{
"channel_id": 1,
"channel": "k.mcfarlane@rude.com"
}
]
},
{
"id": 5,
"external_primary_id": "jane.doe",
"brand_name": "Mercury",
"firstname": "Jane",
"lastname": "Doe",
"channels": [
{
"channel_id": 1,
"channel": "jane.doe@smith.inc"
}
]
},
{
"id": 6,
"external_primary_id": "thomas.testa",
"brand_name": "Mercury",
"firstname": "Thomas",
"lastname": "testa",
"channels": [
{
"channel_id": 1,
"channel": "thomas@test.com"
}
]
},
{
"id": 8,
"external_primary_id": "john.smith",
"brand_name": "Mercury",
"firstname": "John",
"lastname": "Smith",
"channels": [
{
"channel_id": 1,
"channel": "john.smith@mercury.com"
}
]
},
{
"id": 9,
"external_primary_id": "william.branson",
"brand_name": "Mercury",
"firstname": "William",
"lastname": "Branson",
"channels": [
{
"channel_id": 1,
"channel": "william.branson@gmail.com"
}
]
},
{
"id": 50,
"external_primary_id": "seppe.v.donk",
"brand_name": "CareFree",
"firstname": "Seppe",
"lastname": "van Donk",
"channels": [
{
"channel_id": 1,
"channel": "s.vandonk@gmail.com"
},
{
"channel_id": 2,
"channel": "+31676189537"
}
]
},
{
"id": 109,
"external_primary_id": "c9f0f3d5780701217388d70248964a9f",
"brand_name": "CareFree",
"firstname": "Mark",
"lastname": "Filippo",
"channels": [
{
"channel_id": 2,
"channel": "+31618674740"
},
{
"channel_id": 1,
"channel": "mjwfilippo@gmail.com"
}
]
}
]
}Creates a new customer.
Most parameters are optional but depending on the presence of other parameters.
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.
type: string
The name of the address, depending on the channel e.g. a phone number or an email address.
type: number
type: string
The external primary ID of the customer.
type: any
Does not update the ticket with the new linked channel(s) if sent along with the request.
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = ' '
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = ' '
type: number = null
type: string = null
Has to be a valid email address format.
type: ^\+[0-9]+$ = null
Successful response
POST /api/v2/customer HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 208
{
"channel_id": "text",
"customer_link_channel": "text",
"brand_id": "text",
"primary_id": "text",
"noSync": "text",
"firstname": "text",
"lastname": "text",
"ticket_id": "text",
"extra_email": "text",
"extra_telephone": "text"
}Successful response
Updates this customer's name.
PrimaryID, brandID and customerID are all optional, but dependent on the presence of at least one.
The external primary ID of the customer.
type: number = null
type: number = null
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = null
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = null
Successful response
PUT /api/v2/customer HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 94
"primaryID='text'&brandID='text'&customerID='text'&firstname='text'&lastname='text'"Successful response
Returns all the data of this customer.
Successful response
GET /api/v2/customer/{id} HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
Successful response
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.
type: number
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = ' '
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$ = ' '
OK
PUT /api/v2/customer/{id} HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 55
"brandID='text'&firstname='text'&lastname='text'"OK
{
"type": "result",
"message": "Customer updated."
}Permanently deletes this customer.
Successful response
DELETE /api/v2/customer/{id} HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
Successful response
Searches for this customer by primary external ID.
type: string
The external primary ID of the customer.
type: number
Successful response
POST /api/v2/customer/SearchByPrimaryExternalID HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 39
{
"primary_id": "text",
"brand_id": "text"
}Successful response
Searches for this customer by channel value.
type: string
The channel value of the customer.
type: number
Successful response
POST /api/v2/customer/SearchByCustomerChannelValue HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 49
{
"customerChannelValue": "text",
"brand_id": "text"
}Successful response
Adds a channel to a customer.
type: number = null
type: string = null
The external primary ID of the customer.
type: number
type: string = null
Should be in a valid email address format.
type: ^\+[0-9]+$ = null
type: ^[a-zA-Z0-9_ ]+$ = null
type: number = null
Successful response
POST /api/v2/customer/addChannelOnly HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 153
{
"customer_id": "text",
"primary_id": "text",
"brand_id": "text",
"extra_email": "text",
"extra_telephone": "text",
"extra_twitter": "text",
"extra_facebook": "text"
}Successful response
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.
type: string
type: number
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$
Successful response
PUT /api/v2/customer/updateCustomer HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 82
"externalPrimaryID='text'&brandID='text'&firstname='text'&lastname='text'"Successful response
Permanently deletes a channel endpoint of this customer.
Successful response
DELETE /api/v2/customer/channel/{id} HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
Successful response
Returns the timeline from this customer by external primary ID.
External primary ID of the customer.
Successful response
GET /api/v2/customer/timelineByCustomerExternalID HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
Successful response
Permanently deletes customer data and related items/tickets.
Successful response
DELETE /api/v2/customer/purgeData/{id} HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Accept: */*
Successful response
Creates a new customer event e.g. an order or marketing mail to the customer timeline.
type: number = null
type: string = null
The external primary ID of the customer.
type: number
type: string
type: string
type: string
Successful response
POST /api/v2/customer/externalEvent HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 120
{
"customer_id": "text",
"external_id": "text",
"brand_id": "text",
"initiated_by": "text",
"message": "text",
"source_url": "text"
}Successful response
Synchronizes customer data for this customer with the CRM if a CRM lookup URL is configured for the brand.
type: number
type: string
The name of the channel e.g. telephone or email
type: string = null
Successful response
POST /api/v2/customer/syncWithCRM HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 52
{
"brandID": "text",
"channel": "text",
"address": "text"
}Successful response
Creates a customer using the CRUD.
type: string
The external primary ID of the customer.
type: number
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$
type: ^[a-zA-ZÀ-ÖØ-Þß-öø-ÿŠš\.\-\' ]+$
Successful response
POST /api/v2/customer/createCustomerCRUD HTTP/1.1
Host: {{base_url}}
Authorization: apikey YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 74
{
"primaryID": "text",
"brandID": "text",
"firstname": "text",
"lastname": "text"
}Successful response
Last updated