Scout RFP (Workday Strategic Sourcing) payment_terms API

Use the payment terms API to create, update, and query the payment terms in Workday Strategic Sourcing. ## Payment Term Object

OpenAPI Specification

scoutrfp-payment-terms-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: Workday Strategic Sourcing attachments payment_terms 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: payment_terms
  x-displayName: Payment Terms
  description: 'Use the payment terms API to create, update, and query the payment terms in Workday Strategic Sourcing.


    ## Payment Term Object


    <SchemaDefinition schemaRef="#/components/schemas/PaymentTerm" showReadOnly={true} showWriteOnly={true} />

    '
paths:
  /payment_terms:
    get:
      tags:
      - payment_terms
      description: Returns a list of payment terms.
      operationId: List Payment Terms
      summary: List Payment Terms
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PaymentTerm'
              examples:
                success:
                  $ref: '#/components/examples/index_response'
        '401':
          description: Unauthorized
      x-codeSamples:
      - label: Curl
        source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n     -H \"X-User-Token: ${USER_TOKEN}\" \\\n     -H \"X-User-Email: ${USER_EMAIL}\" \\\n     -H \"Content-Type: application/vnd.api+json\" \\\n     \"https://api.us.workdayspend.com/services/payments/v1/payment_terms\"\n"
    post:
      tags:
      - payment_terms
      description: 'Create a payment term with given parameters.

        '
      operationId: Create a Payment Term
      summary: Create a Payment Term
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/PaymentTermCreate'
            examples:
              success:
                $ref: '#/components/examples/create_request'
      responses:
        '201':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PaymentTerm'
              examples:
                success:
                  $ref: '#/components/examples/create_response'
        '401':
          description: Unauthorized
      x-codeSamples:
      - label: Curl
        source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n     -H \"X-User-Token: ${USER_TOKEN}\" \\\n     -H \"X-User-Email: ${USER_EMAIL}\" \\\n     -H \"Content-Type: application/vnd.api+json\" \\\n     -X POST \\\n     -d '{\"data\":{\"type\":\"payment_terms\",\"attributes\":{\"name\":\"Payment Term\"}}' \\\n     \"https://api.us.workdayspend.com/services/payments/v1/payment_terms\"\n"
  /payment_terms/{id}:
    patch:
      tags:
      - payment_terms
      description: 'Updates the details of an existing payment term. You need to supply the unique

        identifier that was returned upon payment term creation.


        Please note, that request body must include an `id` attribute with the value of your payment term

        unique identifier (the same one you passed in the URL).

        '
      operationId: Update a Payment Term
      summary: Update a Payment Term
      parameters:
      - name: id
        in: path
        description: Unique payment term identifier.
        required: true
        schema:
          type: integer
        example: 1
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/PaymentTermUpdate'
            examples:
              success:
                $ref: '#/components/examples/update_request'
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PaymentTerm'
              examples:
                success:
                  $ref: '#/components/examples/update_response'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '409':
          description: Conflict
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                invalid_type:
                  summary: Missing or invalid 'type' specified, expected 'payment_terms'
                  description: 'Returns error due to invalid `type` parameter.

                    '
                  value:
                    errors:
                    - detail: Missing or invalid 'type' specified, expected 'payment_terms'
      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\":\"payment_terms\",\"id\":\"2\",\"attributes\":{\"name\":\"Updated Field Payment Term\"}}}' \\\n     \"https://api.us.workdayspend.com/services/payments/v1/payment_terms/2\"\n"
    delete:
      tags:
      - payment_terms
      description: 'Deletes a payment term. You need to supply the unique payment term

        identifier that was returned upon payment term creation.

        '
      operationId: Delete a Payment Term
      summary: Delete a Payment Term
      parameters:
      - name: id
        in: path
        description: Unique payment term 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/payments/v1/payment_terms/1\"\n"
  /payment_terms/{external_id}/external_id:
    patch:
      tags:
      - payment_terms
      description: 'Updates the details of an existing payment term. You need to supply the unique

        external identifier assigned to the payment term on creation.


        Please note, that request body must include an `id` attribute with the value of your payment term

        unique identifier (the same one you passed in the URL).

        '
      operationId: Update a Payment Term by External ID
      summary: Update a Payment Term by External ID
      parameters:
      - name: external_id
        in: path
        description: Unique payment term external identifier.
        required: true
        schema:
          type: integer
        example: PAYTERM
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/PaymentTermUpdate'
            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/PaymentTerm'
              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\":\"payment_terms\",\"id\":\"PAYTERM\",\"attributes\":{\"name\":\"Updated Field Payment Term\"}}}' \\\n     \"https://api.us.workdayspend.com/services/payments/v1/payment_terms/PAYTERM/external_id\"\n"
    delete:
      tags:
      - payment_terms
      description: 'Deletes a payment term. You need to supply the unique payment term

        external identifier assigned to the payment term on creation.

        '
      operationId: Delete a Payment Term by External ID
      summary: Delete a Payment Term by External ID
      parameters:
      - name: external_id
        in: path
        description: Unique payment term external identifier.
        required: true
        schema:
          type: integer
        example: PAYTERM
      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/payments/v1/payment_terms/PAYTERM/external_id\"\n"
