Scout RFP (Workday Strategic Sourcing) fields API
Use the fields API to create, update, and query the custom fields in Workday Strategic Sourcing. ## Field Object
Use the fields API to create, update, and query the custom fields in Workday Strategic Sourcing. ## Field Object
openapi: 3.0.2
info:
title: Workday Strategic Sourcing attachments fields API
version: '1.0'
description: '<span id="section/Authentication/api_key" data-section-id="section/Authentication/api_key"></span>
<span id="section/Authentication/user_token" data-section-id="section/Authentication/user_token"></span>
<span id="section/Authentication/user_email" data-section-id="section/Authentication/user_email"></span>
'
servers:
- url: https://api.us.workdayspend.com/services/attachments/v1
description: Production Server
- url: https://api.sandbox.us.workdayspend.com/services/attachments/v1
description: Sandbox Server
security:
- api_key: []
user_token: []
user_email: []
tags:
- name: fields
x-displayName: Fields
description: 'Use the fields API to create, update, and query the custom fields in Workday Strategic Sourcing.
## Field Object
<SchemaDefinition schemaRef="#/components/schemas/Field" showReadOnly={true} showWriteOnly={true} />
'
paths:
/fields:
get:
tags:
- fields
description: Returns a list of custom fields for the specified criteria.
operationId: List Fields
summary: List Fields
parameters:
- name: filter
in: query
description: 'Filter custom fields by multiple criteria. Only one filter per attribute is supported.
For best performance, we recommend 5 or less filters.
'
schema:
$ref: '#/components/schemas/FieldInputFilter'
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Field'
examples:
success:
$ref: '#/components/examples/index_response'
'401':
description: Unauthorized
x-codeSamples:
- label: Curl
source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n -H \"X-User-Token: ${USER_TOKEN}\" \\\n -H \"X-User-Email: ${USER_EMAIL}\" \\\n -H \"Content-Type: application/vnd.api+json\" \\\n \"https://api.us.workdayspend.com/services/fields/v1/fields\"\n"
post:
tags:
- fields
description: 'Create a field with given parameters.
For fields with `target_object` set to `RFP`, `group` relationship should be omitted. It is
required to specify the relationship for all other target objects.
'
operationId: Create a Field
summary: Create a Field
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/FieldCreate'
examples:
success:
$ref: '#/components/examples/create_request'
responses:
'201':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Field'
examples:
success:
$ref: '#/components/examples/create_response'
'401':
description: Unauthorized
x-codeSamples:
- label: Curl
source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n -H \"X-User-Token: ${USER_TOKEN}\" \\\n -H \"X-User-Email: ${USER_EMAIL}\" \\\n -H \"Content-Type: application/vnd.api+json\" \\\n -X POST \\\n -d '{\"data\":{\"type\":\"fields\",\"attributes\":{\"name\":\"custom_field\"}}' \\\n \"https://api.us.workdayspend.com/services/fields/v1/fields\"\n"
/fields/{id}:
get:
tags:
- fields
description: 'Retrieves the details of an existing field. You need to supply the unique field
identifier that was returned upon field creation.
'
operationId: Get a Field
summary: Get a Field
parameters:
- name: id
in: path
description: Unique Field identifier.
required: true
schema:
type: integer
example: 1
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Field'
examples:
success:
$ref: '#/components/examples/show_response'
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- label: Curl
source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n -H \"X-User-Token: ${USER_TOKEN}\" \\\n -H \"X-User-Email: ${USER_EMAIL}\" \\\n -H \"Content-Type: application/vnd.api+json\" \\\n \"https://api.us.workdayspend.com/services/fields/v1/fields/1\"\n"
patch:
tags:
- fields
description: 'Updates the details of an existing field. You need to supply the unique
identifier that was returned upon field creation.
For fields with `target_object` set to `RFP`, `group` relationship should be omitted.
Please note, that request body must include an `id` attribute with the value of your field
unique identifier (the same one you passed in the URL).
'
operationId: Update a Field
summary: Update a Field
parameters:
- name: id
in: path
description: Unique Field identifier.
required: true
schema:
type: integer
example: 1
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/FieldUpdate'
examples:
success:
$ref: '#/components/examples/update_request'
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/Field'
examples:
success:
$ref: '#/components/examples/update_response'
'401':
description: Unauthorized
'404':
description: Not Found
'409':
description: Conflict
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Errors'
examples:
invalid_type:
summary: Missing or invalid 'type' specified, expected 'fields'
description: 'Returns error due to invalid `type` parameter.
'
value:
errors:
- detail: Missing or invalid 'type' specified, expected 'fields'
x-codeSamples:
- label: Curl
source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n -H \"X-User-Token: ${USER_TOKEN}\" \\\n -H \"X-User-Email: ${USER_EMAIL}\" \\\n -H \"Content-Type: application/vnd.api+json\" \\\n -X PATCH \\\n -d '{\"data\":{\"type\":\"fields\",\"id\":\"2\",\"attributes\":{\"name\":\"Updated Field Name\"}}}' \\\n \"https://api.us.workdayspend.com/services/fields/v1/fields/2\"\n"
delete:
tags:
- fields
description: 'Deletes a field. You need to supply the unique field
identifier that was returned upon field creation.
'
operationId: Delete a Field
summary: Delete a Field
parameters:
- name: id
in: path
description: Unique Field identifier.
required: true
schema:
type: integer
example: 1
responses:
'204':
description: OK
'401':
description: Unauthorized
'404':
description: Not Found
x-codeSamples:
- label: Curl
source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n -H \"X-User-Token: ${USER_TOKEN}\" \\\n -H \"X-User-Email: ${USER_EMAIL}\" \\\n -H \"Content-Type: application/vnd.api+json\" \\\n -X DELETE \\\n \"https://api.us.workdayspend.com/services/fields/v1/fields/1\"\n"
components:
schemas:
FieldCreate:
type: object
required:
- type
properties:
type:
$ref: '#/components/schemas/FieldType'
attributes:
$ref: '#/components/schemas/FieldAttributes'
relationships:
$ref: '#/components/schemas/FieldRelationship'
OpenApiEnum:
type: string
enum:
- string
- number
- integer
- boolean
- array
- object
description: OpenAPI data type.
example: string
FieldGroupId:
type: integer
description: Field group identifier string.
example: 1
FieldBase:
title: Field
type: object
required:
- type
- id
properties:
type:
$ref: '#/components/schemas/FieldType'
id:
$ref: '#/components/schemas/FieldId'
FieldGroupBase:
title: Field
type: object
required:
- type
- id
properties:
type:
$ref: '#/components/schemas/FieldGroupType'
id:
$ref: '#/components/schemas/FieldGroupId'
FieldGroupType:
type: string
description: Object type, should always be `field_groups`.
example: field_groups
Field:
allOf:
- $ref: '#/components/schemas/FieldBase'
- type: object
properties:
attributes:
$ref: '#/components/schemas/FieldAttributes'
relationships:
$ref: '#/components/schemas/FieldRelationship'
links:
$ref: '#/components/schemas/ResourceLinks'
FieldUpdate:
type: object
required:
- type
- id
properties:
type:
$ref: '#/components/schemas/FieldType'
id:
$ref: '#/components/schemas/FieldId'
attributes:
allOf:
- $ref: '#/components/schemas/FieldAttributes'
- type: object
properties:
target_object:
readOnly: true
relationships:
$ref: '#/components/schemas/FieldRelationship'
Error:
type: object
properties:
detail:
type: string
description: A human-readable explanation specific to this occurrence of the problem.
FieldRelationship:
type: object
description: Field relationship.
properties:
group:
type: object
description: 'Reference to the field group where the field belongs to. It is always `null` for fields
with `target_object` set to RFP, and required for all other fields.
'
properties:
data:
$ref: '#/components/schemas/FieldGroupBase'
CustomFieldEnum:
type: string
enum:
- Checkbox
- File
- Short Text
- Paragraph
- Date
- Integer
- Currency
- Decimal
- Single Select
- Multiple Select
- URL
- Lookup
- Related
description: Internal name and meaning of each field.
example: Short Text
SelfLink:
type: object
properties:
self:
type: string
format: url
description: Normalized link to the resource.
FieldId:
type: integer
description: Field identifier string.
example: 1
FieldAttributes:
type: object
description: Field attributes.
required:
- name
properties:
name:
type: string
maxLength: 255
description: Field name.
target_object:
type: string
enum:
- PROJECT
- RFP
- SUPPLIER_COMPANY
description: Field object type string.
data_type:
allOf:
- $ref: '#/components/schemas/OpenApiEnum'
- readOnly: true
type_description:
$ref: '#/components/schemas/CustomFieldEnum'
position:
type: integer
description: Field order position on the UI.
readOnly: true
required:
type: boolean
description: 'Identifies whether the field is required in order to create the object successfully.
'
FieldType:
type: string
description: Object type, should always be `fields`.
example: fields
ResourceLinks:
type: object
description: List of related links.
allOf:
- $ref: '#/components/schemas/SelfLink'
FieldInputFilter:
type: object
properties:
group_id_equals:
type: string
description: ID of the group for which fields should be selected.
example: 1
target_object_equals:
type: string
description: Find custom fields by target class name.
example: RFP
Errors:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
examples:
index_response:
value:
data:
- id: '1'
type: fields
attributes:
target_object: PROJECT
name: Field One
data_type: string
type_description: Short Text
position: null
required: false
relationships:
group:
data:
id: '1'
type: field_groups
links:
self: https://api.us.workdayspend.com/services/fields/v1/fields/1
- id: '2'
type: fields
attributes:
target_object: PROJECT
name: Field Two
data_type: string
type_description: Single Select
position: null
required: false
relationships:
group:
data:
id: '1'
type: field_groups
links:
self: https://api.us.workdayspend.com/services/fields/v1/fields/2
links:
self: https://api.us.workdayspend.com/services/fields/v1/fields
update_request:
value:
data:
id: '1'
type: fields
attributes:
name: Updated Custom Field
type_description: Short Text
required: true
relationships:
group:
data:
id: '2'
type: field_groups
show_response:
value:
data:
id: '1'
type: fields
attributes:
target_object: PROJECT
name: Field One
data_type: string
type_description: Short Text
position: null
required: false
relationships:
group:
data:
id: '1'
type: field_groups
links:
self: https://api.us.workdayspend.com/services/fields/v1/fields/1
create_request:
value:
data:
type: fields
attributes:
target_object: PROJECT
name: Custom Field
type_description: Short Text
required: false
relationships:
group:
data:
type: field_groups
id: '1'
create_response:
value:
data:
id: '1'
type: fields
attributes:
target_object: PROJECT
name: Custom Field
data_type: string
type_description: Short Text
position: null
required: false
relationships:
group:
data:
id: '1'
type: field_groups
links:
self: https://api.us.workdayspend.com/services/fields/v1/fields/1
update_response:
value:
data:
id: '1'
type: fields
attributes:
target_object: PROJECT
name: Updated Custom Field
data_type: string
type_description: Short Text
position: null
required: true
relationships:
group:
data:
id: '2'
type: field_groups
links:
self: https://api.us.workdayspend.com/services/fields/v1/fields/1
securitySchemes:
api_key:
type: apiKey
name: X-Api-Key
in: header
description: Company API key.
user_token:
type: apiKey
name: X-User-Token
in: header
description: User token.
user_email:
type: apiKey
name: X-User-Email
in: header
description: User email.
x-tagGroups:
- name: Getting Started
tags:
- support
- servers
- api_specification
- authentication
- rate_limiting
- name: Attachments
tags:
- attachments