API Snap · Example Payload

Pdf Generate Example

API UtilitiesDeveloper ToolsQR CodesScreenshotsImage ProcessingPDF GenerationMarkdownURL MetadataHashingJWTBase64UUIDColor ConversionLorem IpsumPlaceholder Images

Pdf Generate Example is an example object payload from API Snap, with 5 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

@context@typeoperationrequestresponse

Example Payload

Raw ↑
{
  "@context": "../json-ld/api-snap-context.jsonld",
  "@type": "ApiSnap",
  "operation": "htmlToPdf",
  "request": {
    "method": "POST",
    "url": "https://api-snap.com/api/pdf",
    "headers": {
      "Authorization": "Bearer snp_REDACTED",
      "Content-Type": "application/json"
    },
    "body": {
      "html": "<h1>Invoice #1042</h1><p>Total: $129.00</p>",
      "title": "invoice-1042"
    }
  },
  "response": {
    "statusCode": 200,
    "contentType": "application/pdf",
    "headers": {
      "Content-Disposition": "attachment; filename=\"invoice-1042.pdf\""
    }
  }
}