Base URL

https://api.venuerun.com/merchants/:merchantId/modifiers

Modifiers

Modifiers define options that can be added to a product.

This doc was generated by our interal API tester at:

November 11, 2024 at 2:00:27 AM

Endpoints

GET /merchants/:merchantId/modifiers
GET /merchants/:merchantId/modifiers/:modifierId
POST /merchants/:merchantId/products
POST /merchants/:merchantId/modifiers/:modifierId
DELETE /merchants/:merchantId/modifiers/:modifierId

The Modifier Object

Properties

  • Name
    id
    Type
    string read-only
    Description
    The id of the modifier
  • Name
    title
    Type
    string
    Description
    The title of the modifier
  • Name
    description
    Type
    string
    Description
    A description of the modifier
  • Name
    instructions
    Type
    string
    Description
    Instructions for the modifier
  • Name
    rules
    Type
    object
    Description
    Rules for the modifier
  • Name
    required
    Type
    boolean
    Description
    Is the modifier required
  • Name
    allowedMultiple
    Type
    boolean
    Description
    Is the modifier allowed multiple times
  • Name
    selectRestriction
    Type
    number
    Description
    How many options can be selected
  • Name
    requireSelectRestriction
    Type
    boolean
    Description
    Is the select restriction required
  • Name
    enableOptionQuantity
    Type
    boolean
    Description
    Enable option quantity
  • Name
    options
    Type
    array
    Description
    Array of options for the modifier
  • Name
    id
    Type
    string read-only
    Description
    The id of the option auto generated if one is not provided
  • Name
    label
    Type
    string
    Description
    The label of the option
  • Name
    additionalCost
    Type
    number
    Description
    The additional cost of the option
  • Name
    additionalCalories
    Type
    number
    Description
    The additional calories of the option
  • Name
    preSelected
    Type
    boolean
    Description
    Is the option preselected
  • Name
    createdAt
    Type
    string read-only
    Description
    The date the modifier was created
  • Name
    updatedAt
    Type
    string read-only
    Description
    The date the modifier was updated

The Modifier Object

{
  "createdAt": 1731312024,
  "description": "Modifier Description",
  "id": "mnLFewCT9a7EcPQiujzi",
  "instructions": "Please select an option",
  "options": [
    {
      "additionalCalories": 0,
      "additionalCost": 0,
      "id": "some_unique_id",
      "label": "Option 1",
      "preSelected": false
    }
  ],
  "rules": {},
  "testMode": true,
  "title": "Modifier Title Updated",
  "type": "CHECKBOX",
  "updatedAt": 1731312024
}

POST/merchants/:merchantId/modifiers

Create a Modifier

This endpoint allows you to create a Modifier

Required attributes

  • Name
    title
    Type
    string
    Description
    The title of the modifier
  • Name
    instructions
    Type
    string
    Description
    Instructions for the modifier

Optional attributes

  • Name
    id
    Type
    string read-only
    Description
    The id of the modifier
  • Name
    description
    Type
    string
    Description
    A description of the modifier
  • Name
    rules
    Type
    object
    Description
    Rules for the modifier
  • Name
    required
    Type
    boolean
    Description
    Is the modifier required
  • Name
    allowedMultiple
    Type
    boolean
    Description
    Is the modifier allowed multiple times
  • Name
    selectRestriction
    Type
    number
    Description
    How many options can be selected
  • Name
    requireSelectRestriction
    Type
    boolean
    Description
    Is the select restriction required
  • Name
    enableOptionQuantity
    Type
    boolean
    Description
    Enable option quantity
  • Name
    options
    Type
    array
    Description
    Array of options for the modifier
  • Name
    id
    Type
    string read-only
    Description
    The id of the option auto generated if one is not provided
  • Name
    label
    Type
    string
    Description
    The label of the option
  • Name
    additionalCost
    Type
    number
    Description
    The additional cost of the option
  • Name
    additionalCalories
    Type
    number
    Description
    The additional calories of the option
  • Name
    preSelected
    Type
    boolean
    Description
    Is the option preselected
  • Name
    createdAt
    Type
    string read-only
    Description
    The date the modifier was created
  • Name
    updatedAt
    Type
    string read-only
    Description
    The date the modifier was updated

Request

POST
/merchants/:merchantsId/modifiers
const modifier = await VenueRun.modifiers.create({
  type: "CHECKBOX",
  title: "Modifier Title",
  description: "Modifier Description",
  instructions: "Please select an option",
  rules: {
    required: true,
    allowedMultiple: false,
    selectRestriction: 1,
    requireSelectRestriction: true,
    enableOptionQuantity: false
  },
  options: [{
      id: "some_unique_id",
      label: "Option 1",
      additionalCost: 0,
      additionalCalories: 0,
      preSelected: false
    }]
});

POST/merchants/:merchantId/modifiers/:modifierId

Update a modifier

This endpoint allows you to update a Modifier

Required parameters

  • Name
    id
    Type
    string
    Description

    id of the modifiers

Optional attributes

  • Name
    id
    Type
    string read-only
    Description
    The id of the modifier
  • Name
    description
    Type
    string
    Description
    A description of the modifier
  • Name
    rules
    Type
    object
    Description
    Rules for the modifier
  • Name
    required
    Type
    boolean
    Description
    Is the modifier required
  • Name
    allowedMultiple
    Type
    boolean
    Description
    Is the modifier allowed multiple times
  • Name
    selectRestriction
    Type
    number
    Description
    How many options can be selected
  • Name
    requireSelectRestriction
    Type
    boolean
    Description
    Is the select restriction required
  • Name
    enableOptionQuantity
    Type
    boolean
    Description
    Enable option quantity
  • Name
    options
    Type
    array
    Description
    Array of options for the modifier
  • Name
    id
    Type
    string read-only
    Description
    The id of the option auto generated if one is not provided
  • Name
    label
    Type
    string
    Description
    The label of the option
  • Name
    additionalCost
    Type
    number
    Description
    The additional cost of the option
  • Name
    additionalCalories
    Type
    number
    Description
    The additional calories of the option
  • Name
    preSelected
    Type
    boolean
    Description
    Is the option preselected
  • Name
    createdAt
    Type
    string read-only
    Description
    The date the modifier was created
  • Name
    updatedAt
    Type
    string read-only
    Description
    The date the modifier was updated

Request

POST
/merchants/:merchantsId/modifiers/modifierId
await VenueRun.modifiers.update(modifierId, {
  title: "Modifier Title Updated"
});

Response

{
  "createdAt": 1731312024,
  "description": "Modifier Description",
  "id": "mnLFewCT9a7EcPQiujzi",
  "instructions": "Please select an option",
  "options": [
    {
      "additionalCalories": 0,
      "additionalCost": 0,
      "id": "some_unique_id",
      "label": "Option 1",
      "preSelected": false
    }
  ],
  "rules": {},
  "testMode": true,
  "title": "Modifier Title Updated",
  "type": "CHECKBOX",
  "updatedAt": 1731312024
}

GET/merchants/:merchantId/modifiers/:modifierId

Retrive a Modifier

This endpoint allows you to retrieve a Modifier

Required parameters

  • Name
    id
    Type
    string
    Description

    id of the Modifier

Request

GET
/merchants/:merchantsId/modifiers/:modifierId
const product = await VenueRun.modifiers.retrieve(product.id);

Response

{
  "createdAt": 1731312024,
  "description": "Modifier Description",
  "id": "mnLFewCT9a7EcPQiujzi",
  "instructions": "Please select an option",
  "options": [
    {
      "additionalCalories": 0,
      "additionalCost": 0,
      "id": "some_unique_id",
      "label": "Option 1",
      "preSelected": false
    }
  ],
  "rules": {},
  "testMode": true,
  "title": "Modifier Title Updated",
  "type": "CHECKBOX",
  "updatedAt": 1731312024
}

DELETE/merchants/:merchantId/modifiers/:modifierId

Delete a modifier

This endpoint allows you to delete a Modifier

Required parameters

  • Name
    id
    Type
    string
    Description

    id of the product

Request

POST
/merchants/:merchantsId/modifiers/:modifierId
await VenueRun.modifiers.delete(modifierId);

Response

{
  "id": "mnLFewCT9a7EcPQiujzi",
  "object": {
    "createdAt": 1731312024,
    "description": "Modifier Description",
    "id": "mnLFewCT9a7EcPQiujzi",
    "instructions": "Please select an option",
    "options": [
      {
        "additionalCalories": 0,
        "additionalCost": 0,
        "id": "some_unique_id",
        "label": "Option 1",
        "preSelected": false
      }
    ],
    "rules": {},
    "testMode": true,
    "title": "Modifier Title Updated",
    "type": "CHECKBOX",
    "updatedAt": 1731312024
  },
  "message": "Modifier deleted",
  "deleted": true
}

GET/merchants/:merchantId/modifiers

Get all Modifiers

This endpoint allows you to list all Modifiers

Request

POST
/merchants/:merchantsId/modifiers
await VenueRun.modifiers.list()

Was this page helpful?