Documentation Index

Fetch the complete documentation index at: https://learn.servitly.com/llms.txt

Use this file to discover all available pages before exploring further.

Create new spare-part

Prev Next
Post
/inventory/sparePartDefinitions

Creates a new spare-part definition, i.e. an item of the spare parts catalogue that can be referenced by product-models and ordered through the store.
The code is the unique code of the spare-part and is the key used by the import API to recognize items that already exist.

Required permissions: READ_SPARE_PART, WRITE_SPARE_PART.

Security
HTTP
Type bearer
Header parameters
X-Servitly-Tenant
stringRequired

The name of the tenant (e.g. acme).

Body parameters

The details of the spare-part being created.

object
name
string Required

The spare-part name.

code
string Required

The spare-part unique code.

description
string

The spare-part description text.

technicalDescription
string

The spare-part technical description text.

imageUrls
Array of string

The list of HTTPS image URLs of this spare-part.

string
price
number

The spare-part price.

categoryId
string Required

The id of the category this spare-part belongs to.

Responses
201

Successful creation.

object
id
string

The spare-part object identifier.

name
string

The spare-part name.

code
string

The spare-part unique code.

description
string

The spare-part description text.

technicalDescription
string

The spare-part technical description text.

imageUrls
Array of string

The list of HTTPS image URLs of this spare-part.

string
price
number

The spare-part price.

categoryId
string

The id of the category this spare-part belongs to.

400

Request data not valid.

object
message
string

The error response.

ExampleBad request
401

User not authenticated.

object
message
string

The error response.

ExampleUser not authenticated
403

User not authorized.

object
message
string

The error response.

ExampleUser not authorized
429

API call rate limit exceeded.

object
message
string

The error response.

ExampleAPI call rate limit exceeded
500

Internal server error.

object
message
string

The error response.

ExampleInternal Server Error