Scout RFP (Workday Strategic Sourcing) supplier_company_segmentations API

Use the supplier company segmentations API to create, update, and query the supplier company segmentations in Workday Strategic Sourcing. ## Supplier Company Segmentation Object

OpenAPI Specification

scoutrfp-supplier-company-segmentations-api-openapi.yml Raw ↑
openapi: 3.0.2
info:
  title: Workday Strategic Sourcing attachments supplier_company_segmentations API
  version: '1.0'
  description: '<span id="section/Authentication/api_key" data-section-id="section/Authentication/api_key"></span>

    <span id="section/Authentication/user_token" data-section-id="section/Authentication/user_token"></span>

    <span id="section/Authentication/user_email" data-section-id="section/Authentication/user_email"></span>

    '
servers:
- url: https://api.us.workdayspend.com/services/attachments/v1
  description: Production Server
- url: https://api.sandbox.us.workdayspend.com/services/attachments/v1
  description: Sandbox Server
security:
- api_key: []
  user_token: []
  user_email: []
tags:
- name: supplier_company_segmentations
  x-displayName: Supplier Company Segmentations
  description: 'Use the supplier company segmentations API to create, update, and query the supplier company segmentations in Workday Strategic Sourcing.


    ## Supplier Company Segmentation Object


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

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

        '
      operationId: Create a Supplier Company Segmentation
      summary: Create a Supplier Company Segmentation
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/SupplierCompanySegmentationCreate'
            examples:
              without_slug:
                $ref: '#/components/examples/create_request-4'
              with_slug:
                $ref: '#/components/examples/create_with_slug_request'
      responses:
        '201':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SupplierCompanySegmentation'
              examples:
                without_slug:
                  $ref: '#/components/examples/create_response-5'
                with_slug:
                  $ref: '#/components/examples/create_with_slug_response'
        '401':
          description: Unauthorized
        '409':
          description: Conflict
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                invalid_type:
                  summary: Missing or invalid 'type' specified, expected 'supplier_company_segmentations'
                  description: 'Returns error due to invalid `type` parameter.

                    '
                  value:
                    errors:
                    - detail: Missing or invalid 'type' specified, expected 'supplier_company_segmentations'
                duplicate_label:
                  summary: Duplicate `label` value provided
                  description: 'Returns error due to already taken `label` attribute.

                    '
                  value:
                    errors:
                    - source:
                        pointer: /data/attributes/label
                      title: Validation Error
                      detail: label has already been taken
      x-codeSamples:
      - label: Curl without slug
        source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n     -H \"X-User-Token: ${USER_TOKEN}\" \\\n     -H \"X-User-Email: ${USER_EMAIL}\" \\\n     -H \"Content-Type: application/vnd.api+json\" \\\n     -X POST \\\n     -d '{\"data\":{\"type\":\"supplier_company_segmentations\",\"attributes\":{\"label\":\"Tier 5\",\"order\":5}}' \\\n     \"https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations\"\n"
      - label: Curl with slug
        source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n     -H \"X-User-Token: ${USER_TOKEN}\" \\\n     -H \"X-User-Email: ${USER_EMAIL}\" \\\n     -H \"Content-Type: application/vnd.api+json\" \\\n     -X POST \\\n     -d '{\"data\":{\"type\":\"supplier_company_segmentations\",\"attributes\":{\"label\":\"Tier 5\",\"order\":5,\"slug\":\"tier_5\"}}' \\\n     \"https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations\"\n"
  /supplier_company_segmentations/{id}:
    patch:
      tags:
      - supplier_company_segmentations
      description: 'Updates the details of an existing supplier company segmentation. You need to supply the unique

        identifier that was returned upon supplier company segmentation creation.


        Please note, that request body must include an `id` attribute with the value of your supplier company segmentation

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

        '
      operationId: Update a Supplier Company Segmentation
      summary: Update a Supplier Company Segmentation
      parameters:
      - name: id
        in: path
        description: Unique supplier company segmentation identifier.
        required: true
        schema:
          type: integer
        example: 1
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/SupplierCompanySegmentationUpdate'
            examples:
              success:
                $ref: '#/components/examples/update_request-5'
      responses:
        '200':
          description: OK
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/SupplierCompanySegmentation'
              examples:
                success:
                  $ref: '#/components/examples/update_response-5'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
        '409':
          description: Conflict
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                invalid_type:
                  summary: Missing or invalid 'type' specified, expected 'supplier_company_segmentations'
                  description: 'Returns error due to invalid `type` parameter.

                    '
                  value:
                    errors:
                    - detail: Missing or invalid 'type' specified, expected 'supplier_company_segmentations'
                duplicate_label:
                  summary: Duplicate `label` value provided
                  description: 'Returns error due to already taken `label` attribute.

                    '
                  value:
                    errors:
                    - source:
                        pointer: /data/attributes/label
                      title: Validation Error
                      detail: label has already been taken
      x-codeSamples:
      - label: Curl
        source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n     -H \"X-User-Token: ${USER_TOKEN}\" \\\n     -H \"X-User-Email: ${USER_EMAIL}\" \\\n     -H \"Content-Type: application/vnd.api+json\" \\\n     -X PATCH \\\n     -d '{\"data\":{\"type\":\"supplier_company_segmentations\",\"id\":\"2\",\"attributes\":{\"name\":\"Updated Field Supplier Company Segmentation\"}}}' \\\n     \"https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/2\"\n"
    delete:
      tags:
      - supplier_company_segmentations
      description: 'Deletes a supplier company segmentation. You need to supply the unique supplier company segmentation

        identifier that was returned upon supplier company segmentation creation.

        '
      operationId: Delete a Supplier Company Segmentation
      summary: Delete a Supplier Company Segmentation
      parameters:
      - name: id
        in: path
        description: Unique supplier company segmentation identifier.
        required: true
        schema:
          type: integer
        example: 1
      responses:
        '204':
          description: OK
        '401':
          description: Unauthorized
        '404':
          description: Not Found
      x-codeSamples:
      - label: Curl
        source: "curl -H \"X-Api-Key: ${COMPANY_KEY}\" \\\n     -H \"X-User-Token: ${USER_TOKEN}\" \\\n     -H \"X-User-Email: ${USER_EMAIL}\" \\\n     -H \"Content-Type: application/vnd.api+json\" \\\n     -X DELETE \\\n     \"https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/1\"\n"
