{
  "openapi": "3.1.0",
  "info": {
    "title": "CoPlaid Route Optimisation API",
    "version": "1.0.0",
    "summary": "Public endpoints for CoPlaid Route Optimisation.",
    "description": "Public REST endpoints for CoPlaid Route Optimisation. Keys are issued to partner accounts by CoPlaid administrators \u2014 there is no self-service key generation. Request access at admin@coplaid.ai. Full request and response schemas are published in the partner dashboard at https://core.coplaid.ai.\n\nAuthentication: send your key in the X-API-Key header. Keys are valid for 365 days and rate limited to 100 requests per hour per key.",
    "contact": {
      "name": "CoPlaid",
      "email": "admin@coplaid.ai",
      "url": "https://route.coplaid.ai/developers"
    }
  },
  "servers": [
    {
      "url": "https://api.coplaid.ai",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Developer resources",
    "url": "https://route.coplaid.ai/developers"
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Partner API key, issued by CoPlaid administrators."
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/jobs": {
      "post": {
        "operationId": "post_jobs",
        "summary": "Create jobs",
        "description": "Submit jobs to be scheduled in an optimisation run.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Validation error."
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The key is not permitted to perform this action."
          },
          "429": {
            "description": "Rate limit exceeded (100 requests per hour per key)."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "See the full request schema in the partner dashboard at core.coplaid.ai."
              }
            }
          }
        }
      }
    },
    "/job-templates/upload-csv": {
      "post": {
        "operationId": "post_job_templates_upload_csv",
        "summary": "Upload a job template CSV",
        "description": "Upload job data as CSV for a scheduled optimisation run.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Validation error."
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The key is not permitted to perform this action."
          },
          "429": {
            "description": "Rate limit exceeded (100 requests per hour per key)."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "See the full request schema in the partner dashboard at core.coplaid.ai."
              }
            }
          }
        }
      }
    },
    "/job-templates/create-json": {
      "post": {
        "operationId": "post_job_templates_create_json",
        "summary": "Create a job template from JSON",
        "description": "Submit job data as JSON for a scheduled optimisation run.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Validation error."
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The key is not permitted to perform this action."
          },
          "429": {
            "description": "Rate limit exceeded (100 requests per hour per key)."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "See the full request schema in the partner dashboard at core.coplaid.ai."
              }
            }
          }
        }
      }
    },
    "/job-templates/status/{log_id}": {
      "get": {
        "operationId": "get_job_templates_status_log_id",
        "summary": "Check upload status",
        "description": "Retrieve the processing status of a previously submitted job template.",
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Validation error."
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The key is not permitted to perform this action."
          },
          "429": {
            "description": "Rate limit exceeded (100 requests per hour per key)."
          }
        },
        "parameters": [
          {
            "name": "log_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The log id."
          }
        ]
      }
    }
  }
}
