in_stock_subscriptions

Create an in stock subscription

Changed on

Create an in stock subscription

post/in_stock_subscriptions

Request

  • Base URL
    https://{your_organization_slug}.commercelayer.io/api
  • URL
    https://{your_organization_slug}.commercelayer.io/api/in_stock_subscriptions
  • Auth
    HTTP bearer

Request body

Example request

{
  "data": {
    "attributes": {
      "customer_email": "john@example.com",
      "sku_code": "TSHIRTMM000000FFFFFFXLXX",
      "stock_threshold": 3,
      "reference": "ANY-EXTERNAL-REFEFERNCE",
      "reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
      "metadata": {
        "foo": "bar"
      }
    },
    "relationships": {
      "market": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "customer": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      },
      "sku": {
        "data": {
          "id": "XAyRWNUzyN"
        }
      }
    }
  }
}

Response

The created in stock subscription object

Changes

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      added the new required request property ///

    • breaking

      request property / was restricted to a list of enum values

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • info

      the request property default value in_stock_subscriptions was removed

    • info

      added the new in_stock_subscriptions enum value to the request property /

    • info

      added the media type application/vnd.api+json for the response with the status