Skip to content

CountryController API Documentation

Lee Sambridge edited this page Mar 21, 2025 · 1 revision

Country API Documentation

This document provides documentation for the Country API endpoints available in the Points.Api system.

Table of Contents

Authentication

All endpoints in the Country API require JWT Bearer authentication. Include the JWT token in the Authorization header of your requests:

Authorization: Bearer {your_jwt_token}

Endpoints

Get Countries

Retrieves a list of all available countries.

URL: /api/Country

Method: GET

Auth required: Yes (JWT Bearer token)

Success Response:

  • Code: 200 OK
  • Content: Array of country objects

Example Request:

GET /api/Country HTTP/1.1
Host: your-api-domain.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Example Response:

[
  {
    "id": 1,
    "name": "United States",
    "code": "US"
  },
  {
    "id": 2,
    "name": "United Kingdom",
    "code": "UK"
  },
  {
    "id": 3,
    "name": "Canada",
    "code": "CA"
  }
]

The response contains an array of country objects, each with an ID, name, and country code.

Clone this wiki locally