---
title: "Create a new driver status option."
url: "https://developers.vzconnect.com/apis/driver-status-options-api-v1/versions/d227c3f2-e790-460f-9300-fe3653b69ae9/operations/createDriverStatusOption"
---

> Full API specification: https://developers.vzconnect.com/apis/driver-status-options-api-v1/versions/d227c3f2-e790-460f-9300-fe3653b69ae9.md

# Create a new driver status option.

`POST` `/da/v1/driverstatusoptions`

Operation ID: `createDriverStatusOption`

Creates driver statuses within a REVEAL account. Users cannot manage driver status options through the REVEAL UI, and therefore all new driver statuses must be created from this API before applying them to a driver's activity. At this time, only PunchIn and PunchOut driver status information data will display within the REVEAL designated reports to show punch in and out data. Integration users can send additional driver statuses available within REVEAL, but only Punch In and Out statuses will be shown within the UI.

## Request body (required)

Content types: `application/json`

## Responses

- `200` - Driver status option successfully created.
- `400` - Bad request. The Code is empty or already exists for the account (the comparison is not case-sensitive), or DriverStatusType is missing or not a recognised value.
- `401` - Unauthorized. Authentication credentials are missing or invalid.
- `500` - Internal server error.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Driver Status Options API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /da/v1/driverstatusoptions:
    post:
      summary: Create a new driver status option.
      description: >-
        Creates driver statuses within a REVEAL account. Users cannot manage
        driver status options through the REVEAL UI, and therefore all new
        driver statuses must be created from this API before applying them to a
        driver's activity.


        At this time, only PunchIn and PunchOut driver status information data
        will display within the REVEAL designated reports to show punch in and
        out data. Integration users can send additional driver statuses
        available within REVEAL, but only Punch In and Out statuses will be
        shown within the UI.
      operationId: createDriverStatusOption
      tags:
        - Driver Status Options API
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/da/v1/driverstatusoptions/?$
      requestBody:
        description: The Code, optional Description and DriverStatusType of the driver
          status option to create.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DriverStatusOptionRequest"
        required: true
      responses:
        "200":
          description: Driver status option successfully created.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DriverStatusOptionResponse"
        "400":
          description: Bad request. The Code is empty or already exists for the account
            (the comparison is not case-sensitive), or DriverStatusType is
            missing or not a recognised value.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
        "401":
          description: Unauthorized. Authentication credentials are missing or invalid.
        "500":
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
components:
  schemas:
    DriverStatusOptionRequest:
      type: object
      description: The payload used to create a driver status option within a REVEAL
        account.
      required:
        - Code
        - DriverStatusType
      properties:
        Code:
          type: string
          description: The Driver Status Type Code string value that will be displayed as
            reference within REVEAL where available.
          example: Clock Out
        Description:
          type: string
          description: A string field provided by the integration user to provide context
            for the Driver Status Type Code to be referenced.
          example: None Working Time
        DriverStatusType:
          $ref: "#/components/schemas/DriverStatusType"
    DriverStatusOptionResponse:
      type: object
      description: 'The response returned when a driver status option is created.
        Note: in the sample response the DriverStatusType is returned as the
        numeric enumerator value in string form (e.g. PunchOut maps to "4").'
      properties:
        Description:
          type: string
          description: A string field provided by the integration user to provide context
            for the Driver Status Type Code to be referenced.
          example: None Working Time
        Code:
          type: string
          description: The Driver Status Type Code string value that will be displayed as
            reference within REVEAL where available.
          example: Clock Out
        DriverStatusType:
          type: string
          description: "The enumerator value that the Driver Status Type is mapped to,
            returned as a numeric string. Mapping: NotSet = 0, None = 1, PunchIn
            = 2, PunchOut = 4, LunchStart = 8, LunchEnd = 16, BreakStart = 32,
            BreakEnd = 64, All = 127."
          enum:
            - "0"
            - "1"
            - "2"
            - "4"
            - "8"
            - "16"
            - "32"
            - "64"
            - "127"
          example: "4"
        CreatedDateUtc:
          type: string
          format: date-time
          description: The date the Driver Status Type Code was created within the REVEAL
            account and made available for use to apply to a driver status
            activity.
          example: 2016-12-21T19:32:14.8774588Z
    ErrorResponse:
      type: object
      description: Error response returned with a 400 or 500 status.
      properties:
        Message:
          type: string
          description: A human-readable description of the error.
          nullable: true
    DriverStatusType:
      type: string
      description: "The DriverStatusType the request content must map to. Each option
        maps to the following enumerator value: NotSet = 0, None = 1, PunchIn =
        2, PunchOut = 4, LunchStart = 8, LunchEnd = 16, BreakStart = 32,
        BreakEnd = 64, All = 127. At this time, only PunchIn and PunchOut driver
        status information data will display within the REVEAL designated
        reports. Integration users can send additional driver statuses, but only
        Punch In and Out statuses will be shown within the UI. When a POST is
        made successfully, the enumerator value that the Driver Status Type is
        mapped to is returned."
      enum:
        - NotSet
        - None
        - PunchIn
        - PunchOut
        - LunchStart
        - LunchEnd
        - BreakStart
        - BreakEnd
        - All
      example: PunchOut
```
