---
title: "Give posts without a date the date read from their link"
method: POST
path: "/api/admin/posts-without-date/apply"
tags: ["Seasons"]
---

# Give posts without a date the date read from their link

`POST /api/admin/posts-without-date/apply`

## Request

- Base URL: `https://api.sponsorunited.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sponsorunited.com/api/admin/posts-without-date/apply`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sponsorunited/apis/sponsorunited-api/docs/api/admin/posts-without-date/apply/post.ts> (a function with typed inputs; its response is checked against the schema)

For each given post that still has a zero date, writes the publication date read from its link to its issued_at, retained_at and social detail. Posts whose link carries no date are reported as not recoverable; posts that already have a real date are left out. Each change is written to the activity log. Requires the permission to edit leagues.

## Request body

- ApplyPostDatesRequest
  - `item_value_ids` integer[], required: The posts (item_values.id) to give the date read from their link. Posts that already have a real date are left out.

## Response `200`

The posts that got a date and those whose link carries none.

- object
  - `recovered` integer[]
  - `not_recoverable` integer[]

## Other responses

- `401`: Unauthenticated
- `403`: Forbidden
- `422`: Validation error

---

[API](https://skmtc.dev/sponsorunited/apis/sponsorunited-api.md) - [All operations](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/revisions/cbf1ca5bff8f?raw)
