Create or update a catalog item

put

/rest/ofscPartsCatalog/v1/catalogs/{catalog}/{language}/{itemLabel}

This operation creates or updates a catalog item with the specified catalog label, specified language, and the specified item label.

The Parts Catalog service is modified to manage the updates internally so that it does not cause constant catalog redistribution to the technician devices. All the incremental updates to the catalog are collected and applied after a certain period of time, which could take up to 4 hours.

Request

Path Parameters
Body ()
Root Schema : Catalog Item
Type: object
Title: Catalog Item
The item of a catalog.
Show Source
  • fields
    The list of catalog item fields that allow you to filter the catalog data.
  • images
    The list of images of the catalog item.
  • linkedItems
    The list of linked items associated with the catalog item.
  • tags
    The list of tags associated with the catalog item.
  • Title: Catalog Item Type
    The parameter that allows you to define the type of data in your catalog.
  • Title: Catalog Item weight
    Default 1. Item weight used for sorting during cache loading. Items with weight=0 will not be cahced for offline usage. May be used to reduce the size of the catalog cache in user devices (too many items may exceed available memory).
Nested Schema : fields
Type: array
The list of catalog item fields that allow you to filter the catalog data.
Show Source
Nested Schema : images
Type: array
The list of images of the catalog item.
Show Source
Nested Schema : linkedItems
Type: array
The list of linked items associated with the catalog item.
Show Source
Nested Schema : tags
Type: array
The list of tags associated with the catalog item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
  • Title: Additional Link Data
    The additional linked data assigned to the catalog item. The linked data is displayed in the mobile interface.
  • Title: Item Label
    Minimum Length: 1
    Maximum Length: 165
    The unique label assigned to each linked item associated with the catalog item. The maximum length is 165 symbols.
Back to Top

Response

Supported Media Types

204 Response

This response code indicates that the operation completed successfully. This operation does not return elements in the response body.

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

Examples

The following example shows how to create or update an item by submitting a PUT request on the REST resource:

cURL command Example

curl -u 'clientID@instanceName:clientSecret' \ -X PUT \ --url 'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscPartsCatalog/v1/catalogs/my_catalog/en/RG5-7691-250CN' \ -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
            "type": "parts",
            "fields": [
                {
                    "label": "part_id",
                    "value": "RG5-7691-250CN"
                },
                {
                    "label": "vendor",
                    "value": "HEWLETT PACKARD"
                },
                {
                    "label": "descr",
                    "value": "110V FUSER ASSEMBLY"
                },
                {
                    "label": "price",
                    "value": "943.80"
                }
            ],
            "tags": [
                "Printer",
                "Cartridge"
            ],
            "linkedItems": [
                {
                    "itemLabel": "RG5-7691-250CN",
                    "data": "1"
                },
                {
                    "itemLabel": "RG5-7691-250CF",
                    "data": "2"
                },
                {
                    "itemLabel": "RG5-7691-250CZ",
                    "data": "3"
                }
            ],
            "images": [
                {
                    "imageURL": "https://www.storage-service.com/rg5_7691_250cz.png"
                },
                {
                    "imageURL": "https://www.storage-service.com/rg5_7691_250cf.png"
                }
            ]
}'

Response Header Example

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Feb 2019 16:28:18 GMT
Content-Type: application/json; charset=utf-8
Connection: close

Response Body Example

204 Response
Operation completed successfully
Back to Top