components:
  schemas:
    PaymentTermCreate:
      type: object
      required:
      - type
      properties:
        type:
          $ref: '#/components/schemas/PaymentTermType'
        attributes:
          $ref: '#/components/schemas/PaymentTermAttributes'
    PaymentTermUpdate:
      type: object
      required:
      - type
      - id
      properties:
        type:
          $ref: '#/components/schemas/PaymentTermType'
        id:
          $ref: '#/components/schemas/PaymentTermId'
        attributes:
          $ref: '#/components/schemas/PaymentTermAttributes'
    PaymentTerm:
      allOf:
      - $ref: '#/components/schemas/PaymentTermBase'
      - type: object
        properties:
          attributes:
            $ref: '#/components/schemas/PaymentTermAttributes'
    PaymentTermBase:
      title: Field
      type: object
      required:
      - type
      - id
      properties:
        type:
          $ref: '#/components/schemas/PaymentTermType'
        id:
          $ref: '#/components/schemas/PaymentTermId'
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    PaymentTermType:
      type: string
      description: Object type, should always be `payment_terms`.
      example: payment_terms
    PaymentTermId:
      type: integer
      description: Payment term identifier string.
      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.
    Error:
      type: object
      properties:
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the problem.
  examples:
    external_update_response:
      value:
        data:
          id: '1'
          type: payment_terms
          attributes:
            name: Payment Term Updated
            external_id: PAYTERM
          links:
            self: https://api.us.workdayspend.com/services/payments/v1/payment_terms/1
    external_update_request:
      value:
        data:
          type: payment_terms
          id: PAYTERM
          attributes:
            name: Payment Term Updated
    create_response:
      value:
        data:
          id: '1'
          type: payment_terms
          attributes:
            name: 'Payment Term #1'
            external_id: PAYTERM-1
          links:
            self: https://api.us.workdayspend.com/services/payments/v1/payment_terms/1
    index_response:
      value:
        data:
        - id: '1'
          type: payment_terms
          attributes:
            name: 'Payment Term #1'
            external_id: PAYTERM-1
          links:
            self: https://api.us.workdayspend.com/services/payments/v1/payment_terms/1
        - id: '2'
          type: payment_terms
          attributes:
            name: 'Payment Term #2'
            external_id: PAYTERM-2
          links:
            self: https://api.us.workdayspend.com/services/payments/v1/payment_terms/2
        links:
          self: https://api.us.workdayspend.com/services/payments/v1/payment_terms
    update_request:
      value:
        data:
          type: payment_terms
          id: '1'
          attributes:
            name: Payment Term Updated
            external_id: PAYTERM-UPD
    update_response:
      value:
        data:
          id: '1'
          type: payment_terms
          attributes:
            name: Payment Term Updated
            external_id: PAYTERM-UPD
          links:
            self: https://api.us.workdayspend.com/services/payments/v1/payment_terms/1
    create_request:
      value:
        data:
          type: payment_terms
          attributes:
            name: 'Payment Term #1'
            external_id: PAYTERM-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