---
title: "The Organization creates a debt Position."
method: POST
path: "/organizations/{organizationfiscalcode}/debtpositions"
tags: ["Debt Positions API"]
---

# The Organization creates a debt Position.

`POST /organizations/{organizationfiscalcode}/debtpositions`

## Path parameters

- `organizationfiscalcode` string, required

## Query parameters

- `toPublish` boolean

## Request body

- PaymentPositionModel
  - `iupd` string, required
  - `type` 'F' | 'G', required
  - `payStandIn` boolean — feature flag to enable a debt position in stand-in mode
  - `fiscalCode` string, required
  - `fullName` string, required
  - `streetName` string
  - `civicNumber` string
  - `postalCode` string
  - `city` string
  - `province` string
  - `region` string
  - `country` string
  - `email` string
  - `phone` string
  - `switchToExpired` boolean, required — feature flag to enable the debt position to expire after the due date
  - `companyName` string, required
  - `officeName` string
  - `validityDate` string, date-time
  - `paymentDate` string, date-time
  - `status` 'DRAFT' | 'PUBLISHED' | 'VALID' | 'INVALID' | 'EXPIRED' | 'PARTIALLY_PAID' | 'PAID' | 'REPORTED'
  - `paymentOption` PaymentOptionModel[]
    - `nav` string
    - `iuv` string, required
    - `amount` integer, required
    - `description` string, required
    - `isPartialPayment` boolean, required
    - `dueDate` string, date-time, required
    - `retentionDate` string, date-time
    - `fee` integer
    - `notificationFee` integer
    - `transfer` TransferModel[]
      - `idTransfer` '1' | '2' | '3' | '4' | '5', required
      - `amount` integer, required
      - `organizationFiscalCode` string — Fiscal code related to the organization targeted by this transfer.
      - `remittanceInformation` string, required
      - `category` string, required
      - `iban` string — mutual exclusive with stamp
      - `postalIban` string — optional - can be combined with iban but not with stamp
      - `stamp` Stamp
        - `hashDocument` string, required — Document hash type is stBase64Binary72 as described in https://github.com/pagopa/pagopa-api.
        - `stampType` string, required — The type of the stamp
        - `provincialResidence` string, required — The provincial of the residence
      - `companyName` string
      - `transferMetadata` TransferMetadataModel[] — it can added a maximum of 10 key-value pairs for metadata
        - `key` string, required
        - `value` string, required
    - `paymentOptionMetadata` PaymentOptionMetadataModel[] — it can added a maximum of 10 key-value pairs for metadata
      - `key` string, required
      - `value` string, required

## Response `201`

Request created.

- PaymentPositionModel
  - `iupd` string, required
  - `type` 'F' | 'G', required
  - `payStandIn` boolean — feature flag to enable a debt position in stand-in mode
  - `fiscalCode` string, required
  - `fullName` string, required
  - `streetName` string
  - `civicNumber` string
  - `postalCode` string
  - `city` string
  - `province` string
  - `region` string
  - `country` string
  - `email` string
  - `phone` string
  - `switchToExpired` boolean, required — feature flag to enable the debt position to expire after the due date
  - `companyName` string, required
  - `officeName` string
  - `validityDate` string, date-time
  - `paymentDate` string, date-time
  - `status` 'DRAFT' | 'PUBLISHED' | 'VALID' | 'INVALID' | 'EXPIRED' | 'PARTIALLY_PAID' | 'PAID' | 'REPORTED'
  - `paymentOption` PaymentOptionModel[]
    - `nav` string
    - `iuv` string, required
    - `amount` integer, required
    - `description` string, required
    - `isPartialPayment` boolean, required
    - `dueDate` string, date-time, required
    - `retentionDate` string, date-time
    - `fee` integer
    - `notificationFee` integer
    - `transfer` TransferModel[]
      - `idTransfer` '1' | '2' | '3' | '4' | '5', required
      - `amount` integer, required
      - `organizationFiscalCode` string — Fiscal code related to the organization targeted by this transfer.
      - `remittanceInformation` string, required
      - `category` string, required
      - `iban` string — mutual exclusive with stamp
      - `postalIban` string — optional - can be combined with iban but not with stamp
      - `stamp` Stamp
        - `hashDocument` string, required — Document hash type is stBase64Binary72 as described in https://github.com/pagopa/pagopa-api.
        - `stampType` string, required — The type of the stamp
        - `provincialResidence` string, required — The provincial of the residence
      - `companyName` string
      - `transferMetadata` TransferMetadataModel[] — it can added a maximum of 10 key-value pairs for metadata
        - `key` string, required
        - `value` string, required
    - `paymentOptionMetadata` PaymentOptionMetadataModel[] — it can added a maximum of 10 key-value pairs for metadata
      - `key` string, required
      - `value` string, required

## Other responses

- `400` — Malformed request.
- `401` — Wrong or missing function key.
- `403` — Forbidden
- `409` — Conflict: duplicate debt position found.
- `500` — Service unavailable.

---

[API](https://skmtc.net/pagopa/apis/pagopa-api-debt-position.md) · [All operations](https://skmtc.net/pagopa/apis/pagopa-api-debt-position/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pagopa/pagopa-api-debt-position/versions/a54f9d0b71c6/schema)
