Skip to content

upsertPaymentTerm

WRITE

Upsert payment term.

POST /api/v1/accounting/upsertPaymentTerm
curl -X POST '<your-host>/api/v1/accounting/upsertPaymentTerm' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "string",
    "daysDue": 0,
    "daysDiscount": 0,
    "discountPercentage": 0,
    "calculationMethod": "Net",
    "_operation": "create"
  }'
Response
{
  "id": "string"
}

Parameters

ParameterType

Required. 'create' inserts a new record, 'update' modifies the existing record with this id.

"create""update"
"Net""End of Month""Day of Month"
min 0
min 0
min 0max 100
min length 1

Input schema

schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "daysDue": {
      "type": "number",
      "minimum": 0
    },
    "daysDiscount": {
      "type": "number",
      "minimum": 0
    },
    "discountPercentage": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "calculationMethod": {
      "type": "string",
      "enum": [
        "Net",
        "End of Month",
        "Day of Month"
      ]
    },
    "customFields": {},
    "id": {
      "type": "string"
    },
    "_operation": {
      "type": "string",
      "enum": [
        "create",
        "update"
      ],
      "description": "Required. 'create' inserts a new record, 'update' modifies the existing record with this id."
    }
  },
  "required": [
    "name",
    "daysDue",
    "daysDiscount",
    "discountPercentage",
    "calculationMethod",
    "_operation"
  ]
}