Workday Strategic Sourcing Contracts API (1.1)
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/contracts/v1 |
Sandbox | https://api.sandbox.us.workdayspend.com/services/contracts/v1 |
EU Region
Environment | EU region Base URI |
---|---|
Production | https://api.eu.workdayspend.com/services/contracts/v1 |
Sandbox | https://api.sandbox.eu.workdayspend.com/services/contracts/v1 |
CA Region
Environment | CA region Base URI |
---|---|
Production | https://api.ca.workdayspend.com/services/contracts/v1 |
Sandbox | https://api.sandbox.ca.workdayspend.com/services/contracts/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.1
.
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. |
{- "data": {
- "key": "value"
}, - "meta": {
- "count": 2
}, - "links": {
- "prev": 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 contracts API to create, update, and query the contracts in Workday Strategic Sourcing.
type required | string (ContractTypeValue) Object type, should always be |
id required | integer (ContractId) Contract identifier string. |
object Contract attributes. | |
object (ContractRelationship) Contract relationship. | |
object (ResourceLinks) List of related links. |
{- "data": {
- "type": "contracts",
- "id": "1",
- "attributes": {
- "actual_end_date": "2031-12-30",
- "actual_spend_amount": 11.11,
- "actual_start_date": "2028-12-30",
- "auto_renewal": "yes",
- "approved_at": "2019-10-11T09:12:31.080Z",
- "approval_rounds": 1,
- "description": "Contract Description",
- "external_id": "1234-5678-abcd-efgh",
- "marked_as_needs_attention_at": null,
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "number": 1,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_date": "2031-07-30",
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_date": "2031-06-18",
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "first_sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title",
- "updated_at": "2019-10-29T21:28:46.790Z",
- "scc_updated_at": "2019-10-29T21:28:46.790Z",
- "request_submitted_at": "2019-10-29T21:28:46.790Z",
- "request_opened_at": null,
- "public": false,
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 1234567890
}, - {
- "name": "Custom Field Integer",
- "value": 1234567890
}, - {
- "name": "Custom Field Checkbox",
- "value": true
}, - {
- "name": "Custom Field Decimal",
- "value": 123456.78
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-31T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text"
},
]
}, - "relationships": {
- "attachments": {
- "data": [
- {
- "id": "1",
- "type": "attachments"
}, - {
- "id": "2",
- "type": "attachments"
}
]
}, - "supplier_company": {
- "data": {
- "id": "1",
- "type": "supplier_companies"
}
}, - "creator": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "owner": {
- "data": {
- "id": "2",
- "type": "stakeholders"
}
}, - "spend_category": {
- "data": {
- "id": "1",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "1",
- "type": "contract_types"
}
}
},
}
}
type required | string (DocusignEnvelopeType) Object type, should always be |
id required | integer (DocusignEnvelopeId) Docusign envelope identifier string. |
object (DocusignEnvelopeAttributes) Docusign envelope attributes | |
object (Docusign envelope relationships) |
{- "type": "docusign_envelopes",
- "id": 1,
- "attributes": {
- "docusign_created_at": "2023-07-25 14:11:20 UTC",
- "docusign_updated_at": "2023-07-26 16:11:17 UTC",
- "error_code": "123",
- "error_message": "Oops, we ran into a problem",
- "state": "creating",
- "title": "My envelope",
- "docusign_id": "5"
}, - "relationships": {
- "attachments": [
- {
- "type": "attachments",
- "id": 1
}
]
}
}
type required | string (AdobeSignAgreementType) Object type, should always be |
id required | integer (AdobeSignAgreementId) Adobe Sign Agreement identifier string |
object (AdobeSignAgreementAttributes) Adobe Sign Agreement attributes | |
object (Adobe Sign Agreement relationships) |
{- "type": "adobe_sign_agreements",
- "id": 1,
- "attributes": {
- "name": "Agreement #236",
- "state": "CREATING",
- "adobe_created_at": "2019-10-29T21:28:46.790Z",
- "adobe_id": "24",
- "adobe_signed_at": "2019-10-29T21:28:46.790Z",
- "adobe_sign_errors": "{}"
}, - "relationships": {
- "documents": [
- {
- "type": "adobe_sign_documents",
- "id": 1
}
]
}
}
type required | string (AdobeSignDocumentType) Object type, should always be |
id required | integer (AdobeSignDocumentId) Adobe Sign Document identifier string |
object (AdobeSignDocumentAttributes) Adobe Sign Document attributes | |
object (Adobe Sign Document relationships) |
{- "type": "adobe_sign_documents",
- "id": 1,
- "attributes": {
- "name": "Document #236",
- "adobe_id": "24"
}, - "relationships": {
- "attachment": {
- "type": "attachments",
- "id": 1
}
}
}
List Contracts
Returns a list of contracts for the specified criteria.
Authorizations:
query Parameters
object (ContractInputFilter) Filter contracts by multiple criteria. Only one filter per attribute is supported. For best performance, we recommend 5 or less filters. | |
include | string (ContractRelatedResources) Enum: "contract_type" "spend_category" "supplier_company" "docusign_envelopes" "adobe_sign_agreements" 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 The value of the
In the response, relationships will be represented as normal linkage objects (containing
|
object (PageInput) Customize pagination results with |
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/contracts/v1/contracts"
Response samples
- 200
{- "meta": {
- "count": 2
}, - "data": [
- {
- "type": "contracts",
- "id": "1",
- "attributes": {
- "actual_end_date": "2031-12-30",
- "actual_spend_amount": 11.11,
- "actual_start_date": "2028-12-30",
- "approved_at": "2019-10-11T09:12:31.080Z",
- "approval_rounds": 1,
- "auto_renewal": "yes",
- "description": "Contract Description",
- "external_id": "1234-5678-abcd-efgh",
- "marked_as_needs_attention_at": null,
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "number": 1,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_date": "2031-07-30",
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_date": "2031-06-18",
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "first_sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title",
- "updated_at": "2019-10-29T21:28:46.790Z",
- "scc_updated_at": null,
- "request_submitted_at": "2019-10-28T21:28:46.790Z",
- "request_opened_at": null,
- "public": false,
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 1234567890
}, - {
- "name": "Custom Field Integer",
- "value": 1234567890
}, - {
- "name": "Custom Field Checkbox",
- "value": true
}, - {
- "name": "Custom Field Decimal",
- "value": 123456.78
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-31T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text"
},
]
}, - "relationships": {
- "attachments": {
- "data": [
- {
- "id": "1",
- "type": "attachments"
}, - {
- "id": "2",
- "type": "attachments"
}
]
}, - "supplier_company": {
- "data": {
- "id": "1",
- "type": "supplier_companies"
}
}, - "creator": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "owner": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}, - "docusign_envelopes": {
- "data": [
- {
- "id": "3",
- "type": "docusign_envelopes"
}
]
}, - "adobe_sign_agreements": {
- "data": [
- {
- "id": "4",
- "type": "adobe_sign_agreements"
}
]
}
},
}, - {
- "type": "contracts",
- "id": "2",
- "attributes": {
- "actual_end_date": "2033-12-30",
- "actual_spend_amount": 22.22,
- "actual_start_date": "2030-12-30",
- "auto_renewal": "yes",
- "approved_at": "2019-10-11T09:12:31.080Z",
- "approval_rounds": 1,
- "description": "Contract #2 Description",
- "external_id": "abcd-efgh-1234-5678",
- "marked_as_needs_attention_at": null,
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "number": 2,
- "renew_number_of_times": 6,
- "renewal_term_unit": "days",
- "renewal_term_value": 3,
- "renewal_termination_notice_date": "2033-08-30",
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 4,
- "renewal_termination_reminder_date": "2033-07-26",
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 5,
- "first_sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract #2 Title",
- "updated_at": "2019-10-29T21:28:46.790Z",
- "request_submitted_at": "2019-10-28T21:28:46.790Z",
- "scc_updated_at": null,
- "request_opened_at": null,
- "public": false,
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 1234567890
}, - {
- "name": "Custom Field Integer",
- "value": 1234567890
}, - {
- "name": "Custom Field Checkbox",
- "value": true
}, - {
- "name": "Custom Field Decimal",
- "value": 123456.78
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-31T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text"
},
]
}, - "relationships": {
- "attachments": {
- "data": [ ]
}, - "supplier_company": {
- "data": null
}, - "creator": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "owner": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}, - "docusign_envelopes": {
- "data": [
- {
- "id": "3",
- "type": "docusign_envelopes"
}
]
}, - "adobe_sign_agreements": {
- "data": [
- {
- "id": "5",
- "type": "adobe_sign_agreements"
}
]
}
},
}
], - "links": {
}
}
Create a Contract
Create a contract with given attributes.
Authorizations:
query Parameters
include | string (ContractRelatedResources) Enum: "contract_type" "spend_category" "supplier_company" "docusign_envelopes" "adobe_sign_agreements" Use the |
Request Body schema: application/vnd.api+json
object (ContractCreate) |
Responses
Request samples
- Payload
- Curl
{- "data": {
- "type": "contracts",
- "attributes": {
- "actual_end_date": "2031-12-30",
- "actual_spend_amount": "11.11",
- "actual_start_date": "2028-12-30",
- "auto_renewal": "yes",
- "description": "Contract Description",
- "external_id": "1234-5678-abcd-efgh",
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title",
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 1234567890
}, - {
- "name": "Custom Field Integer",
- "value": 1234567890
}, - {
- "name": "Custom Field Checkbox",
- "value": true
}, - {
- "name": "Custom Field Decimal",
- "value": 123456.78
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-31T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text"
},
]
}, - "relationships": {
- "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}
}
}
}
Response samples
- 201
{- "data": {
- "type": "contracts",
- "id": "1",
- "attributes": {
- "actual_end_date": "2031-12-30",
- "actual_spend_amount": 11.11,
- "actual_start_date": "2028-12-30",
- "auto_renewal": "yes",
- "approved_at": null,
- "approval_rounds": 0,
- "description": "Contract Description",
- "external_id": "1234-5678-abcd-efgh",
- "marked_as_needs_attention_at": null,
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "number": 1,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_date": "2031-07-30",
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_date": "2031-06-18",
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "first_sent_for_approval_at": null,
- "sent_for_approval_at": null,
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title",
- "updated_at": "2019-10-29T21:28:46.790Z",
- "scc_updated_at": null,
- "request_submitted_at": "2019-10-28T21:28:46.790Z",
- "request_opened_at": null,
- "public": false,
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 1234567890
}, - {
- "name": "Custom Field Integer",
- "value": 1234567890
}, - {
- "name": "Custom Field Checkbox",
- "value": true
}, - {
- "name": "Custom Field Decimal",
- "value": 123456.78
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-31T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text"
},
]
}, - "relationships": {
- "supplier_company": {
- "data": null
}, - "creator": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "owner": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}, - "docusign_envelopes": {
- "data": [ ]
}, - "adobe_sign_agreements": {
- "data": [ ]
}, - "attachments": {
- "data": [ ]
}
},
}
}
Get a Contract
Retrieves the details of an existing contract. You need to supply the unique contract identifier that was returned upon contract creation.
Authorizations:
path Parameters
id required | integer Example: 1 Unique Contract identifier. |
query Parameters
include | string (ContractRelatedResources) Enum: "contract_type" "spend_category" "supplier_company" "docusign_envelopes" "adobe_sign_agreements" Use the |
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/contracts/v1/contracts/1"
Response samples
- 200
{- "data": {
- "type": "contracts",
- "id": "1",
- "attributes": {
- "actual_end_date": "2031-12-30",
- "actual_spend_amount": 11.11,
- "actual_start_date": "2028-12-30",
- "approved_at": "2019-10-11T09:12:31.080Z",
- "approval_rounds": 1,
- "auto_renewal": "yes",
- "description": "Contract Description",
- "external_id": "1234-5678-abcd-efgh",
- "marked_as_needs_attention_at": null,
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "number": 1,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_date": "2031-07-30",
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_date": "2031-06-18",
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "first_sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title",
- "updated_at": "2019-10-29T21:28:46.790Z",
- "scc_updated_at": null,
- "request_submitted_at": "2019-10-28T21:28:46.790Z",
- "request_opened_at": null,
- "public": false,
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 1234567890
}, - {
- "name": "Custom Field Integer",
- "value": 1234567890
}, - {
- "name": "Custom Field Checkbox",
- "value": true
}, - {
- "name": "Custom Field Decimal",
- "value": 123456.78
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-31T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text"
},
]
}, - "relationships": {
- "attachments": {
- "data": [
- {
- "id": "1",
- "type": "attachments"
}, - {
- "id": "2",
- "type": "attachments"
}
]
}, - "supplier_company": {
- "data": {
- "id": "1",
- "type": "supplier_companies"
}
}, - "creator": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "owner": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}, - "docusign_envelopes": {
- "data": [
- {
- "id": "3",
- "type": "docusign_envelopes"
}
]
}, - "adobe_sign_agreements": {
- "data": [
- {
- "id": "4",
- "type": "adobe_sign_agreements"
}
]
}
},
}
}
Update a Contract
Updates the details of an existing contract. You need to supply the unique supplier contract that was returned upon contract creation.
Please note, that request body must include an id
attribute with the value of your contract
unique identifier (the same one you passed in the URL).
Authorizations:
path Parameters
id required | integer Example: 1 Unique Contract identifier. |
query Parameters
include | string (ContractRelatedResources) Enum: "contract_type" "spend_category" "supplier_company" "docusign_envelopes" "adobe_sign_agreements" Use the |
Request Body schema: application/vnd.api+json
object (ContractUpdate) |
Responses
Request samples
- Payload
- Curl
{- "data": {
- "type": "contracts",
- "id": "1",
- "attributes": {
- "actual_end_date": "2032-12-30",
- "actual_spend_amount": "22.11",
- "actual_start_date": "2029-12-30",
- "auto_renewal": "yes",
- "description": "Contract Description Updated",
- "external_id": "1234-5678-abcd-efgh",
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title Updated",
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 987654321
}, - {
- "name": "Custom Field Integer",
- "value": 987654321
}, - {
- "name": "Custom Field Checkbox",
- "value": false
}, - {
- "name": "Custom Field Decimal",
- "value": 876543.21
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-25T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text updated"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text updated"
},
]
}, - "relationships": {
- "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}
}
}
}
Response samples
- 200
- 409
{- "data": {
- "type": "contracts",
- "id": "1",
- "attributes": {
- "actual_end_date": "2032-12-30",
- "actual_spend_amount": 22.11,
- "actual_start_date": "2029-12-30",
- "auto_renewal": "yes",
- "approved_at": "2019-10-11T09:12:31.080Z",
- "approval_rounds": 1,
- "description": "Contract Description Updated",
- "external_id": "1234-5678-abcd-efgh",
- "marked_as_needs_attention_at": null,
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "number": 1,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_date": "2032-07-30",
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_date": "2032-06-18",
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "first_sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title Updated",
- "updated_at": "2019-10-29T21:28:46.790Z",
- "scc_updated_at": null,
- "request_submitted_at": "2019-10-28T21:28:46.790Z",
- "request_opened_at": null,
- "public": false,
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 987654321
}, - {
- "name": "Custom Field Integer",
- "value": 987654321
}, - {
- "name": "Custom Field Checkbox",
- "value": false
}, - {
- "name": "Custom Field Decimal",
- "value": 876543.21
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-25T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text updated"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text updated"
},
]
}, - "relationships": {
- "attachments": {
- "data": [
- {
- "id": "1",
- "type": "attachments"
}, - {
- "id": "2",
- "type": "attachments"
}
]
}, - "supplier_company": {
- "data": null
}, - "creator": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "owner": {
- "data": {
- "id": "2",
- "type": "stakeholders"
}
}, - "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}, - "docusign_envelopes": {
- "data": [ ]
}, - "adobe_sign_agreements": {
- "data": [ ]
}
},
}
}
Delete a Contract
Deletes a contract. You need to supply the unique contract identifier that was returned upon contract creation.
Authorizations:
path Parameters
id required | integer Example: 1 Unique Contract 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/contracts/v1/contracts/1"
Get a Contract by External ID
Retrieves the details of an existing contract. You need to supply the unique contract external identifier (the one you used when created the contract).
Authorizations:
path Parameters
external_id required | string Example: 1234-5678-abcd-efgh Contract external identifier. |
query Parameters
include | string (ContractRelatedResources) Enum: "contract_type" "spend_category" "supplier_company" "docusign_envelopes" "adobe_sign_agreements" Use the |
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/contracts/v1/contracts/SUP-1234/external_id"
Response samples
- 200
{- "data": {
- "type": "contracts",
- "id": "1",
- "attributes": {
- "actual_end_date": "2031-12-30",
- "actual_spend_amount": 11.11,
- "actual_start_date": "2028-12-30",
- "auto_renewal": "yes",
- "approved_at": "2019-10-11T09:12:31.080Z",
- "approval_rounds": 1,
- "description": "Contract Description",
- "external_id": "1234-5678-abcd-efgh",
- "marked_as_needs_attention_at": null,
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "number": 1,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_date": "2031-07-30",
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_date": "2031-06-18",
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "first_sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title",
- "updated_at": "2019-10-29T21:28:46.790Z",
- "scc_updated_at": null,
- "request_submitted_at": "2019-10-28T21:28:46.790Z",
- "request_opened_at": null,
- "public": false,
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 1234567890
}, - {
- "name": "Custom Field Integer",
- "value": 1234567890
}, - {
- "name": "Custom Field Checkbox",
- "value": true
}, - {
- "name": "Custom Field Decimal",
- "value": 123456.78
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-31T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text"
},
]
}, - "relationships": {
- "attachments": {
- "data": [
- {
- "id": "1",
- "type": "attachments"
}, - {
- "id": "2",
- "type": "attachments"
}
]
}, - "supplier_company": {
- "data": {
- "id": "1",
- "type": "supplier_companies"
}
}, - "creator": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "owner": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}, - "docusign_envelopes": {
- "data": [
- {
- "id": "3",
- "type": "docusign_envelopes"
}
]
}, - "adobe_sign_agreements": {
- "data": [
- {
- "id": "4",
- "type": "adobe_sign_agreements"
}
]
}
},
}
}
Update a Contract by External ID
Updates the details of an existing contract. You need to supply the unique contract external identifier (the one you used when created the contract).
Please note, that request body must include an id
attribute with the value of your contract
external identifier (the same one you passed in the URL).
Authorizations:
path Parameters
external_id required | string Example: 1234-5678-abcd-efgh Contract external identifier. |
query Parameters
include | string (ContractRelatedResources) Enum: "contract_type" "spend_category" "supplier_company" "docusign_envelopes" "adobe_sign_agreements" Use the |
Request Body schema: application/vnd.api+json
object (ContractUpdate) |
Responses
Request samples
- Payload
- Curl
{- "data": {
- "type": "contracts",
- "id": "1234-5678-abcd-efgh",
- "attributes": {
- "actual_end_date": "2032-12-30",
- "actual_spend_amount": "22.11",
- "actual_start_date": "2029-12-30",
- "auto_renewal": "yes",
- "description": "Contract Description Updated",
- "external_id": "1234-5678-abcd-efgh",
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title Updated",
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 987654321
}, - {
- "name": "Custom Field Integer",
- "value": 987654321
}, - {
- "name": "Custom Field Checkbox",
- "value": false
}, - {
- "name": "Custom Field Decimal",
- "value": 876543.21
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-25T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text updated"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text updated"
},
]
}, - "relationships": {
- "supplier_company": {
- "data": {
- "id": "1",
- "type": "supplier_companies"
}
}, - "owner": {
- "meta": {
- "email": "contract.owner@example.com"
}
}, - "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}
}
}
}
Response samples
- 200
{- "data": {
- "type": "contracts",
- "id": "1",
- "attributes": {
- "actual_end_date": "2032-12-30",
- "actual_spend_amount": 22.11,
- "actual_start_date": "2029-12-30",
- "approved_at": "2019-10-11T09:12:31.080Z",
- "approval_rounds": 1,
- "auto_renewal": "yes",
- "description": "Contract Description Updated",
- "external_id": "1234-5678-abcd-efgh",
- "marked_as_needs_attention_at": null,
- "needs_attention": false,
- "needs_attention_note": null,
- "needs_attention_reason": null,
- "number": 1,
- "renew_number_of_times": 3,
- "renewal_term_unit": "days",
- "renewal_term_value": 4,
- "renewal_termination_notice_date": "2032-07-30",
- "renewal_termination_notice_unit": "months",
- "renewal_termination_notice_value": 5,
- "renewal_termination_reminder_date": "2032-06-18",
- "renewal_termination_reminder_unit": "weeks",
- "renewal_termination_reminder_value": 6,
- "first_sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "sent_for_approval_at": "2019-10-05T05:24:12.000Z",
- "state": "in_progress",
- "state_label": "Discovery",
- "terminated_note": null,
- "terminated_reason": null,
- "title": "Contract Title Updated",
- "updated_at": "2019-10-29T21:28:46.790Z",
- "scc_updated_at": null,
- "request_submitted_at": "2019-10-28T21:28:46.790Z",
- "request_opened_at": null,
- "public": false,
- "custom_fields": [
- {
- "name": "Custom Field Currency",
- "value": 987654321
}, - {
- "name": "Custom Field Integer",
- "value": 987654321
}, - {
- "name": "Custom Field Checkbox",
- "value": false
}, - {
- "name": "Custom Field Decimal",
- "value": 876543.21
}, - {
- "name": "Custom Field Date",
- "value": "2018-12-25T00:00:00.000Z"
}, - {
- "name": "Custom Field Select",
- "value": "Select Option"
}, - {
- "name": "Custom Field Multiple",
- "value": [
- "Multiple Select Option 1",
- "Multiple Select Option 2"
]
}, - {
- "name": "Custom Field Short Text",
- "value": "some short text updated"
}, - {
- "name": "Custom Field Paragraph",
- "value": "longer text than short text updated"
},
]
}, - "relationships": {
- "attachments": {
- "data": [
- {
- "id": "1",
- "type": "attachments"
}, - {
- "id": "2",
- "type": "attachments"
}
]
}, - "supplier_company": {
- "data": {
- "id": "1",
- "type": "supplier_companies"
}
}, - "spend_category": {
- "data": {
- "id": "2",
- "type": "spend_categories"
}
}, - "creator": {
- "data": {
- "id": "1",
- "type": "stakeholders"
}
}, - "owner": {
- "data": {
- "id": "2",
- "type": "stakeholders"
}
}, - "contract_type": {
- "data": {
- "id": "3",
- "type": "contract_types"
}
}, - "docusign_envelopes": {
- "data": [ ]
}, - "adobe_sign_agreements": {
- "data": [ ]
}
},
}
}
Delete a Contract by External ID
Deletes a contract. You need to supply the unique contract external identifier (the one you used when created the contract).
Authorizations:
path Parameters
external_id required | string Example: 1234-5678-abcd-efgh Contract 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/contracts/v1/contracts/SUP-1234/external_id"
Describe Contract object
Returns a list of fields for the contract object.
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/contracts/v1/contracts/describe"
Response samples
- 200
{- "meta": {
- "count": 40
}, - "data": [
- {
- "id": "actual_end_date",
- "type": "contract_fields",
- "attributes": {
- "name": "actual_end_date",
- "data_type": "string",
- "type_description": "Date",
- "custom_field": false
}
}, - {
- "id": "actual_spend_amount",
- "type": "contract_fields",
- "attributes": {
- "name": "actual_spend_amount",
- "data_type": "number",
- "type_description": "Currency",
- "custom_field": false
}
}, - {
- "id": "actual_start_date",
- "type": "contract_fields",
- "attributes": {
- "name": "actual_start_date",
- "data_type": "string",
- "type_description": "Date",
- "custom_field": false
}
}, - {
- "id": "auto_renewal",
- "type": "contract_fields",
- "attributes": {
- "name": "auto_renewal",
- "data_type": "string",
- "type_description": "Single Select",
- "custom_field": false
}
}, - {
- "id": "description",
- "type": "contract_fields",
- "attributes": {
- "name": "description",
- "data_type": "string",
- "type_description": "Paragraph",
- "custom_field": false
}
}, - {
- "id": "external_id",
- "type": "contract_fields",
- "attributes": {
- "name": "external_id",
- "data_type": "string",
- "type_description": "Short Text",
- "custom_field": false
}
}, - {
- "id": "needs_attention",
- "type": "contract_fields",
- "attributes": {
- "name": "needs_attention",
- "data_type": "boolean",
- "type_description": "Checkbox",
- "custom_field": false
}
}, - {
- "id": "renew_number_of_times",
- "type": "contract_fields",
- "attributes": {
- "name": "renew_number_of_times",
- "data_type": "integer",
- "type_description": "Integer",
- "custom_field": false
}
}, - {
- "id": "renewal_term_unit",
- "type": "contract_fields",
- "attributes": {
- "name": "renewal_term_unit",
- "data_type": "string",
- "type_description": "Single Select",
- "custom_field": false
}
}, - {
- "id": "renewal_term_value",
- "type": "contract_fields",
- "attributes": {
- "name": "renewal_term_value",
- "data_type": "integer",
- "type_description": "Integer",
- "custom_field": false
}
}, - {
- "id": "renewal_termination_notice_unit",
- "type": "contract_fields",
- "attributes": {
- "name": "renewal_termination_notice_unit",
- "data_type": "string",
- "type_description": "Single Select",
- "custom_field": false
}
}, - {
- "id": "renewal_termination_notice_value",
- "type": "contract_fields",
- "attributes": {
- "name": "renewal_termination_notice_value",
- "data_type": "integer",
- "type_description": "Integer",
- "custom_field": false
}
}, - {
- "id": "renewal_termination_reminder_unit",
- "type": "contract_fields",
- "attributes": {
- "name": "renewal_termination_reminder_unit",
- "data_type": "string",
- "type_description": "Single Select",
- "custom_field": false
}
}, - {
- "id": "renewal_termination_reminder_value",
- "type": "contract_fields",
- "attributes": {
- "name": "renewal_termination_reminder_value",
- "data_type": "integer",
- "type_description": "Integer",
- "custom_field": false
}
}, - {
- "id": "state",
- "type": "contract_fields",
- "attributes": {
- "name": "state",
- "data_type": "string",
- "type_description": "Single Select",
- "custom_field": false
}
}, - {
- "id": "state_label",
- "type": "contract_fields",
- "attributes": {
- "name": "state_label",
- "data_type": "string",
- "type_description": "Single Select",
- "custom_field": false
}
}, - {
- "id": "terminated_note",
- "type": "contract_fields",
- "attributes": {
- "name": "terminated_note",
- "data_type": "string",
- "type_description": "Short Text",
- "custom_field": false
}
}, - {
- "id": "terminated_reason",
- "type": "contract_fields",
- "attributes": {
- "name": "terminated_reason",
- "data_type": "string",
- "type_description": "Single Select",
- "custom_field": false
}
}, - {
- "id": "title",
- "type": "contract_fields",
- "attributes": {
- "name": "title",
- "data_type": "string",
- "type_description": "Short Text",
- "custom_field": false
}
}, - {
- "id": "approved_at",
- "type": "contract_fields",
- "attributes": {
- "name": "approved_at",
- "data_type": "string",
- "type_description": "Date",
- "custom_field": false
}
}, - {
- "id": "marked_as_needs_attention_at",
- "type": "contract_fields",
- "attributes": {
- "name": "marked_as_needs_attention_at",
- "data_type": "string",
- "type_description": "Date",
- "custom_field": false
}
}, - {
- "id": "needs_attention_note",
- "type": "contract_fields",
- "attributes": {
- "name": "needs_attention_note",
- "data_type": "string",
- "type_description": "Short Text",
- "custom_field": false
}
}, - {
- "id": "needs_attention_reason",
- "type": "contract_fields",
- "attributes": {
- "name": "needs_attention_reason",
- "data_type": "string",
- "type_description": "Single Select",
- "custom_field": false
}
}, - {
- "id": "number",
- "type": "contract_fields",
- "attributes": {
- "name": "number",
- "data_type": "integer",
- "type_description": "Integer",
- "custom_field": false
}
}, - {
- "id": "renewal_termination_notice_date",
- "type": "contract_fields",
- "attributes": {
- "name": "renewal_termination_notice_date",
- "data_type": "string",
- "type_description": "Date",
- "custom_field": false
}
}, - {
- "id": "renewal_termination_reminder_date",
- "type": "contract_fields",
- "attributes": {
- "name": "renewal_termination_reminder_date",
- "data_type": "string",
- "type_description": "Date",
- "custom_field": false
}
}, - {
- "id": "sent_for_approval_at",
- "type": "contract_fields",
- "attributes": {
- "name": "sent_for_approval_at",
- "data_type": "string",
- "type_description": "Date",
- "custom_field": false
}
}, - {
- "id": "updated_at",
- "type": "contract_fields",
- "attributes": {
- "name": "updated_at",
- "data_type": "string",
- "type_description": "Date",
- "custom_field": false
}
}, - {
- "id": "scc_updated_at",
- "type": "contract_fields",
- "attributes": {
- "name": "scc_updated_at",
- "data_type": "string",
- "type_description": "Date",
- "custom_field": false
}
}, - {
- "id": "public",
- "type": "contract_fields",
- "attributes": {
- "name": "public",
- "data_type": "boolean",
- "type_description": "Checkbox",
- "custom_field": false
}
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "number",
- "name": "Custom Field Currency",
- "type_description": "Currency"
}, - "type": "contract_fields"
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "integer",
- "name": "Custom Field Integer",
- "type_description": "Integer"
}, - "type": "contract_fields"
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "boolean",
- "name": "Custom Field Checkbox",
- "type_description": "Checkbox"
}, - "type": "contract_fields"
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "number",
- "name": "Custom Field Decimal",
- "type_description": "Decimal"
}, - "type": "contract_fields"
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "string",
- "name": "Custom Field Date",
- "type_description": "Date"
}, - "type": "contract_fields"
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "string",
- "name": "Custom Field Select",
- "type_description": "Single Select"
}, - "type": "contract_fields"
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "array",
- "name": "Custom Field Multiple",
- "type_description": "Multiple Select"
}, - "type": "contract_fields"
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "string",
- "name": "Custom Field Short Text",
- "type_description": "Short Text"
}, - "type": "contract_fields"
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "string",
- "name": "Custom Field Paragraph",
- "type_description": "Paragraph"
}, - "type": "contract_fields"
}, - {
- "attributes": {
- "custom_field": true,
- "data_type": "string",
- "name": "Custom Field URL",
- "type_description": "URL"
}, - "type": "contract_fields"
}
], - "links": { }
}
Use the contract types API to query the contract types in Workday Strategic Sourcing.
Contract Types are used in the contract resource. On POST and PATCH related endpoints for this resource a contract_type_id can be added to set the contract type. The contract_type_id is a foreign key for the contract_types resource's id.
type required | string (ContractTypeType) Object type, should always be |
id required | integer (ContractTypeId) Contract type identifier string. |
object (ContractTypeAttributes) Contract type attributes. |
{- "type": "contract_types",
- "id": 1,
- "attributes": {
- "name": "My Contract Type",
- "shortcode": "CPUB",
- "external_id": "1234-5678-abcd-efgh"
}
}
List Contract Types
Returns a list of all contract types.
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/contracts/v1/contract_types"
Response samples
- 200
{- "meta": {
- "count": 2
}, - "data": [
- {
- "type": "contract_types",
- "id": "1",
- "attributes": {
- "name": "Contract Type #1",
- "shortcode": "CTRA",
- "external_id": "CTR$1"
},
}, - {
- "type": "contract_types",
- "id": "2",
- "attributes": {
- "name": "Contract Type #2",
- "shortcode": "CTRB",
- "external_id": "CTR$2"
},
}
],
}
Create a Contract Type
Create a contract type with given parameters.
Authorizations:
Request Body schema: application/vnd.api+json
object (ContractTypeCreate) |
Responses
Request samples
- Payload
- Curl
{- "data": {
- "type": "contract_types",
- "attributes": {
- "name": "The Contract Type",
- "shortcode": "CTRT",
- "external_id": "CTR$1"
}
}
}
Response samples
- 201
{- "data": {
- "type": "contract_types",
- "id": "1",
- "attributes": {
- "name": "The Contract Type",
- "shortcode": "CTRT",
- "external_id": "CTR$1"
},
}
}
Get a Contract Type
Retrieves the details of an existing contract type.
Authorizations:
path Parameters
id required | integer Example: 1 Unique contract type 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/contracts/v1/contract_types/1"
Response samples
- 200
{- "data": {
- "type": "contract_types",
- "id": "1",
- "attributes": {
- "name": "The Contract Type",
- "shortcode": "CTRT",
- "external_id": "CTR$1"
},
}
}
Update a Contract Type
Updates the details of an existing contract type. You need to supply the unique identifier that was returned upon contract type creation.
Please note, that request body must include an id
attribute with the value of your contract type
unique identifier (the same one you passed in the URL).
Authorizations:
path Parameters
id required | integer Example: 1 Unique contract type identifier. |
Request Body schema: application/vnd.api+json
object (ContractTypeUpdate) |
Responses
Request samples
- Payload
- Curl
{- "data": {
- "id": "1",
- "type": "contract_types",
- "attributes": {
- "name": "Updated Contract Type",
- "shortcode": "C1",
- "external_id": "C$1"
}
}
}
Response samples
- 200
- 409
{- "data": {
- "id": "1",
- "type": "contract_types",
- "attributes": {
- "name": "Updated Contract Type",
- "shortcode": "C1",
- "external_id": "C$1"
},
}
}
Delete a Contract Type
Deletes a contract type. You need to supply the unique contract type identifier that was returned upon contract type creation.
Authorizations:
path Parameters
id required | integer Example: 1 Unique contract type 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/contracts/v1/contract_types/1"
Get a Contract Type by External ID
Retrieves the details of an existing contract type.
Authorizations:
path Parameters
external_id required | string Example: CTR$1 Unique contract type 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/contracts/v1/contract_types/CTR$1/external_id"
Response samples
- 200
{- "data": {
- "type": "contract_types",
- "id": "1",
- "attributes": {
- "name": "The Contract Type",
- "shortcode": "CTRT",
- "external_id": "CTR$1"
},
}
}
Update a Contract Type by External ID
Updates the details of an existing contract type. You need to supply the unique external identifier assigned to the contract type on creation.
Please note, that request body must include an id
attribute with the value of your contract type
unique identifier (the same one you passed in the URL).
Authorizations:
path Parameters
external_id required | string Example: CTR$1 Unique contract type external identifier. |
Request Body schema: application/vnd.api+json
object (ContractTypeUpdate) |
Responses
Request samples
- Payload
- Curl
{- "data": {
- "id": "CTR$1",
- "type": "contract_types",
- "attributes": {
- "name": "Updated Contract Type",
- "shortcode": "C1",
- "external_id": "C$1"
}
}
}
Response samples
- 200
{- "data": {
- "id": "1",
- "type": "contract_types",
- "attributes": {
- "name": "Updated Contract Type",
- "shortcode": "C1",
- "external_id": "C$1"
},
}
}
Delete a Contract Type by External ID
Deletes a contract type. You need to supply the unique contract type external identifier assigned to the contract type on creation.
Authorizations:
path Parameters
external_id required | string Example: CTR$1 Unique contract type 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/contracts/v1/contract_types/CTR$1/external_id"