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
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
  • Title: Field Label
    The label assigned to the catalog item fields.
  • Title: Field Value
    The value assigned to the catalog item fields. The value of the item field can be a empty string.
Nested Schema : items
Type: object
Show Source
  • Title: Image URL
    The URL address of the image assigned to the catalog item.
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
Error response
Show Source
Back to Top

Examples

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

cURL Command Example

curl -u 'clientID@instanceName:clientSecret' \ -X PUT \ --url 'https://<instance_name>.etadirect.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