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:
Parameter | Type | Required | Description |
---|---|---|---|
page | Integer | Yes | The page number for pagination. |
pageSize | Integer | Yes | The number of records to retrieve per page. |
statuses | Array | Yes | List of customer statuses to filter by (e.g., "Active"). |
createdDateRange | Object | No | The date range for filtering created customers. |
createdDateRange.start | String (Date-Time) | No | The start date for filtering. |
createdDateRange.end | String (Date-Time) | No | The 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:
Field | Type | Description |
---|---|---|
Page | Integer | The current page number of the response. |
PageSize | Integer | The number of records returned per page. |
Total | Integer | The total number of customer records available. |
Id | String | The unique identifier of the customer. |
Name | String | The name of the customer. |
CompanyNumber | String | The company number of the customer. |
Type | String | The type of customer (e.g., "Customer"). |
Status | String | The status of the customer (e.g., "Active"). |
BillingAddress | Object | The billing address of the customer. |
BillingAddress.Street | String | The street address of the billing location. |
BillingAddress.City | String | The city of the billing address. |
BillingAddress.State | String | The state of the billing address. |
BillingAddress.ZipCode | String | The postal code of the billing address. |
Array | A list of email addresses associated with the customer. | |
Phone | Array | A list of phone numbers associated with the customer. |
Fax | String | The fax number of the customer. |
DateCreated | String (Date-Time) | The date and time when the customer was created. |
InvoicingInformation | Object | The invoicing information for the customer. |
InvoicingInformation.Address | Object | The address used for invoicing. |
InvoicingInformation.Address.Street | String | The street address for invoicing. |
InvoicingInformation.Address.City | String | The city of the invoicing address. |
InvoicingInformation.Address.State | String | The state of the invoicing address. |
InvoicingInformation.Address.ZipCode | String | The postal code of the invoicing address. |
InvoicingInformation.EmailAddresses | Array | Email addresses used for invoicing. |
InvoicingInformation.InvoicingName | String | The name used for invoicing. |
InvoicingInformation.InvoicingNameAlias | String | The alias for the invoicing name. |
ExternalIds | Array | A list of external IDs associated with the customer. |
Contacts | Array | A list of contacts associated with the customer. |
Notes | Array | A list of notes related to the customer. |
Notes.Id | String | The unique identifier of the note. |
Notes.Description | String | The description of the note. |
Notes.NoteType | String | The type of the note. |
Notes.Time | String (Date-Time) | The time the note was created. |
Notes.User | String | The 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.