x-generator: NSwag v13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v11.0.0.0))
swagger: '2.0'
info:
  title: Absorb Integration API
  version: v1
consumes:
  - application/json
produces:
  - application/json
paths:
  /provinces:
    get:
      tags:
        - Provinces
      summary: List provinces in country.
      operationId: Provinces_GetProvincesByCountryId
      parameters:
        - type: string
          name: countryId
          in: query
          required: true
          description: The country ID.
          format: guid
          x-nullable: false
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '1'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            type: array
            items:
              $ref: '#/definitions/ProvinceResource'
        '400':
          x-nullable: false
          description: Country ID not provided.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
        '404':
          x-nullable: false
          description: Country not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
  /provinces/{id}:
    get:
      tags:
        - Provinces
      summary: Get province.
      operationId: Provinces_GetProvince
      parameters:
        - type: string
          name: id
          in: path
          required: true
          description: The province ID.
          format: guid
          x-nullable: false
        - type: string
          name: x-api-key
          in: header
        - type: string
          name: x-api-version
          in: header
          description: '1'
      responses:
        '200':
          x-nullable: false
          description: ''
          schema:
            $ref: '#/definitions/ProvinceResource'
        '404':
          x-nullable: false
          description: Province not found.
          schema:
            $ref: '#/definitions/GenericErrorResponse'
      security:
        - api_key: []
definitions:
  ProvinceResource:
    type: object
    description: Represents information about a province for an Integration API endpoint.
    properties:
      id:
        type: string
        description: The unique province identifier.
        format: guid
      name:
        type: string
        description: The province's name.
  Link:
    type: object
    properties:
      Rel:
        $ref: '#/definitions/Relation'
      Items:
        type: array
        items:
          $ref: '#/definitions/LinkItem'
  Relation:
    type: object
    properties:
      Name:
        type: string
  LinkItem:
    type: object
    properties:
      Href:
        type: string
      Name:
        type: string
      Templated:
        type: boolean
      Type:
        type: string
      Deprecation:
        type: string
      Profile:
        type: string
      Title:
        type: string
      Hreflang:
        type: string
  IEmbeddedResource:
    type: object
    x-abstract: true
    properties:
      Name:
        type: string
      Resources:
        type: array
        items:
          $ref: '#/definitions/IResource'
  IResource:
    type: object
    x-abstract: true
    properties:
      Links:
        type: array
        items:
          $ref: '#/definitions/Link'
      EmbeddedResources:
        type: array
        items:
          $ref: '#/definitions/IEmbeddedResource'
  GenericErrorResponse:
    type: object
    description: |-
      This class is NOT to be used as an actual response. This is to be used as
      the return type for non-200 responses in `SwaggerResponse` attributes.
    properties:
      validations:
        type: array
        description: The validations (if any) which caused the error.
        items:
          type: string
      code:
        description: The status code returned.
        allOf:
          - $ref: '#/definitions/HttpStatusCode'
      message:
        type: string
        description: The error message.
      term:
        type: string
        description: The general error term.
      _meta:
        type: object
        description: 'A list of meta data (if any). '
        additionalProperties:
          type: string
  HttpStatusCode:
    type: integer
    description: ''
    x-enumNames:
      - Continue
      - SwitchingProtocols
      - OK
      - Created
      - Accepted
      - NonAuthoritativeInformation
      - NoContent
      - ResetContent
      - PartialContent
      - MultipleChoices
      - Ambiguous
      - MovedPermanently
      - Moved
      - Found
      - Redirect
      - SeeOther
      - RedirectMethod
      - NotModified
      - UseProxy
      - Unused
      - TemporaryRedirect
      - RedirectKeepVerb
      - BadRequest
      - Unauthorized
      - PaymentRequired
      - Forbidden
      - NotFound
      - MethodNotAllowed
      - NotAcceptable
      - ProxyAuthenticationRequired
      - RequestTimeout
      - Conflict
      - Gone
      - LengthRequired
      - PreconditionFailed
      - RequestEntityTooLarge
      - RequestUriTooLong
      - UnsupportedMediaType
      - RequestedRangeNotSatisfiable
      - ExpectationFailed
      - UpgradeRequired
      - InternalServerError
      - NotImplemented
      - BadGateway
      - ServiceUnavailable
      - GatewayTimeout
      - HttpVersionNotSupported
securityDefinitions:
  api_key:
    type: apiKey
    name: x-api-key
    in: header
tags:
  - name: Provinces
x-servers:
  - url: https://rest.myabsorb.com
    description: US
  - url: https://rest.myabsorb.ca
    description: CA
  - url: https://rest.myabsorb.eu
    description: EU
  - url: https://rest.myabsorb.com.au
    description: AU
