Tradeshift Dx Category Assignments Update API

The dx-category--assignments-update API from Tradeshift — 3 operation(s) for dx-category--assignments-update.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

tradeshift-dx-category-assignments-update-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tradeshift External Dx Category Assignments Update API
  version: 1.0.0
servers:
- url: https://api.tradeshift.com/tradeshift
tags:
- name: dx-category--assignments-update
paths:
  /rest/external/assignments/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: An UUID representing the assignment id.
    patch:
      responses:
        '200':
          description: '&nbsp; The assignment was successfully updated are new assignment is returned <br>

            '
          content:
            application/json:
              example:
                id: a60b2008-8872-4620-8ed2-410ce5640fb9
                externalId: External-Id
                subjectId: 360b2008-8872-4620-8ed2-410ce5640fb0
                app: APVerification
                createdBy: 260b2008-8872-4620-8ed2-410ce5640fb3
                assigneeIds:
                - 12067d82-1308-4fd1-9d0b-12eafe99c4cd
                companyId: 3fba6061-b51e-49bb-8c08-6cf6d28a304a
                tags:
                - A tag
                - Another tag
                type: A type
                createdAt: '2018-10-25T16:40:31.795+03:00'
                modifiedAt: '2018-10-25T16:40:31.795+03:00'
                outcome: An outcome
                status: CLOSED
                modifiedBy: 12067d82-1308-4fd1-9d0b-12eafe99c4cd
                comment: A comment
                context:
                  format: App.Tradeshift
                  context: {}
              schema:
                title: Tradeshift Public API 1.0 - Assignment
                required:
                - id
                - subjectId
                - type
                type: object
                additionalProperties: false
                properties:
                  id:
                    pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                    description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                    type: string
                  subjectId:
                    pattern: ^.{1,255}$
                    type: string
                  app:
                    pattern: ^.{1,255}$
                    type: string
                  createdBy:
                    pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                    description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                    type: string
                  assigneeIds:
                    uniqueItems: true
                    type: array
                    additionalProperties: false
                    items:
                      pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                      description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                      type: string
                  companyId:
                    pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                    description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                    type: string
                  tags:
                    minItems: 0
                    uniqueItems: true
                    type: array
                    additionalProperties: false
                    items:
                      type: string
                  type:
                    pattern: ^.{1,255}$
                    type: string
                  comment:
                    type: string
                  outcome:
                    type: string
                  status:
                    type: string
                  externalId:
                    pattern: ^.{1,255}$
                    type: string
                  modifiedBy:
                    pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                    description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                    type: string
                  createdAt:
                    pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.\d{3})?(Z|(\+|\-)[0-9]{2}:[0-9]{2})
                    description: ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.
                    type: string
                  modifiedAt:
                    pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.\d{3})?(Z|(\+|\-)[0-9]{2}:[0-9]{2})
                    description: ISO8601 formatted DateTime in UTC timezone, fx 2014-12-09T16:11:53Z with optionally .001 for milliseconds.
                    type: string
                  context:
                    type: object
                  delegations:
                    uniqueItems: true
                    type: array
                    items:
                      required:
                      - delegator
                      - delegatee
                      type: object
                      properties:
                        delegator:
                          pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                          description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                          type: string
                        delegatee:
                          pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                          description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                          type: string
                        delegatorType:
                          type: string
        '400':
          description: Invalid input. The response will contain a list of one or more validation errors.
          content:
            application/json:
              schema:
                type: string
        '401':
          description: ''
        '403':
          description: Current user does not have access to assignment
          content:
            application/json:
              schema:
                type: string
        '404':
          description: ''
          content:
            text/xml:
              schema:
                example: "<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"
        '500':
          description: '&nbsp; The service failed unexpectedly while updating the assignment.

            '
          content:
            application/json:
              example:
                ErrorCode: AbsentDefaultAssignee
                Message: Default assignee is absent. - Default assignee is absent.
                ErrorDetail: []
                ValidationError: []
              schema:
                type: string
      description: 'Updates an assignment with assignees, tags, comment, outcome. The new assignees will be added to the existing ones and the duplicates will be removed. The new tags will be added to the existing ones and the duplicates will be removed. The comment will replace the existing one. The outcome will replace the existing one.

        '
      operationId: patch-rest-external-assignments-id
      requestBody:
        content:
          application/json:
            example:
              addAssigneeIds:
              - e6aaeb31-b33d-40a1-bd05-a4d5bc1410ea
              - 12067d82-1308-4fd1-9d0b-12eafe99c4cd
              addTags:
              - tag1
              - tag2
              updateComment: comment
              updateOutcome: outcome
            schema:
              title: Tradeshift Public API 1.0 - Assignment
              type: object
              additionalProperties: false
              properties:
                addAssigneeIds:
                  minItems: 1
                  uniqueItems: true
                  type: array
                  additionalProperties: false
                  items:
                    pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
                    description: String representation of an Universally unique identifier (UUID), version 5. See RFC 4122
                    type: string
                addTags:
                  minItems: 0
                  uniqueItems: true
                  type: array
                  additionalProperties: false
                  items:
                    type: string
                updateComment:
                  type: string
                updateOutcome:
                  pattern: ^.{1,255}$
                  type: string
                context:
                  type: object
              required:
              - addAssigneeIds
              - addTags
              - updateComment
              - updateOutcome
              - context
        required: true
      parameters: []
      x-annotation-dx-category: assignments-update
      summary: update assignment
      tags:
      - dx-category--assignments-update
  /rest/external/assignments/{id}/close:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: An UUID representing the assignment id.
    put:
      responses:
        '204':
          description: The assignment is successfully closed.
        '400':
          description: The assignment cannot be found or closed.
          content:
            application/json:
              example:
                ErrorCode: BadRequest
                Message: Could not resolve type nonExistentType
                ErrorDetail:
                - Key: message
                  Value: Could not resolve type nonExistentType
                - Key: stacktrace
                  Value: "com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"
                ValidationError: []
                RequestId: 2c941598-489c-4fac-8543-03cb921feaf7
              schema:
                type: string
        '401':
          description: ''
        '403':
          description: Current user does not have access to assignment
          content:
            application/json:
              schema:
                type: string
        '404':
          description: ''
          content:
            text/xml:
              schema:
                example: "<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"
      description: 'Update the status of the assignment to CLOSED. <br> The assignment can be closed if it is in OPEN state.

        '
      operationId: put-rest-external-assignments-id-close
      parameters: []
      x-annotation-dx-category: assignments-update
      summary: update assignment status to CLOSED
      tags:
      - dx-category--assignments-update
  /rest/external/assignments/{id}/comment:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
      description: An UUID representing the assignment id.
    put:
      responses:
        '204':
          description: The comment is successfully updated.
        '400':
          description: The assignment cannot be found or updated.
          content:
            application/json:
              example:
                ErrorCode: BadRequest
                Message: Could not resolve type nonExistentType
                ErrorDetail:
                - Key: message
                  Value: Could not resolve type nonExistentType
                - Key: stacktrace
                  Value: "com.tradeshift.commons.exception.BadRequestException: Could not resolve type nonExistentType\n\tat com.tradeshift.coding.rest.CodingResource.getCodingLists(CodingResource.java:85)\n\t"
                ValidationError: []
                RequestId: 2c941598-489c-4fac-8543-03cb921feaf7
              schema:
                type: string
        '401':
          description: ''
        '403':
          description: Current user does not have access to assignment
          content:
            application/json:
              schema:
                type: string
        '404':
          description: ''
          content:
            text/xml:
              schema:
                example: "<ns6:ResponseError xmlns:cec=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n                   xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n                   xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n                   xmlns:ns6=\"http://tradeshift.com/api/1.0\"\n                   xmlns:ns20=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponseSimple-2\"\n                   xmlns:ns8=\"urn:oasis:names:specification:ubl:schema:xsd:ApplicationResponse-2\"\n                   xmlns:ns7=\"http://tradeshift.com/api/2.0\"\n                   xmlns:ns13=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n                   xmlns:ns9=\"urn:oasis:names:specification:ubl:schema:xsd:OrderCancellation-2\"\n                   xmlns:ns12=\"urn:oasis:names:specification:ubl:schema:xsd:Quotation-2\"\n                   xmlns:ns11=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n                   xmlns:ns22=\"urn:oasis:names:specification:ubl:schema:xsd:RequestForQuotation-2\"\n                   xmlns:ns10=\"urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2\"\n                   xmlns:ns21=\"urn:oasis:names:specification:ubl:schema:xsd:OrderResponse-2\"\n                   xmlns:ns17=\"urn:oasis:names:specification:ubl:schema:xsd:RemittanceAdvice-2\"\n                   xmlns:ns16=\"urn:oasis:names:specification:ubl:schema:xsd:Reminder-2\"\n                   xmlns:ns15=\"urn:oasis:names:specification:ubl:schema:xsd:OrderChange-2\"\n                   xmlns:ns14=\"urn:oasis:names:specification:ubl:schema:xsd:Order-2\"\n                   xmlns:ns19=\"urn:oasis:names:specification:ubl:schema:xsd:Catalogue-2\"\n                   xmlns:ts=\"http://tradeshift.com/api/public/1.0\"\n                   xmlns:ns18=\"urn:oasis:names:specification:ubl:schema:xsd:ReceiptAdvice-2\">\n    <ns6:ErrorCode>ResourceNotFound</ns6:ErrorCode>\n    <ns6:Message>Error&amp;#x3a; ResourceNotFound&amp;#x3a; The object did not exist</ns6:Message>\n    <ns6:RequestId>fff29544-8039-499f-91c5-b3c9e4e3d8b1</ns6:RequestId>\n</ns6:ResponseError>\n"
      description: 'Update the comment of the assignment. <br> You should put the new comment of the assignment in the request body as plain text.

        '
      operationId: put-rest-external-assignments-id-comment
      requestBody:
        content:
          text/plain:
            example: A comment
            schema:
              type: string
        required: true
      parameters: []
      x-annotation-dx-category: assignments-update
      summary: update assignment comment
      tags:
      - dx-category--assignments-update