---
title: "Get authorization code definitions."
method: GET
path: "/api/v2/AuthorizationCodeDefinitions"
tags: ["AuthorizationCodeDefinitions"]
---

# Get authorization code definitions.

`GET /api/v2/AuthorizationCodeDefinitions`

## Request

- Base URL: `https://secure.agco-ats.com`
- URL: `https://secure.agco-ats.com/api/v2/AuthorizationCodeDefinitions`
- Auth: none declared

Additional searches: validationFields[Name]=true and dataFields[Name]=true. These can be used to search for authorization code definitions that have the specified data or validation fields.

## Query parameters

- `limit` integer
- `offset` integer
- `name` string
- `createdByUserID` integer
- `deletedByUserID` integer
- `includeDeleted` boolean
- `categoryID` string

## Response `200`

OK

- APIIPagedResponseAuthorizationCodesSharedModelsAuthorizationCodeDefinition
  - `Entities` AuthorizationCodesSharedModelsAuthorizationCodeDefinition[]
    - `ID` string: The ID of the authorization code definition. Read only.
    - `AuthorizationID` string: The value used for securing codes generated.
    - `Name` string, required: The name of the authorization code definition. May not be updated.
    - `Description` string: A description of this definition. May not be updated.
    - `CreatedByUserID` integer: The ID of the user that created this definition. Read only.
    - `CreatedDate` string, date-time: A timestamp of when this definition was created. Read only.
    - `IsDeleted` boolean: Indicates whether this definition is enabled. True if generating codes is disabled.
    - `DeletedByUserID` integer: The ID of the user that deleted this definition. Read only.
    - `DeletedDate` string, date-time: A timestamp of when this definition was deleted. Read only.
    - `DataFields` AuthorizationCodesSharedModelsDataField[]: The defined fields to include in authorization codes generated from this definition. May not be updated.
      - `Type` 'Boolean' | 'Decimal' | 'Float' | 'VariableLengthByteArray', required: The type of this data field.
      - `MinValue` number, double: The minimum value that can be represented by this data field. Required only by the 'Decimal' data type.
      - `MaxValue` number, double: The maximum value that can be represented by this data field. Required only by the 'Decimal' data type.
      - `ScaleFactor` number, double: The resolution of values that can be represented by this data field. The base value is multiplied by this to compute the final value. Required only by the 'Decimal' data type.
      - `DigitsPrecision` integer: The number of decimal digits to be used by this data field. Required only by the 'Float' data type. Must be in range 1 - 15.
      - `MaxExponent` integer: The maximum exponent to be used by this data field. Required only by the 'Float' data type. May not be greater than 307.
      - `MinExponent` integer: The minimum exponent to be used by this data field. Required only by the 'Float' data type. May not be less than -292.
      - `Signed` boolean: Indicates whether this value is signed. Required only by the 'Float' data type.
      - `Name` string, required: The name of the field.
    - `ValidationFields` AuthorizationCodesSharedModelsValidationField[]: The defined fields to verify when reading authorization codes generated from this definition. May not be updated.
      - `Type` 'Boolean' | 'Float' | 'Int' | 'StringCaseInsensitive' | 'StringCaseSensitive', required: The type for this validation field.
      - `Name` string, required: The name of the field.
    - `HashLength` integer: The bit length of the hash data which will be used for the authorization code. Defaults to 20. May not be updated.
    - `RandomLength` integer: The bit length of random data which will be included in the authorization code. This is necessary to allow creation of "identical" authorization codes containing the same timestamp. Defaults to 5. May not be updated.
    - `DurationAmount` integer: The amount of duration for the specified duration unit used to calculate the Authorization Code. Defaults to 1. May not be updated.
    - `DurationUnits` 'Weeks' | 'Days' | 'Hours' | 'Minutes': The units of duration used to calculate the Authorization Code. Defaults to 'Days'. May not be updated.
    - `DurationAccuracy` integer: The number of bits used for timestamp verification. Defaults to 5. May not be updated.
  - `Metadata` APIPagedResponseMetadata: Metadata for the paged response
    - `TotalCount` integer, required: The total number of entities matching the request.
    - `Limit` integer, required: The number of entities this paged response is limited to.
    - `Offset` integer, required: The number of entities prior to this page of items.

## Other responses

- `default`: API Error Response

## Changes

- **2022-09-25** `64b7a32ab769`: 1 info
  - added the new optional `query` request parameter `categoryID`

[Operation history](https://skmtc.dev/agco-ats/apis/agco-ats-api/changes/api/v2/AuthorizationCodeDefinitions/get.md)

---

[API](https://skmtc.dev/agco-ats/apis/agco-ats-api.md) - [All operations](https://skmtc.dev/agco-ats/apis/agco-ats-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agco-ats/apis/agco-ats-api/revisions/8b416443df5c?raw)
