API reference · Files
Create a file generation request
POST/v1/files/file-generation-requests
Request the generation of a file. The request will be queued and processed asynchronously. ⚠️ This endpoint is rate limited.
Requires a Bearer access token.
Body
CreateFileGenerationRequestDto1 of 2 fields has no description in the spec.
Response
200 · FileGenerationRequestNo field is described in the spec.
fileGenerationRequestId#stringalways returnedhash#stringalways returnedslug#stringalways returnedtype#FileGenerationTypealways returnedZIPPRINT_PHYSICAL_CARDS_PDFstatus#FileGenerationStatusalways returnedPENDINGDONEFAILEDaccountId#stringuserId#stringcharityId#stringcharityUserId#stringcreatedAt#string (date-time)always returnedupdatedAt#string (date-time)always returned
Errors
400Missing params in createFileGenerationRequest
{ "statusCode": 400, "message": "Missing params in createFileGenerationRequest", "error": "Bad Request" }400A field is missing, has the wrong type, or is not part of the request schema.
Every request with a body or query is validated.
{ "statusCode": 400, "message": [ "amount must not be less than 1", "property foo should not exist" ], "error": "Bad Request" }401Unauthorized
Missing, expired or invalid access token.
{ "statusCode": 401, "message": "Unauthorized" }403Account closed
{ "message": "Account closed", "code": "ACCOUNT_CLOSED" }429Rate limit exceeded
Too many calls to this endpoint in a short time.
{ "statusCode": 429, "message": "Rate limit exceeded" }
curl -X POST https://api.sandbox.charitips.com/v1/files/file-generation-requests \ -H "Authorization: Bearer $CHARITIPS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "type": "PRINT_PHYSICAL_CARDS_PDF", "params": { "campaignId": "<campaignId>" } }'Request bodies are written for this docs and checked against the API's validation; ids in angle brackets are placeholders. Response values are placeholders built from the schema.