Skip to content
HALOWERK

Formatwerk

bates number

Stamps every page of the documents, in order, with a Bates label such as ACME000001 (pdf-lib, Helvetica) at a corner or edge of the visible page (CropBox; rotated pages get an upright label), optionally on a white box and with a legend such as CONFIDENTIAL on the opposite side. Numbering continues across documents; the call fails before stamping if the last number needs more digits than configured. Returns each PDF with its first and last number.

POST https://format.halowerk.com/v1/bates-number

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
documentsarrayYes
prefixstringNo
suffixstringNo
startintegerNo
digitsintegerNo
positionstringNo
margin_mmnumberNo
font_size_ptnumberNo
backgroundbooleanNo
legendstringNoOptional text on the opposite side, e.g. CONFIDENTIAL.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "documents"
  ],
  "properties": {
    "documents": {
      "type": "array",
      "minItems": 1,
      "maxItems": 20,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "pdf_base64"
        ],
        "properties": {
          "pdf_base64": {
            "type": "string",
            "maxLength": 28000000
          },
          "name": {
            "type": "string",
            "maxLength": 120
          }
        }
      }
    },
    "prefix": {
      "type": "string",
      "maxLength": 20,
      "pattern": "^[A-Za-z0-9 _./-]*$",
      "default": ""
    },
    "suffix": {
      "type": "string",
      "maxLength": 20,
      "pattern": "^[A-Za-z0-9 _./-]*$",
      "default": ""
    },
    "start": {
      "type": "integer",
      "minimum": 0,
      "maximum": 999999999999,
      "default": 1
    },
    "digits": {
      "type": "integer",
      "minimum": 1,
      "maximum": 12,
      "default": 6
    },
    "position": {
      "type": "string",
      "enum": [
        "bottom-right",
        "bottom-center",
        "bottom-left",
        "top-right",
        "top-center",
        "top-left"
      ],
      "default": "bottom-right"
    },
    "margin_mm": {
      "type": "number",
      "minimum": 2,
      "maximum": 40,
      "default": 8
    },
    "font_size_pt": {
      "type": "number",
      "minimum": 6,
      "maximum": 18,
      "default": 9
    },
    "background": {
      "type": "boolean",
      "default": true
    },
    "legend": {
      "type": "string",
      "maxLength": 60,
      "pattern": "^[A-Za-z0-9 ÄÖÜäöüß_.,:;/()&-]*$",
      "description": "Optional text on the opposite side, e.g. CONFIDENTIAL."
    }
  }
}

Open original schema

Published input example

{
  "documents": [
    {
      "pdf_base64": "JVBERi0xLjcKJYGBgYEKCjUgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL1R5cGUgL09ialN0bQovTiA0Ci9GaXJzdCAyMAovTGVuZ3RoIDI1Nwo+PgpzdHJlYW0KeJzVUk1LxDAQvedXzFFPmaTZpCuloP24iLAsnpQ9hG1YCrKRtAX99840q+JBPBt45OO9SWbyRgGCBmOgAFeCgU2hoaqEfHx/DSB3/hQmIe/HYYJnYhH2cBCyict5BiXqWnxrGz/7l3gSOQgUiz8VuxSH5RgSVH3X94gOEa0hWETd0twQtgRNe+J0SWuCMxfQmSsQi1vi+gzrcgzzq3Zzie9oJq1lTZu1psz7r3f5rS7fof/KZ1sL+RCH1s8BrtobjdoqhQrX8XRN35GCn+P/LW7Nf4znXyv84TPbyyanwD2wuiz3YYpLOpLtpKv5v8Iw+rv4Rl2D3GGYcWDyAxQmjZoKZW5kc3RyZWFtCmVuZG9iagoKNiAwIG9iago8PAovU2l6ZSA3Ci9Sb290IDIgMCBSCi9JbmZvIDMgMCBSCi9GaWx0ZXIgL0ZsYXRlRGVjb2RlCi9UeXBlIC9YUmVmCi9MZW5ndGggMzQKL1cgWyAxIDIgMiBdCi9JbmRleCBbIDAgNyBdCj4+CnN0cmVhbQp4nBXEMQ4AIAgEsB7G3d/6fAgdiu5y2bLVduKRfAZDgAKrCmVuZHN0cmVhbQplbmRvYmoKCnN0YXJ0eHJlZgozNzUKJSVFT0Y=",
      "name": "contract.pdf"
    }
  ],
  "prefix": "ACME",
  "digits": 6
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →