List OData

Overview

Use the List Odata to retrieve, create or update a list within an Aimbase instance. This is an OData endpoint and it supports the OData query language. More information about this can be found at odata.org

Related APIs: 

  • To retrieve, create and update records within a list use List Item Odata


Possible Response Codes

  • 200 (OK). This request was successful and information will be returned.
  • 204 (No Content). The request for patching was successful. 
  • 400 (Bad Request). The request is invalid.
  • 401 (Unauthorized). The token is missing, invalid, or expired.
  • 404 (Not Found). The list was not able to be found.
  • 500 (Internal Server Error). The request was malformed, the list given in the request did not exist, or some other unspecified error occurred when attempting to retrieve information.

Authentication

The List OData API requires authentication. The GET and PATCH request will require a valid Authenticate message header with an API token. See the Aimbase Authentication API for more information on how to authenticate your request. 

Authenticate message header example:

Authenticate: Avala-Api {username}:{token}

Query Information

This OData API allows GET, POST and PATCH. 

Endpoint for GET

GET https://@{{baseurl}}.aimbase.com/Odata/V2/List

Endpoint for POST

POST https://@{{baseurl}}.aimbase.com/Odata/V2/List

Endpoint for PATCH

PATCH https://@{{baseurl}}.aimbase.com/Odata/V2/List

List OData Data Schema 

The information below will be returned in a GET, sent in a POST, or updated via PATCH. 

Field Name 

Editable

Format 

Description 

Id 


 Integer

The list's identifier.

Code X String The list's code in Aimbase.
Name X String The list's name in Aimbase.
Description X String The description of the list in Aimbase.
Count
Integer The count of members in the list. 

Expand Options 

The information of the list items are not included by default, but you can expand the list item object to get that information. When you expand, you will get additional fields related to the list items. 

List Item Fields on Expand

Name

Editable

Values

Description

Id
Integer The Aimbase ID of the list item.
ListId
Integer The list ID the list item is in.
FirstName

String The list item's first name.
LastName

String The list item's last name.
Email

String The list item's email.
Address1

String The list item's address row one.
Address2

String The list item's address row two.
City

String The city of the list item.
State

String The state of the list item (abbreviation)
PostalCode

String The postal code of the list item.
County

String The county of the list item.
CountryCode

String The ISO country code of the list item.
DealerId

Integer The list item's dealer ID (only accepts values already in Aimbase)
DealerName

String The list item's dealer name. If entered, this must match what is in Aimbase.
DealerNumber

String
The list item's dealer number. If entered, this must match what is in Aimbase. 
DealerAddress1

String
The dealer's address row one.
DealerAddress2

String
The dealer's address row two.
DealerCity

String
The dealer's city.
DealerState

String
The dealer's state.
DealerPostalCode

String
The dealer's postal code.
DealerCounty

String The county of the dealer.
DealerCountryCode

String
The dealer's ISO country code.
ProductCode

String
The product code the list item is interested in. If entered, this must match what is in Aimbase. 
ProductName

String
The name of the product the list item is interested in. If entered, this must match what is in Aimbase. 
ProductModelYear

Integer The product model year the list item is interested in.
ProductTypeName

String
The product type name of the product the list item is interested in.
BrandName

String
The name of the brand for the product the list item is interested in.
ProspectUid

Guid If matched to a prospect, the prospect UID for the prospect that is tied to the list item.
ProspectId

Integer If matched to a prospect, this is the prospect ID for the prospect tied to the list item.
OwnerId

Integer If matched to an owner, this is the owner ID for the owner tied to the list item.
IsManuallyAdded

Boolean This field indicates if the list item was manually or systematically added.
IsActive

Boolean This field indicates if the list item is still active within the list.
IsCommunicationOptIn

Boolean This field indicates if the list item has explicitly opted in.
CommunicationOptInIpAddress

String
This field indicates the IP address the list item opted in from. It will only be filled out if IsCommunicationOptIn is Yes.
CommunicationOptInDate
DateTimeOffset This field indicates the date the user opted in. It will only be filled out if IsCommunicationOptIn is Yes. 
CommunicationOptInSource
String This field indicates the source the user opted in from. It will only be filled out if IsCommunicationOptIn is Yes. 
Source
String This indicates the source of the list item.
Type
String
This indicates the type of the list item.
CompanyName
String
If you use B2B, this will show the company the list item belongs to.
CompanyExternalId
String
If you use B2B, this will show the external ID of the company the list item belongs to. 

Sample Queries

Get First Ten Lists

GET https://@{{baseurl}}.aimbase.com/Odata/V2/List?$top=10

Get a List Based on ID and Expand List Items

GET https://@{{baseurl}}.aimbase.com/Odata/V2/List(338)?$expand=ListItems

Create a List

POST  https://@{{baseurl}}.aimbase.com/Odata/V2/List HTTP/1.1
Content-Type: application/json
Authenticate: Avala-Api @{{token}}

  {
      "Code": "List",
      "Name": "List",
      "Description": "This is a list.",
      "IsActive": true,
      "IsPublic": false,
      "ListTypeCode": "ListItem",
      "ManufacturerCode": "MFG",
      "UsageCode": "Email"
    }

Update a List

PATCH  https://@{{baseurl}}.aimbase.com/Odata/V2/List(61) HTTP/1.1
Content-Type: application/json
Authenticate: Avala-Api @{{token}}


  {
      "Code": "Updated List",
      "Name": "Updated List",
      "Description": "This is a list, updated.",
      "IsActive": true,
      "IsPublic": false,
      "ListTypeCode": "ListItem",
      "ManufacturerCode": "ROL",
      "UsageCode": "Email"
    }


Sample Responses

After Creating or Updating a List

{
  "@odata.context": "https://{baseurl}/odata/V2/$metadata#List",
  "value": [
    {
      "Id": 61,
      "Code": "Updated List",
      "Name": "Updated List",
      "Description": "This is a list, updated.",
      "Count": 0,
      "IsActive": true,
      "IsPublic": false,
      "LastRefreshDate": null,
      "ListTypeCode": "ListItem",
      "ManufacturerCode": "ROL",
      "UsageCode": "Email",
      "DataFilterName": null,
      "ListStatusCode": "Ready"
    }
  ]
}