Start an upload of a reference document for the organisation's templates
curl --request POST \ --url https://api.whatsbuilt.fi/v1/organisation/reference-documents/uploads \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "filename": "example", "content_type": "application/pdf", "byte_size": 1 }'Answers a presigned PUT for one PDF. Upload it, then call createOrganisationReferenceDocument with the key. Needs an integration that is an admin of its organisation.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Where to upload
Where to upload.
object
Pass it to createReferenceDocument, or createOrganisationReferenceDocument, once the upload has finished
Send exactly these headers with the PUT
object
Example
{ "method": "PUT"}VALIDATION_ERROR, DOCUMENT_TYPE_NOT_ALLOWED or DOCUMENT_TOO_LARGE
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Missing, malformed, expired or revoked token
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}INSUFFICIENT_SCOPE; INSUFFICIENT_ROLE when the integration is not an admin of its organisation
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}No such document
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}IDEMPOTENCY_KEY_REUSED: the key was used with another body
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RATE_LIMITED; wait for Retry-After seconds
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}