Create Entity Template
POST
/v1/templates
const url = 'https://example.com/api/v1/templates';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"defaultDescription":"example","defaultInsured":true,"defaultLifetimeWarranty":true,"defaultLocationId":"example","defaultManufacturer":"example","defaultModelNumber":"example","defaultName":"example","defaultQuantity":1,"defaultTagIds":["example"],"defaultWarrantyDetails":"example","description":"example","fields":[{"booleanValue":true,"id":"example","name":"example","numberValue":1,"textValue":"example","timeValue":"example","type":"example"}],"includePurchaseFields":true,"includeSoldFields":true,"includeWarrantyFields":true,"name":"example","notes":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/templates \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "defaultDescription": "example", "defaultInsured": true, "defaultLifetimeWarranty": true, "defaultLocationId": "example", "defaultManufacturer": "example", "defaultModelNumber": "example", "defaultName": "example", "defaultQuantity": 1, "defaultTagIds": [ "example" ], "defaultWarrantyDetails": "example", "description": "example", "fields": [ { "booleanValue": true, "id": "example", "name": "example", "numberValue": 1, "textValue": "example", "timeValue": "example", "type": "example" } ], "includePurchaseFields": true, "includeSoldFields": true, "includeWarrantyFields": true, "name": "example", "notes": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Template Data
Media type application/json
object
defaultDescription
string
defaultInsured
boolean
defaultLifetimeWarranty
boolean
defaultLocationId
Default location and tags
string
defaultManufacturer
string
defaultModelNumber
string
defaultName
string
defaultQuantity
Default values for entities
number
defaultTagIds
Array<string>
defaultWarrantyDetails
string
description
string
fields
Custom fields
Array<object>
object
booleanValue
boolean
id
string
name
string
numberValue
integer
textValue
string
timeValue
string
type
string
includePurchaseFields
boolean
includeSoldFields
boolean
includeWarrantyFields
Metadata flags
boolean
name
required
string
notes
string
Example generated
{ "defaultDescription": "example", "defaultInsured": true, "defaultLifetimeWarranty": true, "defaultLocationId": "example", "defaultManufacturer": "example", "defaultModelNumber": "example", "defaultName": "example", "defaultQuantity": 1, "defaultTagIds": [ "example" ], "defaultWarrantyDetails": "example", "description": "example", "fields": [ { "booleanValue": true, "id": "example", "name": "example", "numberValue": 1, "textValue": "example", "timeValue": "example", "type": "example" } ], "includePurchaseFields": true, "includeSoldFields": true, "includeWarrantyFields": true, "name": "example", "notes": "example"}Responses
Section titled “ Responses ”Created
Media type application/json
object
createdAt
string
defaultDescription
string
defaultInsured
boolean
defaultLifetimeWarranty
boolean
defaultLocation
Default location and tags
object
id
string
name
string
defaultManufacturer
string
defaultModelNumber
string
defaultName
string
defaultQuantity
Default values for entities
number
defaultTags
Array<object>
object
id
string
name
string
defaultWarrantyDetails
string
description
string
fields
Custom fields
Array<object>
object
booleanValue
boolean
id
string
name
string
numberValue
integer
textValue
string
timeValue
string
type
string
id
string
includePurchaseFields
boolean
includeSoldFields
boolean
includeWarrantyFields
Metadata flags
boolean
name
string
notes
string
updatedAt
string
Example generated
{ "createdAt": "example", "defaultDescription": "example", "defaultInsured": true, "defaultLifetimeWarranty": true, "defaultLocation": { "id": "example", "name": "example" }, "defaultManufacturer": "example", "defaultModelNumber": "example", "defaultName": "example", "defaultQuantity": 1, "defaultTags": [ { "id": "example", "name": "example" } ], "defaultWarrantyDetails": "example", "description": "example", "fields": [ { "booleanValue": true, "id": "example", "name": "example", "numberValue": 1, "textValue": "example", "timeValue": "example", "type": "example" } ], "id": "example", "includePurchaseFields": true, "includeSoldFields": true, "includeWarrantyFields": true, "name": "example", "notes": "example", "updatedAt": "example"}