Skip to main content
GET
/
api
/
plans
/
search
Cross-type plan search
curl --request GET \
  --url https://app.solya.app/api/plans/search \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "code": "PSO-2025-FW-001",
      "id": "550e8400-e29b-41d4-a716-446655440006",
      "name": "Pre-Season FW2025 Buying Plan",
      "planType": "PRE_SEASON",
      "status": "DRAFT",
      "updatedAt": "2025-04-01T12:00:00.000Z"
    },
    {
      "code": "RST-2025-ADI-001",
      "id": "550e8400-e29b-41d4-a716-446655440001",
      "name": "Restock Adidas SS25 Collection",
      "planType": "RESTOCK",
      "status": "DRAFT",
      "updatedAt": "2025-03-15T10:00:00.000Z"
    }
  ],
  "page": 1,
  "pageSize": 20,
  "total": 2
}

Authorizations

Authorization
string
header
required

User session token issued by NextAuth. For human users accessing Solya via the web application.

Query Parameters

page
integer
default:1

Page number, 1-indexed (default: 1)

Required range: 1 <= x <= 9007199254740991
pageSize
integer
default:20

Number of items per page, max 100 (default: 20)

Required range: 1 <= x <= 100
q
string
required

Case-insensitive substring searched against plan name and plan code (min 1 character)

Minimum string length: 1
type
required
status
string

Restrict results to plans with this exact status value (e.g. DRAFT, VALIDATED, CLOSED)

Response

Successful response

data
object
required
success
enum<boolean>
required
Available options:
true