Modify a request

PATCH /request

This endpoint retrieves all the details of a specific request including the answers of the forms and the documents that have been uploaded.

application/json

Body

  • requestId string

    The ID of the request you want to modify.

  • status string

    The new status of the request. Can be one of the predifined status pending, completed, waiting, canceled, archived or a custom status that you previously have created on your account.

  • dueDate string

    The new due date of the request. The due date should be encoded as a string using ISO 8601 format.

  • data object

    An object with custom data that you want to use in your request.

    Additional properties are allowed.

  • assignedTo string

    The ID of the team member you want to assign the request to. Use 'unset' if you want to unassign the request.

  • sendCompletionMessage boolean

    Boolean. If set to true, a message will be automatically send when the request status will be changed to "completed". This message can be customized in the branding settings used for this campaign.

  • sendRejectionMessage boolean

    Boolean. If set to true, a message will be automatically send when the request status will be changed to "pending" and at least one element on the portal has been rejected. This message can be customized in the branding settings used for this campaign.

  • sendReopenMessage boolean

    Boolean. If set to true, a message will be automatically send when the request status will be changed to "pending". This message can be customized in the branding settings used for this campaign.

Responses

  • 200 application/json

    List of requests of a campaigns.

    Hide response attributes Show response attributes object
    • request object

      Additional properties are allowed.

      Hide request attributes Show request attributes object
      • _id string
      • campaignId string
      • createdAt string(date-time)
      • portalUrl string
      • status string
      • dueDate string(date-time)
      • privacy string
      • contact object

        Additional properties are allowed.

        Hide contact attributes Show contact attributes object
        • _id string
        • email string(email)
        • firstName string
        • lastName string
        • company string
        • tag array[string]
        • custom array[object]
          Hide custom attributes Show custom attributes object
          • _id string
          • name string
          • variable string
          • value string
      • branding object

        Additional properties are allowed.

        Hide branding attributes Show branding attributes object
        • useBranding boolean
        • brandingId string
    • errors array
  • 400

    Bad Request -- Your request is invalid.

  • 401

    Unauthorized -- Your API key is wrong.

  • 403

    Forbidden -- The object requested is hidden for administrators only.

  • 404

    Not Found -- The specified object could not be found.

  • 429

    Too Many Requests -- You're requesting too many objects! Slow down!

  • 500

    Internal Server Error -- We had a problem with our server. Try again later.

  • 503

    Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

PATCH /request
curl \
 --request PATCH 'https://api.usecollect.com/v1/request' \
 --header "Content-Type: application/json" \
 --data '{"status":"pending","requestId":"bbbBkrejSaJkHWwDE"}'
Request example
{
  "status": "pending",
  "requestId": "bbbBkrejSaJkHWwDE"
}
Response examples (200)
{
  "errors": [],
  "request": {
    "_id": "bbbBkrejSaJkHWwDE",
    "status": "pending",
    "contact": {
      "_id": "ngxhLDiDGEBS2jjKh",
      "tag": [],
      "email": "elon@example.com",
      "custom": [],
      "company": "Tesla",
      "lastName": "Musk",
      "createdAt": "2022-11-16T05:00:43Z",
      "firstName": "Elon",
      "lastActivity": "2022-02-21T10:31:52Z"
    },
    "dueDate": null,
    "privacy": "private",
    "branding": {
      "brandingId": "bJoTr6kHikTRDsvSd",
      "useBranding": true
    },
    "createdAt": "2023-02-21T10:31:52Z",
    "portalUrl": "https://app.usecollect.com/portal/LzP5r56tpqh3gteCf/bbbBkrejSaJkHWwDE",
    "campaignId": "7gDq3XyLyixkhqoHa",
    "sendCompletionMessage": true
  }
}