AR Statuses

The AR Status API allows you to review and manage available AR statuses that can be assigned to dealers


The AR Status Resource

Properties

  • Name
    id
    Required
    Type
    integer
    Description

    Unique identifier for the AR status.

  • Name
    name
    Required
    Type
    string
    Description

    The user friendly name for the AR status.

  • Name
    legacy_reference
    Required
    Type
    string
    Description

    The legacy reference for the AR status. Used in mappings with the legacy databases and services.

  • Name
    flags
    Required
    Type
    object
    Description
    • Name
      has_consumer_duty
      Required
      Type
      boolean
      Description

      Determines whether dealers with this AR status should receive a consumer duty report

    • Name
      has_general_insurance
      Required
      Type
      boolean
      Description

      Determines whether dealers with this AR status sell insurance products

    • Name
      has_consumer_credit
      Required
      Type
      boolean
      Description

      Determines whether dealers with this AR status sell consumer credit products

    • Name
      directly_authorised
      Required
      Type
      boolean
      Description

      Determines whether dealers with this AR status are directly authorised

    • Name
      is_cc_var
      Required
      Type
      boolean
      Description

      Determines whether dealers with this AR status are consumer credit VARs

  • Name
    dates.created_at
    Required
    Type
    datetime
    Description

    The date the AR status record was created, represented in YYYY-MM-DD HH:MM:SS format

  • Name
    dates.updated_at
    Required
    Type
    datetime
    Description

    The date the AR Status record was last updated, represented in YYYY-MM-DD HH:MM:SS format

  • Name
    dates.deleted_at
    Required
    Type
    null | datetime
    Description

    The date the AR Status record was deleted, represented in YYYY-MM-DD HH:MM:SS format. If the AR status record is not deleted, this will be null

AR Status

{
  "id": 1,
  "name": "AR GI and ARCC",
  "legacy_reference": "AR Gi & ARCC",
  "flags": {
    "has_consumer_duty": true,
    "has_general_insurance": true,
    "has_consumer_credit": true,
    "directly_authorised": false,
    "is_cc_var": false,
  },
  "dates": {
    "created_at": "2024-01-01 00:00:00",
    "updated_at": "2024-01-02 12:00:00",
    "deleted_at": null,
  }
}

GET/v2/ar-statuses

Search AR Statuses

The search AR Statuses endpoint uses the standard [/searching](search package) from the SDK.

An array of AR status 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 AR status by ID

  • Name
    filters.id.equals
    Required
    Type
    integer
    Description

    Match multiple AR statuses by ID

  • Name
    filters.legacy_reference.equals
    Required
    Type
    integer
    Description

    Match a single AR status by legacy reference

  • Name
    filters.legacy_reference.equals
    Required
    Type
    integer
    Description

    Match multiple AR statuses by legacy reference

  • Name
    filters.has_consumer_duty.equals
    Required
    Type
    integer
    Description

    Find AR statuses that allow for consumer duty

Error Codes

Status Description
404 The requested status could not be found

Request

GET
/v2/ar-statuses
use Compliance\Sdk\ApexV3\Contracts\ApexV3SdkInterface;
use Compliance\Sdk\Authentication\Types\Machine;

private ApexV3SdkInterface $sdk;

$response = $this->sdk
  ->v2(new Machine())
  ->arStatuses()
  ->search($search);

Response

{
  "data": [
    {
      "id": 1,
      "name": "AR GI and ARCC",
      "legacy_reference": "AR Gi & ARCC",
      "flags": {
        "has_consumer_duty": true,
        "has_general_insurance": true,
        "has_consumer_credit": true,
        "directly_authorised": false,
        "is_cc_var": false,
      },
      "dates": {
        "created_at": "2024-01-01 00:00:00",
        "updated_at": "2024-01-02 12:00:00",
        "deleted_at": null,
      }
    }
  ]
}

GET/v2/ar-statuses/:status_id

Retrieve AR Status

Will retrieve a specific AR status

URL Parameters

  • Name
    status_id
    Required
    required
    Type
    integer
    Description

    ID of the status to retrieve

Error Codes

Status Description
404 The requested status could not be found

Request

GET
/v2/ar-statuses/:status_id
use Compliance\Sdk\ApexV3\Contracts\ApexV3SdkInterface;
use Compliance\Sdk\Authentication\Types\Machine;

private ApexV3SdkInterface $sdk;

$response = $this->sdk
  ->v2(new Machine())
  ->arStatus(1)
  ->get();

Response

{
  "data": {
    "id": 1,
    "name": "AR GI and ARCC",
    "legacy_reference": "AR Gi & ARCC",
    "flags": {
      "has_consumer_duty": true,
      "has_general_insurance": true,
      "has_consumer_credit": true,
      "directly_authorised": false,
      "is_cc_var": false,
    },
    "dates": {
      "created_at": "2024-01-01 00:00:00",
      "updated_at": "2024-01-02 12:00:00",
      "deleted_at": null,
    }
  }
}

PUT/v2/ar-statuses/:status_id

Update AR Status

Will attempt to update the the AR status. Only values provided in the request payload will be updated. Any values not specified will remain as their existing values.

URL Parameters

  • Name
    status_id
    Required
    required
    Type
    integer
    Description

    ID of the status to update

Payload

  • Name
    name
    Required
    Type
    string
    Description

    New user friendly name for the status

  • Name
    legacy_reference
    Required
    Type
    string
    Description

    The new legacy reference for the status

  • Name
    flags
    Required
    Type
    object
    Description

    Only flags provided will be updated. Any flags not provided will remain as their current values.

    • Name
      has_consumer_duty
      Required
      Type
      boolean
      Description

      Determines whether dealers with this AR status should receive a consumer duty report

Error Codes

Status Description
404 The requested dealer could not be found.
422 The data provided in the payload was invalid. See errors for more details.

Request

PUT
/v2/ar-statuses/:status_id
use Compliance\Sdk\ApexV3\Contracts\ApexV3SdkInterface;
use Compliance\Sdk\Authentication\Types\Machine;

private ApexV3SdkInterface $sdk;

// To update a single contact method
$response = $this->sdk
  ->v2(new Machine())
  ->arStatus(1)
  ->update([
    'name' => 'New name',
    'legacy_reference' => 'new legacy reference',
    'flags' => [
      'has_consumer_duty' => true,
    ]
  ]);

Response

{
  "data": {
    "id": 1,
    "name": "AR GI and ARCC",
    "legacy_reference": "AR Gi & ARCC",
    "flags": {
      "has_consumer_duty": true,
      "has_general_insurance": true,
      "has_consumer_credit": true,
      "directly_authorised": false,
      "is_cc_var": false,
    },
    "dates": {
      "created_at": "2024-01-01 00:00:00",
      "updated_at": "2024-01-02 12:00:00",
      "deleted_at": null,
    }
  }
}