# Menu Operations

### Archived Menu

Menu operations track import, publish, and other long-running operations performed on menus. You can retrieve the archived menu state (before or after an operation) via a signed URL.

### `GET /menu_operations/{menuOperationId}/archived-menu/signed-url` - Get Archived Menu Signed URL

Retrieve a signed URL to download the archived menu snapshot associated with a menu operation. Use the timing parameter to get the menu state before or after the operation.

#### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| menuOperationId | integer | Yes | The unique identifier of the menu operation. |
| timing | string | No | Whether to get the menu state "before" or "after" the operation (default: "before"). |

#### Response

```json
{
  "status": 200,
  "code": "archived_menu_signed_url_generated",
  "message": "The archived menu signed url has been generated",
  "data": {
    "signedUrl": "https://storage.googleapis.com/...?X-Goog-Signature=..."
  }
}
```

##### Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| status | integer | 200 | HTTP status code returned by the API. |
| code | string | "archived\_menu\_signed\_url\_generated" | Machine-readable application code for the result. |
| message | string | "The archived menu signed url has been generated" | Human-readable result message. Do not use this value for program logic. |
| data | object | {…} | Endpoint-specific response payload. |
| data.signedUrl | string | "https://storage.googleapis.com/...?X-Goog-Signature=..." | The signed url value. |

### Copy Products

Copy (propagate) products from one menu to other restaurants. This is used to push product changes across a brand's restaurant network. You can control which attributes to update and which strategies to use for tags, categories, and steps.

### `POST /menus/copy_product` - Copy Products to Restaurants

Copy one or more products to target restaurants. Supports strategy configuration for handling tags, categories, and steps during the copy process. Can optionally publish menus and trigger marketplace sync after copy.

#### Request Body

```json
{
  "productIds": [
    464462,
    464463
  ],
  "restaurantIds": [
    6801,
    6802
  ],
  "menuChannels": [
    "web",
    null
  ],
  "menuIds": [
    106477
  ],
  "publishAfterCopy": false,
  "publishAfterCopyMarketplace": false,
  "strategies": {
    "tags": "REPLACE",
    "categories": "REPLACE",
    "steps": "REPLACE"
  },
  "updateIgnoreAttributes": [
    "price"
  ],
  "stepUpdateIgnoreAttributes": [],
  "posDevices": []
}
```

##### Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| productIds | array | \[…\] | List of product ids entries. |
| productIds\[\] | integer | 464462 | The product ids value. |
| restaurantIds | array | \[…\] | List of restaurant ids entries. |
| restaurantIds\[\] | integer | 6801 | The restaurant ids value. |
| menuChannels | array | \[…\] | List of menu channels entries. |
| menuChannels\[\] | string | "web" | The menu channels value. |
| menuIds | array | \[…\] | List of menu ids entries. |
| menuIds\[\] | integer | 106477 | The menu ids value. |
| publishAfterCopy | boolean | false | The publish after copy value. |
| publishAfterCopyMarketplace | boolean | false | The publish after copy marketplace value. |
| strategies | object | {…} | Object containing strategies fields. |
| strategies.tags | string | "REPLACE" | The tags value. |
| strategies.categories | string | "REPLACE" | The categories value. |
| strategies.steps | string | "REPLACE" | The steps value. |
| updateIgnoreAttributes | array | \[…\] | List of update ignore attributes entries. |
| updateIgnoreAttributes\[\] | string | "price" | The update ignore attributes value. |
| stepUpdateIgnoreAttributes | array | \[\] | List of step update ignore attributes entries. |
| posDevices | array | \[\] | List of pos devices entries. |

#### Response

```json
{
  "status": 201,
  "code": "product_copy_succeed",
  "message": "Products copied to every menus of selected restaurants."
}
```

##### Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| status | integer | 201 | HTTP status code returned by the API. |
| code | string | "product\_copy\_succeed" | Machine-readable application code for the result. |
| message | string | "Products copied to every menus of selected restaurants." | Human-readable result message. Do not use this value for program logic. |

### `POST /menus/copy_product/validate` - Validate Copy Products

Validate whether the given products can be copied. Returns information about the products and their dependencies.

#### Request Body

```json
{
  "productIds": [
    464462
  ]
}
```

##### Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| productIds | array | \[…\] | List of product ids entries. |
| productIds\[\] | integer | 464462 | The product ids value. |

#### Response

```json
{
  "status": 200,
  "code": "product_copy_validate_succeed",
  "message": "Products validated.",
  "data": {
    "valid": true,
    "products": [
      {
        "productId": 464462,
        "name": "Cheeseburger"
      }
    ]
  }
}
```

##### Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| status | integer | 200 | HTTP status code returned by the API. |
| code | string | "product\_copy\_validate\_succeed" | Machine-readable application code for the result. |
| message | string | "Products validated." | Human-readable result message. Do not use this value for program logic. |
| data | object | {…} | Endpoint-specific response payload. |
| data.valid | boolean | true | The valid value. |
| data.products | array | \[…\] | List of products entries. |
| data.products\[\] | object | {…} | Object containing products fields. |
| data.products\[\].productId | integer | 464462 | Identifier of the product. |
| data.products\[\].name | string | "Cheeseburger" | The name value. |

#### Data Models

##### CopyProductPayload

```yaml
type: object
required: [productIds, restaurantIds]
properties:
  productIds:
    type: array
    items: number
    description: IDs of products to copy
  restaurantIds:
    type: array
    items: number
    description: Target restaurant IDs
  menuChannels:
    type: array
    items: string | null
    description: Filter target menus by channel
  menuIds:
    type: array
    items: number
    description: Specific target menu IDs
  publishAfterCopy:
    type: boolean
    default: false
  publishAfterCopyMarketplace:
    type: boolean
    default: false
  strategies:
    type: object
    properties:
      tags: REPLACE | MERGE | SKIP
      categories: REPLACE | MERGE | SKIP
      steps: REPLACE | MERGE | SKIP
  updateIgnoreAttributes:
    type: array
    items: string
    description: Product attributes to NOT overwrite
  stepUpdateIgnoreAttributes:
    type: array
    items: string
    description: Step attributes to NOT overwrite
  posDevices:
    type: array
    items: string
```

### Copy Steps

Copy (propagate) steps (option groups) from one menu to other restaurants. Similar to Copy Product but operates at the step level.

### `POST /menus/copy_step` - Copy Steps to Restaurants

Copy one or more steps to target restaurants. Supports strategy configuration for handling tags, categories, and steps during the copy process.

#### Request Body

```json
{
  "stepIds": [
    554,
    555
  ],
  "restaurantIds": [
    6801,
    6802
  ],
  "menuChannels": [
    "web"
  ],
  "publishAfterCopy": false,
  "strategies": {
    "tags": "REPLACE",
    "categories": "REPLACE",
    "steps": "REPLACE"
  },
  "updateIgnoreAttributes": [],
  "stepUpdateIgnoreAttributes": []
}
```

##### Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| stepIds | array | \[…\] | List of step ids entries. |
| stepIds\[\] | integer | 554 | The step ids value. |
| restaurantIds | array | \[…\] | List of restaurant ids entries. |
| restaurantIds\[\] | integer | 6801 | The restaurant ids value. |
| menuChannels | array | \[…\] | List of menu channels entries. |
| menuChannels\[\] | string | "web" | The menu channels value. |
| publishAfterCopy | boolean | false | The publish after copy value. |
| strategies | object | {…} | Object containing strategies fields. |
| strategies.tags | string | "REPLACE" | The tags value. |
| strategies.categories | string | "REPLACE" | The categories value. |
| strategies.steps | string | "REPLACE" | The steps value. |
| updateIgnoreAttributes | array | \[\] | List of update ignore attributes entries. |
| stepUpdateIgnoreAttributes | array | \[\] | List of step update ignore attributes entries. |

#### Response

```json
{
  "status": 201,
  "code": "step_copy_succeed",
  "message": "Steps copied to every menus of selected restaurants."
}
```

##### Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| status | integer | 201 | HTTP status code returned by the API. |
| code | string | "step\_copy\_succeed" | Machine-readable application code for the result. |
| message | string | "Steps copied to every menus of selected restaurants." | Human-readable result message. Do not use this value for program logic. |

### `POST /menus/copy_step/validate` - Validate Copy Steps

