Create a Validation Request Document
POST/v1/validation-requests/:validationRequestId/document
Uploads a document and updates the Validation Request to refer to that document. Valid file formats for documents are jpg
, png
and pdf
. The maximum file size is 5MB.
Request​
Path Parameters
Id of the Validation Request to add a document to
Header Parameters
Idempotency key
- multipart/form-data
Body
string
Responses​
- 200
- 400
- 401
- 403
- 404
Successfully uploaded document and updated Validation Request
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
data
object
validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Some charity
National Charities Registry
Charity's ID in registry
I34324
test@percent.internal
Testowa street 15
Testowa street 22/15
Katowice
44-100
Silesia
https://percent.internal
organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
POL
Reason for rejecting
Possible values: [Organisation is not a nonprofit.
, Organisation didn’t provide sufficient proof of nonprofit status.
, Organisation is a nonprofit but doesn’t have an official registry ID.
, Other
]
Reason code for rejecting
Possible values: [other
, not_eligible
, incorrect_documentation
, not_attributable_to_registry
]
2020-10-13T17:46:54.000Z
2020-10-13T17:46:54.000Z
2020-10-13T17:46:54.000Z
2020-10-13T17:46:54.000Z
documents
object[]
validationrequestdocument_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://s3-eu-west-1.amazonaws.com/assets.poweredbypercent.com/document.docx
Possible values: [social_impact
, nonprofit
]
validation_request
{
"data": {
"id": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Some charity",
"registryName": "National Charities Registry",
"registryId": "I34324",
"email": "test@percent.internal",
"addressLine1": "Testowa street 15",
"addressLine2": "Testowa street 22/15",
"city": "Katowice",
"postal": "44-100",
"state": "Silesia",
"website": "https://percent.internal",
"organisationId": "organisation_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"countryCode": "POL",
"rejectionReasonCode": "other",
"createdAt": "2020-10-13T17:46:54.000Z",
"deletedAt": "2020-10-13T17:46:54.000Z",
"acceptedAt": "2020-10-13T17:46:54.000Z",
"rejectedAt": "2020-10-13T17:46:54.000Z",
"documents": [
{
"id": "validationrequestdocument_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"validationRequestId": "validationrequest_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"url": "https://s3-eu-west-1.amazonaws.com/assets.poweredbypercent.com/document.docx",
"createdAt": "2024-07-29T15:51:28.071Z",
"deletedAt": "2024-07-29T15:51:28.071Z"
}
],
"organisationTypes": [
"social_impact"
]
},
"object": "validation_request"
}
Bad request
- application/json
- Schema
- Example (from schema)
- MultipartBoundaryNotFound
- TooManyAttachments
- ContentTypeError
- MaxFileSize
- FiletypeNotSupported
- BadRequest
Schema
error
object
{
"error": {
"code": "string",
"title": "string",
"message": "string",
"reasons": [
"string"
]
}
}
Upload - Multipart boundary not found
{
"error": {
"code": "upload/multipart_boundary_not_found",
"title": "Bad request",
"message": "Please provide multipart boundary"
}
}
Upload - Too many attachments
{
"error": {
"code": "upload/too_many_files",
"title": "Bad request",
"message": "Too many files attached (max: 1)"
}
}
Upload - Content type error
{
"error": {
"code": "upload/content_type_error",
"title": "Bad request",
"message": "Unsupported content type: xls"
}
}
Upload - File exceeded max size
{
"error": {
"code": "upload/max_file_size",
"title": "Bad request",
"message": "Request size exceeded maximum for this endpoint (5242880 bytes)"
}
}
Upload - Filetype not supported
{
"error": {
"code": "upload/filetype_not_supported",
"title": "Bad request",
"message": "Filetype not supported. Supported types include: pdf, png, jpg"
}
}
400 Bad Request
{
"error": {
"code": "bad_request",
"title": "Bad request",
"message": "Something is wrong with your request, please check any parameters and try again"
}
}
Unauthorized
Forbidden (scope)
- application/json
- Schema
- Example (from schema)
Schema
error
object
forbidden
Forbidden
Access is denied due to missing scope permissions
{
"error": {
"code": "forbidden",
"title": "Forbidden",
"message": "Access is denied due to missing scope permissions"
}
}
The specified resource was not found
- application/json
- Schema
- Example (from schema)
Schema
error
object
not_found
Resource not found
This endpoint is unavailable or can not be found
{
"error": {
"code": "not_found",
"title": "Resource not found",
"message": "This endpoint is unavailable or can not be found"
}
}