{
  "openapi": "3.0.1",
  "info": {
    "title": "Salon Appointment Booking Automation",
    "version": "0.0",
    "x-build-id": "c34tosuRMaR3Y91ij"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/relishable_woodland~salon-appointment-booking-automation/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-relishable_woodland-salon-appointment-booking-automation",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/relishable_woodland~salon-appointment-booking-automation/runs": {
      "post": {
        "operationId": "runs-sync-relishable_woodland-salon-appointment-booking-automation",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/relishable_woodland~salon-appointment-booking-automation/run-sync": {
      "post": {
        "operationId": "run-sync-relishable_woodland-salon-appointment-booking-automation",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "operation"
        ],
        "properties": {
          "operation": {
            "title": "Operation",
            "enum": [
              "checkAvailability",
              "createAppointment",
              "getAppointment",
              "cancelAppointment"
            ],
            "type": "string",
            "description": "Which appointment operation to perform."
          },
          "salonId": {
            "title": "Salon ID",
            "type": "string",
            "description": "Optional. This is a single-salon deployment — leave blank to use it. If set, it's validated against the connected backend's configured SALON_ID (reserved scaffolding for a future multi-salon version)."
          },
          "serviceId": {
            "title": "Service ID",
            "type": "string",
            "description": "Preferred way to identify the service (the backend's real numeric id, e.g. 1). Required for checkAvailability and createAppointment unless `service` (name) is given instead."
          },
          "service": {
            "title": "Service name",
            "type": "string",
            "description": "Alternative to serviceId: the exact service name, e.g. \"Women's Haircut\" (case-insensitive). Used only if serviceId is not set."
          },
          "staffId": {
            "title": "Staff ID",
            "type": "string",
            "description": "Optional preferred staff member. Reserved for future use — the connected backend has no staff/stylist model yet, so this is accepted and recorded but currently has no effect on booking."
          },
          "appointmentDate": {
            "title": "Appointment date",
            "type": "string",
            "description": "Date in YYYY-MM-DD format. Required for checkAvailability and createAppointment."
          },
          "appointmentTime": {
            "title": "Appointment time",
            "type": "string",
            "description": "Time in 24-hour HH:MM format, e.g. \"10:30\". Required for createAppointment; optional for checkAvailability (omit to list all open slots for the day)."
          },
          "customerName": {
            "title": "Customer name",
            "type": "string",
            "description": "Required for createAppointment."
          },
          "customerPhone": {
            "title": "Customer phone",
            "type": "string",
            "description": "Required for createAppointment."
          },
          "customerEmail": {
            "title": "Customer email",
            "type": "string",
            "description": "Optional contact email for createAppointment."
          },
          "appointmentId": {
            "title": "Appointment ID",
            "type": "string",
            "description": "Required for getAppointment and cancelAppointment — the ID returned by a previous createAppointment call."
          },
          "apiBaseUrl": {
            "title": "Salon backend API base URL",
            "type": "string",
            "description": "Base URL of the salon's booking backend, e.g. https://your-salon-api.example.com. Falls back to the API_BASE_URL environment variable, then http://localhost:4000 for local testing."
          },
          "apiKey": {
            "title": "Salon backend API key",
            "type": "string",
            "description": "API key for the salon backend's /api/actor/* endpoints (sent as the x-api-key header). Treated as a secret — falls back to the API_KEY environment variable if left blank. Never hard-code this in the Actor's source or logs."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}