CRM Contacts API
Create, Retrieve, Update and Delete CRM Contacts via the public API endpoint using "where" filtering as well as retrieve a contact's Bookings, Cases and Orders. The contact's Secure Zone details can also be retrieved and password reset via this API.
GET
CRM Contacts List
Retrieves a list of Contacts as a JSON response based on your provided query parameters.
/api/v2/admin/contacts
Data / Response:
{
"Where" : {},
"Order_By" : "Id",
"Offset" : 0,
"Limit" : 100,
}
{
"Items": [
{
"Id": 0,
"Email": "string",
"FirstName": "string",
"LastName": "string",
"CrmType": "Contact",
"EmailConfirmed": true,
"Role": "General",
"CreatedDate": "2024-05-17T18:18:39.175Z",
"Address": "string",
"City": "string",
"State": "string",
"ZipCode": "string",
"Country": "string",
"Site": "string",
"Phone": "string",
"Status": "string",
"Notes": "string",
"Type": 0,
"CustomerTypeName": "string",
"IsDataUsingAllowed": true,
"CustomCrmGroups": {
"<GroupAlias1>": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
}
}
],
"TotalItemsCount": 0
}
POST
CRM Contact Create
Creates a new Contact based on the provided data.
/api/v2/admin/contacts
Data / Response:
{
"Email": "user@example.com",
"FirstName": "string",
"LastName": "string",
"Password": "string",
"CrmType": "string",
"Role": "string",
"Address": "string",
"City": "string",
"State": "string",
"ZipCode": "string",
"Country": "string",
"Site": "string",
"Phone": "string",
"Status": "string",
"Notes": "string",
"Type": 0,
"IsDataUsingAllowed": true,
"CustomCrmGroups": {
"<GroupAlias1>": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
}
}
{
"Id": 0,
"Email": "string",
"FirstName": "string",
"LastName": "string",
"CrmType": "Contact",
"EmailConfirmed": true,
"Role": "General",
"CreatedDate": "2024-05-17T18:19:07.010Z",
"Address": "string",
"City": "string",
"State": "string",
"ZipCode": "string",
"Country": "string",
"Site": "string",
"Phone": "string",
"Status": "string",
"Notes": "string",
"Type": 0,
"CustomerTypeName": "string",
"IsDataUsingAllowed": true,
"CustomCrmGroups": {
"<GroupAlias1>": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
}
}
GET
CRM Contact Item
Retrieves a single Contact based on the ID passed in the endpoint URL.
/api/v2/admin/contacts/{id}
Data / Response:
N/A
{
"Id": 0,
"Email": "string",
"FirstName": "string",
"LastName": "string",
"CrmType": "Contact",
"EmailConfirmed": true,
"Role": "General",
"CreatedDate": "2024-05-17T18:19:07.010Z",
"Address": "string",
"City": "string",
"State": "string",
"ZipCode": "string",
"Country": "string",
"Site": "string",
"Phone": "string",
"Status": "string",
"Notes": "string",
"Type": 0,
"CustomerTypeName": "string",
"IsDataUsingAllowed": true,
"CustomCrmGroups": {
"<GroupAlias1>": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
}
}
PUT
CRM Contact Update
Updates a single Contact based on the ID passed in the endpoint URL and data provided.
/api/v2/admin/contacts/{id}
Data / Response:
{
"Id": 0,
"Email": "user@example.com",
"FirstName": "string",
"LastName": "string",
"CrmType": "string",
"Role": "string",
"Address": "string",
"City": "string",
"State": "string",
"ZipCode": "string",
"Country": "string",
"Site": "string",
"Phone": "string",
"Status": "string",
"Notes": "string",
"Type": 0,
"IsDataUsingAllowed": true,
"CustomCrmGroups": {
"<GroupAlias1>": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
}
}
{
"Id": 0,
"Email": "string",
"FirstName": "string",
"LastName": "string",
"CrmType": "Contact",
"EmailConfirmed": true,
"Role": "General",
"CreatedDate": "2024-05-17T18:19:07.010Z",
"Address": "string",
"City": "string",
"State": "string",
"ZipCode": "string",
"Country": "string",
"Site": "string",
"Phone": "string",
"Status": "string",
"Notes": "string",
"Type": 0,
"CustomerTypeName": "string",
"IsDataUsingAllowed": true,
"CustomCrmGroups": {
"<GroupAlias1>": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
}
}
DELETE
CRM Contact Delete
Deletes a single Contact based on the ID passed in the endpoint URL.
/api/v2/admin/contacts/{id}
Data / Response:
N/A
Status 204
GET
CRM Contact Bookings List
Retrieves a list of Contact's Bookings as a JSON response based on your provided query parameters.
/api/v2/admin/contacts/{contactId}/bookings
Data / Response:
{
"Where" : {},
"Order_By" : "Id",
"Offset" : 0,
"Limit" : 100,
}
{
"Items": [
{
"Id": 0,
"EventId": 0,
"OrderId": 0,
"FormId": 0,
"MemberId": 0,
"Allocation": 0,
"CreatedDateTime": "2024-05-17T18:25:35.895Z",
"CustomCrmGroups": {
"<GroupAlias1>": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
},
"Member": {
"Id": 0,
"Email": "string",
"FirstName": "string",
"LastName": "string"
},
"Form": {
"Id": 0,
"Alias": "string",
"Name": "string"
},
"Event": {
"Id": 0,
"Name": "string"
},
"EventBookingFields": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
}
],
"TotalItemsCount": 0
}
GET
CRM Contact Cases List
Retrieves a list of Contact's Cases as a JSON response based on your provided query parameters.
/api/v2/admin/contacts/{contactId}/cases
Data / Response:
{
"Where" : {},
"Order_By" : "Id",
"Offset" : 0,
"Limit" : 100,
}
{
"Items": [
{
"Id": 0,
"OrderId": 0,
"FormId": 0,
"MemberId": 0,
"CreatedDateTime": "2024-05-17T18:25:21.989Z",
"CustomCrmGroups": {
"<GroupAlias1>": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
},
"Member": {
"Id": 0,
"Email": "string",
"FirstName": "string",
"LastName": "string"
},
"Form": {
"Id": 0,
"Alias": "string",
"Name": "string"
},
"CaseFields": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
}
],
"TotalItemsCount": 0
}
GET
CRM Contact Orders List
Retrieves a list of Contact's Orders as a JSON response based on your provided query parameters.
/api/v2/admin/contacts/{contactId}/orders
Data / Response:
{
"Where" : {},
"Order_By" : "Id",
"Offset" : 0,
"Limit" : 100,
}
{
"Items": [
{
"Id": 0,
"AWBNumber": "string",
"CurrencyCountry": "string",
"Currency": "string",
"Country": "string",
"InvoiceDate": "2024-05-17T18:25:03.680Z",
"InvoiceNumber": 0,
"IsDeleted": true,
"IsRecurring": true,
"MainOrderId": 0,
"MemberId": 0,
"OrderName": "string",
"PaymentState": "None",
"StatusId": 0,
"TotalCost": 0,
"CreatedDateTime": "2024-05-17T18:25:03.680Z",
"HasSubscriptions": true,
"HasPaidSubscription": true,
"TrackingURL": "string",
"TransactionId": "string",
"AmountPaid": 0,
"AmountPending": 0,
"OrderCaseType": "FormCase",
"StatusShort": {
"Id": 0,
"Name": "string"
},
"Discount": {
"Code": "string",
"Cost": 0
},
"GiftVoucher": {
"Name": "string",
"Cost": 0
},
"Tax": {
"Code": "string",
"Rate": 0
},
"ShippingInfo": {
"Name": "string",
"Cost": 0,
"Address": "string",
"City": "string",
"State": "string",
"Zipcode": "string",
"Country": "string"
},
"Member": {
"Id": 0,
"Email": "string",
"FirstName": "string",
"LastName": "string"
},
"OrderLines": [
{
"Id": 0,
"EntityType": "Form",
"ProductId": 0,
"ModuleId": 0,
"ProductName": "string",
"Quantity": 0,
"TaxRate": 0,
"UnitPrice": 0,
"TotalPrice": 0,
"FileName": "string",
"IsDownload": true,
"Attributes": [
{
"AttributeId": 0,
"OptionsIds": [
"string"
]
}
]
}
],
"Payments": [
{
"Id": 0,
"Amount": 0,
"AmountCaptured": 0,
"GatewayReason": "string",
"TransactionId": "string",
"Status": "string",
"PaymentType": "CreditCard",
"PaymentGatewayType": "stripe",
"Notes": "string",
"CreatedDateTime": "2024-05-17T18:25:03.680Z"
}
],
"CustomCrmGroups": {
"<GroupAlias1>": {
"<FieldAlias1>": "<value>",
"<FieldAlias2>": false,
"<FieldAlias3>": 0
}
}
}
],
"TotalItemsCount": 0
}
GET
CRM Contact Secure Zones List
Retrieves a list of Contact's Secure Zones as a JSON response based on your provided query parameters.
/api/v2/admin/contacts/{contactId}/secure-zones
Data / Response:
{
"Where" : {},
"Order_By" : "Id",
"Offset" : 0,
"Limit" : 100,
}
{
"Items": [
{
"Id": 0,
"Name": "string",
"ExpiryDateTime": "2024-05-17T18:23:47.717Z"
}
],
"TotalItemsCount": 0
}
PUT
CRM Contact Secure Zone Update
Updates a single Contact's Secure Zones based on the ID passed in the endpoint URL and data provided.
/api/v2/admin/contacts/{contactId}/secure-zones
Data / Response:
[
{
"Id": 0,
"Name": "string",
"ExpiryDateTime": "2024-05-17T18:24:05.723Z"
}
]
{
"Items": [
{
"Id": 0,
"Name": "string",
"ExpiryDateTime": "2024-05-17T18:23:47.717Z"
}
],
"TotalItemsCount": 0
}
PUT
CRM Contact Set Password
Sets a Contact's Password based on the ID passed in the endpoint URL and data provided.
/api/v2/admin/contacts/{id}/set-password
Data / Response:
{
"Password": "string"
}
{
"Items": [
{
"Id": 0,
"Name": "string",
"ExpiryDateTime": "2024-05-17T18:23:47.717Z"
}
],
"TotalItemsCount": 0
}
Related Articles
- CRM
Contacts
Contacts store individual’s contact details and other customer-specific data (including extended custom fields) that is either collected via the website, manually added via the admin, or created via external API connections. - Reports
Custom Reports
Custom reports can be used to bring CRM data together, as a spreadsheet, based on your requirements. - OpenAPI (Admin)
Customer Types API
Retrieve Customer Types via the public API endpoint. - CRM
Form Submissions
Form Submissions store the captured data from any form submission made on your website (from a form created under ‘Content’ > ‘Forms’). - CRM
Event Bookings
Event Bookings store all registrations made to an Event item, either via the website front-end or manually allocated via the admin. - CRM
Orders
Orders store accounts of any payments made via the website and provide management for additional payments, invoices, order statuses, tracking info, the products purchased within the order and the details of the form submission used to take the order. - CRM
Advanced CRM Groups
Advanced CRM Groups allow you to extend the data fields within multiple areas of the CRM, either globally or on a per-record basis. - Liquid Components
CRMContacts
This component fetches CRM Record data to use on the front-end via Liquid. - Liquid Components
CRMCustomGroup
This component fetches Advanced CRM Group data attached to CRM Records, Cases, Orders or Event Bookings. - Liquid Components
member_update_form
This component renders a contact update form for a specified CRM contact so that a CRM Admin role, who is logged in to the front-end, can update the specified contact’s CRM info or secure zone subscriptions.
External Resources
There are currently no external resources available.
Please let us know if you have any other contributions or know of any helpful resources you'd like to see added here.
Questions?
We are always happy to help with any questions you may have.
Visit the Treepl Forum for community support and to search previously asked questions or send us a message at support@webinone.com and we will consult you as soon as possible.