StackOne Locations API

The Locations API from StackOne — 4 operation(s) for locations.

OpenAPI Specification

stackone-locations-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Marketing Accounts Locations API
  description: The documentation for the StackOne Unified API - MARKETING
  contact: {}
  version: 1.0.0
servers:
- url: https://api.stackone.com
tags:
- name: Locations
paths:
  /unified/hris/locations:
    get:
      tags:
      - Locations
      summary: List locations
      operationId: hris_list_locations
      parameters:
      - name: page
        in: query
        description: The page number of the results to fetch
        schema:
          type: string
      - name: page_size
        in: query
        description: The number of results per page
        schema:
          type: string
          default: '25'
      - name: raw
        in: query
        description: Indicates that the raw request result is returned
        schema:
          type: boolean
          default: false
      - name: fields
        in: query
        description: The comma separated list of fields to return in the response (if empty, all fields are returned)
        schema:
          type: string
          default: ''
        example: id,employee_id,name,phone_number,street_1,street_2,city,state,zip_code,country,location_type,created_at,updated_at
      - name: sync_token
        in: query
        description: The sync token to select the only updated results
        schema:
          type: string
      - name: updated_after
        in: query
        description: Use a string with a date to only select results updated after that given date
        schema:
          type: string
        example: '2020-01-01T00:00:00.000Z'
      - name: proxy
        in: query
        description: Query parameters that can be used to pass through parameters to the underlying provider request by surrounding them with "proxy" key
        style: deepObject
        explode: true
        schema:
          type: object
          additionalProperties: true
        example:
          proxy:
            custom_filter_param: '123'
            filter[eq][name]: Luke
      - name: x-account-id
        in: header
        description: The account identifier
        required: true
        schema:
          type: string
      responses:
        '400':
          description: Invalid request.
        '403':
          description: Forbidden.
        '412':
          description: 'Precondition failed: linked account belongs to a disabled integration.'
        '429':
          description: Too many requests.
        '500':
          description: Server error while executing the request.
        '501':
          description: This functionality is not implemented.
        '200':
          description: The list of Locations was retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HRISLocationsPaginated'
      security:
      - basic: []
      x-speakeasy-group: hris
      x-speakeasy-name-override: list_locations
  /unified/ats/locations/{id}:
    get:
      tags:
      - Locations
      summary: Get Location
      operationId: ats_get_location
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: The page number of the results to fetch
        schema:
          type: string
      - name: page_size
        in: query
        description: The number of results per page
        schema:
          type: string
          default: '25'
      - name: raw
        in: query
        description: Indicates that the raw request result is returned
        schema:
          type: boolean
          default: false
      - name: fields
        in: query
        description: The comma separated list of fields to return in the response (if empty, all fields are returned)
        schema:
          type: string
          default: ''
        example: id,name
      - name: sync_token
        in: query
        description: The sync token to select the only updated results
        schema:
          type: string
      - name: updated_after
        in: query
        description: Use a string with a date to only select results updated after that given date
        schema:
          type: string
        example: '2020-01-01T00:00:00.000Z'
      - name: proxy
        in: query
        description: Query parameters that can be used to pass through parameters to the underlying provider request by surrounding them with "proxy" key
        style: deepObject
        explode: true
        schema:
          type: object
          additionalProperties: true
        example:
          proxy:
            custom_filter_param: '123'
            filter[eq][name]: Luke
      - name: x-account-id
        in: header
        description: The account identifier
        required: true
        schema:
          type: string
      responses:
        '400':
          description: Invalid request.
        '403':
          description: Forbidden.
        '412':
          description: 'Precondition failed: linked account belongs to a disabled integration.'
        '429':
          description: Too many requests.
        '500':
          description: Server error while executing the request.
        '501':
          description: This functionality is not implemented.
        '200':
          description: The location with the given identifier was retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ATSLocationResult'
      security:
      - basic: []
      x-speakeasy-group: ats
      x-speakeasy-name-override: get_location
  /unified/hris/locations/{id}:
    get:
      tags:
      - Locations
      summary: Get Location
      operationId: hris_get_location
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: page
        in: query
        description: The page number of the results to fetch
        schema:
          type: string
      - name: page_size
        in: query
        description: The number of results per page
        schema:
          type: string
          default: '25'
      - name: raw
        in: query
        description: Indicates that the raw request result is returned
        schema:
          type: boolean
          default: false
      - name: fields
        in: query
        description: The comma separated list of fields to return in the response (if empty, all fields are returned)
        schema:
          type: string
          default: ''
        example: id,employee_id,name,phone_number,street_1,street_2,city,state,zip_code,country,location_type,created_at,updated_at
      - name: sync_token
        in: query
        description: The sync token to select the only updated results
        schema:
          type: string
      - name: updated_after
        in: query
        description: Use a string with a date to only select results updated after that given date
        schema:
          type: string
        example: '2020-01-01T00:00:00.000Z'
      - name: proxy
        in: query
        description: Query parameters that can be used to pass through parameters to the underlying provider request by surrounding them with "proxy" key
        style: deepObject
        explode: true
        schema:
          type: object
          additionalProperties: true
        example:
          proxy:
            custom_filter_param: '123'
            filter[eq][name]: Luke
      - name: x-account-id
        in: header
        description: The account identifier
        required: true
        schema:
          type: string
      responses:
        '412':
          description: 'Precondition failed: linked account belongs to a disabled integration.'
        '429':
          description: Too many requests.
        '500':
          description: Server error while executing the request.
        '200':
          description: The Location with the given identifier was retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HRISLocationResult'
        '400':
          description: Invalid request.
        '501':
          description: This functionality is not implemented.
        '403':
          description: Forbidden.
      security:
      - basic: []
      x-speakeasy-group: hris
      x-speakeasy-name-override: get_location
  /unified/ats/locations:
    get:
      tags:
      - Locations
      summary: List locations
      operationId: ats_list_locations
      parameters:
      - name: page
        in: query
        description: The page number of the results to fetch
        schema:
          type: string
      - name: page_size
        in: query
        description: The number of results per page
        schema:
          type: string
          default: '25'
      - name: raw
        in: query
        description: Indicates that the raw request result is returned
        schema:
          type: boolean
          default: false
      - name: fields
        in: query
        description: The comma separated list of fields to return in the response (if empty, all fields are returned)
        schema:
          type: string
          default: ''
        example: id,name
      - name: sync_token
        in: query
        description: The sync token to select the only updated results
        schema:
          type: string
      - name: updated_after
        in: query
        description: Use a string with a date to only select results updated after that given date
        schema:
          type: string
        example: '2020-01-01T00:00:00.000Z'
      - name: proxy
        in: query
        description: Query parameters that can be used to pass through parameters to the underlying provider request by surrounding them with "proxy" key
        style: deepObject
        explode: true
        schema:
          type: object
          additionalProperties: true
        example:
          proxy:
            custom_filter_param: '123'
            filter[eq][name]: Luke
      - name: x-account-id
        in: header
        description: The account identifier
        required: true
        schema:
          type: string
      responses:
        '501':
          description: This functionality is not implemented.
        '200':
          description: The list of locations was retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ATSLocationsPaginated'
        '400':
          description: Invalid request.
        '403':
          description: Forbidden.
        '412':
          description: 'Precondition failed: linked account belongs to a disabled integration.'
        '429':
          description: Too many requests.
        '500':
          description: Server error while executing the request.
      security:
      - basic: []
      x-speakeasy-group: ats
      x-speakeasy-name-override: list_locations
