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

# Get Service

> Get one broker-owned service and its VPS credentials by service number.

The endpoint returns in depth service details and VPS credentials.

<Warning>
  The response can contain a VPS IP address, username, and password.
</Warning>

## Errors

| HTTP status | Error code                 | Cause                                                                        |
| ----------- | -------------------------- | ---------------------------------------------------------------------------- |
| `400`       | `invalid_request`          | `service_number` does not produce a nonzero base-10 integer.                 |
| `401`       | `authentication_failed`    | The Bearer token is missing, invalid, inactive, or expired.                  |
| `403`       | `insufficient_permissions` | The key lacks `admin:full`, or the request IP is not allowed.                |
| `404`       | `not_found`                | No service with this number belongs to the authenticated broker.             |
| `429`       | `rate_limit_exceeded`      | The key has reached its rate limit. The response has a `Retry-After` header. |
| `500`       | `server_error`             | An unexpected authentication or route error occurred.                        |


## OpenAPI

````yaml api/openapi.yaml GET /v1/services/{service_number}
openapi: 3.1.0
info:
  title: Broker API
  version: 1.0.0
  description: API for broker-scoped service, request, and report operations.
servers:
  - url: https://brokers.newyorkcityservers.com/api
    description: Broker Panel API
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Services
  - name: Requests
  - name: Reports
paths:
  /v1/services/{service_number}:
    get:
      tags:
        - Services
      summary: Get Service
      description: >-
        Returns one broker-owned service including cached VPS credentials.
        Requires `admin:full`.
      operationId: getService
      parameters:
        - $ref: '#/components/parameters/ServiceNumber'
      responses:
        '200':
          description: Service details.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    required:
                      - data
                    properties:
                      data:
                        $ref: '#/components/schemas/Service'
              example:
                success: true
                data:
                  service_number: 971100004
                  customer_name: Example Trading LLC
                  customer_email: operations@example.com
                  customer_phone: +1 212 555 0100
                  plan: Standard VPS
                  service_status: active
                  created_date: '2026-05-01T10:30:00.000Z'
                  next_billing_date: '2026-06-01'
                  last_modified: '2026-05-02T14:22:33.000Z'
                  notes: Primary trading service
                  vps_ip: 192.0.2.10
                  vps_username: Administrator
                  vps_password: <redacted>
        '400':
          description: Code `invalid_request` for an invalid service number.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: invalid_request
                  message: Invalid service number
        '401':
          $ref: '#/components/responses/AuthenticationError'
        '403':
          $ref: '#/components/responses/PermissionError'
        '404':
          description: Code `not_found` when no broker-owned service matches.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error:
                  code: not_found
                  message: Service not found
        '429':
          $ref: '#/components/responses/RateLimitError'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    ServiceNumber:
      name: service_number
      in: path
      required: true
      description: Public service number parsed as a base-10 integer.
      schema:
        type: integer
        format: int64
  schemas:
    SuccessEnvelope:
      type: object
      required:
        - success
      properties:
        success:
          type: boolean
          const: true
        message:
          type: string
        pagination:
          $ref: '#/components/schemas/Pagination'
    Service:
      type: object
      required:
        - service_number
        - customer_name
        - customer_email
        - customer_phone
        - plan
        - service_status
        - created_date
        - next_billing_date
        - last_modified
        - notes
      properties:
        service_number:
          type:
            - integer
            - 'null'
        customer_name:
          type: string
        customer_email:
          type: string
          format: email
        customer_phone:
          type:
            - string
            - 'null'
        plan:
          type: string
        service_status:
          type: string
          description: >-
            Stored service state. Common values are active, pending, suspended,
            cancelled, and terminated.
        created_date:
          type: string
          format: date-time
        next_billing_date:
          type:
            - string
            - 'null'
        last_modified:
          type: string
          format: date-time
        notes:
          type:
            - string
            - 'null'
        cancel_date:
          type:
            - string
            - 'null'
        cancellation_reason:
          type:
            - string
            - 'null'
        vps_ip:
          type:
            - string
            - 'null'
        vps_username:
          type:
            - string
            - 'null'
        vps_password:
          type:
            - string
            - 'null'
          writeOnly: false
          description: Sensitive cached service credential.
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          $ref: '#/components/schemas/Error'
    Pagination:
      type: object
      required:
        - page
        - perPage
        - total
        - totalPages
      properties:
        page:
          type: integer
          minimum: 1
        perPage:
          type: integer
          minimum: 1
          maximum: 100
        total:
          type: integer
          minimum: 0
        totalPages:
          type: integer
          minimum: 0
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
  responses:
    AuthenticationError:
      description: >-
        Code `authentication_failed` for a missing, malformed, invalid,
        inactive, or expired API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: authentication_failed
              message: Invalid API key
    PermissionError:
      description: >-
        Code `insufficient_permissions` when the request IP is not whitelisted
        or a required scope is missing.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: insufficient_permissions
              message: IP address not whitelisted
    RateLimitError:
      description: Code `rate_limit_exceeded` when the API key exceeds its rate limit.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: rate_limit_exceeded
              message: Rate limit exceeded
    ServerError:
      description: >-
        Code `server_error` when authentication or internal processing cannot
        complete.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: server_error
              message: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Send the API key in the Authorization bearer header. Production keys
        begin with `sk_live_`.

````