Skip to main content
POST
/
accounting
/
items
cURL
curl --request POST \
  --url https://api.maesn.dev/accounting/items \
  --header 'Content-Type: application/json' \
  --header 'X-ACCOUNT-KEY: <x-account-key>' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '{
  "assetAccountId": "80",
  "expenseAccountId": "81",
  "incomeAccountId": "79",
  "inventoryStartDate": "2021-01-01",
  "itemNumber": "12345-A",
  "name": "Handmade Plastic Chair",
  "priceIncludesTax": true,
  "stockCount": 11,
  "taxCode": "TAX19",
  "taxRatePercentage": 19,
  "type": "PRODUCT",
  "unitName": "PIECE",
  "unitPurchasePrice": 10,
  "unitSalesPrice": 20.5
}'
{
  "meta": {
    "warnings": [
      "Field not used by target system"
    ],
    "pagination": {
      "total": 123,
      "perPage": 123,
      "currentPage": 123,
      "totalPages": 123
    }
  },
  "data": {
    "id": "02c74e8a-b95b-ef11-bfe2-002248e5aac5",
    "assetAccountId": "80",
    "expenseAccountId": "81",
    "incomeAccountId": "79",
    "inventoryStartDate": "2021-01-01",
    "itemNumber": "12345-A",
    "lastModifiedDate": "2021-01-01T00:00:00Z",
    "name": "Handmade Plastic Chair",
    "priceIncludesTax": true,
    "stockCount": 11,
    "taxCode": "TAX19",
    "taxRatePercentage": 19,
    "type": "PRODUCT",
    "unitName": "PIECE",
    "unitPurchasePrice": 10,
    "unitSalesPrice": 20.5
  }
}

Field support per integration

If you’re not using the Interactive Authentication Flow, make sure the query parameters environmentName and companyId are correctly populated. You can obtain these values by using the GET Environments and GET Companies endpoints available under the Authentication section.
Supported Request Parameters:
itemNumber
string
name
string
required
priceIncludesTax
boolean
type
enum
Available options: PRODUCT, SERVICE
unitName
string
unitPurchasePrice
number
unitSalesPrice
number
Supported Request Parameters:
assetAccountId
string
expenseAccountId
string
incomeAccountId
string
inventoryStartDate
string
itemNumber
string
name
string
required
stockCount
number
type
enum
required
Available options: PRODUCT, SERVICE
unitPurchasePrice
number
unitSalesPrice
number
If you’re not using the Interactive Authentication Flow, make sure the query parameters environmentName and companyId are correctly populated. You can obtain these values by using the GET Companies endpoint available under the Authentication section. Please use the id field as the companyId and the environmentId field as the environmentName.
Supported Request Parameters:
itemNumber
string
required
name
string
required
type
enum
Available options: PRODUCT, SERVICE
unitSalesPrice
number
unitName
enum
Available options: HOUR, KILOGRAM, LITRE, METRE, MILLILITRE, MILLIGRAM, PACK, SQUARE_METRE, TONNE, UNIT, CUBIC_METRE, DAY, GRAM, KILOMETRE, MONTH, NIGHT, NOT_UNIT, PERCENTAGE
Customized values are supported.

Headers

X-API-KEY
string
required

API key

X-ACCOUNT-KEY
string
required

Account key

Query Parameters

companyId
string
environmentName
string

Body

application/json
assetAccountId
string
Example:

"80"

expenseAccountId
string
Example:

"81"

incomeAccountId
string
Example:

"79"

inventoryStartDate
string
Example:

"2021-01-01"

itemNumber
string
Example:

"12345-A"

name
string
Example:

"Handmade Plastic Chair"

priceIncludesTax
boolean
Example:

true

stockCount
number
Example:

11

taxCode
string
Example:

"TAX19"

taxRatePercentage
number
Example:

19

type
enum<string>
Available options:
PRODUCT,
SERVICE
Example:

"PRODUCT"

unitName
Available options:
PIECE,
STÜCK,
NOT_UNIT,
CUBIC_METRE,
DAY,
GRAM,
HOUR,
KILOGRAM,
KILOMETRE,
LITRE,
METRE,
MILLIGRAM,
MILLILITRE,
MONTH,
NIGHT,
PACK,
PERCENTAGE,
SQUARE_METRE,
TONNE,
UNIT
Example:

"PIECE"

unitPurchasePrice
number
Example:

10

unitSalesPrice
number
Example:

20.5

Response

200 - application/json
meta
object
data
object
I