Questionnaire Responses

Create documents on the company an answer request is about

Changed on

Uploads documents as the answer to a DOCUMENTS question, filed on the company the request is about. The target company is taken from the request's onBehalfOfCompanyId and is deliberately not accepted in the body, so this grant cannot be aimed at any other company. Only the answering company (forCompanyId) may call it, and only while the brand that issued the request is still connected to it; anyone else gets 404 request_not_found, so the existence of another company's request is never confirmed. Where the generic POST /api/company-documents/bulk-create requires the target to be in the caller's own network — which a delegated answering party never is — this route treats the request itself as the authorization. Each document is filed on the subject company with the caller as its owner, is never public, and is auto-shared with the brand that asked, which is what makes it visible to all three parties. Files must belong to the caller; any that do not are skipped rather than failing the batch. Responds 201 with the created ids. A request whose questionnaire is archived is read-only and answers 409 questionnaire_archived.

post/api/questionnaires/requests/{requestId}/documents

Request

  • Base URL
    https://api.retraced.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.retraced.com/api/questionnaires/requests/{requestId}/documents
  • Auth
    none declared

Path parameters

requestIdstring required

Request body

Response

Default Response

Changes

    • info

      added the non-success response with the status

    • breaking

      request property // list-of-types was narrowed by removing types null from media type application/json

    • breaking

      request property // list-of-types was narrowed by removing types null from media type application/json

    • breaking

      the // request property's minLength was increased from 0 to 1

    • breaking

      the // request property's minLength was increased from 0 to 1

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • breaking

      the response property /// became nullable for the status

    • warning

      the // request property's maxLength was set to 255

    • warning

      the // request property's maxLength was set to 255

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      response property data/documents/items/documentTypeId list-of-types was narrowed by removing types null from media type application/json of response 201

    • info

      response property data/documents/items/fileId list-of-types was narrowed by removing types null from media type application/json of response 201

    • info

      response property data/documents/items/name list-of-types was narrowed by removing types null from media type application/json of response 201