Puzzle Locations API

The Locations API from Puzzle — 1 operation(s) for locations.

OpenAPI Specification

puzzle-locations-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Puzzle Api Accounts Locations API
  description: Puzzle Api
  version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Locations
paths:
  /company/{id}/locations:
    get:
      operationId: locations
      summary: Get Locations
      description: 'Retrieves a list of all locations for the given company.


        Requires scope: read:company'
      tags:
      - Locations
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        city:
                          type: string
                        state:
                          type: string
                        zipCode:
                          type: string
                      required:
                      - id
                      - city
                      - state
                      - zipCode
                required:
                - locations
    post:
      operationId: createLocation
      summary: Create Location
      description: 'Create a location for the given company.


        Locations must be unique. A 400 error will be thrown if a location with the same city, state, and zip code already exists.


        Requires scope: write:location'
      tags:
      - Locations
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                city:
                  type: string
                  minLength: 1
                state:
                  type: string
                  minLength: 1
                zipCode:
                  type: string
                  minLength: 1
              required:
              - city
              - state
              - zipCode
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  city:
                    type: string
                  state:
                    type: string
                  zipCode:
                    type: string
                required:
                - id
                - city
                - state
                - zipCode