POST
/
accounting
/
paymentTerms
cURL
curl --request POST \
  --url https://api.maesn.dev/accounting/paymentTerms \
  --header 'Content-Type: application/json' \
  --header 'X-ACCOUNT-KEY: <x-account-key>' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '{
  "code": "1",
  "description": "31 dagen",
  "discountDays": 10,
  "discountDays2": 14,
  "discountPercentage": 5,
  "discountPercentage2": 3,
  "discountPeriods": [
    {
      "invoiceRange": "Invoice issuance range up to day 5 of the month",
      "discountDeadline": "Day 15 of the current month",
      "discountDeadline2": "Day 25 of the current month",
      "paymentDeadline": "Day 30 of the current month"
    }
  ],
  "dueType": "DUE_IN_DAYS",
  "name": "31 DAYS",
  "paymentDays": 31,
  "paymentMethod": "BANK_TRANSFER"
}'
{
  "meta": {
    "warnings": [
      "Field not used by target system"
    ],
    "pagination": {
      "total": 123,
      "perPage": 123,
      "currentPage": 123,
      "totalPages": 123
    }
  },
  "data": {
    "id": "08d52c49-b90c-4328-b1ec-623df74f904a",
    "code": "1",
    "createdDate": "2021-01-01T00:00:00Z",
    "description": "31 dagen",
    "discountDays": 10,
    "discountDays2": 14,
    "discountPercentage": 5,
    "discountPercentage2": 3,
    "discountPeriods": [
      {
        "invoiceRange": "Invoice issuance range up to day 5 of the month",
        "discountDeadline": "Day 15 of the current month",
        "discountDeadline2": "Day 25 of the current month",
        "paymentDeadline": "Day 30 of the current month"
      }
    ],
    "dueType": "DUE_IN_DAYS",
    "name": "31 DAYS",
    "paymentDays": 31,
    "paymentMethod": "BANK_TRANSFER",
    "updatedDate": "2021-01-01T00:00:00Z"
  }
}

Field support per integration

If you’re not using the Interactive Authentication Flow, make sure the query parameter companyId is correctly populated. You can obtain this value by using the GET Companies endpoint available under the Authentication section.
Supported Request Parameters:
code
string
description
string
discountDays
number
discountPercentage
number
dueType
enum
Available options: DUE_IN_DAYS
paymentDays
number
paymentMethod
enum
required
Available options: CASH, BANK_TRANSFER, PAYMENT_SERVICE_PROVIDER, AUTOMATIC_BANK_WITHDRAWAL

Headers

X-API-KEY
string
required

API key

Example:

"example value"

X-ACCOUNT-KEY
string
required

Account key

Example:

"example value"

Query Parameters

companyId
string
environmentName
string

Body

application/json
code
string
Example:

"1"

description
string
Example:

"31 dagen"

discountDays
number
Example:

10

discountDays2
number
Example:

14

discountPercentage
number
Example:

5

discountPercentage2
number
Example:

3

discountPeriods
object[]
dueType
enum<string>
Available options:
DUE_IN_DAYS,
DUE_AS_PERIOD
name
string
Example:

"31 DAYS"

paymentDays
number
Example:

31

paymentMethod
enum<string>
Available options:
CASH,
BANK_TRANSFER,
PAYMENT_SERVICE_PROVIDER,
AUTOMATIC_BANK_WITHDRAWAL
Example:

"BANK_TRANSFER"

Response

200 - application/json
meta
object
data
object