Skip to main content

Introduction

The EPR LAPS (Extended Producer Responsibility - Local Authority Payment System) Backend API provides endpoints for managing bank details, accessing financial documents, and controlling permissions for local authorities in the EPR system.

Base URL

The API base URL depends on your environment:
http://localhost:3001
The default port for local development is 3001, but this can be configured via the PORT environment variable.

Available Endpoints

All endpoints (except /health) require JWT authentication. See the Authentication page for details.

Health Check

GET /health
Returns the health status of the API. This endpoint does not require authentication. Response:
{
  "message": "success"
}

Bank Details

GET /bank-details/{localAuthority}
Authorization: Bearer <token>
GET - Retrieve bank details for a local authority
POST - Create new bank details
PUT - Confirm bank details

Documents

GET /documents/{localAuthority}
Authorization: Bearer <token>
GET /documents/ - Get document metadata for a local authority
GET /document/ - Retrieve a specific document by ID

Permissions

GET /permissions/config
Authorization: Bearer <token>
Returns the authorization configuration including role-based permissions for:
  • Viewing full bank details
  • Confirming bank details
  • Creating bank details
  • Listing finance documents
  • Accessing finance documents
Response Example:
{
  "viewFullBankDetails": ["CEO"],
  "confirmBankDetails": ["CEO", "WO"],
  "createBankDetails": ["CEO"],
  "listFinanceDocuments": ["CEO"],
  "accessFinanceDocument": ["CEO"]
}

Request Headers

All authenticated requests must include:
HeaderRequiredDescription
AuthorizationYesBearer token with JWT
Content-TypeFor POST/PUTapplication/json
x-cdp-request-idNoRequest tracing ID for debugging
The health check endpoint (/health) is the only endpoint that does not require authentication.

Example Request

curl -X GET https://api.epr-laps.defra.gov.uk/documents/birmingham-city-council \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -H "x-cdp-request-id: 12345"

Response Format

All API responses follow standard HTTP status codes:
Status CodeDescription
200Success
201Created successfully
400Bad request (validation error)
401Unauthorized (invalid or missing token)
403Forbidden (insufficient permissions)
404Not found
500Internal server error

Service Configuration

The API service is configured with:
  • Service Name: epr-laps-backend
  • Default Host: 0.0.0.0
  • Default Port: 3001
  • Database: MongoDB
  • Default Database Name: epr-laps-backend
Configuration values can be overridden using environment variables. See the deployment documentation for details.

Build docs developers (and LLMs) love