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

# Update IPID Config

> 
### Overview

This API sets how IPD case numbers (IPIDs) are generated for your workspace.

`prefix` (a non-empty string, trimmed) and `startsFrom` (a whole number, `1` or more) are required. `startsFrom` is the **last number used**, so after setting `startsFrom: 100` the next generated IPID is `prefix101`. The two admission-form settings are optional; when omitted they keep their current value.



## OpenAPI

````yaml post /ipd/v1/service/admissions/ipid-config
openapi: 3.0.0
info:
  title: Ekacare API & Webhook Documentation
  contact: {}
  version: '1.0'
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /ipd/v1/service/admissions/ipid-config:
    post:
      tags:
        - IPD API
      summary: Update IPID Config
      description: >-

        ### Overview


        This API sets how IPD case numbers (IPIDs) are generated for your
        workspace.


        `prefix` (a non-empty string, trimmed) and `startsFrom` (a whole number,
        `1` or more) are required. `startsFrom` is the **last number used**, so
        after setting `startsFrom: 100` the next generated IPID is `prefix101`.
        The two admission-form settings are optional; when omitted they keep
        their current value.
      operationId: UpdateIpdIpidConfig
      parameters:
        - name: auth
          in: header
          required: true
          schema:
            type: string
          example: >-
            eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
      requestBody:
        description: The IPID settings.
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - prefix
                - startsFrom
              properties:
                prefix:
                  type: string
                  description: Text placed before the running number, for example `IPD`.
                startsFrom:
                  type: integer
                  minimum: 1
                  description: Last number used. The next IPID uses `startsFrom + 1`.
                editable_in_admission:
                  type: boolean
                  description: Allow the IPID to be edited on the admission form.
                auto_generate_in_admission:
                  type: boolean
                  description: Generate the IPID automatically on the admission form.
            example:
              prefix: IPD
              startsFrom: 1000
              editable_in_admission: false
              auto_generate_in_admission: true
      responses:
        '200':
          description: OK — the saved IPID config.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpdIpidConfigResponse'
              example:
                success: true
                data:
                  owner: '170142612985588'
                  prefix: IPD
                  startsFrom: 1000
                  editable_in_admission: false
                  auto_generate_in_admission: true
        '400':
          description: >-
            Bad Request. Returns `{ success: false, error }` when a value is not
            allowed (for example `prefix` is empty or `startsFrom` is not a
            whole number of at least `1`), or `{ message }` when the request
            body failed schema validation (for example a required field is
            missing; the `message` is currently empty).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/IpdServiceFailure'
                  - $ref: '#/components/schemas/IpdServiceError'
              example:
                success: false
                error: startsFrom must be greater than or equal to 1
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpdServiceError'
      deprecated: false
components:
  schemas:
    IpdIpidConfigResponse:
      title: IpdIpidConfigResponse
      type: object
      properties:
        success:
          type: boolean
        data:
          type: object
          properties:
            owner:
              type: string
              description: Workspace id.
            prefix:
              type: string
              description: Text placed before the running number.
            startsFrom:
              type: integer
              description: Last number used. The next IPID uses `startsFrom + 1`.
            editable_in_admission:
              type: boolean
              description: Whether the IPID can be edited on the admission form.
            auto_generate_in_admission:
              type: boolean
              description: >-
                Whether the IPID is generated automatically on the admission
                form.
    IpdServiceFailure:
      title: IpdServiceFailure
      type: object
      properties:
        success:
          type: boolean
          description: Always `false`.
        error:
          type: string
          description: Human-readable error message.
    IpdServiceError:
      title: IpdServiceError
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.