younifyd
Menu

Update state of an existing product

Update state of an existing product

PUT/products/{productIdentifier}/state

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Update state of an existing product action (under Products).
  3. Fill in the fields below, then reference the result from later steps as {{updateStateOfAnExistingProduct.response.data}}.

Request

Path parameters

productIdentifieroneOfrequired

Product ID or reference key. If you are using a reference key, it is highly recommended to use the encoded equal sign (%3D) instead of the plain =

Request body

Enter the body as JSON in the step's Body field.

statestringrequired

The state of the product determined by the state evaluation process. The only possible values to request are `live`, `draft` and `blocked`. The `problem` state can only be the result of the state evaluation process. If product is in problem state, the reasons are listed in read-only 'problems' field. The `new` and `inApproval` states can be set in the SCAYLE Panel. If a product belongs to multiple merchants, the state is returned based on the hierarchical order live, inApproval, problem, blocked, draft

One oflivedraftproblemnewinApprovalblockedDefault "live"

merchantReferenceKeysarray<string>

A list of merchant reference keys the merchant product belongs to.

merchantProductStatesarray<object>

A list of merchant keys to which the merchant product belongs to and the state of the merchant product.

merchantReferenceKeystringrequired

Reference key of the merchant to which the product belongs to.

statestringrequired

State of the merchant product.

json
{
  "state": "live",
  "merchantReferenceKeys": [
    "string"
  ],
  "merchantProductStates": [
    {
      "merchantReferenceKey": "string",
      "state": "live"
    }
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{updateStateOfAnExistingProduct.response.data.<field>}}.

statestring

The state of the product determined by the state evaluation process. The only possible values to request are `live`, `draft` and `blocked`. The `problem` state can only be the result of the state evaluation process. If product is in problem state, the reasons are listed in read-only 'problems' field. The `new` and `inApproval` states can be set in the SCAYLE Panel. If a product belongs to multiple merchants, the state is returned based on the hierarchical order live, inApproval, problem, blocked, draft

One oflivedraftproblemnewinApprovalblockedDefault "live"

merchantReferenceKeysarray<string>

A list of merchant reference keys the merchant product belongs to.

merchantProductStatesarray<object>

A list of merchant keys to which the merchant product belongs to and the state of the merchant product.

merchantReferenceKeystringrequired

Reference key of the merchant to which the product belongs to.

statestringrequired

State of the merchant product.

json
{
  "state": "live",
  "merchantReferenceKeys": [
    "string"
  ],
  "merchantProductStates": [
    {
      "merchantReferenceKey": "string",
      "state": "live"
    }
  ]
}

Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.

Update state of an existing product — SCAYLE Admin — Documentation