Workday Strategic Sourcing Spend Categories API (1.0)
Download OpenAPI specification:
We've provided detailed documentation below to guide you. However, if you need additional assistance, here's how you can get the support you need:
- Community Discussions: Join the conversation on our Workday Community Discussion Boards (found under the "Collaborate" section in community). Connect with other users, share best practices, and get answers to your configuration questions.
- Expert Configuration Assistance (Professional Services): For tailored, hands-on support with your specific project, our Professional Services team is available.
- Looking for personalized guidance? Workday Success Plan customers can submit an "Ask" for expert insights on configuration and best practices.
- Need custom solutions? Consider Expert Assist, our consulting service for detailed changes and project support.
- Reporting System Issues: If you suspect a problem with the Workday system itself, please connect with our dedicated support team. Your company's Named Support Contact (NSC) can log a Product Support Defect case. We'll review the issue based on its impact and Workday's service level agreement (SLA).
US Region
Environment | US region Base URI |
---|---|
Production | https://api.us.workdayspend.com/services/spend_categories/v1 |
Sandbox | https://api.sandbox.us.workdayspend.com/services/spend_categories/v1 |
EU Region
Environment | EU region Base URI |
---|---|
Production | https://api.eu.workdayspend.com/services/spend_categories/v1 |
Sandbox | https://api.sandbox.eu.workdayspend.com/services/spend_categories/v1 |
CA Region
Environment | CA region Base URI |
---|---|
Production | https://api.ca.workdayspend.com/services/spend_categories/v1 |
Sandbox | https://api.sandbox.ca.workdayspend.com/services/spend_categories/v1 |
The API conforms to the JSON API Specification.
The current version of this service is indicated by the X-Api-Version
header.
Sample version header: X-Api-Version: 1.0
.
Our API adheres to the ISO 8601 standard when accepting and formatting Date and Time fields. All Date and Time fields returned by this API will be in the UTC timezone.
Date and Time fields sent to this API can be in any timezone, provided they adhere to the ISO 8601 standard.
The Workday Strategic Sourcing API uses API keys to authenticate requests. Every request will require all 3 HTTP headers:
HTTP Header | Description |
---|---|
X-Api-Key | a company-wide API key |
X-User-Token | a user-specific API token |
X-User-Email | user email |
You can generate all of those from the API tokens section of your Profile page.
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Rate limit windows are per second and are shared by all API Keys for a company.
The rate limit is 5 requests per second.
When request submissions exceed the limits, the limit-exceeding requests return 429 Too Many Requests
error responses to the client.
Upon receiving a 429
response, it is recommended to retry the request in compliance with the rate limit. One example would be to add a sleep function for 1 second and retry.
The external_id
field exists on many of the Workday Strategic Sourcing resources. This optional and mutable extension is intended to store foreign keys of the corresponding resource from a third party system. These IDs are not considered Sourcing Data and may be logged in external systems. Do not include any sensitive or personal data in IDs.
The purpose of external IDs is to:
- Prevent duplicate record creation
- Allow resources in Workday Strategic Sourcing and a third party system to share the same identifier
- Allow for records to be queried or updated without requiring knowledge of the Workday Strategic Sourcing generated IDs
Paginated endpoints may return a subset of the total results for a GET
request that returns multiple resources. Endpoints that support pagination will include usage details in the Query Parameters section for the resource.
The paginated results can be configured using the page
query parameter to configure the number of returned results. The default pagination size is 10 results and the maximum pagination size is 100 results per request.
Endpoints that support pagination may return "self" and "next" sections within the "links" section that navigate to the current and next pages respectively.
Example Paginated Request
Request Query Parameter Format
/projects?page[size]=25
Response Schema
The paginated response will also include the following schema
object Result set metadata. | |
object (PaginationLinks) List of related links. |
null
The results can be filtered to a subset of the total set of results using filter
query parameters.
Endpoints that support filtering will include usage details in the Query Parameters section for the resource.
Most filters that end in equals
support a Query Parameter array format to filter by multiple values.
Example:
?filter[status_equals][]=submitted&filter[status_equals][]=resubmitted
Use the Spend Categories API to create, update, and query the Spend Categories in Workday Strategic Sourcing.
Spend Categories are used in both the project and contract resources. On POST and PATCH related endpoints for those resources a spend_category_id can be added to attach a spend category. The spend_category_id is a foreign key for the spend_categories resource's id.
type | string (SpendCategoryType) Object type, should always be |
id required | integer (SpendCategoryId) Spend category identifier string. |
object (SpendCategoryAttributes) Spend category attributes. |
{- "type": "spend_categories",
- "id": 1,
- "attributes": {
- "name": "string",
- "external_id": "string",
- "usages": [
- "procurement"
]
}
}
List Spend Categories
Returns a list of spend categories.
Authorizations:
Responses
Request samples
- Curl
curl -H "X-Api-Key: ${COMPANY_KEY}" \ -H "X-User-Token: ${USER_TOKEN}" \ -H "X-User-Email: ${USER_EMAIL}" \ -H "Content-Type: application/vnd.api+json" \ "https://api.us.workdayspend.com/services/spend_categories/v1/spend_categories"
Response samples
- 200
{- "meta": {
- "count": 2
}, - "data": [
- {
- "type": "spend_categories",
- "id": "1",
- "attributes": {
- "name": "Spend Category #1",
- "external_id": "SP-1",
- "usages": [
- "procurement"
]
}, - "links": {
}
}, - {
- "type": "spend_categories",
- "id": "2",
- "attributes": {
- "name": "Spend Category #2",
- "external_id": "SP-2",
- "usages": [
- "procurement"
]
}, - "links": {
}
}
], - "links": {
}
}
Create a Spend Category
Create a Spend Category with given parameters.
Authorizations:
Request Body schema: application/vnd.api+json
object (SpendCategoryCreate) |
Responses
Request samples
- Payload
- Curl
{- "data": {
- "type": "spend_categories",
- "attributes": {
- "name": "Spend Category #1",
- "external_id": "SP-1",
- "usages": [
- "procurement"
]
}
}
}
Response samples
- 201
{- "data": {
- "id": "1",
- "type": "spend_categories",
- "attributes": {
- "name": "Spend Category #1",
- "external_id": "SP-1",
- "usages": [
- "procurement"
]
}, - "links": {
}
}
}
Get a Spend Category
Retrieves the details of an existing Spend Category.
Authorizations:
path Parameters
id required | integer Example: 1 Unique Spend Category identifier. |
Responses
Request samples
- Curl
curl -H "X-Api-Key: ${COMPANY_KEY}" \ -H "X-User-Token: ${USER_TOKEN}" \ -H "X-User-Email: ${USER_EMAIL}" \ -H "Content-Type: application/vnd.api+json" \ "https://api.us.workdayspend.com/services/spend_categories/v1/spend_categories/1"
Response samples
- 200
{- "data": {
- "id": "1",
- "type": "spend_categories",
- "attributes": {
- "name": "Spend Category",
- "external_id": "SP",
- "usages": [
- "procurement"
]
}, - "links": {
}
}
}
Update a Spend Category
Updates the details of an existing Spend Category. You need to supply the unique identifier that was returned upon Spend Category creation.
Please note, that request body must include an id
attribute with the value of your Spend Category
unique identifier (the same one you passed in the URL).
Authorizations:
path Parameters
id required | integer Example: 1 Unique Spend Category identifier. |
Request Body schema: application/vnd.api+json
object (SpendCategoryUpdate) |
Responses
Request samples
- Payload
- Curl
{- "data": {
- "type": "spend_categories",
- "id": "1",
- "attributes": {
- "name": "Spend Category Updated",
- "external_id": "SP-UPD",
- "usages": [
- "procurement"
]
}
}
}
Response samples
- 200
- 409
{- "data": {
- "id": "1",
- "type": "spend_categories",
- "attributes": {
- "name": "Spend Category Updated",
- "external_id": "SP-UPD",
- "usages": [
- "procurement"
]
}, - "links": {
}
}
}
Delete a Spend Category
Deletes a Spend Category. You need to supply the unique Spend Category identifier that was returned upon Spend Category creation.
Authorizations:
path Parameters
id required | integer Example: 1 Unique Spend Category identifier. |
Responses
Request samples
- Curl
curl -H "X-Api-Key: ${COMPANY_KEY}" \ -H "X-User-Token: ${USER_TOKEN}" \ -H "X-User-Email: ${USER_EMAIL}" \ -H "Content-Type: application/vnd.api+json" \ -X DELETE \ "https://api.us.workdayspend.com/services/spend_categories/v1/spend_categories/1"
Get a Spend Category by External ID
Retrieves the details of an existing Spend Category.
Authorizations:
path Parameters
external_id required | string Example: SP Unique Spend Category external identifier. |
Responses
Request samples
- Curl
curl -H "X-Api-Key: ${COMPANY_KEY}" \ -H "X-User-Token: ${USER_TOKEN}" \ -H "X-User-Email: ${USER_EMAIL}" \ -H "Content-Type: application/vnd.api+json" \ "https://api.us.workdayspend.com/services/spend_categories/v1/spend_categories/SP/external_id"
Response samples
- 200
{- "data": {
- "id": "1",
- "type": "spend_categories",
- "attributes": {
- "name": "Spend Category",
- "external_id": "SP",
- "usages": [
- "procurement"
]
}, - "links": {
}
}
}
Update a Spend Category by External ID
Updates the details of an existing Spend Category. You need to supply the unique external identifier assigned to the Spend Category on creation.
Please note, that request body must include an id
attribute with the value of your Spend Category
unique identifier (the same one you passed in the URL).
Authorizations:
path Parameters
external_id required | string Example: SP Unique Spend Category external identifier. |
Request Body schema: application/vnd.api+json
object (SpendCategoryUpdate) |
Responses
Request samples
- Payload
- Curl
{- "data": {
- "type": "spend_categories",
- "id": "SP",
- "attributes": {
- "name": "Spend Category Updated",
- "external_id": "SP-UPD",
- "usages": [
- "procurement"
]
}
}
}
Response samples
- 200
{- "data": {
- "id": "1",
- "type": "spend_categories",
- "attributes": {
- "name": "Spend Category Updated",
- "external_id": "SP-UPD",
- "usages": [
- "procurement"
]
}, - "links": {
}
}
}
Delete a Spend Category by External ID
Deletes a Spend Category. You need to supply the unique Spend Category external identifier assigned to the Spend Category on creation.
Authorizations:
path Parameters
external_id required | string Example: SP Unique Spend Category external identifier. |
Responses
Request samples
- Curl
curl -H "X-Api-Key: ${COMPANY_KEY}" \ -H "X-User-Token: ${USER_TOKEN}" \ -H "X-User-Email: ${USER_EMAIL}" \ -H "Content-Type: application/vnd.api+json" \ -X DELETE \ "https://api.us.workdayspend.com/services/spend_categories/v1/spend_categories/SP/external_id"