الانتقال إلى المحتوى الرئيسي
POST
Creates a product or a bundle in the item catalog.

التفويضات

X-API-Key
string
header
مطلوب

Your Gorelo API key. See Generate API key. If your data is hosted in Australia, click the base URL at the top of this page and select https://api.aue.gorelo.io.

الجسم

The item to create.

Creates a product or a bundle in the catalog. TypeId decides which, and which of the type-conditional fields below are accepted.

TypeId
integer<int32>

Whether this is a product (1) or a bundle (2). Required; cannot be changed once created.

مثال:

1

Name
string

Display name of the item. Required.

مثال:

"Managed Workstation - Standard"

Number
string | null

The item's product number, free text.

Description
string | null

Free-text description.

CategoryId
integer<int64> | null

Category to file the item under, from GET /v1/items/categories. Validated for existence and tenant ownership.

SubcategoryId
integer<int64> | null

Subcategory to file the item under; must belong to CategoryId.

ClientId
integer<int64> | null

Client this item is scoped to, when it is client-specific rather than catalog-wide.

LocationId
integer<int64> | null

Client location this item is scoped to; must belong to ClientId.

Sku
string | null

Product-only. Rejected (400) if sent while TypeId is Bundle.

PartNumber
string | null

Product-only. Rejected (400) if sent while TypeId is Bundle.

Manufacturer
string | null

Product-only. Rejected (400) if sent while TypeId is Bundle.

Vendor
string | null

Vendor the item is sourced from.

UnitCost
number<double> | null

Product-only. Rejected (400) if sent while TypeId is Bundle — a bundle's cost is derived server-side from its sub-items, never supplied directly.

مثال:

42.5

UnitPrice
number<double> | null

Unit price charged to the client. May be negative, for a discount or credit line.

مثال:

89

TaxId
integer<int64> | null

Tax rate to apply, from GET /v1/taxes.

ExternalProductId
string | null

Identifier of this item in an external accounting system.

SubItems
object[] | null

Bundle-only, required for a bundle (at least one entry) — rejected (400) if sent while TypeId is Product. Every ItemId must resolve to an existing, active product (not a bundle — bundles cannot nest) owned by this service provider.

ShowSubItemsOnInvoice
boolean | null

Bundle-only. Rejected (400) if sent while TypeId is Product.

ShowSubItemDescriptionsOnInvoice
boolean | null

Bundle-only. Rejected (400) if sent while TypeId is Product.

الاستجابة

OK

StatusCode
enum<integer>
الخيارات المتاحة:
100,
101,
102,
103,
200,
201,
202,
203,
204,
205,
206,
207,
208,
226,
300,
301,
302,
303,
304,
305,
306,
307,
308,
400,
401,
402,
403,
404,
405,
406,
407,
408,
409,
410,
411,
412,
413,
414,
415,
416,
417,
421,
422,
423,
424,
426,
428,
429,
431,
451,
500,
501,
502,
503,
504,
505,
506,
507,
508,
510,
511
IsSuccess
boolean
Data
object

Result of a create-item request. Matches the minimal shape returned by create-ticket, create-time-entry and create-invoice, rather than returning the full item.

DataContext
object | null
مثال:

null

Notifications
object[]