Zum Inhalt
HALOWERK

Finopswerk

sales return refund asset ledger

OriginalfullycollectedsaleN/priceP/formerinventoryunitcostC/fixedrationalperreturnrecoverycostK plusorderedactualreturndeltas/updatedTOTALreturnforecastsE reconstruct returned/expected/remainingunits,revenue/refundliability,SEPARATEright-to-recoverasset,returnedstock,actualrefund/recoverycash,attributablecashposition,COGS/margin,revenue-COGScatchups andbalanceidentity. Revenue=(N-E)P,remainingrefund=(E-A)P,recoverasset=(E-A)(C-K),returnedstock=A*C,cash=NP-A*P-A*K,COGS=NC-E(C-K)..

POST https://finops.halowerk.com/v1/sales-return-refund-asset-ledger

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
sold_unitsintegerJa
unit_priceintegerJa
unit_costintegerJa
recovery_cost_nintegerJa
recovery_cost_dintegerJa
observationsarrayJa
reportobjectJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "sold_units": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "unit_price": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000
    },
    "unit_cost": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "recovery_cost_n": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    },
    "recovery_cost_d": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "observations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "actual_returns_delta": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000
          },
          "expected_total_domain": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000
            },
            "minItems": 1,
            "maxItems": 2
          }
        },
        "required": [
          "actual_returns_delta",
          "expected_total_domain"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 6
    },
    "report": {
      "type": "object",
      "required": [
        "returned_units",
        "expected_total",
        "remaining_returns",
        "revenue",
        "refund_liability",
        "recovery_asset",
        "returned_inventory",
        "refund_cash",
        "recovery_cash",
        "cash_position",
        "cogs",
        "margin",
        "revenue_delta",
        "cogs_delta",
        "balance_gap",
        "initial_cash",
        "initial_inventory_cost",
        "final_margin",
        "total_revenue_change",
        "total_cogs_change"
      ],
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "n": {
              "type": [
                "string",
                "null"
              ],
              "pattern": "^(0|-?[1-9][0-9]{0,47})$",
              "maxLength": 49
            },
            "d": {
              "type": [
                "string",
                "null"
              ],
              "pattern": "^[1-9][0-9]{0,47}$",
              "maxLength": 48
            }
          },
          "required": [
            "n",
            "d"
          ],
          "additionalProperties": false
        },
        "minItems": 1,
        "maxItems": 6
      },
      "propertyNames": {
        "enum": [
          "returned_units",
          "expected_total",
          "remaining_returns",
          "revenue",
          "refund_liability",
          "recovery_asset",
          "returned_inventory",
          "refund_cash",
          "recovery_cash",
          "cash_position",
          "cogs",
          "margin",
          "revenue_delta",
          "cogs_delta",
          "balance_gap",
          "initial_cash",
          "initial_inventory_cost",
          "final_margin",
          "total_revenue_change",
          "total_cogs_change"
        ]
      },
      "patternProperties": {
        "^(initial_cash|initial_inventory_cost|final_margin|total_revenue_change|total_cogs_change)$": {
          "type": "object",
          "properties": {
            "n": {
              "type": [
                "string",
                "null"
              ],
              "pattern": "^(0|-?[1-9][0-9]{0,47})$",
              "maxLength": 49
            },
            "d": {
              "type": [
                "string",
                "null"
              ],
              "pattern": "^[1-9][0-9]{0,47}$",
              "maxLength": 48
            }
          },
          "required": [
            "n",
            "d"
          ],
          "additionalProperties": false
        }
      }
    }
  },
  "required": [
    "sold_units",
    "unit_price",
    "unit_cost",
    "recovery_cost_n",
    "recovery_cost_d",
    "observations",
    "report"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "sold_units": 2,
  "unit_price": 2,
  "unit_cost": 1,
  "recovery_cost_n": 3,
  "recovery_cost_d": 4,
  "observations": [
    {
      "actual_returns_delta": 0,
      "expected_total_domain": [
        0
      ]
    },
    {
      "actual_returns_delta": 0,
      "expected_total_domain": [
        1
      ]
    }
  ],
  "report": {
    "returned_units": [
      {
        "n": "0",
        "d": "1"
      },
      {
        "n": "0",
        "d": "1"
      }
    ],
    "expected_total": [
      {
        "n": "0",
        "d": "1"
      },
      {
        "n": "1",
        "d": "1"
      }
    ],
    "remaining_returns": [
      {
        "n": "0",
        "d": "1"
      },
      {
        "n": "1",
        "d": "1"
      }
    ],
    "revenue": [
      {
        "n": "4",
        "d": "1"
      },
      {
        "n": "2",
        "d": "1"
      }
    ],
    "refund_liability": [
      {
        "n": "0",
        "d": "1"
      },
      {
        "n": "2",
        "d": "1"
      }
    ],
    "recovery_asset": [
      {
        "n": "0",
        "d": "1"
      },
      {
        "n": "1",
        "d": "4"
      }
    ],
    "returned_inventory": [
      {
        "n": "0",
        "d": "1"
      },
      {
        "n": "0",
        "d": "1"
      }
    ],
    "refund_cash": [
      {
        "n": "0",
        "d": "1"
      },
      {
        "n": "0",
        "d": "1"
      }
    ],
    "recovery_cash": [
      {
        "n": "0",
        "d": "1"
      },
      {
        "n": "0",
        "d": "1"
      }
    ],
    "cash_position": [
      {
        "n": "4",
        "d": "1"
      },
      {
        "n": "4",
        "d": "1"
      }
    ],
    "cogs": [
      {
        "n": "2",
        "d": "1"
      },
      {
        "n": "7",
        "d": "4"
      }
    ],
    "margin": [
      {
        "n": "2",
        "d": "1"
      },
      {
        "n": "1",
        "d": "4"
      }
    ],
    "revenue_delta": [
      {
        "n": "4",
        "d": "1"
      },
      {
        "n": "-2",
        "d": "1"
      }
    ],
    "cogs_delta": [
      {
        "n": "2",
        "d": "1"
      },
      {
        "n": "-1",
        "d": "4"
      }
    ],
    "balance_gap": [
      {
        "n": "0",
        "d": "1"
      },
      {
        "n": "0",
        "d": "1"
      }
    ],
    "initial_cash": {
      "n": "4",
      "d": "1"
    },
    "initial_inventory_cost": {
      "n": "2",
      "d": "1"
    },
    "final_margin": {
      "n": "1",
      "d": "4"
    },
    "total_revenue_change": {
      "n": "2",
      "d": "1"
    },
    "total_cogs_change": {
      "n": "7",
      "d": "4"
    }
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →