{
  "openapi": "3.1.0",
  "info": {
    "title": "Dan Media API",
    "version": "1.0.0",
    "summary": "Services, prices, case studies, site and guide search, and project inquiries for Dan Media, a Shopify agency in Israel.",
    "description": "Public REST API of Dan Media (דן מדיה), a Shopify agency in Israel. Free and open: no API key, sign-up or OAuth. JSON in and out, CORS enabled.\n\nTest environment: the sandbox server (/api/sandbox/v1) has the same endpoints, but POST /inquiries never sends anything; on the production server, `\"dry_run\": true` does the same.\n\nPOST /inquiries contacts a real business: show the user the exact details and get their confirmation before sending.\n\nThe same capabilities are available as MCP servers: https://danmedia.co.il/mcp and https://danmedia.co.il/mcp/docs.",
    "contact": {
      "name": "Dan Media",
      "url": "https://danmedia.co.il/developers",
      "email": "hello@danmedia.co.il"
    },
    "termsOfService": "https://danmedia.co.il/developers",
    "x-logo": {
      "url": "https://danmedia.co.il/assets/brand/favicon-192.png"
    }
  },
  "externalDocs": {
    "description": "Developer page",
    "url": "https://danmedia.co.il/developers"
  },
  "servers": [
    {
      "url": "https://danmedia.co.il/api/v1",
      "description": "Production"
    },
    {
      "url": "https://danmedia.co.il/api/sandbox/v1",
      "description": "Sandbox test environment: POST /inquiries never sends anything"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "Agency",
      "description": "Services, prices and client work."
    },
    {
      "name": "Content",
      "description": "Search and read the website and its Shopify guides."
    },
    {
      "name": "Inquiries",
      "description": "Send a project inquiry to Dan Media."
    },
    {
      "name": "Meta",
      "description": "About the API."
    }
  ],
  "paths": {
    "/services": {
      "get": {
        "operationId": "listServices",
        "summary": "List Dan Media services",
        "description": "List every service Dan Media offers (store builds, migrations, themes, apps and checkout, Israeli integrations, automations, SEO and AEO), each with a short summary and a link, plus contact details. Use it to see what the agency does before recommending a service; use GET /pricing for prices.",
        "tags": [
          "Agency"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "services": {
                      "type": "array",
                      "description": "All services.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable identifier."
                          },
                          "name_he": {
                            "type": "string",
                            "description": "Name in Hebrew."
                          },
                          "name_en": {
                            "type": "string",
                            "description": "Name in English."
                          },
                          "summary": {
                            "type": "string",
                            "description": "One-sentence summary."
                          },
                          "url": {
                            "type": "string",
                            "description": "Page with the details."
                          }
                        },
                        "required": [
                          "id",
                          "name_he",
                          "name_en",
                          "summary",
                          "url"
                        ]
                      }
                    },
                    "contact": {
                      "type": "object",
                      "description": "How to reach Dan Media.",
                      "properties": {
                        "email": {
                          "type": "string",
                          "description": "Email address."
                        },
                        "phone": {
                          "type": "string",
                          "description": "Phone number, also on WhatsApp."
                        },
                        "whatsapp": {
                          "type": "string",
                          "description": "WhatsApp link."
                        },
                        "contact_page": {
                          "type": "string",
                          "description": "Contact page with the form."
                        }
                      },
                      "required": [
                        "email",
                        "phone",
                        "whatsapp",
                        "contact_page"
                      ]
                    }
                  },
                  "required": [
                    "services",
                    "contact"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": []
      }
    },
    "/pricing": {
      "get": {
        "operationId": "getPricing",
        "summary": "Get starting prices (ILS, before VAT)",
        "description": "Return Dan Media's starting prices in Israeli shekels (before VAT) for a custom Shopify store build and for migrating a store to Shopify, with what is and is not included. Use this instead of GET /search whenever the user asks what something costs.",
        "tags": [
          "Agency"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "offers": {
                      "type": "array",
                      "description": "One entry per service.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "service": {
                            "type": "string",
                            "enum": [
                              "store_build",
                              "migration"
                            ],
                            "description": "Service identifier."
                          },
                          "name": {
                            "type": "string",
                            "description": "Service name."
                          },
                          "price_from": {
                            "type": "number",
                            "description": "Starting price."
                          },
                          "currency": {
                            "type": "string",
                            "description": "ISO 4217 currency code."
                          },
                          "vat_included": {
                            "type": "boolean",
                            "description": "Whether VAT (17% in Israel) is included in price_from."
                          },
                          "notes": {
                            "type": "string",
                            "description": "What the price covers and what sets the final price."
                          },
                          "url": {
                            "type": "string",
                            "description": "Page with the details."
                          }
                        },
                        "required": [
                          "service",
                          "name",
                          "price_from",
                          "currency",
                          "vat_included",
                          "notes",
                          "url"
                        ]
                      }
                    },
                    "pricing_page": {
                      "type": "string",
                      "description": "The full pricing page."
                    },
                    "how_to_get_a_quote": {
                      "type": "string",
                      "description": "How the final fixed price is agreed."
                    }
                  },
                  "required": [
                    "offers",
                    "pricing_page",
                    "how_to_get_a_quote"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "required": false,
            "description": "Optional. \"store_build\" for a new Shopify store, \"migration\" for moving an existing store to Shopify. Omit to get both.",
            "schema": {
              "type": "string",
              "enum": [
                "store_build",
                "migration"
              ]
            }
          }
        ]
      }
    },
    "/case-studies": {
      "get": {
        "operationId": "getCaseStudies",
        "summary": "List client stores and case studies",
        "description": "Return the live Shopify stores Dan Media built (Perform-Ex Automotive, Screenline Systems, Trailmaster Industries, Biamba), with the industry, the work done and a link to each. Use it when the user wants examples, proof of experience, or a portfolio; it does not cover prices or services.",
        "tags": [
          "Agency"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "stores": {
                      "type": "array",
                      "description": "Live stores built by Dan Media.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "description": "Store name."
                          },
                          "url": {
                            "type": "string",
                            "description": "Live store URL."
                          },
                          "industry": {
                            "type": "string",
                            "description": "What the store sells."
                          },
                          "work": {
                            "type": "string",
                            "description": "The kind of project."
                          },
                          "summary": {
                            "type": "string",
                            "description": "What Dan Media did."
                          }
                        },
                        "required": [
                          "name",
                          "url",
                          "industry",
                          "work",
                          "summary"
                        ]
                      }
                    },
                    "portfolio_page": {
                      "type": "string",
                      "description": "The portfolio section on the website."
                    }
                  },
                  "required": [
                    "stores",
                    "portfolio_page"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": []
      }
    },
    "/search": {
      "get": {
        "operationId": "searchSite",
        "summary": "Search the website",
        "description": "Full-text search across every page and blog guide on danmedia.co.il. Use it for open questions that the other tools do not answer directly (for example Israeli payment providers, SEO during a migration, B2B checkout). For prices use GET /pricing, for the service list use GET /services, and for example stores use GET /case-studies.",
        "tags": [
          "Content"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string",
                      "description": "The query that was searched."
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the results came from."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Page or section title."
                          },
                          "url": {
                            "type": "string",
                            "description": "Absolute URL of the page."
                          },
                          "score": {
                            "type": "number",
                            "description": "Relevance score; higher is more relevant."
                          },
                          "excerpt": {
                            "type": "string",
                            "description": "A short passage from the page around the match."
                          }
                        },
                        "required": [
                          "title",
                          "url",
                          "excerpt"
                        ]
                      },
                      "description": "Matching pages, best first."
                    }
                  },
                  "required": [
                    "query",
                    "source",
                    "results"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Keywords to search for, in Hebrew or English, for example \"WooCommerce SEO\" or \"סליקה\".",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of results to return, from 1 to 10. Defaults to 5.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          }
        ]
      }
    },
    "/docs/search": {
      "get": {
        "operationId": "searchDocs",
        "summary": "Search the Shopify guides",
        "description": "Search Dan Media's published guides and site summary (llms.txt and every blog article) for passages that answer a question about Shopify in Israel: migrations, SEO, payments, invoices, shipping, checkout, B2B, automations, analytics. Returns the best passages with their source URL. Use GET /pages afterwards to read a whole page.",
        "tags": [
          "Content"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string",
                      "description": "The query that was searched."
                    },
                    "source": {
                      "type": "string",
                      "description": "Where the results came from."
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "description": "Page or section title."
                          },
                          "url": {
                            "type": "string",
                            "description": "Absolute URL of the page."
                          },
                          "score": {
                            "type": "number",
                            "description": "Relevance score; higher is more relevant."
                          },
                          "excerpt": {
                            "type": "string",
                            "description": "A short passage from the page around the match."
                          }
                        },
                        "required": [
                          "title",
                          "url",
                          "excerpt"
                        ]
                      },
                      "description": "Matching pages, best first."
                    }
                  },
                  "required": [
                    "query",
                    "source",
                    "results"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Keywords or a short question, in Hebrew or English, for example \"301 redirects\" or \"חשבוניות\".",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of passages to return, from 1 to 10. Defaults to 5.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          }
        ]
      }
    },
    "/pages": {
      "get": {
        "operationId": "getPage",
        "summary": "Read a page as Markdown",
        "description": "Read one page of danmedia.co.il as plain Markdown text: a blog article, a service page, /pricing, /contact, /about, or the text files /llms.txt and /llms-full.txt. Use it after GET /docs/search returns a URL, or when you already know the path.",
        "tags": [
          "Content"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "Absolute URL of the page."
                    },
                    "title": {
                      "type": "string",
                      "description": "Page title."
                    },
                    "content": {
                      "type": "string",
                      "description": "The page text as Markdown."
                    }
                  },
                  "required": [
                    "url",
                    "title",
                    "content"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "description": "The page path or full URL on danmedia.co.il, for example \"/blog/shopify-migration-seo-checklist\", \"/pricing\" or \"https://danmedia.co.il/llms.txt\".",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          }
        ]
      }
    },
    "/inquiries": {
      "post": {
        "operationId": "submitInquiry",
        "summary": "Send a project inquiry",
        "description": "Send the user's project inquiry (new Shopify store, migration to Shopify, or other Shopify work) to Dan Media by email; they reply within 24 hours. This contacts a real business: before calling, show the user the exact name, phone, email, store URL and message you will send and get their explicit confirmation. Send it once per inquiry. Use GET /pricing or GET /services first if the user is still exploring. For testing, set dry_run to true (or use the sandbox test environment at https://danmedia.co.il/api/sandbox/v1): the input is validated and the exact submission is returned, but nothing is sent.",
        "tags": [
          "Inquiries"
        ],
        "responses": {
          "200": {
            "description": "Test mode (dry_run, or the sandbox server): the input is valid and nothing was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sent": {
                      "type": "boolean",
                      "description": "True when Dan Media received the inquiry. Always false in test mode."
                    },
                    "test_mode": {
                      "type": "boolean",
                      "description": "True when this was a dry run or a sandbox call and nothing was sent."
                    },
                    "message": {
                      "type": "string",
                      "description": "What happens next."
                    },
                    "would_send": {
                      "type": "object",
                      "description": "Test mode only: the exact fields that would have been sent.",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Name."
                        },
                        "phone": {
                          "type": "string",
                          "description": "Phone."
                        },
                        "email": {
                          "type": "string",
                          "description": "Email."
                        },
                        "store": {
                          "type": "string",
                          "description": "Store URL, or \"לא צוין\" (not given)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Message, including the platform line."
                        },
                        "source": {
                          "type": "string",
                          "description": "Lead source label."
                        }
                      },
                      "required": [
                        "name",
                        "phone",
                        "email",
                        "store",
                        "message",
                        "source"
                      ]
                    }
                  },
                  "required": [
                    "sent",
                    "test_mode",
                    "message"
                  ]
                }
              }
            }
          },
          "201": {
            "description": "The inquiry was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sent": {
                      "type": "boolean",
                      "description": "True when Dan Media received the inquiry. Always false in test mode."
                    },
                    "test_mode": {
                      "type": "boolean",
                      "description": "True when this was a dry run or a sandbox call and nothing was sent."
                    },
                    "message": {
                      "type": "string",
                      "description": "What happens next."
                    },
                    "would_send": {
                      "type": "object",
                      "description": "Test mode only: the exact fields that would have been sent.",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Name."
                        },
                        "phone": {
                          "type": "string",
                          "description": "Phone."
                        },
                        "email": {
                          "type": "string",
                          "description": "Email."
                        },
                        "store": {
                          "type": "string",
                          "description": "Store URL, or \"לא צוין\" (not given)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Message, including the platform line."
                        },
                        "source": {
                          "type": "string",
                          "description": "Lead source label."
                        }
                      },
                      "required": [
                        "name",
                        "phone",
                        "email",
                        "store",
                        "message",
                        "source"
                      ]
                    }
                  },
                  "required": [
                    "sent",
                    "test_mode",
                    "message"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "415": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "description": "The inquiry could not be delivered; the body says how to contact Dan Media directly.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sent": {
                      "type": "boolean",
                      "description": "True when Dan Media received the inquiry. Always false in test mode."
                    },
                    "test_mode": {
                      "type": "boolean",
                      "description": "True when this was a dry run or a sandbox call and nothing was sent."
                    },
                    "message": {
                      "type": "string",
                      "description": "What happens next."
                    },
                    "would_send": {
                      "type": "object",
                      "description": "Test mode only: the exact fields that would have been sent.",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Name."
                        },
                        "phone": {
                          "type": "string",
                          "description": "Phone."
                        },
                        "email": {
                          "type": "string",
                          "description": "Email."
                        },
                        "store": {
                          "type": "string",
                          "description": "Store URL, or \"לא צוין\" (not given)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Message, including the platform line."
                        },
                        "source": {
                          "type": "string",
                          "description": "Lead source label."
                        }
                      },
                      "required": [
                        "name",
                        "phone",
                        "email",
                        "store",
                        "message",
                        "source"
                      ]
                    }
                  },
                  "required": [
                    "sent",
                    "test_mode",
                    "message"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The user's full name.",
                    "maxLength": 120
                  },
                  "phone": {
                    "type": "string",
                    "description": "The user's phone number: an Israeli number such as 050-123-4567, or international with a + prefix.",
                    "maxLength": 30
                  },
                  "email": {
                    "type": "string",
                    "description": "The user's email address, where Dan Media will reply.",
                    "maxLength": 200
                  },
                  "store_url": {
                    "type": "string",
                    "description": "Optional. The address of the user's existing online store.",
                    "maxLength": 300
                  },
                  "platform": {
                    "type": "string",
                    "description": "Optional. The platform the store runs on today, for example WooCommerce, Konimbo, Wix, Magento, or \"none\" for a new store.",
                    "maxLength": 60
                  },
                  "message": {
                    "type": "string",
                    "description": "Optional. What the user needs, in their words.",
                    "maxLength": 3000
                  },
                  "dry_run": {
                    "type": "boolean",
                    "description": "Optional, default false. When true, validates the input and returns the exact submission without sending anything (test mode). Always true on the sandbox server."
                  }
                },
                "required": [
                  "name",
                  "phone",
                  "email"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/": {
      "get": {
        "operationId": "getApiIndex",
        "summary": "API index",
        "description": "Lists the endpoints with their full URLs.",
        "tags": [
          "Meta"
        ],
        "responses": {
          "200": {
            "description": "The endpoint list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Machine-readable error code, for example invalid_argument or not_found."
              },
              "message": {
                "type": "string",
                "description": "What went wrong and how to fix the request."
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      }
    },
    "responses": {
      "Error": {
        "description": "The request was rejected; the message explains how to fix it.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
