Skip to main content
GET
/
api
/
data-platform
/
plans
/
{type}
List plans of a given type for outcome attribution
curl --request GET \
  --url https://app.solya.app/api/data-platform/plans/{type} \
  --header 'Authorization: Bearer <token>'
{
  "countsByStatus": {
    "CLOSED": 5,
    "DRAFT": 3,
    "RECEIVED": 0,
    "SENT": 0,
    "VALIDATED": 2
  },
  "data": [
    {
      "createdAt": "2026-05-10T08:00:00.000Z",
      "decidedAt": "2026-05-15T10:30:00.000Z",
      "decisionContextSnapshot": {
        "capturedAt": "2026-05-15T10:30:00.001Z"
      },
      "id": "plan-uuid-1",
      "itemCount": 12,
      "organizationId": "org-uuid-1",
      "status": "VALIDATED",
      "updatedAt": "2026-05-15T10:30:00.000Z"
    },
    {
      "createdAt": "2026-04-15T07:30:00.000Z",
      "decidedAt": "2026-04-20T09:00:00.000Z",
      "decisionContextSnapshot": null,
      "id": "plan-uuid-2",
      "itemCount": 8,
      "organizationId": "org-uuid-1",
      "status": "VALIDATED",
      "updatedAt": "2026-04-20T09:00:00.000Z"
    }
  ],
  "limit": 100,
  "offset": 0,
  "total": 2
}

Authorizations

Authorization
string
header
required

Static internal-ops token used by the data platform and internal cron jobs (e.g. zombie-run sweep). Validated via requireBearerToken inside the handler against a service-specific environment variable.

Path Parameters

type
string
required

Plan type path segment (RESTOCK, REBALANCE, MARKDOWN, SUPPLIER_RETURN, SUPPLIER_EXCHANGE)

Minimum string length: 1

Query Parameters

organizationId
string
required

UUID of the organization whose plans are listed

Minimum string length: 1
status
string

Filter by plan lifecycle status (e.g. DRAFT, VALIDATED, SENT)

decidedAfter
string<date-time>

ISO 8601 lower bound (inclusive) for the plan's decidedAt timestamp

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
decidedBefore
string<date-time>

ISO 8601 upper bound (inclusive) for the plan's decidedAt timestamp

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
limit
integer
default:100

Maximum number of plans to return (default: 100, max: 500)

Required range: 1 <= x <= 500
offset
integer
default:0

Number of plans to skip for pagination (default: 0)

Required range: 0 <= x <= 9007199254740991

Response

Successful response

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