{
  "openapi": "3.1.0",
  "info": {
    "title": "Apex Prints Discovery API",
    "version": "1.0.0",
    "description": "Free catalogue search and single-print estimates. No authentication, payments or order creation. Give customiseUrl to the customer to review and purchase through Stripe. Not an x402 or autonomous checkout integration."
  },
  "servers": [
    {
      "url": "https://apexprints.co"
    }
  ],
  "paths": {
    "/api/agent-catalog": {
      "get": {
        "operationId": "searchRoutePrints",
        "summary": "Find route prints and starting prices",
        "description": "region defaults to AU. q matches route name, sport, city or country. Starting price is A5 matte unframed, excluding shipping. Only published catalogue routes are returned.",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "AU",
                "UK"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful read-only response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "region": {
                      "enum": [
                        "AU",
                        "UK"
                      ]
                    },
                    "currency": {
                      "enum": [
                        "AUD",
                        "GBP"
                      ]
                    },
                    "total": {
                      "type": "integer"
                    },
                    "products": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "sport": {
                            "type": "string"
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "city": {
                                "type": "string"
                              },
                              "country": {
                                "type": "string"
                              },
                              "continent": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "city",
                              "country",
                              "continent"
                            ]
                          },
                          "distanceKm": {
                            "type": "number",
                            "minimum": 0
                          },
                          "routeAccuracy": {
                            "type": "string"
                          },
                          "productUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "imageUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "customiseUrl": {
                            "type": "string",
                            "format": "uri"
                          },
                          "startingPrice": {
                            "type": "object",
                            "properties": {
                              "amount": {
                                "type": "number",
                                "minimum": 0
                              },
                              "currency": {
                                "enum": [
                                  "AUD",
                                  "GBP"
                                ]
                              },
                              "configuration": {
                                "type": "object",
                                "properties": {
                                  "sizeKey": {
                                    "type": "string",
                                    "enum": [
                                      "a5",
                                      "a4",
                                      "a3",
                                      "a2",
                                      "a1",
                                      "sq30",
                                      "sq50"
                                    ]
                                  },
                                  "paperKey": {
                                    "type": "string",
                                    "enum": [
                                      "matte",
                                      "cotton"
                                    ]
                                  },
                                  "frameKey": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "black",
                                      "oak",
                                      "walnut",
                                      "white"
                                    ]
                                  }
                                },
                                "required": [
                                  "sizeKey",
                                  "paperKey",
                                  "frameKey"
                                ]
                              },
                              "excludesShipping": {
                                "const": true
                              }
                            },
                            "required": [
                              "amount",
                              "currency",
                              "configuration",
                              "excludesShipping"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "description",
                          "sport",
                          "location",
                          "distanceKm",
                          "routeAccuracy",
                          "productUrl",
                          "imageUrl",
                          "customiseUrl",
                          "startingPrice"
                        ]
                      }
                    },
                    "options": {
                      "type": "object"
                    },
                    "customRoute": {
                      "type": "object",
                      "properties": {
                        "uploadUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "format": {
                          "type": "string"
                        },
                        "note": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "uploadUrl",
                        "format",
                        "note"
                      ]
                    },
                    "quoteUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "checkout": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "version",
                    "region",
                    "currency",
                    "total",
                    "products",
                    "options",
                    "customRoute",
                    "quoteUrl",
                    "checkout"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Successful read-only response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Successful read-only response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/agent-quote": {
      "get": {
        "operationId": "estimateRoutePrint",
        "summary": "Estimate one print and shipping, with a design handoff link",
        "description": "route is a catalogue product id. country is required and must be a checkout-supported ISO country code (GB, not UK). Defaults: AU, a5, matte, none, standard. No address, GPX, payment data or personalised text accepted. Unknown or duplicate parameters return 400. This does not reserve a price or create an order. Delivery selection is made again at checkout.",
        "parameters": [
          {
            "name": "route",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "AU",
                "UK"
              ]
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AU",
                "GB",
                "NZ",
                "US",
                "IE",
                "CA",
                "DE",
                "FR",
                "NL",
                "ES",
                "IT"
              ]
            }
          },
          {
            "name": "sizeKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "a5",
                "a4",
                "a3",
                "a2",
                "a1",
                "sq30",
                "sq50"
              ]
            }
          },
          {
            "name": "paperKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "matte",
                "cotton"
              ]
            }
          },
          {
            "name": "frameKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "none",
                "black",
                "oak",
                "walnut",
                "white"
              ]
            }
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "standard",
                "express"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful read-only response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "kind": {
                      "const": "estimate"
                    },
                    "route": {
                      "type": "string"
                    },
                    "region": {
                      "enum": [
                        "AU",
                        "UK"
                      ]
                    },
                    "currency": {
                      "enum": [
                        "AUD",
                        "GBP"
                      ]
                    },
                    "quantity": {
                      "const": 1
                    },
                    "configuration": {
                      "type": "object",
                      "properties": {
                        "sizeKey": {
                          "type": "string",
                          "enum": [
                            "a5",
                            "a4",
                            "a3",
                            "a2",
                            "a1",
                            "sq30",
                            "sq50"
                          ]
                        },
                        "paperKey": {
                          "type": "string",
                          "enum": [
                            "matte",
                            "cotton"
                          ]
                        },
                        "frameKey": {
                          "type": "string",
                          "enum": [
                            "none",
                            "black",
                            "oak",
                            "walnut",
                            "white"
                          ]
                        }
                      },
                      "required": [
                        "sizeKey",
                        "paperKey",
                        "frameKey"
                      ]
                    },
                    "printAreaMm": {
                      "type": "object",
                      "properties": {
                        "w": {
                          "type": "number",
                          "minimum": 0
                        },
                        "h": {
                          "type": "number",
                          "minimum": 0
                        },
                        "framed": {
                          "type": "boolean"
                        },
                        "lockPortrait": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "w",
                        "h",
                        "framed",
                        "lockPortrait"
                      ]
                    },
                    "itemAmount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "shippingAmount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "totalAmount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "destinationCountry": {
                      "type": "string"
                    },
                    "shippingService": {
                      "enum": [
                        "standard",
                        "express"
                      ]
                    },
                    "packages": {
                      "type": "integer"
                    },
                    "customiseUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "requiresCustomerReview": {
                      "const": true
                    },
                    "note": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "version",
                    "kind",
                    "route",
                    "region",
                    "currency",
                    "quantity",
                    "configuration",
                    "printAreaMm",
                    "itemAmount",
                    "shippingAmount",
                    "totalAmount",
                    "destinationCountry",
                    "shippingService",
                    "packages",
                    "customiseUrl",
                    "requiresCustomerReview",
                    "note"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Successful read-only response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Successful read-only response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}