openapi: 3.0.0
info:
  version: 1.0.0
  title: Segmint Data Services API
  description: "#### Integrations\n
    When integrating with Segmint's APIs you should always allow for unknown fields.
    Segmint reserves the right to add additional fields to its APIs. Segmint will
    always attempt to not introduce breaking changes into an endpoint. This is often
    accomplished by the addition of fields. If a breaking change is required clients
    will be given advanced notice to make the required changes.\n\nAccess to API endpoints
    may be rate limited and have monthly account level quotas, your account representative
    will have details if this applies to you."
servers:
- url: https://dataservices-demo.segmint.net/
- url: https://dataservices-stage.segmint.net
- url: https://dataservices.segmint.net/
paths:
  "/auth/v1/changePassword":
    post:
      summary: Change your password used to access the Segmint Data Insights APIs.
      description: |-
        - 8 Characters
        - Require Numbers
        - Require special characters
        - Require Uppercase Characters
        - Require Lowercase Characters

        ### <span style="color:var(--red)">Fields marked with an * are required. </span>

      responses:
        '200':
          description: Ok
        '400':
          description: A JSON object that contains Bad Request messages
          content:
            application/json:
              schema:
                anyOf:
                - "$ref": "#/components/responses/BadRequest"
                - "$ref": "#/components/responses/BadPasswordUpperCase"
                - "$ref": "#/components/responses/BadPasswordLowerCase"
                - "$ref": "#/components/responses/BadPasswordLength"
        '404':
          description: Not Found
        '500':
          description: Server Error
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - username
              - password
              - new_password
              properties:
                username:
                  type: string
                  description: The username provided to you via the Segmint Data Services
                    Welcome email.
                  example: somebody@somebank.com
                password:
                  type: string
                  description: Your current password. For new users this would be
                    the password provided to you via the Segmint Data Services Welcome
                    email.
                  example: 342_9B1B
                new_password:
                  type: string
                  description: A new strong password that meets Segmint's Data Services
                    API password policy card processor.
                  example: P@$$w0rd!
        description: The JSON Body of the POST to change your current password
        required: true
      tags:
      - "/auth"
  "/auth/v1/token":
    post:
      summary: Refresh authentication token
      description: |- 
        Call this API to get a new token when previous token expires.
        #### <span style="color:var(--red)">Fields marked with an * are required. </span>

      responses:
        '200':
          description: Ok
          content:
            "*/*":
              schema:
                "$ref": "#/components/schemas/TokenResponse"
        '400':
          description: Bad Request. Check your credentials.
        '404':
          description: Not Found
        '500':
          description: Server Error
      security:
      - BasicAuthentication: []
      tags:
      - "/auth"
components:
  responses:
    UnauthorizedError:
      description: Unauthorized
    BadRequest:
      description: Bad Request. Check your credentials
    BadPasswordUpperCase:
      description: 'Password did not conform with policy: Password must have uppercase
        characters'
    BadPasswordLowerCase:
      description: 'Password did not conform with policy: Password must have lowercase
        characters'
    BadPasswordLength:
      description: New password must have a length greater than 8
    BadPasswordSpecial:
      description: 'Password did not conform with policy: Password must have symbol
        characters'
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/PasswordErrors"
    ToManyRequests:
      description: You have exceeded your throughput rate or quota for your account
        plan.
    Forbidden:
      description: You do not have permission to access this resource.
  securitySchemes:
    BasicAuthentication:
      type: http
      description: Use the provided User ID and password to authenticate.<br><br>If
        you would like a User Id and password please contact us.
      scheme: basic
    BearerAuthentication:
      type: http
      description: Obtain a token using the /auth/v1/token endpoint
      scheme: bearer
      bearerFormat: JWT
  schemas:
    TokenResponse:
      properties:
        token:
          type: string
          description: The token that is used for endpoints that require Bearer Authentication
          example: eyJraWQiOiJKNHl6dmdGZ3VWbityS2s3Wmt2NnBQTGtMK2hwY20zS09lSlJ5MHNaZnJBPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiI3ZjQzZTM3YS0wMzQ3LTRmMTktYmRlMC1hNTgwNGE3YjNkYjQiLCJjdXN0b206cGFydG5lcl9saXN0IjoiODc1NjI2ODgiLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtZWFzdC0xLmFtYXpvbmF3cy5jb21cL3VzLWVhc3QtMV9BS2tNT1VBN0YiLCJjb2duaXRvOnVzZXJuYW1lIjoibGFuY2UuY3V0aGJlcnRAc2VnbWludC5jb20iLCJjdXN0b206cm9vdF9wYXJ0bmVyIjoiODc1NjI2ODgiLCJhdWQiOiIzZjUzM2I1czI4OHI0YmNsamNndWN1NHY0ciIsImV2ZW50X2lkIjoiYmJkZTYzNjEtMjBkNC0xMWU5LWJiYTktNGI2MGIzMjg1NDE4IiwidG9rZW5fdXNlIjoiaWQiLCJhdXRoX3RpbWUiOjE1NDg0NDMzNjcsImN1c3RvbTpwZXJtaXNzaW9uX2xpc3QiOiIsTUVSQ0hBTlQiLCJleHAiOjE1NDg0NDY5NjcsImlhdCI6MTU0ODQ0MzM2NywiZW1haWwiOiJsYW5jZS5jdXRoYmVydEBzZWdtaW50LmNvbSJ9.L9ORpHtxwJ3nBtgMZrQowDotlI0zQy9SZN2uAJj8g_JfJgQ-liK3rTn21IcJdWoS7iPKu-Wq9PT6Zl9jnn71Z7CZ97ipkd9JgLb2W0Brptgm69TRGLr0xWDAsXgqvW8VChT8KHSr3fOCeiz1zDWI2ZBKNj_PDiHRsJn7Xmrkc-joS3TiXtJRyW6TqtoWlf_--GKivzAoJiMkQxlNKYGm5I_NOUYL7x2awJce74jE4b6uqrRG5On1_1X9hKTD2G5L6CYZpz95Xzzeegl-ccuV3lRkzrau-lrc5eHABaFUupm7vMcp3JIbBTCvgJgw8WcuP1JA57TIAW67rfqaMmkWdg
        expires_in:
          type: integer
          description: The time-to-live for the token (in seconds)
          example: 3600
    PasswordErrors:
      type: object
      properties:
        error:
          type: string
          description: The error message returned
          example: 'Password did not conform with policy: Password must have uppercase
            characters'
    