Skip to content

Get field schema for a time management code type

Request

🔐 Required role: TM_CODE_R or TM_CODE_C

📖 Data dictionary: Time-management code

Get field schema for a time management code type

Returns field definitions for the requested code type.

For ExpenseCode, code and display are required; pmsRef defaults to systemRef.reference, and description, billable, taxable, reimbursable, and active are optional. Use GET /api/v1/codes/schema/ExpenseCode for the full attribute list.

Security
(BearerAuth and CfAccessClientId and CfAccessClientSecret) or BearerAuth
Path
typestringrequired

Code type, as listed by GET /api/v1/codes/types (for example TimeCode).

curl -i -X GET \
  'https://api.sandbox.aiwyn.app/api/v1/codes/schema/{type}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'CF-Access-Client-Id: YOUR_API_KEY_HERE' \
  -H 'CF-Access-Client-Secret: YOUR_API_KEY_HERE'

Responses

Schema retrieved successfully

Bodyapplication/json
dataobject
errorobject or null
metaobject
Response
{ "data": { "entityType": "string", "fields": [ … ] }, "error": {}, "meta": { "success": true, "message": "string", "timestamp": "2019-08-24T14:15:22Z", "version": "string" } }