The endpoint for searching customers allows you to retrieve a paginated list of customer records based on specific filters and criteria. It requires specifying mandatory parameters like page number, page size, and statuses in the request body, ensuring precise and efficient querying. Optional filters such as date range provide additional control over the search results. For more information on how versioning works and how to include it in your requests, please refer to the Versioning page.

Request Body Parameters

The following parameters are available in the request body:

ParameterTypeRequiredDescription
pageIntegerYesThe page number for pagination.
pageSizeIntegerYesThe number of records to retrieve per page.
statusesArrayYesList of customer statuses to filter by (e.g., "Active").
createdDateRangeObjectNoThe date range for filtering created customers.
createdDateRange.startString (Date-Time)NoThe start date for filtering.
createdDateRange.endString (Date-Time)NoThe end date for filtering.

Example CURL Request

curl --location 'https://integrations.alvys.com/api/p/v1/customers/search' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
  "page": 0,
  "pageSize": 100,
  "statuses": ["Active"],
  "createdDateRange": {
    "start": "2024-11-08T19:38:34.529Z",
    "end": "2024-11-08T19:38:34.529Z"
  }
}'

Replace YOUR_ACCESS_TOKEN with your actual Bearer token. Adjust the page, pageSize, and date range as needed.

Response Fields

The following fields are returned in the response:

FieldTypeDescription
PageIntegerThe current page number of the response.
PageSizeIntegerThe number of records returned per page.
TotalIntegerThe total number of customer records available.
IdStringThe unique identifier of the customer.
NameStringThe name of the customer.
CompanyNumberStringThe company number of the customer.
TypeStringThe type of customer (e.g., "Customer").
StatusStringThe status of the customer (e.g., "Active").
BillingAddressObjectThe billing address of the customer.
BillingAddress.StreetStringThe street address of the billing location.
BillingAddress.CityStringThe city of the billing address.
BillingAddress.StateStringThe state of the billing address.
BillingAddress.ZipCodeStringThe postal code of the billing address.
EmailArrayA list of email addresses associated with the customer.
PhoneArrayA list of phone numbers associated with the customer.
FaxStringThe fax number of the customer.
DateCreatedString (Date-Time)The date and time when the customer was created.
InvoicingInformationObjectThe invoicing information for the customer.
InvoicingInformation.AddressObjectThe address used for invoicing.
InvoicingInformation.Address.StreetStringThe street address for invoicing.
InvoicingInformation.Address.CityStringThe city of the invoicing address.
InvoicingInformation.Address.StateStringThe state of the invoicing address.
InvoicingInformation.Address.ZipCodeStringThe postal code of the invoicing address.
InvoicingInformation.EmailAddressesArrayEmail addresses used for invoicing.
InvoicingInformation.InvoicingNameStringThe name used for invoicing.
InvoicingInformation.InvoicingNameAliasStringThe alias for the invoicing name.
ExternalIdsArrayA list of external IDs associated with the customer.
ContactsArrayA list of contacts associated with the customer.
NotesArrayA list of notes related to the customer.
Notes.IdStringThe unique identifier of the note.
Notes.DescriptionStringThe description of the note.
Notes.NoteTypeStringThe type of the note.
Notes.TimeString (Date-Time)The time the note was created.
Notes.UserStringThe user who created the note.

Example Response

{
    "Page": 0,
    "PageSize": 100,
    "Total": 30,
    "Items": [
        {
            "Id": "3a61454a41604c24adf061d8304e1177",
            "UserName": "[email protected]",
            "Name": "Jane Doe",
            "Email": "[email protected]",
            "UserType": "Admin",
            "Role": "OperationsManager",
            "CompanyCode": "XYZ789",
            "Status": "Active",
            "Permissions": [
                "ViewCustomerRate",
                "EditCustomerRate",
                "ViewCarrierRate",
                "Accessorials",
                "EditCarrierRate",
                "EditMiles",
                "OOPRate",
                "EditOOPRate",
                "Dispatch",
                "OverrideStopStatus",
                "OverrideLoadWeight",
                "ReleaseLoads",
                "CalendarPastDates",
                "UnlockLoads",
                "ActivateCarrier",
                "ActivateCustomer",
                "EditCarrier",
                "EditCompany",
                "ViewLoadTemplates",
                "ViewDriverRates",
                "EditDriverRates",
                "Invoice",
                "Billing",
                "ViewSummaryFinancialReport",
                "ViewDetailedFinancialReport",
                "ViewStatementItemsReport",
                "ViewAlvysRateHistory",
                "EditAsset",
                "DeleteUser",
                "ViewPayableAmount",
                "DeleteAsset",
                "ManageLoadTemplates",
                "ApplyContractedRatesOnNewLoad"
            ],
            "CreatedAt": "2024-10-01T12:30:45.1234567+00:00"
        },
        {
            "Id": "5b7f65a9416b4d44b8d061d8374f1199",
            "UserName": "[email protected]",
            "Name": "John Smith",
            "Email": "[email protected]",
            "UserType": "User",
            "Role": "Driver",
            "CompanyCode": "LMN456",
            "Status": "Inactive",
            "Permissions": [
                "ViewCustomerRate",
                "Accessorials",
                "Dispatch",
                "ViewDriverRates",
                "ViewSummaryFinancialReport",
                "ViewStatementItemsReport",
                "ViewAlvysRateHistory"
            ],
            "CreatedAt": "2024-08-15T09:45:30.9876543+00:00"
        },
        {
            "Id": "9c8d12a8437e4e57b7f061d8428e2211",
            "UserName": "[email protected]",
            "Name": "Sarah Connor",
            "Email": "[email protected]",
            "UserType": "SuperAdmin",
            "Role": "LogisticsCoordinator",
            "CompanyCode": "ABC123",
            "Status": "Active",
            "Permissions": [
                "EditCustomerRate",
                "EditCarrierRate",
                "EditMiles",
                "OOPRate",
                "EditOOPRate",
                "Dispatch",
                "OverrideStopStatus",
                "OverrideLoadWeight",
                "ReleaseLoads",
                "CalendarPastDates",
                "UnlockLoads",
                "ActivateCarrier",
                "EditCompany",
                "ManageLoadTemplates",
                "Billing",
                "ViewDetailedFinancialReport",
                "EditAsset",
                "DeleteAsset"
            ],
            "CreatedAt": "2024-07-20T14:22:18.6543210+00:00"
        }
    ]
}

Rate Limits

All endpoints are subject to rate limits to ensure stability and performance. For more information, refer to the Rate Limits section.

This page is interactive, allowing you to try a request by completing the fields for the parameters below. As you fill out the parameters, the CURL command on the right side of the page will be automatically updated. Alternatively, you can fork our Public API Postman Collection directly. Make sure to authorize yourself before trying a request.

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!