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

# Get Collection

> Get collection

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.swervpay.co/api/v1/collections/{id} \
    -H "Authorization: Bearer <TOKEN>" \
    -H "Content-Type: application/json"
  ```

  ```javascript Node.js theme={null}
  import { SwervpayClient } from '@swervpaydev/sdk';

  const config = {
      secretKey: "<SECRET_KEY>",
      businessId: "<BUSINESS_ID>"
  }

  const swervpay = new SwervpayClient(config);

  await swervpay.collection.get('<COLLECTION_ID>')
  ```

  ```php PHP theme={null}
  use Swervpaydev\SDK\Swervpay;

  $config = [
  	'business_id' => '<BUSINESS_ID>',
  	'secret_key' => '<SECRET_KEY>'
  ];

  $client = new Swervpay($config);

  $client->collection()->get('<COLLECTION_ID>');
  ```

  ```go Go theme={null}
  package main

  import (
  	"context"
  	"fmt"
  	"github.com/swerv-ltd/swervpay-go"
  	"log"
  )

  func main() {
  	ctx := context.Background()

  	client := swervpay.NewSwervpayClient(&swervpay.SwervpayClientOption{
          BusinessID: "<BUSINESS_ID>",
          SecretKey: "<SECRET_KEY>",
      })

  	resp, err := client.Collection.Get(ctx, "<COLLECTION_ID>")

  	if err != nil {
  		log.Fatal("error", err.Error())
  		return
  	}
  }
  ```
</RequestExample>


## OpenAPI

````yaml GET /collections/{id}
openapi: 3.0.0
info:
  title: Swervpay Developer API Specification
  version: 0.0.0
servers:
  - url: https://api.swervpay.co/api/v1
    description: Production API
  - url: https://sandbox.swervpay.co/api/v1
    description: Sandbox API
security:
  - bearerAuth: []
paths:
  /collections/{id}:
    get:
      tags:
        - collection
      description: Get collection
      operationId: getCollection
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TypesBusinessWallet'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsererrorError'
components:
  schemas:
    TypesBusinessWallet:
      type: object
      properties:
        account_name:
          type: string
        account_number:
          type: string
        account_type:
          type: string
        address:
          type: string
        balance:
          type: number
        bank_address:
          type: string
        bank_code:
          type: string
        bank_name:
          type: string
        created_at:
          type: string
          format: date-time
        id:
          type: string
        pending_balance:
          type: number
        reference:
          type: string
        routing_number:
          type: string
        status:
          type: string
        total_received:
          type: number
        updated_at:
          type: string
          format: date-time
    UsererrorError:
      type: object
      properties:
        message:
          type: string
        values:
          type: object
          additionalProperties: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````