openapi: 3.0.2
info:
title: Workday Strategic Sourcing attachments supplier_companies 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: supplier_companies
x-displayName: Supplier Companies
description: 'Use the supplier companies API to create, update, and query the suppliers in Workday Strategic Sourcing.
## Supplier Company Object
<SchemaDefinition schemaRef="#/components/schemas/SupplierCompany" exampleRef="#/components/examples/SupplierCompany" showReadOnly={true} showWriteOnly={true} />
## Supplier Classification Value Object
<SchemaDefinition schemaRef="#/components/schemas/SupplierClassificationValue" exampleRef="#/components/examples/SupplierClassificationValue" showReadOnly={true} showWriteOnly={true} />
## Supplier Classification Field Value Object
<SchemaDefinition schemaRef="#/components/schemas/SupplierClassificationFieldValue" exampleRef="#/components/examples/SupplierClassificationFieldValue" showReadOnly={true} showWriteOnly={true} />
'
paths:
/supplier_companies:
get:
tags:
- supplier_companies
description: Returns a list of supplier companies for the specified criteria.
operationId: List Supplier Companies
summary: List Supplier Companies
parameters:
- name: filter
in: query
description: 'Filter supplier companies by multiple criteria. Only one filter per attribute is supported.
For best performance, we recommend 5 or less filters.
'
schema:
$ref: '#/components/schemas/SupplierCompanyInputFilter'
- name: include
in: query
schema:
$ref: '#/components/schemas/SupplierCompanyRelatedResources'
description: 'To reduce the number of HTTP requests, related resources can be requested along with the
requested primary resources. Such responses are called "compound documents". In a compound
document, all included resources will be represented as an array of resource objects in a
top-level `included` member.
The value of the `include` parameter must be a comma-separated list of relationships from
the list of available relationships.
```
/supplier_companies?include=payment_types,default_payment_type
```
In the response, relationships will be represented as normal linkage objects (containing
`id` and `type`), and full related resource details will be presented in the `included`
section as resource objects (with `attributes`, `links`, and potentially `relationships`).
'
- name: page
in: query
description: 'Customize pagination results with `size`.
'
schema:
$ref: '#/components/schemas/PageInput'
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
allOf:
- type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SupplierCompany'
included:
$ref: '#/components/schemas/SupplierCompanyIncludedResources'
- $ref: '#/components/schemas/Pagination'
examples:
default response:
$ref: '#/components/examples/index_response'
compound document:
$ref: '#/components/examples/index_compound_response'
'400':
description: Bad Request
content:
application/vnd.api+json:
schema:
$ref: '#/components/schemas/Errors'
examples:
include_not_supported:
summary: '''include'' parameter is not supported'
description: 'Returns error due to unsupported [parameter `include`](https://jsonapi.org/format/#fetching-includes).
'
value:
errors:
- detail: '''include'' parameter does not support following values: ["comments"]'
sort_not_supported:
summary: '''sort'' parameter is not supported'
description: 'Returns error due to unsupported [parameter `sort`](https://jsonapi.org/format/#fetching-sorting).
'
value:
errors:
- detail: '''sort'' parameter is not supported'
'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/suppliers/v1/supplier_companies\"\n"
post:
tags:
- supplier_companies
description: "Create a supplier company with given attributes, relationships, and related complex resources.\n\nWhen creating a supplier company with relationships, keep in mind that there are two kinds of\nrelationships: linked resources and composite resources.\n\n## Linked Resources\n\nThese are normal relationship resources managed outside of primary resource (supplier company).\nFor example, payment currencies exist on their own, and can be assigned to one or many supplier\ncompanies, contracts, etc. These resources usually have their own API management endpoints.\n\nAll related objects should exist prior to being linked to the supplier company. They can be\nreferenced by Workday Strategic Sourcing identifier, or by external ID; in the latter case, the relationship\nname is used with prefix `external_`. For example, a payment currency with Workday Strategic Sourcing ID `\"1\"` and\nexternal ID `\"C$EUR\"` can be used to initialize `default_payment_currency`:\n\n```json\n{\n \"default_payment_currency\": {\n \"data\" {\n \"id\": \"1\",\n \"type\": \"payment_currencies\"\n }\n }\n}\n```\n\n```json\n{\n \"external_default_payment_currency\": {\n \"data\" {\n \"id\": \"C$EUR\",\n \"type\": \"payment_currencies\"\n }\n }\n}\n```\n\nWhen `external_` prefix is applied to a \"many\" relationship, like `external_payment_currencies`,\nall of the identifiers will be treated as external IDs.\n\n\n"
operationId: Create a Supplier Company
summary: Create a Supplier Company
parameters:
- name: include
in: query
schema:
$ref: '#/components/schemas/SupplierCompanyRelatedResources'
description: 'Use the `include` parameter to request related resources along with the primary resource.
(see "List Supplier Companies" for more details).
'
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SupplierCompanyCreate'
examples:
simple request:
$ref: '#/components/examples/create_request'
responses:
'201':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SupplierCompany'
examples:
default response:
$ref: '#/components/examples/create_response'
compound response:
$ref: '#/components/examples/create_compound_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\":\"supplier_companies\",\"attributes\":{\"name\":\"My Supplier\"}}}' \\\n \"https://api.us.workdayspend.com/services/suppliers/v1/supplier_companies\"\n"
/supplier_companies/{id}:
get:
tags:
- supplier_companies
description: 'Retrieves the details of an existing supplier company. You need to supply the unique supplier
company identifier that was returned upon supplier company creation.
'
operationId: Get a Supplier Company
summary: Get a Supplier Company
parameters:
- name: id
in: path
description: Unique Supplier Company identifier.
required: true
schema:
type: integer
example: 1
- name: include
in: query
schema:
$ref: '#/components/schemas/SupplierCompanyRelatedResources'
description: 'Use the `include` parameter to request related resources along with the primary resource.
(see "List Supplier Companies" for more details).
'
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SupplierCompany'
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/suppliers/v1/supplier_companies/1\"\n"
patch:
tags:
- supplier_companies
description: 'Updates the details of an existing supplier company. You need to supply the unique supplier
company identifier that was returned upon supplier company creation.
Please note, that request body must include an `id` attribute with the value of your supplier
unique identifier (the same one you passed in the URL).
## Linked Resources
When updating relationships on a supplier company resource, keep in mind the whole relationship
will be replaced the new values. For example, if a supplier company has currencies with IDs
`"1"` and `"2"`, and in update request payload `payment_currencies` relationship is specified
with ID `"3"`, the only payment currency associated after the request succeeded will be `"3"`.
'
operationId: Update a Supplier Company
summary: Update a Supplier Company
parameters:
- name: id
in: path
description: Unique Supplier Company identifier.
required: true
schema:
type: integer
example: 1
- name: include
in: query
schema:
$ref: '#/components/schemas/SupplierCompanyRelatedResources'
description: 'Use the `include` parameter to request related resources along with the primary resource.
(see "List Supplier Companies" for more details).
'
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SupplierCompanyUpdate'
examples:
simple request:
$ref: '#/components/examples/update_request'
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SupplierCompany'
examples:
default response:
$ref: '#/components/examples/update_response'
compound response:
$ref: '#/components/examples/update_compound_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 'supplier_companies'
description: 'Returns error due to invalid `type` parameter.
'
value:
errors:
- detail: Missing or invalid 'type' specified, expected 'supplier_companies'
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\":\"supplier_companies\",\"id\":\"1\",\"attributes\":{\"segmentation_status\": \"out_of_compliance\"}}}' \\\n \"https://api.us.workdayspend.com/services/suppliers/v1/supplier_companies/1\"\n"
delete:
tags:
- supplier_companies
description: 'Deletes a supplier company. You need to supply the unique supplier
company identifier that was returned upon supplier company creation.
'
operationId: Delete a Supplier Company
summary: Delete a Supplier Company
parameters:
- name: id
in: path
description: Unique Supplier Company 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/suppliers/v1/supplier_companies/1\"\n"
/supplier_companies/{external_id}/external_id:
get:
tags:
- supplier_companies
description: 'Retrieves the details of an existing supplier company. You need to supply the unique supplier
company external identifier (the one you used when created the supplier company).
'
operationId: Get a Supplier Company by External ID
summary: Get a Supplier Company by External ID
parameters:
- name: external_id
in: path
description: Supplier company external identifier.
required: true
schema:
type: string
example: 1234-5678-abcd-efgh
- name: include
in: query
schema:
$ref: '#/components/schemas/SupplierCompanyRelatedResources'
description: 'Use the `include` parameter to request related resources along with the primary resource.
(see "List Supplier Companies" for more details).
'
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SupplierCompany'
examples:
success:
$ref: '#/components/examples/external_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/suppliers/v1/supplier_companies/SUP-1234/external_id\"\n"
patch:
tags:
- supplier_companies
description: 'Updates the details of an existing supplier company. You need to supply the unique supplier
company external identifier (the one you used when created the supplier company).
Please note, that request body must include an `id` attribute with the value of your supplier
external identifier (the same one you passed in the URL).
'
operationId: Update a Supplier Company by External ID
summary: Update a Supplier Company by External ID
parameters:
- name: external_id
in: path
description: Supplier company external identifier.
required: true
schema:
type: string
example: 1234-5678-abcd-efgh
- name: include
in: query
schema:
$ref: '#/components/schemas/SupplierCompanyRelatedResources'
description: 'Use the `include` parameter to request related resources along with the primary resource.
(see "List Supplier Companies" for more details).
'
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SupplierCompanyUpdate'
examples:
success:
$ref: '#/components/examples/external_update_request'
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/SupplierCompany'
examples:
success:
$ref: '#/components/examples/external_update_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 -X PATCH \\\n -d '{\"data\":{\"type\":\"supplier_companies\",\"id\":\"SUP-1234\",attributes\":{\"segmentation_status\": \"out_of_compliance\"}}}' \\\n \"https://api.us.workdayspend.com/services/suppliers/v1/supplier_companies/SUP-1234/external_id\"\n"
delete:
tags:
- supplier_companies
description: 'Deletes a supplier company. You need to supply the unique supplier
company external identifier (the one you used when created the supplier company).
'
operationId: Delete a Supplier Company by External ID
summary: Delete a Supplier Company by External ID
parameters:
- name: external_id
in: path
description: Supplier company external identifier.
required: true
schema:
type: string
example: 1234-5678-abcd-efgh
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/suppliers/v1/supplier_companies/SUP-1234/external_id\"\n"
/supplier_companies/describe:
get:
tags:
- supplier_companies
description: Returns a list of fields for the supplier company object.
operationId: Describe Supplier Company object
summary: Describe Supplier Company object
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
allOf:
- type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/SupplierCompanyFieldModel'
examples:
success:
$ref: '#/components/examples/describe_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/suppliers/v1/supplier_companies/describe\"\n"
components:
schemas:
SupplierGroupAttributes:
type: object
description: Supplier group attributes.
required:
- name
properties:
name:
type: string
maxLength: 255
description: Supplier group name.
external_id:
type: string
maxLength: 255
description: Supplier group external identifier.
SupplierCategoryId:
type: integer
description: Supplier category identifier string.
example: 1
DescribeFieldBase:
title: DescribeFieldModel
type: object
required:
- type
- id
properties:
type:
$ref: '#/components/schemas/DescribeFieldType'
id:
$ref: '#/components/schemas/DescribeFieldId'
OpenApiEnum:
type: string
enum:
- string
- number
- integer
- boolean
- array
- object
description: OpenAPI data type.
example: string
CustomFieldDecimal:
title: Decimal
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
value:
type: string
format: decimal
description: A decimal value represented as a number with floating point.
SupplierClassificationValueId:
type: string
description: A composite identifier for a virtual object created from the id of the supplier and the id of the classification in the response. Id or the external Id of a classification in the request.
example: 1
PaymentTermAttributes:
type: object
description: Payment term attributes.
required:
- name
properties:
name:
type: string
maxLength: 255
description: Payment term name.
external_id:
type: string
maxLength: 255
description: Payment term external identifier.
PrevPageLink:
type: object
properties:
prev:
type: string
format: url
description: Link to the previous results page.
nullable: true
deprecated: true
SupplierClassificationValueType:
type: string
description: Object type, should always be `supplier_classification_values`.
example: supplier_classification_values
PaymentCurrencyType:
type: string
description: Object type, should always be `payment_currencies`.
example: payment_currencies
CustomFieldCheckbox:
title: Checkbox
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
value:
type: boolean
example: true
Pagination:
type: object
properties:
meta:
type: object
description: Result set metadata.
properties:
count:
type: integer
description: Number of pages in the result set.
links:
$ref: '#/components/schemas/PaginationLinks'
DescribeFieldType:
type: string
description: Object type, should always be `describe_fields`.
example: describe_fields
CustomFieldShortText:
title: Short Text
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
value:
type: string
description: A short text (usually under 255 characters).
SupplierClassificationValueRelationship:
type: object
description: Supplier classification value relationships.
properties:
supplier_classification_field_values:
type: object
description: Supplier classification field values.
properties:
data:
type: array
items:
$ref: '#/components/schemas/SupplierClassificationFieldValueBase'
CustomFieldCurrency:
title: Currency
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
value:
format: integer
description: A currency value represented as an integer. The maximum value is 9,007,199,254,740,991.
SupplierGroupId:
type: integer
description: Supplier group identifier string.
example: 1
PaymentTermType:
type: string
description: Object type, should always be `payment_terms`.
example: payment_terms
CustomFieldParagraph:
title: Paragraph
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
value:
type: string
description: A longer text paragraph.
SupplierCompanyAttributes:
type: object
description: Supplier company attributes.
required:
- name
properties:
name:
type: string
maxLength: 255
description: Supplier company name.
description:
type: string
description: Supplier company description.
is_suggested:
type: boolean
description: The supplier was suggested by a team member, but not yet approved.
readOnly: true
public:
type: boolean
description: Identifies whether the supplier company is public.
risk:
type: string
description: Supplier risk must be one of the Supplier Company Risk Object's slug attribute value.
segmentation:
type: string
description: Supplier segmentation must be one of the Supplier Company Segmentation Object's slug attribute value.
segmentation_status:
type: string
description: Supplier segmentation status must be one of the Supplier Company Segmentation Status Object's slug attribute value.
segmentation_notes:
type: string
description: Segmentation notes.
preferred_supplier:
type: string
description: 'Supplier preferred supplier. Must be one of the slug values from the
Supplier Company Preferred Suppliers endpoint.
To retrieve valid options, call:
GET /api/services/suppliers/v1/supplier_company_preferred_suppliers
Example values: "tier_1", "tier_2", "preferred", "standard"
'
example: tier_1
tags:
type: array
items:
type: string
description: Supplier tags.
url:
type: string
description: Supplier website.
duns_number:
type: string
description: Supplier D-U-N-S® Number.
external_id:
type: string
description: Supplier ID in your internal database.
self_registered:
type: boolean
description: Indicates whether the supplier company is a self-registered supplier
onboarding_form_completion_status:
type: string
description: 'Provides details on the onboarding form completion status. The only available statuses are: null, ''not_started'', ''in_progress'' and ''completed''.'
accept_all_currencies:
type: boolean
description: Indicates whether the supplier company accepts all currencies.
updated_at:
type: string
format: date-time
readOnly: true
description: Last modification date.
example: '2019-10-29T21:28:46.790Z'
custom_fields:
type: array
items:
$ref: '#/components/schemas/CustomField'
description: 'Custom field values. Note: custom fields of type File can only be accessed through the user interface, they will be only exposed as `null` in the public API.'
Errors:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
PageInput:
type: object
properties:
size:
type: number
format: integer
description: The number of results returned per page. Default is `10` and max is `100`.
example: '25'
CustomFieldDate:
title: Date
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
value:
type: string
format: date
description: A date value.
PaymentCurrency:
allOf:
- $ref: '#/components/schemas/PaymentCurrencyBase'
- type: object
properties:
attributes:
$ref: '#/components/schemas/PaymentCurrencyAttributes'
Attachment:
allOf:
- $ref: '#/components/schemas/AttachmentBase'
CustomFieldSingleSelect:
title: Single Select
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
value:
type: string
description: A single value from a predefined list of possible options.
SupplierCategoryAttributes:
type: object
description: Supplier category attributes.
required:
- name
properties:
name:
type: string
maxLength: 255
description: Supplier category name.
external_id:
type: string
maxLength: 255
description: Supplier category external identifier.
SupplierCompanyIncludedResources:
allOf:
- type: array
items:
anyOf:
- $ref: '#/components/schemas/Attachment'
- $ref: '#/components/schemas/SupplierCategory'
- $ref: '#/components/schemas/SupplierGroup'
- $ref: '#/components/schemas/PaymentTerm'
- $ref: '#/components/schemas/PaymentType'
- $ref: '#/components/schemas/PaymentCurrency'
- $ref: '#/components/schemas/SupplierClassificationValue'
CustomField:
oneOf:
- $ref: '#/components/schemas/CustomFieldCheckbox'
- $ref: '#/components/schemas/CustomFieldShortText'
- $ref: '#/components/schemas/CustomFieldParagraph'
- $ref: '#/components/schemas/CustomFieldDate'
- $ref: '#/components/schemas/CustomFieldInteger'
- $ref: '#/components/schemas/CustomFieldCurrency'
- $ref: '#/components/schemas/CustomFieldDecimal'
- $ref: '#/components/schemas/CustomFieldSingleSelect'
- $ref: '#/components/schemas/CustomFieldMultipleSelect'
- $ref: '#/components/schemas/CustomFieldURL'
- $ref: '#/components/schemas/CustomFieldLookup'
- $ref: '#/components/schemas/CustomFieldRelated'
CustomFieldLookup:
title: Lookup
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
value:
type: string
description: A value from a customer-provided lookup data source.
CustomFieldMultipleSelect:
title: Multiple Select
allOf:
- $ref: '#/components/schemas/CustomFieldBase'
- type: object
properties:
value:
type: array
description: A list of values from a predefined list of possible opti
# --- truncated at 32 KB (104 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/scoutrfp/refs/heads/main/openapi/scoutrfp-supplier-companies-api-openapi.yml