Create a product

post

/crmRestApi/resources/11.13.18.05/products

Request

Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
  • Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : Default Prices
Type: array
Title: Default Prices
The default prices resource is used to view, create, update, and delete default prices for products.
Show Source
Nested Schema : Product Attachments
Type: array
Title: Product Attachments
The attachment resource is used to view, create, and update attachments of a product. An attachment includes additional information about a product.
Show Source
Nested Schema : Product Image Attachments
Type: array
Title: Product Image Attachments
The attachment resource is used to view, create, and update image attachments of a product.
Show Source
Nested Schema : Product Translations
Type: array
Title: Product Translations
The product translations resource is used to view, create, update, and delete product translations in various installed languages for a product.
Show Source
Nested Schema : SalesProductLookupType
Type: object
The lookup type for the sales product type.
Nested Schema : Smart Actions
Type: array
Title: Smart Actions
This VO stores the endpoint and security details for every user action.
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : products-ProductTranslations-item-post-request
Type: object
Show Source
Nested Schema : products-smartActions-item-post-request
Type: object
Show Source
Nested Schema : Smart Action User Interface Definitions
Type: array
Title: Smart Action User Interface Definitions
UI navigation metadata striped by app usage.
Show Source
Nested Schema : Smart Action REST Payload Definitions
Type: array
Title: Smart Action REST Payload Definitions
If an LOV required for constructing a request payload needs to post data, the payload metadata is stored here.
Show Source
Nested Schema : Smart Action User Interface Definitions
Type: array
Title: Smart Action User Interface Definitions
Binding metadata for a variable in the URL.
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : schema
Type: object
Show Source
Nested Schema : products-smartActions-UserActionURLBinding-item-post-request
Type: object
Show Source
  • Title: URL Binding Type
    Maximum Length: 64
    This is a hint for processing the Url Binding runtime.
  • Title: System Action
    Maximum Length: 1
    Default Value: false
    Boolean indicator.
  • Uniquely identifies the URL Bind for smart actions. For internal use.
  • Title: URL Binding Parameter Name
    Maximum Length: 50
    For action REST endpoints that require runtime binding, this is the key in the key value pair.
  • Title: URL Binding Parameter Value
    Maximum Length: 80
    For action REST endpoints that require runtime binding, this is the value in the key value pair.
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : products-item-response
Type: object
Show Source
Nested Schema : Default Prices
Type: array
Title: Default Prices
The default prices resource is used to view, create, update, and delete default prices for products.
Show Source
Nested Schema : Product Attachments
Type: array
Title: Product Attachments
The attachment resource is used to view, create, and update attachments of a product. An attachment includes additional information about a product.
Show Source
Nested Schema : Product Image Attachments
Type: array
Title: Product Image Attachments
The attachment resource is used to view, create, and update image attachments of a product.
Show Source
Nested Schema : Product Translations
Type: array
Title: Product Translations
The product translations resource is used to view, create, update, and delete product translations in various installed languages for a product.
Show Source
Nested Schema : SalesProductLookupType
Type: object
The lookup type for the sales product type.
Nested Schema : Smart Actions
Type: array
Title: Smart Actions
This VO stores the endpoint and security details for every user action.
Show Source
Nested Schema : products-DefaultPrices-item-response
Type: object
Show Source
Nested Schema : products-ProductAttachments-item-response
Type: object
Show Source
Nested Schema : products-ProductImageAttachments-item-response
Type: object
Show Source
Nested Schema : products-ProductTranslations-item-response
Type: object
Show Source
Nested Schema : products-smartActions-item-response
Type: object
Show Source
Nested Schema : Smart Action User Interface Definitions
Type: array
Title: Smart Action User Interface Definitions
UI navigation metadata striped by app usage.
Show Source
Nested Schema : Smart Action REST Payload Definitions
Type: array
Title: Smart Action REST Payload Definitions
If an LOV required for constructing a request payload needs to post data, the payload metadata is stored here.
Show Source
Nested Schema : Smart Action User Interface Definitions
Type: array
Title: Smart Action User Interface Definitions
Binding metadata for a variable in the URL.
Show Source
Nested Schema : products-smartActions-UserActionNavigation-item-response
Type: object
Show Source
Nested Schema : products-smartActions-UserActionRequestPayload-item-response
Type: object
Show Source
Nested Schema : products-smartActions-UserActionURLBinding-item-response
Type: object
Show Source
  • Title: URL Binding Type
    Maximum Length: 64
    This is a hint for processing the Url Binding runtime.
  • Links
  • Title: System Action
    Maximum Length: 1
    Default Value: false
    Boolean indicator.
  • Uniquely identifies the URL Bind for smart actions. For internal use.
  • Title: URL Binding Parameter Name
    Maximum Length: 50
    For action REST endpoints that require runtime binding, this is the key in the key value pair.
  • Title: URL Binding Parameter Value
    Maximum Length: 80
    For action REST endpoints that require runtime binding, this is the value in the key value pair.
Back to Top

Examples

The following example shows how to create a product by submitting a post request on the REST resource using cURL.

cURL Command

curl -u <username:password> \ -X POST -d @example_request_payload.json https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/products

Example of Request Body

The following shows an example of the request body in JSON format.

{
  "ItemNumber" : "testItemRest120201",
  "Description" : "Test description REST",
  "OrganizationId" : 204,
  "Name" : "Test Product Name REST",
  "DefaultUOMCode" : "Ea",
  "ProductTypeCode" : "GOODS"
}

Example of Response Body

The following shows an example of the response body in JSON format.

{
 InventoryItemId: 300100072708232
 InventoryItemStatusCode: "Active"
 ItemCatalogGroupId: 100000011369001
 ItemNumber: "testItemRest120201"
 Description: " Test description REST"
 OrganizationId: 204
 Name: "Test Product Name REST"
 EligibleToSellFlag: true
 DefaultUOMCode: "Ea"
 ProductTypeCode: "GOODS"
 ...
}

Back to Top