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

# Get one credit

> Fetch one credit of a connected ScripX client firm by scrip number: face, balance, expiry and status for a single duty credit.

One credit in full, the detail read behind a row of the [inventory list](/api-reference/firms/credits). It carries a **`lifecycle`** timeline your platform can render like a status tracker, the same shape a portfolio UI shows a client. Requires the `firms` scope and a `connected` firm.

### Request example

```bash theme={"dark"}
curl "https://api.scripxhq.com/v1/firms/0512345678/credits/SCRIP204188" \
  -H "X-ScripX-Key: <YOUR_API_KEY>"
```

### Response example

```json theme={"dark"}
{
  "credit": {
    "scrip_no": "SCRIP204188",
    "scheme": "RODTEP",
    "face_paise": 100000000,
    "balance_paise": 100000000,
    "issue_date": "2026-04-01",
    "expiry_date": "2027-03-31",
    "status": "issued",
    "sellable": true,
    "lifecycle": [
      { "stage": "issued", "state": "done", "at": "2026-04-01" },
      { "stage": "available", "state": "current" },
      { "stage": "sold", "state": "upcoming" },
      { "stage": "settled", "state": "upcoming" }
    ]
  }
}
```

`lifecycle` stages are `issued → available → sold → settled` for a credit on its way to sale, with an alternate tail (`utilized`, `expired`, `cancelled`) once a credit leaves that path. Each stage's `state` is `done`, `current` or `upcoming`, so a tracker renders straight from the array.

### Errors

* `404 not_found`, the firm does not hold this credit.
* `409 conflict`, the firm is not `connected`.

**Terms used here:** [scrip\_no](/annexure/terminology#scrip-number), [scheme](/annexure/terminology#scheme), [face value](/annexure/terminology#face-value), [balance](/annexure/terminology#balance), [expiry](/annexure/terminology#validity-and-expiry), [connection state](/annexure/terminology#connection-state), [paise](/annexure/terminology#paise), [sellable](/annexure/terminology#sellable), [API key](/annexure/terminology#api-key). Full list in the [terminology annexure](/annexure/terminology).

### Next steps

* [Quote this credit](/api-reference/trading/quote) by `scrip_no`.


## OpenAPI

````yaml GET /v1/firms/{iec}/credits/{scrip_no}
openapi: 3.1.0
info:
  title: ScripX Partner API
  version: 1.2.0
  description: >-
    Automate duty-credit-scrip trading: quote, order, positions, market,
    webhooks. Auth: `X-ScripX-Key: scripx_live_…`. Money = integer paise; price
    = bps of face.
  contact:
    name: ScripX API Support
    email: amin@eximfiles.io
    url: https://scripxhq.com
servers:
  - url: https://api.scripxhq.com
    description: >-
      Production and sandbox share one host; a scripx_test_ key selects the
      sandbox.
security:
  - ApiKeyAuth: []
tags:
  - name: Firms
    description: >-
      client-firm lifecycle: register, verify, authorize, credits, update,
      offboard
  - name: Trading
    description: quote, orders, positions, market
  - name: Group
    description: intra-group netting + positions (enterprise/broker)
  - name: Cross
    description: 'broker cross-desk: block deals + intra-group transfers'
  - name: Webhooks
    description: event subscriptions + delivery
  - name: Account
    description: usage + metering
  - name: Keys
    description: self-serve scoped child keys (sub-accounts)
paths:
  /v1/firms/{iec}/credits/{scrip_no}:
    get:
      tags:
        - Firms
      summary: Get one credit of a connected firm
      parameters:
        - name: iec
          in: path
          required: true
          schema:
            type: string
        - name: scrip_no
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditRecord'
        '401':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreditRecord:
      type: object
      properties:
        credit:
          $ref: '#/components/schemas/CreditDetail'
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: stable machine code
          enum:
            - bad_request
            - unauthorized
            - forbidden
            - not_found
            - conflict
            - unprocessable
            - rate_limited
            - internal
        message:
          type: string
        detail:
          type: object
    CreditDetail:
      allOf:
        - $ref: '#/components/schemas/Credit'
        - type: object
          properties:
            lifecycle:
              type: array
              items:
                $ref: '#/components/schemas/LifecycleStage'
              description: 'product timeline: render it like a status tracker'
    Credit:
      type: object
      description: one duty credit held by the firm, its full lifecycle record
      properties:
        scrip_no:
          type: string
          description: the credit's number
        scheme:
          type: string
          enum:
            - RODTEP
            - ROSCTL
        face_paise:
          type: integer
          description: duty-paying power at issue
        balance_paise:
          type: integer
          description: unused balance (face minus what has been utilized)
        issue_date:
          type: string
        expiry_date:
          type: string
          description: credit lapses after this date
        status:
          type: string
          enum:
            - issued
            - utilized
            - transferred
            - cancelled
            - expired
        sellable:
          type: boolean
          description: issued with a positive balance, ready to quote and sell
    LifecycleStage:
      type: object
      properties:
        stage:
          type: string
          enum:
            - issued
            - available
            - sold
            - settled
            - utilized
            - expired
            - cancelled
        state:
          type: string
          enum:
            - done
            - current
            - upcoming
        at:
          type: string
          description: date, when known
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-ScripX-Key
      description: >-
        Your API key, e.g. `scripx_live_…`. Bound to one firm; tenant isolation
        is enforced.

````