Scout RFP (Workday Strategic Sourcing) line_items API
Use the line items API to create, update, and query the worksheet line items in Workday Strategic Sourcing. ## Line Item Object
Use the line items API to create, update, and query the worksheet line items in Workday Strategic Sourcing. ## Line Item Object
openapi: 3.0.2
info:
title: Workday Strategic Sourcing attachments line_items 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: line_items
x-displayName: Line Items
description: 'Use the line items API to create, update, and query the worksheet line items in Workday Strategic Sourcing.
## Line Item Object
<SchemaDefinition schemaRef="#/components/schemas/LineItem" showReadOnly={true} showWriteOnly={true} />
'
paths:
/events/{event_id}/worksheets/{worksheet_id}/line_items:
get:
tags:
- line_items
description: Returns a list of line items for the specified criteria.
operationId: List Line Items
summary: List Line Items
parameters:
- name: event_id
in: path
description: Event identifier.
required: true
schema:
type: integer
example: 1
- name: worksheet_id
in: path
description: Worksheet identifier.
required: true
schema:
type: integer
example: 1
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
allOf:
- type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/LineItem'
- $ref: '#/components/schemas/Pagination'
examples:
success:
$ref: '#/components/examples/index_response-4'
'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/events/v1/events/1/worksheets/1/line_items\"\n"
post:
tags:
- line_items
description: 'Create a line item with given cell values.
'
operationId: Create a Line Item
summary: Create a Line Item
parameters:
- name: event_id
in: path
description: Event identifier.
required: true
schema:
type: integer
example: 1
- name: worksheet_id
in: path
description: Worksheet identifier.
required: true
schema:
type: integer
example: 1
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/LineItemCreate'
examples:
success:
$ref: '#/components/examples/create_request-2'
responses:
'201':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/LineItem'
examples:
success:
$ref: '#/components/examples/create_response-2'
'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\":\"line_items\",\"attributes\":{\"data\":{\"c1\":\"Product One\",\"c2\":\"items\",\"c3\":14}}}}' \\\n \"https://api.us.workdayspend.com/services/events/v1/events/1/worksheets/1/line_items\"\n"
/events/{event_id}/worksheets/{worksheet_id}/line_items/bulk:
post:
tags:
- line_items
description: 'Create multiple line items in a given worksheet. You can create up to 200 line items in
a single request.
'
operationId: Bulk Create Line Items
summary: Bulk Create Line Items
parameters:
- name: event_id
in: path
description: Event identifier.
required: true
schema:
type: integer
example: 1
- name: worksheet_id
in: path
description: Worksheet identifier.
required: true
schema:
type: integer
example: 1
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: array
items:
type: object
required:
- type
- attributes
properties:
type:
$ref: '#/components/schemas/LineItemType'
attributes:
$ref: '#/components/schemas/LineItemAttributes'
examples:
success:
$ref: '#/components/examples/bulk_create_request'
responses:
'201':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/LineItem'
examples:
success:
$ref: '#/components/examples/bulk_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\":\"line_items\",\"attributes\":{\"data\":{\"c1\":\"Product One\",\"c2\":\"items\",\"c3\":14}}}]}' \\\n \"https://api.us.workdayspend.com/services/events/v1/events/1/worksheets/1/line_items/bulk\"\n"
/events/{event_id}/worksheets/{worksheet_id}/line_items/{id}:
get:
tags:
- line_items
description: 'Retrieves the details of an existing line item. You need to supply the unique line item
identifier that was returned upon line item creation.
'
operationId: Get a Line Item
summary: Get a Line Item
parameters:
- name: event_id
in: path
description: Event identifier.
required: true
schema:
type: integer
example: 1
- name: worksheet_id
in: path
description: Worksheet identifier.
required: true
schema:
type: integer
example: 1
- name: id
in: path
description: Unique line item 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/LineItem'
examples:
success:
$ref: '#/components/examples/show_response-4'
'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/events/v1/events/1/worksheets/1/line_items/1\"\n"
patch:
tags:
- line_items
description: 'Updates the details of an existing line item. You need to supply the unique
line item that was returned upon line item creation.
Please note, that request body must include the `id` attribute with the value of your
line item unique identifier (the same one you passed in the URL).
'
operationId: Update a Line Item
summary: Update a Line Item
parameters:
- name: event_id
in: path
description: Event identifier.
required: true
schema:
type: integer
example: 1
- name: worksheet_id
in: path
description: Worksheet identifier.
required: true
schema:
type: integer
example: 1
- name: id
in: path
description: Unique line item identifier.
required: true
schema:
type: integer
example: 1
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/LineItemUpdate'
examples:
success:
$ref: '#/components/examples/update_request-2'
responses:
'200':
description: OK
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
$ref: '#/components/schemas/LineItem'
examples:
success:
$ref: '#/components/examples/update_response-2'
'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 'line_items'
description: 'Returns error due to invalid `type` parameter.
'
value:
errors:
- detail: Missing or invalid 'type' specified, expected 'line_items'
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\":\"line_items\",\"attributes\":{\"data\":{\"c1\":\"Product One\",\"c2\":\"items\",\"c3\": 14}}}}' \\\n \"https://api.us.workdayspend.com/services/events/v1/events/1/worksheets/1/line_items/2\"\n"
delete:
tags:
- line_items
description: 'Deletes a line item. You need to supply the unique line item
identifier that was returned upon line item creation.
'
operationId: Delete a Line Item
summary: Delete a Line Item
parameters:
- name: event_id
in: path
description: Event identifier.
required: true
schema:
type: integer
example: 1
- name: worksheet_id
in: path
description: Worksheet identifier.
required: true
schema:
type: integer
example: 1
- name: id
in: path
description: Unique line item identifier.
required: true
schema:
type: integer
example: 1
responses:
'204':
description: OK
'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 DELETE \\\n \"https://api.us.workdayspend.com/services/events/v1/events/1/worksheets/1/line_items/1\"\n"
components:
schemas:
LineItemBase:
title: LineItem
type: object
required:
- type
- id
properties:
type:
$ref: '#/components/schemas/LineItemType'
id:
$ref: '#/components/schemas/LineItemId'
LineItemRelationship:
type: object
description: Line item relationship.
properties:
worksheet:
type: object
properties:
data:
$ref: '#/components/schemas/WorksheetBase'
PaginationLinks:
type: object
description: List of related links.
allOf:
- $ref: '#/components/schemas/SelfLink'
- $ref: '#/components/schemas/NextPageLink'
- $ref: '#/components/schemas/PrevPageLink'
PrevPageLink:
type: object
properties:
prev:
type: string
format: url
description: Link to the previous results page.
nullable: true
deprecated: true
LineItemUpdate:
type: object
required:
- type
- id
properties:
type:
$ref: '#/components/schemas/LineItemType'
id:
$ref: '#/components/schemas/LineItemId'
attributes:
$ref: '#/components/schemas/LineItemAttributes'
relationships:
$ref: '#/components/schemas/LineItemRelationship'
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'
WorksheetType:
type: string
description: Object type, should always be `worksheets`.
example: worksheets
Error:
type: object
properties:
detail:
type: string
description: A human-readable explanation specific to this occurrence of the problem.
LineItemType:
type: string
description: Object type, should always be `line_items`.
example: line_items
LineItemId:
type: integer
description: LineItem identifier string.
example: 1
NextPageLink:
type: object
properties:
next:
type: string
format: url
description: Link to the next results page.
nullable: true
SelfLink:
type: object
properties:
self:
type: string
format: url
description: Normalized link to the resource.
LineItem:
allOf:
- $ref: '#/components/schemas/LineItemBase'
- type: object
properties:
attributes:
$ref: '#/components/schemas/LineItemAttributes'
WorksheetId:
type: integer
description: Worksheet identifier string.
example: 1
LineItemAttributes:
type: object
description: LineItem attributes.
required:
- data
properties:
data:
type: object
properties:
data_identifier:
type: string
description: Worksheet column identifier string.
additionalProperties:
x-additionalPropertiesName: value
description: Worksheet line item cell value.
description: 'A hashmap where keys are data identifier strings for the columns in the worksheet,
and values are cell values.
'
LineItemCreate:
type: object
required:
- type
properties:
type:
$ref: '#/components/schemas/LineItemType'
attributes:
$ref: '#/components/schemas/LineItemAttributes'
relationships:
$ref: '#/components/schemas/LineItemRelationship'
Errors:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/Error'
WorksheetBase:
title: Worksheet
type: object
required:
- type
- id
properties:
type:
$ref: '#/components/schemas/WorksheetType'
id:
$ref: '#/components/schemas/WorksheetId'
examples:
update_request-2:
value:
data:
id: '1'
type: line_items
attributes:
data:
c1: Painfully Amazing Product
c2: 24
c3: items
relationships:
worksheet:
data:
type: worksheets
id: '1'
index_response-4:
value:
data:
- id: '1'
type: line_items
attributes:
data:
c1: Product One
c2: 11
c3: items
- id: '2'
type: line_items
attributes:
data:
c1: Product Two
c2: 1
c3: items
links:
self: https://api.us.workdayspend.com/services/events/v1/events/8/worksheets/1/line_items
create_response-2:
value:
data:
id: '1'
type: line_items
attributes:
data:
c1: Amazing Product
c2: items
c3: 14
c4: 0
bulk_create_response:
value:
data:
- id: '1'
type: line_items
attributes:
data:
c1: Product One
c2: items
c3: 14
c4: 0
- id: '2'
type: line_items
attributes:
data:
c1: Product Two
c2: items
c3: 1
c4: 0
update_response-2:
value:
data:
id: '1'
type: line_items
attributes:
data:
c1: Painfully Amazing Product
c2: 24
c3: items
c4: 0
show_response-4:
value:
data:
id: '1'
type: line_items
attributes:
data:
c1: Amazing Product
c2: 10
c3: items
create_request-2:
value:
data:
type: line_items
attributes:
data:
c1: Amazing Product
c2: items
c3: 14
relationships:
worksheet:
data:
type: worksheets
id: '1'
bulk_create_request:
value:
data:
- type: line_items
attributes:
data:
c1: Product One
c2: items
c3: 14
- type: line_items
attributes:
data:
c1: Product Two
c2: items
c3: 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