Responses
-
200 application/json
OK
-
Bad Request -- Your request is invalid.
-
Unauthorized -- Your API key is wrong.
-
Forbidden -- The object requested is hidden for administrators only.
-
Not Found -- The specified object could not be found.
-
Too Many Requests -- You're requesting too many objects! Slow down!
-
Internal Server Error -- We had a problem with our server. Try again later.
-
Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
PATCH /elements
curl \
-X PATCH https://api.usecollect.com/v1/elements \
-H "Content-Type: application/json" \
-d '{"reason":"The document is not readable","status":"rejected","elementId":"eEDJFD5unNQTHoSBZ"}'
Request examples
Document
{
"reason": "The document is not readable",
"status": "rejected",
"elementId": "eEDJFD5unNQTHoSBZ"
}
{
"status": "approved",
"requestId": "2ewEw5L6amQiJ6J2A",
"visibility": false
}
{
"name": "NDA with ACME Corp",
"requestId": "e6bggjBX7vdWKWYwq"
}
{
"text": "Hello everyone!",
"type": "text",
"order": 4,
"requestId": "BKJ95xmpHSyo7KuRC"
}
{
"name": "More details",
"type": "page",
"order": 3,
"requestId": "XigRzPs4N5vwX3Rks"
}
Response examples (200)
Document
{
"id": "eEDJFD5unNQTHoSBZ",
"name": "ID",
"type": "docs",
"order": 3,
"itemId": "urRJfPK7CfyGBnHg8",
"reason": "The document is not readable",
"status": "rejected",
"request": {
"_id": "bbbBkrejSaJkHWwDE",
"campaignId": "7gDq3XyLyixkhqoHa"
},
"uploads": [
{
"url": "https://collectuseast.s3.amazonaws.com/elon_id.pdf?AWSAccessKeyId=AKIAJTQD6LRBSTO25FSQ&Expires=1561559790&Signature=bglKxNBqqcDKkAeuzmxoBS2IOQQ%3D",
"name": "Elon's ID.pdf",
"size": 2414511,
"createdAt": "2022-02-21T11:27:32Z",
"scannedOn": "2022-02-21T11:27:52Z",
"virusScanned": true
}
],
"mandatory": true,
"visibility": true,
"multipleupload": true
}
{
"id": "2ewEw5L6amQiJ6J2A",
"name": "Company info",
"type": "form",
"items": [
{
"name": "What size is your company",
"type": "dropdown",
"answer": "50-250 employees"
},
{
"name": "Where is your company located?",
"type": "multi",
"answer": [
"🇺🇸 USA",
"🇪🇺 Europe"
]
}
],
"order": 0,
"itemId": "dy8SYGJauWwhDcGrp",
"status": "approved",
"request": {
"_id": "GTonevwqoPPJ2PYEy",
"campaignId": "3ya2sjN9GYwYAHeSi"
},
"visibility": false
}
{
"id": "e6bggjBX7vdWKWYwq",
"name": "NDA with ACME Corp",
"type": "sign",
"order": 2,
"itemId": "urRJfPK7CfyGBnHg8",
"status": "signed",
"request": {
"_id": "bbbBkrejSaJkHWwDE",
"campaignId": "7gDq3XyLyixkhqoHa"
},
"uploads": [
{
"id": "KErM5RgjHWjnBPLXz",
"url": "https://collecteurope.s3.eu-west-3.amazonaws.com/YcnS5JKMnG5cA3TXK/qtBHzvbbjsiuW8NSr/1681813171409_new_doc_to_sign.pdf",
"name": "New doc to sign.pdf",
"size": 199498,
"createdAt": "2023-04-18T10:19:31Z"
},
{
"id": "SjgRfMK9Bnj6JYvTy",
"url": "https://collecteurope.s3.eu-west-3.amazonaws.com/YcnS5JKMnG5cA3TXK/qtBHzvbbjsiuW8NSr/1681813171675_summary.pdf",
"name": "Summary.pdf",
"size": 280284,
"createdAt": "2023-04-18T10:19:33Z"
}
],
"visibility": true
}
{
"id": "BKJ95xmpHSyo7KuRC",
"name": "Text block",
"text": "Hello everyone!",
"type": "text",
"order": 4,
"itemId": "7LBBC8LwnBnQoz8ae",
"request": {
"_id": "GTonevwqoPPJ2PYEy",
"campaignId": "3ya2sjN9GYwYAHeSi"
},
"visibility": true
}
{
"id": "XigRzPs4N5vwX3Rks",
"name": "More details",
"type": "page",
"order": 3,
"itemId": "L3uAmzDRJjWTm2TMR",
"request": {
"_id": "GTonevwqoPPJ2PYEy",
"campaignId": "3ya2sjN9GYwYAHeSi"
},
"visibility": true
}