> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperline.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Get segment

> Retrieve the details of an existing customer segment.



## OpenAPI

````yaml get /v1/customers/segments/{id}
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/customers/segments/{id}:
    get:
      tags:
        - Customers > Segments
      summary: Get segment
      description: Retrieve the details of an existing customer segment.
      operationId: getCustomersSegment
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type:
                      - string
                      - 'null'
                  rules:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        operator:
                          type: string
                          enum:
                            - and
                            - or
                        conditions:
                          type: array
                          items:
                            anyOf:
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - country
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                      - set
                                      - not_set
                                  value:
                                    type: array
                                    items:
                                      type: string
                                      enum:
                                        - AD
                                        - AE
                                        - AF
                                        - AG
                                        - AI
                                        - AL
                                        - AM
                                        - AO
                                        - AQ
                                        - AR
                                        - AS
                                        - AT
                                        - AU
                                        - AW
                                        - AX
                                        - AZ
                                        - BA
                                        - BB
                                        - BD
                                        - BE
                                        - BG
                                        - BH
                                        - BI
                                        - BJ
                                        - BL
                                        - BM
                                        - BN
                                        - BO
                                        - BQ
                                        - BR
                                        - BS
                                        - BT
                                        - BF
                                        - BV
                                        - BW
                                        - BY
                                        - BZ
                                        - CA
                                        - CC
                                        - CD
                                        - CF
                                        - CG
                                        - CH
                                        - CI
                                        - CK
                                        - CL
                                        - CM
                                        - CN
                                        - CO
                                        - CR
                                        - CU
                                        - CV
                                        - CW
                                        - CX
                                        - CY
                                        - CZ
                                        - DE
                                        - DJ
                                        - DK
                                        - DM
                                        - DO
                                        - DZ
                                        - EC
                                        - EE
                                        - EG
                                        - EH
                                        - ER
                                        - ES
                                        - ET
                                        - FI
                                        - FJ
                                        - FK
                                        - FM
                                        - FO
                                        - FR
                                        - GA
                                        - GB
                                        - GD
                                        - GE
                                        - GF
                                        - GG
                                        - GH
                                        - GI
                                        - GL
                                        - GM
                                        - GN
                                        - GP
                                        - GQ
                                        - GR
                                        - GS
                                        - GT
                                        - GU
                                        - GW
                                        - GY
                                        - HK
                                        - HM
                                        - HN
                                        - HR
                                        - HT
                                        - HU
                                        - IC
                                        - ID
                                        - IE
                                        - IL
                                        - IM
                                        - IN
                                        - IO
                                        - IQ
                                        - IR
                                        - IS
                                        - IT
                                        - JE
                                        - JM
                                        - JO
                                        - JP
                                        - KE
                                        - KG
                                        - KH
                                        - KI
                                        - KM
                                        - KN
                                        - KP
                                        - KR
                                        - KW
                                        - KY
                                        - KZ
                                        - LA
                                        - LB
                                        - LC
                                        - LI
                                        - LK
                                        - LR
                                        - LS
                                        - LT
                                        - LU
                                        - LV
                                        - LY
                                        - MA
                                        - MC
                                        - MD
                                        - ME
                                        - MF
                                        - MG
                                        - MH
                                        - MK
                                        - ML
                                        - MM
                                        - MN
                                        - MO
                                        - MP
                                        - MQ
                                        - MR
                                        - MS
                                        - MT
                                        - MU
                                        - MV
                                        - MW
                                        - MX
                                        - MY
                                        - MZ
                                        - NA
                                        - NC
                                        - NE
                                        - NF
                                        - NG
                                        - NI
                                        - NL
                                        - 'NO'
                                        - NP
                                        - NR
                                        - NU
                                        - NZ
                                        - OM
                                        - PA
                                        - PE
                                        - PF
                                        - PG
                                        - PH
                                        - PK
                                        - PL
                                        - PM
                                        - PN
                                        - PR
                                        - PS
                                        - PT
                                        - PT-20
                                        - PT-30
                                        - PW
                                        - PY
                                        - QA
                                        - RE
                                        - RO
                                        - RS
                                        - RU
                                        - RW
                                        - SA
                                        - SB
                                        - SC
                                        - SD
                                        - SE
                                        - SG
                                        - SH
                                        - SI
                                        - SJ
                                        - SK
                                        - SL
                                        - SM
                                        - SN
                                        - SO
                                        - SR
                                        - SS
                                        - ST
                                        - SV
                                        - SX
                                        - SY
                                        - SZ
                                        - TC
                                        - TD
                                        - TF
                                        - TG
                                        - TH
                                        - TJ
                                        - TK
                                        - TL
                                        - TM
                                        - TN
                                        - TO
                                        - TR
                                        - TT
                                        - TV
                                        - TW
                                        - TZ
                                        - UA
                                        - UG
                                        - UM
                                        - US
                                        - UY
                                        - UZ
                                        - VA
                                        - VC
                                        - VE
                                        - VG
                                        - VI
                                        - VN
                                        - VU
                                        - WF
                                        - WS
                                        - XK
                                        - YE
                                        - YT
                                        - ZA
                                        - ZM
                                        - ZW
                                      description: >-
                                        Two-letter country code in ISO format.
                                        See [ISO 3166-1
                                        alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
                                      example: FR
                                required:
                                  - field
                                  - operator
                                title: Country
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - currency
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                      - set
                                      - not_set
                                  value:
                                    type: array
                                    items:
                                      type: string
                                      enum:
                                        - EUR
                                        - AED
                                        - AFN
                                        - XCD
                                        - ALL
                                        - AMD
                                        - AOA
                                        - ARS
                                        - USD
                                        - AUD
                                        - AWG
                                        - AZN
                                        - BAM
                                        - BBD
                                        - BDT
                                        - BGN
                                        - BHD
                                        - BIF
                                        - XOF
                                        - BMD
                                        - BND
                                        - BOB
                                        - BRL
                                        - BSD
                                        - BTN
                                        - NOK
                                        - BWP
                                        - BYR
                                        - BZD
                                        - CAD
                                        - CDF
                                        - XAF
                                        - CHF
                                        - NZD
                                        - CLP
                                        - CNY
                                        - COP
                                        - CRC
                                        - CUP
                                        - CVE
                                        - ANG
                                        - CZK
                                        - DJF
                                        - DKK
                                        - DOP
                                        - DZD
                                        - EGP
                                        - MAD
                                        - ERN
                                        - ETB
                                        - FJD
                                        - FKP
                                        - GBP
                                        - GEL
                                        - GHS
                                        - GIP
                                        - GMD
                                        - GNF
                                        - GTQ
                                        - GYD
                                        - HKD
                                        - HNL
                                        - HRK
                                        - HTG
                                        - HUF
                                        - IDR
                                        - ILS
                                        - INR
                                        - IQD
                                        - IRR
                                        - ISK
                                        - JMD
                                        - JOD
                                        - JPY
                                        - KES
                                        - KGS
                                        - KHR
                                        - KMF
                                        - KPW
                                        - KRW
                                        - KWD
                                        - KYD
                                        - KZT
                                        - LAK
                                        - LBP
                                        - LKR
                                        - LRD
                                        - LSL
                                        - LYD
                                        - MDL
                                        - MGA
                                        - MKD
                                        - MMK
                                        - MNT
                                        - MOP
                                        - MRO
                                        - MUR
                                        - MVR
                                        - MWK
                                        - MXN
                                        - MYR
                                        - MZN
                                        - NAD
                                        - XPF
                                        - NGN
                                        - NIO
                                        - NPR
                                        - OMR
                                        - PAB
                                        - PEN
                                        - PGK
                                        - PHP
                                        - PKR
                                        - PLN
                                        - PYG
                                        - QAR
                                        - RON
                                        - RSD
                                        - RUB
                                        - RWF
                                        - SAR
                                        - SBD
                                        - SCR
                                        - SDG
                                        - SEK
                                        - SGD
                                        - SHP
                                        - SLL
                                        - SOS
                                        - SRD
                                        - SSP
                                        - STD
                                        - SYP
                                        - SZL
                                        - THB
                                        - TJS
                                        - TMT
                                        - TND
                                        - TOP
                                        - TRY
                                        - TTD
                                        - TWD
                                        - TZS
                                        - UAH
                                        - UGX
                                        - UYU
                                        - UZS
                                        - VEF
                                        - VND
                                        - VUV
                                        - WST
                                        - YER
                                        - ZAR
                                        - ZMW
                                        - ZWL
                                      description: >-
                                        Currency code. See [ISO
                                        4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).
                                      example: EUR
                                required:
                                  - field
                                  - operator
                                title: Currency
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - language
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                      - set
                                      - not_set
                                  value:
                                    type: array
                                    items:
                                      type: string
                                      enum:
                                        - fr
                                        - en
                                        - de
                                        - it
                                        - nl
                                        - es
                                        - pt
                                        - pl
                                required:
                                  - field
                                  - operator
                                title: Language
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - invoicing_entity_id
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                      - set
                                      - not_set
                                  value:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - field
                                  - operator
                                title: Invoicing entity
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - tax_id
                                  operator:
                                    type: string
                                    enum:
                                      - set
                                      - not_set
                                required:
                                  - field
                                  - operator
                                title: Tax ID
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - external_id
                                  operator:
                                    type: string
                                    enum:
                                      - set
                                      - not_set
                                required:
                                  - field
                                  - operator
                                title: External ID
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - payment_method_type
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                      - set
                                      - not_set
                                  value:
                                    type: array
                                    items:
                                      type: string
                                      enum:
                                        - card
                                        - apple_pay
                                        - google_pay
                                        - direct_debit
                                        - direct_debit_ach
                                        - direct_debit_bacs
                                        - stripe_link
                                        - transfer
                                        - transfer_automated
                                        - external
                                required:
                                  - field
                                  - operator
                                title: Payment method type
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - relationship
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                  value:
                                    type: array
                                    items:
                                      type: string
                                      enum:
                                        - has_parent
                                        - has_child
                                required:
                                  - field
                                  - operator
                                title: Relationship
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - customer_id
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                  value:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - field
                                  - operator
                                title: Customer ID
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - subscription_status
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                      - set
                                      - not_set
                                  value:
                                    type: array
                                    items:
                                      type: string
                                      enum:
                                        - draft
                                        - voided
                                        - archived
                                        - pending
                                        - trialing
                                        - active
                                        - paused
                                        - errored
                                        - cancelled
                                required:
                                  - field
                                  - operator
                                title: Subscription status
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - product_id
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                  value:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - field
                                  - operator
                                title: Product ID
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - invoice_status
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                      - set
                                      - not_set
                                  value:
                                    type: array
                                    items:
                                      type: string
                                      enum:
                                        - error
                                        - draft
                                        - open
                                        - to_pay
                                        - to_pay_batch
                                        - grace_period
                                        - partially_paid
                                        - paid
                                        - late
                                        - voided
                                        - closed
                                        - missing_info
                                        - archived
                                        - charged_on_parent
                                        - pending_parent_concat
                                        - uncollectible
                                required:
                                  - field
                                  - operator
                                title: Invoice status
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    enum:
                                      - contract_end_date
                                      - current_subscription_start_date
                                      - first_subscription_start_date
                                      - customer_created_at
                                  operator:
                                    type: string
                                    enum:
                                      - after
                                      - before
                                      - between
                                  value:
                                    type: array
                                    items:
                                      type: string
                                required:
                                  - field
                                  - operator
                                title: Date condition
                              - type: object
                                properties:
                                  field:
                                    type: string
                                    pattern: ^custom_property\..+$
                                    description: custom_property.<slug>
                                  operator:
                                    type: string
                                    enum:
                                      - in
                                      - not_in
                                      - set
                                      - not_set
                                  value:
                                    type: array
                                    items:
                                      anyOf:
                                        - type: string
                                        - type: number
                                        - type: boolean
                                required:
                                  - field
                                  - operator
                                title: Custom property
                      required:
                        - id
                        - operator
                        - conditions
                  created_at:
                    type: string
                    format: date
                  updated_at:
                    type: string
                    format: date
                required:
                  - id
                  - name
                  - description
                  - rules
                  - created_at
                  - updated_at
        '404':
          description: Segment not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````