younifyd
Menu

Create a new bulk request

Create a new bulk request.

POST/variants/stocks/bulk-requests

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Create a new bulk request action (under Stocks).
  3. Fill in the fields below, then reference the result from later steps as {{createANewBulkRequest.response.data}}.

Request

Request body

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

callbacksobject
requestUrlstring (url)

Callback url, which will be triggered when request status is changed

operationUrlstring (url)

Callback url, which will be triggered when operation status is changed

requestStatusstring

Status of the bulk request creation

One ofcompleteincompleteDefault "complete"

bulkRequestKeyinteger

Key indicating the bulk request id. To split a bulk request into multiple chunks, create the request with requestStatus=incomplete, then pass the returned key as bulkRequestKey when submitting additional chunks. For the final chunk, pass the same bulkRequestKey and set requestStatus=complete so the request can be queued for processing. Completed bulk requests cannot be extended. When extending a bulk request, operation keys that were already submitted in previous chunks are not checked again. When not provided, a new bulk request is created.

operationsarray<object>
keystringrequired

Operation key, which is unique within the given bulk request

urlstringrequired

Operation relative url

methodstringrequired

Operation HTTP method

One ofGETHEADPOSTPUTPATCHDELETE

headersobject

Operation additional HTTP headers

bodyobject

Operation request body

json
{
  "callbacks": {
    "requestUrl": "https://example.com/api/internal/callback/request",
    "operationUrl": "https://client.aboutyou.cloud/api/internal/callback/operation",
    "requestStatus": "complete",
    "bulkRequestKey": 2241
  },
  "operations": [
    {
      "key": "create-product",
      "url": "/products",
      "method": "POST",
      "headers": {
        "X-Merchant-Key": 123
      },
      "body": {
        "referenceKey": "M0001-black",
        "name": {
          "de_DE": "Blaues Shirt",
          "en_GB": "Blue Shirt"
        },
        "state": "draft",
        "master": {
          "referenceKey": "M0001",
          "categories": {
            "paths": [
              [
                "Fashion",
                "Men",
                "Shirts"
              ]
            ]
          }
        }
      }
    }
  ]
}

Response

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

keyinteger

Bulk request identifier

json
{
  "key": 123
}

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

Create a new bulk request — SCAYLE Admin — Documentation