# Update a Subscription

Updates a Subscription. Specify only those parameters you wish to change.

Endpoint: POST /subscriptions/{id}
Version: v1
Security: basic_auth

## Path parameters:

  - `id` (string, required)
    ID of the Subscription.

## Request fields (application/json):

  - `package` (string)
    Package to run for the Report.

  - `candidate_id` (string)
    ID of the candidate being screened.

  - `start_date` (string)
    Start date for the subscription. This is the date on which the subscription will begin, and the first time the report will be run.

  - `interval_count` (integer)
    The number of intervals between each recurrent background check.

  - `interval_unit` (string)
    Interval at which the subscription will repeat.
    Enum: "day", "week", "month", "year"

  - `node` (string)
    `custom_id` of the associated node.

  - `work_locations` (array)
    Array of locations described using country, state, and city. When country is not specified defaults to US. State is required for US candidates. Country is required for non-US candidates.

  - `work_locations.country` (string)
    The country in ISO-3166 alpha-2 format.
    Example: US

  - `work_locations.state` (string, required)
    The two letter state code.
    Example: CA

  - `work_locations.city` (string)
    Name of the city
    Example: San Francisco

## Response 200 fields (application/json):

  - `id` (string)
    ID of the resource.
    Example: e44aa283528e6fde7d542194

  - `object` (string)
    Enum: "subscription"

  - `uri` (string)
    URI of the Subscription.
    Example: /v1/subscriptions/e44aa283528e6fde7d542194

  - `status` (string)
    Status of the Subscription.
    Enum: "active", "inactive"

  - `created_at` (string)
    Time at which the Subscription was created.
    Example: 2014-01-18T12:34:00Z

  - `canceled_at` (string)
    Time at which the Subscription was canceled.
    Example: null

  - `package` (string)
    Package to run for the Subscription.
    Example: driver_pro

  - `interval_count` (integer)
    The number of intervals between each recurrent background check.
    Example: 1

  - `interval_unit` (string)
    Interval at which the Subscription will repeat.
    Enum: "day", "week", "month", "year"

  - `start_date` (string)
    Start date for the Subscription. This is the date on which the Subscription will begin, and the first time the report will be run.
    Example: 2014-06-10

  - `next_occurrence_date` (string)
    The next date on which the Subscription will be run. This date is determined based on the `start_date`, `interval_unit`, `interval_count`, and the last date the subscription was run.
    Example: 2014-07-10

  - `candidate_id` (string)
    ID of the candidate screened.
    Example: 4722c07dd9a10c3985ae432a

  - `node` (string)
    Node to be used when generating a report for this Subscription.
    Example: zpy8orej4r614ize

  - `work_locations` (array)
    Array of work locations to be used when generating a report for this Subscription.

  - `work_locations.country` (string)
    The country in ISO-3166 alpha-2 format.
    Example: US

  - `work_locations.state` (string, required)
    The two letter state code.
    Example: CA

  - `work_locations.city` (string)
    Name of the city
    Example: San Francisco

## Response 400 fields (application/json):

  - `error` (string)
    Example: Dl number 'F211165' does not match the license number format in CA

## Response 401 fields (application/json):

  - `error` (string)
    Example: Bad authentication error

## Response 403 fields (application/json):

  - `error` (string)
    Example: You do not have permission to access the requested resource

