Overview
This API allows for the creation of a list of custom activity records.
Possible Response Codes
- 201 (Created)This response indicates that the lead data was successfully parsed. The body of the response will contain the success or failure status for each lead that was submitted in the request. NOTE: The response record details for each lead will be returned in the order that they were submitted.
- 400 (Bad Request) Along with the 400 response, the body of the response will contain an error message describing why the request was a bad request.
- 500 (Internal Server Error) An unknown error occurred during the import
Authentication
The Lead API requires authentication. The HTTP POST will require a valid Authenticate message header with an API token. See the Aimbase Authentication Web Service Specification for more details on how to retrieve a valid API token.
Authenticate message header example:
Authenticate: Avala-Api {username}:{token}
Post Information
HTTP Endpoint
https://{baseUrl}/Marketing/api/CustomActivity?manufacturer={manufacturerCode}
Custom Activity Data Schema
| Field Name | Required Field | Field Type | Length | Description |
| CustomActivityUid |
|
Guid |
|
A unique identifier for the record. Will be generated if none is provided. |
| CustomActivityStatus | x |
Text | 50 |
CustomActivityStatus Code. Must match the available statuses in the instance. |
| CustomActivityType | x |
Text | 50 |
CustomActivityType Code. Must match the available types in the instance. |
| ExternalId |
|
Text | 20 |
A unique identifier for the record. Will be null if none is provided. |
| LeadId |
|
Number |
|
Will tie the custom activity record to an existing Lead record. Must match an existing Lead's ID if provided. Will not be associated with a lead (just prospect) if none is provided. |
| EventDate |
|
Date |
|
Sets the date on the related prospect timeline record. Will use the current date if none is provided. |
| Prospect | x |
Prospect |
|
See the Prospect Data schema section |
| Customs |
|
List of Custom Datas | See the Custom Data schema section | |
| Dealer |
|
Dealer |
|
Associates the record with a dealer. Will not be associated with a dealer if none is provided. See the Dealer Data schema section |
| Product |
|
Product |
|
Associates the record with a product. Will not be associated with a product if none is provided. See the Product Data schema section |
Prospect Data Schema
| Field Name | Required Field | Field Type | Length | Description |
| ProspectUid |
|
Guid |
|
A unique identifier for the prospect. Will be generated if none is provided. |
| FirstName |
|
Text | 50 |
|
| LastName | x |
Text | 50 |
|
| Title |
|
Text | 20 |
|
| Address1 |
|
Text | 256 |
|
| Address2 |
|
Text | 256 |
|
| City |
|
Text | 64 |
|
| State |
|
Text | 3 |
|
| PostalCode |
|
Text | 10 |
|
| Zip4 |
|
Text | 4 |
|
| County |
|
Text | 25 |
|
| Country | Text | 50 |
||
| CompanyName | Text | 200 |
||
| CompanyTitle | Text | 50 |
||
| WorkPhone | Text | 20 |
||
| HomePhone | Text | 20 |
||
| MobilePhone | Text | 20 |
||
| Fax | Text | 20 |
||
| Text | 80 |
|||
| ProspectTypeCode | Text | 28 |
||
| CompetitiveBrand | Text | 128 |
Custom Data Schema
| Field Name | Required Field | Field Type | Length | Description |
| FieldName | x |
Text | 50 |
Both FieldName and FieldValue are required for each custom field. |
| FieldValue | x |
Text | 2048 |
Dealer Data Schema
| Field Name | Required Field | Field Type | Length | Description |
| DealerNumber | x |
Text | 20 |
|
| DealerLocation |
|
Text | 10 |
|
| DewalerName |
|
Text | 80 |
Product Data Schema
| Field Name | Required Field | Field Type | Length | Description |
| ProductCode | x |
Text | 50 |
|
| ProductName | x |
Text | 100 |
|
| ProductModelYear | x |
Text | 4 |
Numeric |
Example Post
POST https://{baseUrl}/Marketing/api/CustomActivity?manufacturer={manufacturerCode}
Content-Type: application/json
Authenticate: Avala-Api {username}:{token}
[
{
"CustomActivityStatus": "New",
"CustomActivityType": "Note",
"LeadId": 123456,
"EventDate": "2025-10-09"
"Customs": [
{
"FieldName": "Comment",
"FieldValue": "This is a new note."
},
{
"FieldName": "AimbaseCustomActivityMessage",
"FieldValue": "New note entered from dealer's CRM"
}
],
"Dealer": {},
"Product": {},
"Prospect": {
"ProspectUid": "1b9eeb77-1cd1-48f3-8j6g-02e05862a450",
"FirstName": "John",
"LastName": "Doe",
"Email": "johndoe@example.com",
"MobilePhone": "816-262-1234",
"City": "Austin",
"State": "TX",
"PostalCode": "78704",
"Country": "US",
}
}
]Example Response
{
"TopLevelError": null,
"CustomActivityResponseRecords": [
{
"CustomActivitiyUid": "8359157e-2c23-4bac-8d60-421066b24015",
"CustomActivityExternalId": null,
"Id": "27562",
"Status": "Success",
"StatusMessage": "Custom activities successfully received",
"Messages": []
}
]
}