> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cadanapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit person filing fields

> Submit statutory filing fields for a person in a jurisdiction. Use this
endpoint for fields returned by the required-fields endpoint with
`entity: "person"` and `scope` containing `"filing"`.

Fields are validated against the jurisdiction's field definitions.
Unknown keys are rejected.

For `document`-typed fields (e.g. `aadhaarCardFront`), upload the file
first: `POST /v1/files/upload-url` (Workforce Management API) with
`{"purpose": "statutory-document", "contentType": "image/png"}`
returns a `fileId` and a presigned `putUrl`; HTTP PUT the file bytes
to the `putUrl`, then submit the `fileId` as the field value here.
The GET endpoint returns document fields as an object with a presigned
download `url`.




## OpenAPI

````yaml /openapi/statutory-compliance.yaml put /v1/statutory/persons/{person_id}/fields/{country_code}
openapi: 3.0.0
info:
  title: Statutory Compliance API
  version: 0.1.0
  description: Statutory filing, government remittance, and compliance tracking API
  termsOfService: https://cadanapay.com/terms-and-conditions
  contact:
    email: api@cadanapay.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.cadanapay.com
    description: Prod Server
  - url: https://dev-api.cadanapay.com
    description: Dev Server
security:
  - Authorization: []
tags:
  - name: Jurisdictions
    description: Discover supported countries, required fields, and filing types
  - name: Filings
    description: >-
      Create, submit, and track statutory returns — from upcoming obligations
      through acceptance
  - name: Remittances
    description: Government payments linked to filings
  - name: Requirements
    description: Prerequisites that must be satisfied before filing
  - name: Events
    description: Immutable audit trail
  - name: Statutory Fields
    description: Submit and read entity-level statutory filing data
paths:
  /v1/statutory/persons/{person_id}/fields/{country_code}:
    put:
      tags:
        - Statutory Fields
      summary: Submit person filing fields
      description: |
        Submit statutory filing fields for a person in a jurisdiction. Use this
        endpoint for fields returned by the required-fields endpoint with
        `entity: "person"` and `scope` containing `"filing"`.

        Fields are validated against the jurisdiction's field definitions.
        Unknown keys are rejected.

        For `document`-typed fields (e.g. `aadhaarCardFront`), upload the file
        first: `POST /v1/files/upload-url` (Workforce Management API) with
        `{"purpose": "statutory-document", "contentType": "image/png"}`
        returns a `fileId` and a presigned `putUrl`; HTTP PUT the file bytes
        to the `putUrl`, then submit the `fileId` as the field value here.
        The GET endpoint returns document fields as an object with a presigned
        download `url`.
      operationId: putPersonFields
      parameters:
        - $ref: '#/components/parameters/XMultiTenantKey'
        - $ref: '#/components/parameters/PersonId'
        - $ref: '#/components/parameters/CountryCode'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutStatutoryFieldsRequest'
            example:
              fields:
                steuerID: '97148835200'
                personengruppenschluessel: '101'
      responses:
        '204':
          description: Fields saved successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    XMultiTenantKey:
      name: X-MultiTenantKey
      in: header
      required: false
      schema:
        type: string
      description: >-
        Required when using a Platform API token. The tenant key identifying
        which business to operate on.
    PersonId:
      name: person_id
      in: path
      required: true
      schema:
        type: string
      description: Person identifier
      example: 81933bed-97ba-4477-81a7-b8c5ab507b6f
    CountryCode:
      name: country_code
      in: path
      required: true
      schema:
        type: string
        pattern: ^[A-Z]{2}$
      description: ISO 3166-1 alpha-2 country code
      example: MX
  schemas:
    PutStatutoryFieldsRequest:
      type: object
      required:
        - fields
      description: Request body for submitting statutory filing fields.
      properties:
        fields:
          type: object
          additionalProperties:
            oneOf:
              - type: string
              - type: object
                properties:
                  fileId:
                    type: string
                    format: uuid
                required:
                  - fileId
          description: |
            Key-value pairs of field data. Keys must match the `key` values
            from the jurisdiction's required-fields response.

            For `document`-typed fields, the value is the `fileId` returned by
            `POST /v1/files/upload-url` (purpose `statutory-document`) after the
            file has been uploaded — either as a bare string or as an object
            `{"fileId": "..."}`. The request is rejected with `400` if the
            fileId is unknown, the file has not been uploaded yet, or it was
            uploaded with a different purpose.
          example:
            steuerID: '97148835200'
            personengruppenschluessel: '101'
            idCard: f1e2d3c4-b5a6-4789-9abc-def012345678
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
              example: countryCode is required
            details:
              type: array
              nullable: true
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      bearerFormat: API_SECRET_KEY

````