Skip to content

replaceInvoiceSettlements

DESTRUCTIVE

Replace invoice settlements.

POST /api/v1/invoicing/replaceInvoiceSettlements
curl -X POST '<your-host>/api/v1/invoicing/replaceInvoiceSettlements' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "paymentId": "string",
    "applications": []
  }'

Parameters

ParameterType
min length 1
> 0
> 0
min 0
min 0
min 0
min 0

Input schema

schema
{
  "type": "object",
  "properties": {
    "paymentId": {
      "type": "string"
    },
    "applications": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "memoId": {
            "type": "string"
          },
          "targetSalesInvoiceId": {
            "type": "string"
          },
          "targetPurchaseInvoiceId": {
            "type": "string"
          },
          "targetMemoId": {
            "type": "string"
          },
          "sourceAmount": {
            "type": "number",
            "minimum": 0
          },
          "appliedAmount": {
            "default": 0,
            "type": "number",
            "minimum": 0
          },
          "discountAmount": {
            "default": 0,
            "type": "number",
            "minimum": 0
          },
          "writeOffAmount": {
            "default": 0,
            "type": "number",
            "minimum": 0
          },
          "targetExchangeRate": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "sourceExchangeRate": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "appliedDate": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "targetExchangeRate",
          "sourceExchangeRate",
          "appliedDate"
        ]
      }
    }
  },
  "required": [
    "paymentId",
    "applications"
  ]
}