components:
  schemas:
    HRISLocation:
      type: object
      properties:
        zip_code:
          type: string
          description: The ZIP code/Postal code of the location
          example: NG33 5NR
        street_1:
          type: string
          description: The first line of the address
          example: Water Lane
        street_2:
          type: string
          description: The second line of the address
          example: Woolsthorpe by Colsterworth
        updated_at:
          type: string
          description: The updated_at date
          example: '2023-06-14T01:00:00Z'
        id:
          type: string
          description: The unique ID of the location
          example: '123456'
        phone_number:
          type: string
          description: The phone number of the location
          example: +44 1476 860 364
        employee_id:
          type: string
          description: The employee ID
          example: 1687-3
        city:
          type: string
          description: The city where the location is situated
          example: Grantham
        country:
          allOf:
          - $ref: '#/components/schemas/CountryCodeEnum'
          description: The country code
          example: GB
        name:
          type: string
          description: The name of the location
          example: Woolsthorpe Manor
        created_at:
          type: string
          description: The created_at date
          example: '2023-06-14T01:00:00Z'
        state:
          type: string
          description: The state where the location is situated
          example: Lincolnshire
        location_type:
          allOf:
          - $ref: '#/components/schemas/LocationTypeEnum'
          description: The location type
          example: work
    ATSLocation:
      type: object
      properties:
        name:
          type: string
        id:
          type: string
      required:
      - id
      - name
    ATSLocationResult:
      type: object
      properties:
        raw:
          type: string
        data:
          $ref: '#/components/schemas/ATSLocation'
      required:
      - data
    HRISLocationsPaginated:
      type: object
      properties:
        next_page:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/HRISLocation'
        raw:
          type: string
      required:
      - next_page
      - data
    LocationTypeEnum:
      type: object
      properties:
        source_value:
          type: string
        value:
          type: string
          enum:
          - home
          - work
          - unmapped_value
      required:
      - value
      - source_value
    CountryCodeEnum:
      type: object
      properties:
        source_value:
          type: string
        value:
          type: string
          enum:
          - AF
          - AL
          - DZ
          - AS
          - AD
          - AO
          - AI
          - AQ
          - AG
          - AR
          - AM
          - AW
          - AU
          - AT
          - AZ
          - BS
          - BH
          - BD
          - BB
          - BY
          - BE
          - BZ
          - BJ
          - BM
          - BT
          - BO
          - BQ
          - BA
          - BW
          - BV
          - BR
          - IO
          - BN
          - BG
          - BF
          - BI
          - KH
          - CM
          - CA
          - CV
          - KY
          - CF
          - TD
          - CL
          - CN
          - CX
          - CC
          - CO
          - KM
          - CG
          - CD
          - CK
          - CR
          - HR
          - CU
          - CW
          - CY
          - CZ
          - CI
          - DK
          - DJ
          - DM
          - DO
          - EC
          - EG
          - SV
          - GQ
          - ER
          - EE
          - ET
          - FK
          - FO
          - FJ
          - FI
          - FR
          - GF
          - PF
          - TF
          - GA
          - GM
          - GE
          - DE
          - GH
          - GI
          - GR
          - GL
          - GD
          - GP
          - GU
          - GT
          - GG
          - GN
          - GW
          - GY
          - HT
          - HM
          - VA
          - HN
          - HK
          - HU
          - IS
          - IN
          - ID
          - IR
          - IQ
          - IE
          - IM
          - IL
          - IT
          - JM
          - JP
          - JE
          - JO
          - KZ
          - KE
          - KI
          - KP
          - KR
          - KW
          - KG
          - LA
          - LV
          - LB
          - LS
          - LR
          - LY
          - LI
          - LT
          - LU
          - MO
          - MK
          - MG
          - MW
          - MY
          - MV
          - ML
          - MT
          - MH
          - MQ
          - MR
          - MU
          - YT
          - MX
          - FM
          - MD
          - MC
          - MN
          - ME
          - MS
          - MA
          - MZ
          - MM
          - NA
          - NR
          - NP
          - NL
          - NC
          - NZ
          - NI
          - NE
          - NG
          - NU
          - NF
          - MP
          - 'NO'
          - OM
          - PK
          - PW
          - PS
          - PA
          - PG
          - PY
          - PE
          - PH
          - PN
          - PL
          - PT
          - PR
          - QA
          - RO
          - RU
          - RW
          - RE
          - BL
          - SH
          - KN
          - LC
          - MF
          - PM
          - VC
          - WS
          - SM
          - ST
          - SA
          - SN
          - RS
          - SC
          - SL
          - SG
          - SX
          - SK
          - SI
          - SB
          - SO
          - ZA
          - GS
          - SS
          - ES
          - LK
          - SD
          - SR
          - SJ
          - SZ
          - SE
          - CH
          - SY
          - TW
          - TJ
          - TZ
          - TH
          - TL
          - TG
          - TK
          - TO
          - TT
          - TN
          - TR
          - TM
          - TC
          - TV
          - UG
          - UA
          - AE
          - GB
          - US
          - UM
          - UY
          - UZ
          - VU
          - VE
          - VN
          - VG
          - VI
          - WF
          - EH
          - YE
          - ZM
          - ZW
          - unmapped_value
      required:
      - value
      - source_value
    ATSLocationsPaginated:
      type: object
      properties:
        raw:
          type: string
        next_page:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/ATSLocation'
      required:
      - next_page
      - data
    HRISLocationResult:
      type: object
      properties:
        raw:
          type: string
        data:
          $ref: '#/components/schemas/HRISLocation'
      required:
      - data
  securitySchemes:
    basic:
      type: http
      scheme: basic