Validate whether the given steps can be copied. Returns information about the steps and their dependencies.

#### Request Body

```json
{
  "stepIds": [
    554
  ]
}
```

##### Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| stepIds | array | \[…\] | List of step ids entries. |
| stepIds\[\] | integer | 554 | The step ids value. |

#### Response

```json
{
  "status": 200,
  "code": "step_copy_validate_succeed",
  "message": "Steps validated.",
  "data": {
    "valid": true,
    "steps": [
      {
        "stepId": 554,
        "name": "Cooking Level"
      }
    ]
  }
}
```

##### Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| status | integer | 200 | HTTP status code returned by the API. |
| code | string | "step\_copy\_validate\_succeed" | Machine-readable application code for the result. |
| message | string | "Steps validated." | Human-readable result message. Do not use this value for program logic. |
| data | object | {…} | Endpoint-specific response payload. |
| data.valid | boolean | true | The valid value. |
| data.steps | array | \[…\] | List of steps entries. |
| data.steps\[\] | object | {…} | Object containing steps fields. |
| data.steps\[\].stepId | integer | 554 | Identifier of the associated step. |
| data.steps\[\].name | string | "Cooking Level" | The name value. |

#### Data Models

##### CopyStepPayload

```yaml
type: object
required: [stepIds, restaurantIds]
properties:
  stepIds:
    type: array
    items: number
    description: IDs of steps to copy
  restaurantIds:
    type: array
    items: number
    description: Target restaurant IDs
  menuChannels:
    type: array
    items: string | null
    description: Filter target menus by channel
  publishAfterCopy:
    type: boolean
    default: false
  strategies:
    type: object
    properties:
      tags: REPLACE | MERGE | SKIP
      categories: REPLACE | MERGE | SKIP
      steps: REPLACE | MERGE | SKIP
  updateIgnoreAttributes:
    type: array
    items: string
  stepUpdateIgnoreAttributes:
    type: array
    items: string
```

### Pricing Revaluation

Apply a percentage-based price revaluation across one or more menus. This is useful for applying bulk price adjustments (e.g. annual price increases). The revaluation rate is expressed in basis points (e.g. 500 = +5%, -200 = -2%).

### `POST /menus/pricing_revaluation` - Revaluate Menu Pricing

Apply a pricing revaluation to the specified menus. You can control whether options and exceeding prices are also revaluated, and whether changes are applied in-place or create a new version.

#### Request Body

```json
{
  "menuIds": [
    106477,
    106478
  ],
  "revaluationRate": 500,
  "useOptions": true,
  "useExceedings": false,
  "updateInPlace": false
}
```

##### Request Body Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| menuIds | array | \[…\] | List of menu ids entries. |
| menuIds\[\] | integer | 106477 | The menu ids value. |
| revaluationRate | integer | 500 | The revaluation rate value. |
| useOptions | boolean | true | The use options value. |
| useExceedings | boolean | false | The use exceedings value. |
| updateInPlace | boolean | false | The update in place value. |

#### Response

```json
{
  "status": 201,
  "code": "menus_pricing_revaluated",
  "message": "Pricing revaluation of selected menus done"
}
```

##### Response Properties

Every field in the example is listed below. Explicit requiredness is shown when the endpoint contract defines it.

| Property | Type | Example | Description |
| --- | --- | --- | --- |
| status | integer | 201 | HTTP status code returned by the API. |
| code | string | "menus\_pricing\_revaluated" | Machine-readable application code for the result. |
| message | string | "Pricing revaluation of selected menus done" | Human-readable result message. Do not use this value for program logic. |

#### Data Models

##### PricingRevaluationPayload

```yaml
type: object
required: [menuIds, revaluationRate, useOptions, useExceedings]
properties:
  menuIds:
    type: array
    items: number
    description: IDs of menus to revaluate
  revaluationRate:
    type: number
    minimum: -10000
    description: Rate in basis points (500 = +5%)
  useOptions:
    type: boolean
    description: Whether to revaluate option/step product prices
  useExceedings:
    type: boolean
    description: Whether to revaluate exceeding prices
  updateInPlace:
    type: boolean
    default: false
    description: If true, update prices in place instead of creating a new operation
```
