Deal Actions
The deal actions API allows notification and management of outstanding documentation.
The Deal Actions Resource
Properties
- Name
id
- Required
- Type
- integer
- Description
Unique identifier for the record deal action notification.
- Name
group_id
- Required
- Type
- integer
- Description
Unique identifier for the group id.
- Name
group_name
- Required
- Type
- string
- Description
Name of the group.
- Name
deal_id
- Required
- Type
- integer
- Description
Unique identifier for the deal id.
- Name
dealer_id
- Required
- Type
- integer
- Description
Unique identifier for the dealer id.
- Name
dealer_name
- Required
- Type
- string
- Description
Name of the dealer.
- Name
vehicle_registration
- Required
- Type
- string
- Description
Vehicle registration number.
- Name
action
- Required
- Type
- string
- Description
Details of action required.
- Name
action_completed_at
- Required
- Type
- string
- Description
Details of action required.
- Name
action_completed_by
- Required
- Type
- integer
- Description
Details of action required.
- Name
deal_owner_id
- Required
- Type
- integer
- Description
The user id of the person who completed the deal, unless reassigned.
- Name
deal_owner_name
- Required
- Type
- string
- Description
The name of the person who completed the deal, unless reassigned.
- Name
dates
- Required
- Type
- DateCollection
- Description
- Name
created_at
- Required
- Type
- datetime
- Description
The date the deal action notification item was created, represented in
YYYY-MM-DD HH:MM:SS
format
- Name
updated_at
- Required
- Type
- datetime
- Description
The date the deal action notification item was last updated, represented in
YYYY-MM-DD HH:MM:SS
format
- Name
deleted_at
- Required
- Type
- null | datetime
- Description
The date the deal action notification item was deleted, represented in
YYYY-MM-DD HH:MM:SS
format. If the record is not deleted, this will benull
Deal Action Resource
{
"id": 1,
"group_id": 2,
"group_name": "Group Name",
"deal_id": 3,
"dealer_id": 4,
"dealer_name": "Dealer Name",
"vehicle_registration": "QW61 DTY",
"action": "customer-support-document",
"action_completed_at": "2024-01-01 00:00:00",
"action_completed_by": 45,
"deal_owner_id": "32",
"deal_owner_name": "Bob",
"dates": {
"created_at": "2024-01-01 00:00:00",
"updated_at": "2024-01-02 12:00:00",
"deleted_at": null,
}
}
Search Deal Action
The search notifications deal action endpoint uses the standard Search package from the SDK.
An array of deal action resources are returned. If no results are found, an empty collection is returned.
Search Filters
- Name
filters.id.equals
- Required
- Type
- integer
- Description
Match a single notification deal action item by ID
- Name
filters.id.in
- Required
- Type
- array<integer>
- Description
Match notification deal action items by multiple IDs
- Name
filters.created_at.before_or_on
- Required
- Type
- datetime
- Description
Match all notification deal action items that were created before or on this datetime.
- Name
filters.created_at.after_or_on
- Required
- Type
- datetime
- Description
Match all deal action notification items that were created after or on this datetime.
- Name
filters.updated_at.before_or_on
- Required
- Type
- datetime
- Description
Match all deal action notification items that were last updated before or on this datetime.
- Name
filters.updated_at.after_or_on
- Required
- Type
- datetime
- Description
Match all deal action notification items that were last updated after or on this datetime.
- Name
filters.deleted_at.equals
- Required
- Type
- boolean
- Description
If you want to only deleted notification deal action items from results, provide
true
. If you only non-deleted notification deal action items, providefalse
Search Ordering
- id
- created_at
- updated_at
- deleted_at
Request
use Compliance\Sdk\ApexV3\Contracts\ApexV3SdkInterface;
use Compliance\Sdk\Authentication\Types\Machine;
use Compliance\Sdk\Search\Search;
private ApexV3SdkInterface $sdk;
$search = new Search();
$response = $this->sdk
->v2(new Machine())
->notifications()
->dealActions()
->search($search);
Response
{
"data": [
{
"id": 1,
"group_id": 2,
"group_name": "Group Name",
"deal_id": 3,
"dealer_id": 4,
"dealer_name": "Dealer Name",
"vehicle_registration": "QW61 DTY",
"action": "customer-support-document",
"action_completed_at": "2024-01-01 00:00:00",
"action_completed_by": 45,
"deal_owner_id": "32",
"deal_owner_name": "Bob",
"dates": {
"created_at": "2024-01-01 00:00:00",
"updated_at": "2024-01-02 12:00:00",
"deleted_at": null,
}
}
]
}
Update Notification Deal Action
Will attempt to update the notification deal action item by ID.
Only values provided in the request payload will be updated.
URL Parameters
- Name
deal_action_id
- Required
- required
- Type
- integer
- Description
ID of the notification deal action item to update
Payload
- Name
deal_owner_id
- Required
- required
- Type
- integer
- Description
The user id of the person the deal is reassigned to.
- Name
dealer_id
- Required
- required
- Type
- integer
- Description
ID of the dealership.
Error Codes
Status | Description |
---|---|
404 | The requested notification deal action could not be found. |
422 | The data provided in the payload was invalid. See errors for more details. |
Request
use Compliance\Sdk\ApexV3\Contracts\ApexV3SdkInterface;
use Compliance\Sdk\Authentication\Types\Machine;
private ApexV3SdkInterface $sdk;
$response = $this->sdk
->v2(new Machine())
->notifications()
->dealActions(1)
->update([
'deal_owner_id' => 32,
'dealer_id' => 25,
]);
Response
{
"data": {
"id": 1,
"group_id": 2,
"group_name": "Group Name",
"deal_id": 3,
"dealer_id": 25,
"dealer_name": "Dealer Name 2",
"vehicle_registration": "QW61 DTY",
"action": "customer-support-document",
"action_completed_at": "2024-01-01 00:00:00",
"action_completed_by": 45,
"deal_owner_id": 32,
"deal_owner_name": "Bob",
"dates": {
"created_at": "2024-01-01 00:00:00",
"updated_at": "2024-01-02 12:00:00",
"deleted_at": null,
}
}
}
Delete Notification Deal Action
Will attempt to delete the notification deal action item. This endpoint will only affect non-deleted notification deal actions.
The API will return a successful response if the deal action notification is already deleted, but won't update the deleted_at
timestamp.
URL Parameters
- Name
deal_action_id
- Required
- required
- Type
- integer
- Description
ID of the notification deal action to delete
Error Codes
Status | Description |
---|---|
404 | The requested notification deal action could not be found. |
Request
use Compliance\Sdk\ApexV3\Contracts\ApexV3SdkInterface;
use Compliance\Sdk\Authentication\Types\Machine;
private ApexV3SdkInterface $sdk;
$response = $this->sdk
->v2(new Machine())
->notifications()
->dealActions(1)
->delete();
Response
{
"data": {
"id": 1,
"group_id": 2,
"group_name": "Group Name",
"deal_id": 3,
"dealer_id": 4,
"dealer_name": "Dealer Name",
"vehicle_registration": "QW61 DTY",
"action": "customer-support-document",
"action_completed_at": "2024-01-01 00:00:00",
"action_completed_by": 45,
"deal_owner_id": "32",
"deal_owner_name": "Bob",
"dates": {
"created_at": "2024-01-01 00:00:00",
"updated_at": "2024-01-02 12:00:00",
"deleted_at": "2024-01-03 00:00:00"
}
}
}