Navigate Markets API

The Markets API from Navigate — 2 operation(s) for markets.

OpenAPI Specification

navigate-markets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: NavigateAI Access codes Markets API
  version: 1.0.0
  description: The NavigateAI external API allows you to programmatically manage locations, scoping, work orders, and more.
servers:
- url: https://api.navigateai.co
tags:
- name: Markets
paths:
  /v1/markets:
    get:
      operationId: api_external_api_market_list_markets
      summary: List markets
      parameters:
      - in: query
        name: reference_key
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Reference Key
        required: false
      - in: query
        name: slug
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Slug
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListMarketsResponse'
      tags:
      - Markets
      security:
      - ApiKeyAuth: []
    post:
      operationId: api_external_api_market_create_market
      summary: Create a market
      parameters: []
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketResponse'
      tags:
      - Markets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMarketRequest'
        required: true
      security:
      - ApiKeyAuth: []
  /v1/markets/{market_id}:
    get:
      operationId: api_external_api_market_get_market
      summary: Get a market
      parameters:
      - in: path
        name: market_id
        schema:
          title: Market Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketResponse'
      tags:
      - Markets
      security:
      - ApiKeyAuth: []
    post:
      operationId: api_external_api_market_update_market
      summary: Update a market
      parameters:
      - in: path
        name: market_id
        schema:
          title: Market Id
          type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketResponse'
      tags:
      - Markets
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMarketRequest'
        required: true
      security:
      - ApiKeyAuth: []
components:
  schemas:
    ListMarketsResponse:
      properties:
        markets:
          items:
            $ref: '#/components/schemas/MarketExternalSchema'
          title: Markets
          type: array
      required:
      - markets
      title: ListMarketsResponse
      type: object
    MarketResponse:
      properties:
        market:
          $ref: '#/components/schemas/MarketExternalSchema'
      required:
      - market
      title: MarketResponse
      type: object
    UpdateMarketRequest:
      additionalProperties: false
      description: 'Request schema for updating a market.


        All fields are optional. Omitting a field leaves it unchanged.'
      properties:
        name:
          description: Display name for the market. Must be unique within your organization. Omit to leave unchanged.
          minLength: 1
          title: Name
          type: string
        slug:
          description: URL-friendly identifier for the market. Must be unique within your organization. Only lowercase letters and underscores are allowed. Omit to leave unchanged.
          pattern: ^[a-z_]+$
          title: Slug
          type: string
      required: []
      title: UpdateMarketRequest
      type: object
    CreateMarketRequest:
      additionalProperties: false
      properties:
        name:
          description: Display name for the market.
          minLength: 1
          title: Name
          type: string
        slug:
          description: URL-friendly identifier for the market. Must be unique within your organization. Only lowercase letters and underscores are allowed.
          pattern: ^[a-z_]+$
          title: Slug
          type: string
      required:
      - name
      - slug
      title: CreateMarketRequest
      type: object
    MarketExternalSchema:
      properties:
        id:
          title: Id
          type: string
        name:
          description: Display name for this market. Must be unique within your organization.
          title: Name
          type: string
        slug:
          description: URL-friendly identifier for this market. Must be unique within your organization. Only lowercase letters and underscores are allowed.
          title: Slug
          type: string
        reference_key:
          anyOf:
          - type: string
          - type: 'null'
          description: Optional unique identifier for this market in your system. Must be unique within your organization.
          title: Reference Key
      required:
      - id
      - name
      - slug
      - reference_key
      title: Market
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer