> ## 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 All Collections

> List all collections

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://api.swervpay.co/api/v1/collections \
    -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.gets()
  ```

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

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

  $client = new Swervpay($config);

  $client->card()->collection()->toArray();
  ```

  ```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: businessId
  		SecretKey: secretKey
    	})

    	query := swervpay.PageAndLimitQuery{
  		Limit: 10,
  		Page: 1,
  	}

  	resp, err := client.Collection.Gets(ctx, query)

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


## OpenAPI

````yaml GET /collections
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:
    get:
      tags:
        - collections
      description: List all collections
      operationId: collectionList
      parameters:
        - name: page
          in: query
          schema:
            type: integer
        - name: limit
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $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

````