Skip to main content
POST
/
asset-types
Typescript (SDK)
import { Idalia } from "idalia";

const idalia = new Idalia({
  apiKeyAuth: process.env["IDALIA_API_KEY_AUTH"] ?? "",
});

async function run() {
  const result = await idalia.assetTypes.create();

  console.log(result);
}

run();
[
  {
    "id": "<string>",
    "createdAt": "<string>",
    "name": "<string>",
    "updatedAt": "<string>",
    "workspaceId": "<string>",
    "updatedBy": "<string>",
    "sku": "<string>",
    "notes": "<string>",
    "length": 123,
    "width": 123,
    "height": 123,
    "mass": 123,
    "externalIds": {},
    "categoryId": "<string>",
    "isAssembly": false
  }
]

Body

application/json
name
string
required

Name of the asset type

updatedBy
string | null

ID of the user who last updated the asset type

sku
string | null
notes
string | null
length
number | null

Length of the asset type in m

width
number | null

Width of the asset type in m

height
number | null

Height of the asset type in m

mass
number | null

Mass of the asset type in m

externalIds
object
categoryId
string | null

ID of the category the asset type belongs to

isAssembly
boolean | null
default:false

Boolean true if the asset type represents an assembly otherwise false to represent a component

Response

Successful response

id
string
required

ID of the asset type

createdAt
string
required

Datetime when the asset type was created

name
string
required

Name of the asset type

updatedAt
string | null

Datetime when the asset type was last updated

workspaceId
string | null

ID of the workspace the asset type belongs to

updatedBy
string | null

ID of the user who last updated the asset type

sku
string | null
notes
string | null
length
number | null

Length of the asset type in m

width
number | null

Width of the asset type in m

height
number | null

Height of the asset type in m

mass
number | null

Mass of the asset type in m

externalIds
object
categoryId
string | null

ID of the category the asset type belongs to

isAssembly
boolean | null
default:false

Boolean true if the asset type represents an assembly otherwise false to represent a component