# Set related products

This method set given products (minimum 0, maximum 50), defined with
guid to the related product list. After product

is successfully saved, complete list of related product is returned in
response.

Endpoint: PUT /api/products/{guid}/relatedProducts
Version: abaae1c
Security: shoptetAccessToken, shoptetPrivateApiToken

## Path parameters:

  - `guid` (string, required)
    Product guid
    Example: "93bc0dbe-7481-11e8-8216-002590dad85e"

## Header parameters:

  - `Content-Type` (string, required)

## Request fields (application/json):

  - `data` (object, required)

  - `data.relatedProducts` (array, required)
    Array of new related products, minimum 0 item, maximum 50 items on request

  - `data.relatedProducts.guid` (string, required)
    Guid of new related product

## Response 200 fields (application/json):

  - `data` (object, required)

  - `data.items` (array, required)

  - `data.items.guid` (string, required)
    related product identifier

  - `data.items.priority` (integer, required)
    Priority of product in related products list

  - `data.items.visibility` (string)
    visibility of product (normal, hidden ...) - see also [Product visibility](#section/code-lists/product-visibility) code list

  - `data.items.linkType` (string)
    Type of the link to the product. Defines if the product is paired physically or reciprocally.

  - `errors` (array,null, required)

  - `errors.errorCode` (string, required)
    Short text error identification

  - `errors.message` (string, required)
    Descriptive error message

  - `errors.instance` (string, required)
    Identification of the entity referenced

  - `metadata` (object, required)

  - `metadata.requestId` (string, required)
    Request identifier. Useful for logging/reporting purposes.


