{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/keysavvy/main/json-schema/keysavvy-marketplace-update-request-body-schema.json",
  "title": "MarketplaceUpdateRequestBody",
  "x-generated": "2026-10-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/keysavvy-openapi.json#/components/schemas/MarketplaceUpdateRequestBody",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The user facing name of this marketplace. This value is displayed in various places throughout the UI & emails."
    },
    "color": {
      "type": "string",
      "pattern": "^#[A-F0-9]{6}$",
      "description": "Hex color (e.g. #FF99CC) to be used as the primary accent color. If this is null, your default theme color will be used."
    },
    "mobileLogo": {
      "type": "string",
      "description": "Displayed in the header at mobile breakpoints. When not set, your platform's logo is used. This image will be aspect scaled to fit 220px x 40px. May be provided as base64 image data, or an absolute URL to the image. E.g. \"data:image/png;base64,...\" or \"https://...\""
    },
    "desktopLogo": {
      "type": "string",
      "description": "Displayed in the header at desktop breakpoints. When not set, the mobile logo is used, then your platform's logo. This image will be aspect scaled to fit 250px x 100px. May be provided as base64 image data, or an absolute URL to the image. E.g. \"data:image/png;base64,...\" or \"https://...\""
    },
    "emailLogo": {
      "type": "string",
      "description": "Displayed in the header of transactional emails. When not set, the desktop logo is used, then the mobile logo, then your platform's logo. This image will be aspect scaled to fit 400px x 200px. May be provided as base64 image data, or an absolute URL to the image. E.g. \"data:image/png;base64,...\" or \"https://...\""
    },
    "homePageUrl": {
      "type": "string",
      "format": "uri",
      "maxLength": 1024,
      "description": "URL to the marketplace website home page. Must be fully qualified and HTTPS. E.g. https://www.keysavvy.com"
    },
    "linkConfig": {
      "oneOf": [
        {
          "$ref": "#/$defs/PartnerMarketplaceLinkConfig"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "$defs": {
    "PartnerMarketplaceLinkConfig": {
      "type": "object",
      "description": "Configuration so that KeySavvy can create URLs that link a vehicle or deal in our system back out to your marketplace.\n",
      "required": [
        "baseUrl",
        "dealPathPattern",
        "vehiclePathPattern"
      ],
      "properties": {
        "baseUrl": {
          "type": "string",
          "format": "uri",
          "maxLength": 512,
          "description": "Base URL KeySavvy can use to link a user back to the vehicle or deal in your marketplace. This must be\nfully qualified, HTTPS, and should not include path or query params.\n\nExample: https://www.keysavvy.com\n"
        },
        "dealPathPattern": {
          "type": "string",
          "maxLength": 512,
          "description": "A [path-to-regexp](https://github.com/pillarjs/path-to-regexp?tab=readme-ov-file#compile-reverse-path-to-regexp)\npattern used in combination with baseUrl to create a link to a specific deal in your marketplace.\n\nThe following the following path parameters are supported:\n\n  * `dealReferenceId` - The vehicle reference ID provided at the time of vehicle / deal creation.\n\nExample - /deal/:dealReferenceId\n"
        },
        "vehiclePathPattern": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 512,
          "description": "A [path-to-regexp](https://github.com/pillarjs/path-to-regexp?tab=readme-ov-file#compile-reverse-path-to-regexp)\npattern used in combination with baseUrl to create a link to a specific vehicle page in your marketplace.\n\nThe following the following path parameters are supported:\n\n  * `vehicleReferenceId` - The vehicle reference ID provided at the time of vehicle / deal creation.\n\nExample - /vehicle/:vehicleReferenceId\n"
        }
      }
    }
  }
}