Create or update an inventory type
put
/rest/ofscMetadata/v1/inventoryTypes/{label}
This operation creates a new inventory type or updates an existing inventory type.
- If the inventory type with 'label' already exists, the function replaces it with the new values.
- Response code 200 is returned when an inventory type object is updated.
- Response code 201 is returned when an inventory type object is created.
Request
Path Parameters
-
label(required): string
Minimum Length:
1
Maximum Length:32
The label of the inventory type that is used in the request URL to create a new inventory type or update an existing inventory type.
The inventory type object created or updated in Oracle Field Service.
Root Schema : Inventory Type
Type:
object
Title:
Inventory Type
The inventory type object.
Show Source
-
active(required):
boolean
Title:
Active
Indicates whether the inventory type is valid for creating an inventory. If the value is true, then the inventory type is listed as a possible value in the 'Inventory Type' drop-down list in Manage or Mobility apps while creating an inventory. If the value is false, then the inventory type is not listed as a value in the drop-down list. -
modelProperty:
string
Title:
Model Property
Label of an inventory property which is used to identify model of this inventory. Note that this field cannot be changed after it is set with inventory type creation. -
nonSerialized(required):
boolean
Title:
Non Serialized
Indicates whether the inventory is serialized. If the value is true, then the inventory is serialized, that is, it has a serial number. If the value is false, then the inventory is non-serialized, that is, it doesn't have a serial number. -
quantityPrecision:
integer
Title:
Quantity precision
Number of digits after decimal point of the quantity for non-serialized inventory . '0' value means that the quantity doesn't have a fractional part. -
translations(required):
array Translations
Title:
Translations
The list of translations associated with the name and unit of measurement of the inventory type. The list is only returned if the language parameter is not specified in the request. language: string - The language code of the translated text. The code in the response is two characters long. For example, 'en', 'es'.
Nested Schema : Translations
Type:
array
Title:
Translations
The list of translations associated with the name and unit of measurement of the inventory type. The list is only returned if the language parameter is not specified in the request.
language: string - The language code of the translated text. The code in the response is two characters long. For example, 'en', 'es'.
Show Source
Nested Schema : TranslationInvType
Type:
Show Source
object
-
language(required):
string
The language code of the translated text. The code in the response is two characters long (for example, 'en', 'es').
See Supported Language Codes to view the values that are supported.
-
languageISO:
string
The ISO language code. For example, 'en-US'.
-
name(required):
string
The specified name of the property translated to the language code available in the application.
-
unitOfMeasurement:
string
Title:
Unit Of Measurement
The translation for the unit of measurement of the inventory type. This attribute is used only for non-serialized inventory.
Response
Supported Media Types
- application/schema+json
- application/json
200 Response
This section describes the 200 status response for this operation. The 200 status code is returned when an inventory type object is updated.
Root Schema : Inventory Type
Type:
object
Title:
Inventory Type
The inventory type object.
Show Source
-
active(required):
boolean
Title:
Active
Indicates whether the inventory type is valid for creating an inventory. If the value is true, then the inventory type is listed as a possible value in the 'Inventory Type' drop-down list in Manage or Mobility apps while creating an inventory. If the value is false, then the inventory type is not listed as a value in the drop-down list. -
label(required):
string
Title:
Label
Inventory type label. -
modelProperty:
string
Title:
Model Property
Label of an inventory property which is used to identify model of this inventory. -
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:40
The translation for the name of the inventory type. If the value of the language parameter is specified, then the name is provided in the specified language. If the value is not specified, then the name is provided in English. Minimum Length: 1, Maximum Length: 40. -
nonSerialized(required):
boolean
Title:
Non Serialized
Indicates whether the inventory is serialized. If the value is true, then the inventory is serialized, that is, it has a serial number. If the value is false, then the inventory is non-serialized, that is, it doesn't have a serial number. -
quantityPrecision:
integer
Title:
Quantity precision
Number of digits after decimal point of the quantity for non-serialized inventory . '0' value means that the quantity doesn't have a fractional part. -
translations(required):
array Translations
Title:
Translations
The list of translations associated with the name and unit of measurement of the inventory type. The list is only returned if the language parameter is not specified in the request. language: string - The language code of the translated text. The code in the response is two characters long. For example, 'en', 'es'. -
unitOfMeasurement:
string
Title:
Unit Of Measurement
The translation for the unit of measurement of the inventory type. If the value of the language parameter is specified, then the unit of measurement is provided the specified language. If the value is not specified, then the unit of measurement is provided in English. This attribute is used only for non-serialized inventory.
Nested Schema : Translations
Type:
array
Title:
Translations
The list of translations associated with the name and unit of measurement of the inventory type. The list is only returned if the language parameter is not specified in the request.
language: string - The language code of the translated text. The code in the response is two characters long. For example, 'en', 'es'.
Show Source
Nested Schema : TranslationInvType
Type:
Show Source
object
-
language(required):
string
The language code of the translated text. The code in the response is two characters long (for example, 'en', 'es').
See Supported Language Codes to view the values that are supported.
-
languageISO:
string
The ISO language code. For example, 'en-US'.
-
name(required):
string
The specified name of the property translated to the language code available in the application.
-
unitOfMeasurement:
string
Title:
Unit Of Measurement
The translation for the unit of measurement of the inventory type. This attribute is used only for non-serialized inventory.
201 Response
This section describes the 201 status response for this operation. This response code indicates that the inventory type object is created. The inventory type object is returned in the response.
Root Schema : Inventory Type
Type:
object
Title:
Inventory Type
The inventory type object.
Show Source
-
active(required):
boolean
Title:
Active
Indicates whether the inventory type is valid for creating an inventory. If the value is true, then the inventory type is listed as a possible value in the 'Inventory Type' drop-down list in Manage or Mobility apps while creating an inventory. If the value is false, then the inventory type is not listed as a value in the drop-down list. -
label(required):
string
Title:
Label
Inventory type label. -
modelProperty:
string
Title:
Model Property
Label of an inventory property which is used to identify model of this inventory. -
name(required):
string
Title:
Name
Minimum Length:1
Maximum Length:40
The translation for the name of the inventory type. If the value of the language parameter is specified, then the name is provided in the specified language. If the value is not specified, then the name is provided in English. Minimum Length: 1, Maximum Length: 40. -
nonSerialized(required):
boolean
Title:
Non Serialized
Indicates whether the inventory is serialized. If the value is true, then the inventory is serialized, that is, it has a serial number. If the value is false, then the inventory is non-serialized, that is, it doesn't have a serial number. -
quantityPrecision:
integer
Title:
Quantity precision
Number of digits after decimal point of the quantity for non-serialized inventory . '0' value means that the quantity doesn't have a fractional part. -
translations(required):
array Translations
Title:
Translations
The list of translations associated with the name and unit of measurement of the inventory type. The list is only returned if the language parameter is not specified in the request. language: string - The language code of the translated text. The code in the response is two characters long. For example, 'en', 'es'. -
unitOfMeasurement:
string
Title:
Unit Of Measurement
The translation for the unit of measurement of the inventory type. If the value of the language parameter is specified, then the unit of measurement is provided the specified language. If the value is not specified, then the unit of measurement is provided in English. This attribute is used only for non-serialized inventory.
Nested Schema : Translations
Type:
array
Title:
Translations
The list of translations associated with the name and unit of measurement of the inventory type. The list is only returned if the language parameter is not specified in the request.
language: string - The language code of the translated text. The code in the response is two characters long. For example, 'en', 'es'.
Show Source
Nested Schema : TranslationInvType
Type:
Show Source
object
-
language(required):
string
The language code of the translated text. The code in the response is two characters long (for example, 'en', 'es').
See Supported Language Codes to view the values that are supported.
-
languageISO:
string
The ISO language code. For example, 'en-US'.
-
name(required):
string
The specified name of the property translated to the language code available in the application.
-
unitOfMeasurement:
string
Title:
Unit Of Measurement
The translation for the unit of measurement of the inventory type. This attribute is used only for non-serialized inventory.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.