components:
  schemas:
    SupplierCompanySegmentationCreateAttributes:
      type: object
      description: Supplier company segmentation attributes.
      required:
      - label
      - order
      properties:
        label:
          type: string
          maxLength: 255
          description: Supplier company segmentation label.
          example: Tier 1
        order:
          type: integer
          description: Supplier company segmentation order
          example: 1
        slug:
          type: string
          maxLength: 255
          description: Supplier company segmentation slug.
          example: tier_1
    SupplierCompanySegmentationUpdate:
      type: object
      required:
      - type
      - id
      properties:
        type:
          $ref: '#/components/schemas/SupplierCompanySegmentationType'
        id:
          $ref: '#/components/schemas/SupplierCompanySegmentationId'
        attributes:
          $ref: '#/components/schemas/SupplierCompanySegmentationAttributes'
    SupplierCompanySegmentation:
      allOf:
      - $ref: '#/components/schemas/SupplierCompanySegmentationBase'
      - type: object
        properties:
          attributes:
            $ref: '#/components/schemas/SupplierCompanySegmentationCreateAttributes'
    SupplierCompanySegmentationAttributes:
      type: object
      description: Supplier company segmentation attributes.
      required:
      - label
      - order
      properties:
        label:
          type: string
          maxLength: 255
          description: Supplier company segmentation label.
          example: Tier 1
        order:
          type: integer
          description: Supplier company segmentation order
          example: 1
    SupplierCompanySegmentationType:
      type: string
      description: Object type, should always be `supplier_company_segmentations`.
      example: supplier_company_segmentations
    SupplierCompanySegmentationCreate:
      type: object
      required:
      - type
      properties:
        type:
          $ref: '#/components/schemas/SupplierCompanySegmentationType'
        attributes:
          allOf:
          - $ref: '#/components/schemas/SupplierCompanySegmentationCreateAttributes'
          - type: object
            required:
            - label
            - order
    SupplierCompanySegmentationId:
      type: integer
      description: Supplier company segmentation identifier string.
      example: 1
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    SupplierCompanySegmentationBase:
      title: Field
      type: object
      required:
      - type
      - id
      properties:
        type:
          $ref: '#/components/schemas/SupplierCompanySegmentationType'
        id:
          $ref: '#/components/schemas/SupplierCompanySegmentationId'
    Error:
      type: object
      properties:
        detail:
          type: string
          description: A human-readable explanation specific to this occurrence of the problem.
  examples:
    create_request-4:
      value:
        data:
          type: supplier_company_segmentations
          attributes:
            label: Tier 5
            order: 5
    update_response-5:
      value:
        data:
          id: '1'
          type: supplier_company_segmentations
          attributes:
            label: Tier 16
            order: 1
            slug: tier_1
          links:
            self: https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/1
    index_response-5:
      value:
        data:
        - id: '1'
          type: supplier_company_segmentations
          attributes:
            label: Tier 1
            order: 1
            slug: tier_1
          links:
            self: https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/1
        - id: '2'
          type: supplier_company_segmentations
          attributes:
            label: Tier 2
            order: 2
            slug: tier_2
          links:
            self: https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/2
        - id: '3'
          type: supplier_company_segmentations
          attributes:
            label: Tier 3
            order: 3
            slug: tier_3
          links:
            self: https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/3
        - id: '4'
          type: supplier_company_segmentations
          attributes:
            label: Tier 4
            order: 4
            slug: tier_4
          links:
            self: https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/4
        - id: '5'
          type: supplier_company_segmentations
          attributes:
            label: Tier 5
            order: 5
            slug: tier_5_ab9fcfab-eaa5-4006-999a-7b82019f486a
          links:
            self: https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/5
        links:
          self: https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations
    create_with_slug_request:
      value:
        data:
          type: supplier_company_segmentations
          attributes:
            label: Tier 5
            order: 5
            slug: tier_5
    create_with_slug_response:
      value:
        data:
          id: '5'
          type: supplier_company_segmentations
          attributes:
            label: Tier 5
            order: 5
            slug: tier_5
          links:
            self: https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/5
    create_response-5:
      value:
        data:
          id: '5'
          type: supplier_company_segmentations
          attributes:
            label: Tier 5
            order: 5
            slug: tier_5_25672734-8f8f-4735-9099-8a4f3c64505a
          links:
            self: https://api.us.workdayspend.com/services/suppliers/v1/supplier_company_segmentations/5
    update_request-5:
      value:
        data:
          type: supplier_company_segmentations
          id: '1'
          attributes:
            label: Tier 16
            order: 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