{
  "openapi": "3.0.1",
  "info": {
    "title": "IRestoSaas.Platform.Api | partner",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "http://api.resto.isoft4is.net/"
    }
  ],
  "paths": {
    "/api/partner/v1/catalog/branches": {
      "get": {
        "tags": [
          "PartnerCatalog"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PartnerCatalogBranchResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/catalog/branches/{branchId}/products": {
      "get": {
        "tags": [
          "PartnerCatalog"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerCatalogProductListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/catalog/branches/{branchId}/products/{productId}": {
      "get": {
        "tags": [
          "PartnerCatalog"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "language",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerCatalogProductDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/deliveries/{orderId}/accept": {
      "post": {
        "tags": [
          "PartnerDeliveries"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDeliveryAssignmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/deliveries/{orderId}/reject": {
      "post": {
        "tags": [
          "PartnerDeliveries"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDeliveryAssignmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/deliveries/{orderId}/cancel": {
      "post": {
        "tags": [
          "PartnerDeliveries"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDeliveryAssignmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/deliveries/{orderId}/status": {
      "patch": {
        "tags": [
          "PartnerDeliveries"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDeliveryAssignmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/deliveries/{orderId}/driver": {
      "patch": {
        "tags": [
          "PartnerDeliveries"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryDriverRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryDriverRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryDriverRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDeliveryAssignmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/deliveries/{orderId}/eta": {
      "patch": {
        "tags": [
          "PartnerDeliveries"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryEtaRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryEtaRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryEtaRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDeliveryAssignmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/deliveries/{orderId}/tracking": {
      "patch": {
        "tags": [
          "PartnerDeliveries"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryTrackingRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryTrackingRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerUpdateDeliveryTrackingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderDeliveryAssignmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/orders/{orderId}": {
      "get": {
        "tags": [
          "PartnerOrders"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerOrderResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/orders": {
      "post": {
        "tags": [
          "PartnerOrders"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerOrderRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerOrderRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePartnerOrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePartnerOrderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/partner/v1/orders/{orderId}/cancel": {
      "post": {
        "tags": [
          "PartnerOrders"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerOrderCancellationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CatalogItemAvailability": {
        "type": "integer"
      },
      "CreatePartnerOrderDeliveryAddressRequest": {
        "required": [
          "label",
          "addressLine",
          "latitude",
          "longitude"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "nullable": true
          },
          "addressLine": {
            "type": "string"
          },
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          },
          "notes": {
            "type": "string",
            "default": null,
            "nullable": true
          }
        },
        "default": null,
        "nullable": true
      },
      "CreatePartnerOrderLineRequest": {
        "required": [
          "productId",
          "variantId",
          "quantity",
          "modifierSelections"
        ],
        "type": "object",
        "properties": {
          "productId": {
            "type": "string",
            "format": "uuid"
          },
          "variantId": {
            "type": "string",
            "format": "uuid"
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "modifierSelections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatePartnerOrderModifierSelectionRequest"
            }
          },
          "customerNote": {
            "type": "string",
            "default": null,
            "nullable": true
          }
        }
      },
      "CreatePartnerOrderModifierSelectionRequest": {
        "required": [
          "selectionId",
          "modifierGroupId",
          "modifierOptionId"
        ],
        "type": "object",
        "properties": {
          "selectionId": {
            "type": "string",
            "format": "uuid"
          },
          "modifierGroupId": {
            "type": "string",
            "format": "uuid"
          },
          "modifierOptionId": {
            "type": "string",
            "format": "uuid"
          },
          "parentSelectionId": {
            "type": "string",
            "format": "uuid",
            "default": null,
            "nullable": true
          }
        }
      },
      "CreatePartnerOrderRequest": {
        "required": [
          "branchId",
          "orderMode",
          "customerName",
          "customerPhone",
          "paymentMethod",
          "lines",
          "externalOrderId"
        ],
        "type": "object",
        "properties": {
          "branchId": {
            "type": "string",
            "format": "uuid"
          },
          "orderMode": {
            "$ref": "#/components/schemas/OrderMode"
          },
          "customerName": {
            "type": "string"
          },
          "customerPhone": {
            "type": "string"
          },
          "paymentMethod": {
            "$ref": "#/components/schemas/OrderPaymentMethod"
          },
          "lines": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatePartnerOrderLineRequest"
            }
          },
          "externalOrderId": {
            "type": "string"
          },
          "customerEmail": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "customerNotes": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "promotionCode": {
            "type": "string",
            "default": null,
            "nullable": true
          },
          "deliveryZoneId": {
            "type": "string",
            "format": "uuid",
            "default": null,
            "nullable": true
          },
          "deliveryAddress": {
            "$ref": "#/components/schemas/CreatePartnerOrderDeliveryAddressRequest"
          },
          "expectedTotal": {
            "type": "number",
            "format": "double",
            "default": null,
            "nullable": true
          }
        }
      },
      "CreatePartnerOrderResponse": {
        "required": [
          "orderId",
          "orderNumber",
          "status",
          "paymentStatus",
          "currencyCode",
          "subtotal",
          "discountTotal",
          "taxTotal",
          "deliveryFee",
          "serviceFee",
          "grandTotal",
          "externalOrderId"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "orderNumber": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "paymentStatus": {
            "$ref": "#/components/schemas/OrderPaymentStatus"
          },
          "currencyCode": {
            "type": "string"
          },
          "subtotal": {
            "type": "number",
            "format": "double"
          },
          "discountTotal": {
            "type": "number",
            "format": "double"
          },
          "taxTotal": {
            "type": "number",
            "format": "double"
          },
          "deliveryFee": {
            "type": "number",
            "format": "double"
          },
          "serviceFee": {
            "type": "number",
            "format": "double"
          },
          "grandTotal": {
            "type": "number",
            "format": "double"
          },
          "externalOrderId": {
            "type": "string"
          }
        }
      },
      "DeliveryAssignmentStatus": {
        "type": "integer"
      },
      "NullableOfOrderPaymentStatus": {
        "type": "integer",
        "nullable": true
      },
      "OrderDeliveryAssignmentResponse": {
        "required": [
          "assignmentId",
          "orderId",
          "appInstallationId",
          "status",
          "assignedAtUtc",
          "respondedAtUtc",
          "driverName",
          "driverPhone",
          "etaUtc",
          "trackingUrl"
        ],
        "type": "object",
        "properties": {
          "assignmentId": {
            "type": "string",
            "format": "uuid"
          },
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "appInstallationId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "$ref": "#/components/schemas/DeliveryAssignmentStatus"
          },
          "assignedAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "respondedAtUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "driverName": {
            "type": "string",
            "nullable": true
          },
          "driverPhone": {
            "type": "string",
            "nullable": true
          },
          "etaUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "trackingUrl": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "OrderMode": {
        "type": "integer"
      },
      "OrderPaymentMethod": {
        "type": "integer"
      },
      "OrderPaymentStatus": {
        "type": "integer"
      },
      "OrderStatus": {
        "type": "integer"
      },
      "PartnerAddressResponse": {
        "required": [
          "label",
          "addressLine",
          "latitude",
          "longitude",
          "instructions"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "nullable": true
          },
          "addressLine": {
            "type": "string"
          },
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          },
          "instructions": {
            "type": "string",
            "nullable": true
          }
        },
        "nullable": true
      },
      "PartnerBranchPickupResponse": {
        "required": [
          "name",
          "address",
          "latitude",
          "longitude",
          "externalLocationId"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "latitude": {
            "type": "number",
            "format": "double"
          },
          "longitude": {
            "type": "number",
            "format": "double"
          },
          "externalLocationId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PartnerCatalogBranchResponse": {
        "required": [
          "id",
          "name",
          "isActive",
          "externalLocationId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isActive": {
            "type": "boolean"
          },
          "externalLocationId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PartnerCatalogCategoryResponse": {
        "required": [
          "id",
          "name",
          "products"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerCatalogProductSummaryResponse"
            }
          }
        }
      },
      "PartnerCatalogModifierGroupResponse": {
        "required": [
          "id",
          "name",
          "minSelections",
          "maxSelections",
          "isRequired",
          "sortOrder",
          "options"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "minSelections": {
            "type": "integer",
            "format": "int32"
          },
          "maxSelections": {
            "type": "integer",
            "format": "int32"
          },
          "isRequired": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer",
            "format": "int32"
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerCatalogModifierOptionResponse"
            }
          }
        }
      },
      "PartnerCatalogModifierOptionResponse": {
        "required": [
          "id",
          "name",
          "price",
          "isDefault",
          "availability",
          "childGroups"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "isDefault": {
            "type": "boolean"
          },
          "availability": {
            "$ref": "#/components/schemas/CatalogItemAvailability"
          },
          "childGroups": {
            "type": "array",
            "items": { }
          }
        }
      },
      "PartnerCatalogProductDetailResponse": {
        "required": [
          "id",
          "sku",
          "name",
          "imageUrl",
          "taxCategory",
          "availability",
          "variants",
          "resolvedLanguage"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string",
            "nullable": true
          },
          "taxCategory": {
            "$ref": "#/components/schemas/PartnerCatalogTaxCategoryResponse"
          },
          "availability": {
            "$ref": "#/components/schemas/CatalogItemAvailability"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerCatalogVariantDetailResponse"
            }
          },
          "resolvedLanguage": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PartnerCatalogProductListResponse": {
        "required": [
          "categories",
          "resolvedLanguage"
        ],
        "type": "object",
        "properties": {
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerCatalogCategoryResponse"
            }
          },
          "resolvedLanguage": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PartnerCatalogProductSummaryResponse": {
        "required": [
          "id",
          "sku",
          "name",
          "imageUrl",
          "taxCategory",
          "availability",
          "startingPrice",
          "variants"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string",
            "nullable": true
          },
          "taxCategory": {
            "$ref": "#/components/schemas/PartnerCatalogTaxCategoryResponse"
          },
          "availability": {
            "$ref": "#/components/schemas/CatalogItemAvailability"
          },
          "startingPrice": {
            "type": "number",
            "format": "double"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerCatalogVariantResponse"
            }
          }
        }
      },
      "PartnerCatalogTaxCategoryResponse": {
        "required": [
          "rate",
          "isInclusive"
        ],
        "type": "object",
        "properties": {
          "rate": {
            "type": "number",
            "format": "double"
          },
          "isInclusive": {
            "type": "boolean"
          }
        },
        "nullable": true
      },
      "PartnerCatalogVariantDetailResponse": {
        "required": [
          "id",
          "sku",
          "name",
          "price",
          "compareAtPrice",
          "isDefault",
          "availability",
          "modifierGroups"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "compareAtPrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean"
          },
          "availability": {
            "$ref": "#/components/schemas/CatalogItemAvailability"
          },
          "modifierGroups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerCatalogModifierGroupResponse"
            }
          }
        }
      },
      "PartnerCatalogVariantResponse": {
        "required": [
          "id",
          "sku",
          "name",
          "price",
          "compareAtPrice",
          "isDefault",
          "availability"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "number",
            "format": "double"
          },
          "compareAtPrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "isDefault": {
            "type": "boolean"
          },
          "availability": {
            "$ref": "#/components/schemas/CatalogItemAvailability"
          }
        }
      },
      "PartnerOrderCancellationResponse": {
        "required": [
          "orderId",
          "orderNumber",
          "status",
          "externalOrderId"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "orderNumber": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "externalOrderId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PartnerOrderItemModifierResponse": {
        "required": [
          "modifierGroupName",
          "modifierOptionName",
          "quantity",
          "totalPrice"
        ],
        "type": "object",
        "properties": {
          "modifierGroupName": {
            "type": "string"
          },
          "modifierOptionName": {
            "type": "string"
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "totalPrice": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "PartnerOrderItemResponse": {
        "required": [
          "productName",
          "variantName",
          "quantity",
          "lineTotal",
          "modifiers"
        ],
        "type": "object",
        "properties": {
          "productName": {
            "type": "string"
          },
          "variantName": {
            "type": "string",
            "nullable": true
          },
          "quantity": {
            "type": "integer",
            "format": "int32"
          },
          "lineTotal": {
            "type": "number",
            "format": "double"
          },
          "modifiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerOrderItemModifierResponse"
            }
          }
        }
      },
      "PartnerOrderResponse": {
        "required": [
          "orderId",
          "orderNumber",
          "status",
          "orderMode",
          "tableNumber",
          "customerName",
          "customerPhone",
          "grandTotal",
          "currencyCode",
          "items",
          "deliveryAddress",
          "branch",
          "paymentStatus",
          "externalOrderId",
          "subtotal",
          "discountTotal",
          "taxTotal",
          "deliveryFee",
          "serviceFee"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "format": "uuid"
          },
          "orderNumber": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/OrderStatus"
          },
          "orderMode": {
            "$ref": "#/components/schemas/OrderMode"
          },
          "tableNumber": {
            "type": "string",
            "nullable": true
          },
          "customerName": {
            "type": "string"
          },
          "customerPhone": {
            "type": "string"
          },
          "grandTotal": {
            "type": "number",
            "format": "double"
          },
          "currencyCode": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PartnerOrderItemResponse"
            }
          },
          "deliveryAddress": {
            "$ref": "#/components/schemas/PartnerAddressResponse"
          },
          "branch": {
            "$ref": "#/components/schemas/PartnerBranchPickupResponse"
          },
          "paymentStatus": {
            "$ref": "#/components/schemas/NullableOfOrderPaymentStatus"
          },
          "externalOrderId": {
            "type": "string",
            "nullable": true
          },
          "subtotal": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "discountTotal": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxTotal": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "deliveryFee": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "serviceFee": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        }
      },
      "PartnerUpdateDeliveryDriverRequest": {
        "required": [
          "driverName",
          "driverPhone"
        ],
        "type": "object",
        "properties": {
          "driverName": {
            "type": "string",
            "nullable": true
          },
          "driverPhone": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "PartnerUpdateDeliveryEtaRequest": {
        "required": [
          "etaUtc"
        ],
        "type": "object",
        "properties": {
          "etaUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "PartnerUpdateDeliveryStatusRequest": {
        "required": [
          "targetStatus"
        ],
        "type": "object",
        "properties": {
          "targetStatus": {
            "$ref": "#/components/schemas/DeliveryAssignmentStatus"
          }
        }
      },
      "PartnerUpdateDeliveryTrackingRequest": {
        "required": [
          "trackingUrl"
        ],
        "type": "object",
        "properties": {
          "trackingUrl": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ValidationProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "PartnerApiKey": {
        "type": "apiKey",
        "description": "Partner API key credential: Authorization: ApiKey {KeyId}.{secret} — see docs/PARTNER-API.md for the full authentication contract.",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "tags": [
    {
      "name": "PartnerCatalog"
    },
    {
      "name": "PartnerDeliveries"
    },
    {
      "name": "PartnerOrders"
    }
  ]
}