Update a fact
POST/v2/matches/{matchId}/facts/{factId}
POST
/v2/matches/{matchId}/facts/{factId}
const url = 'https://api.ligr.live/rest/v2/matches/1/facts/1';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","teamId":1,"playerId":1,"clockAtDate":"example","date":"example","data":"example","tags":["example"],"meta":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ligr.live/rest/v2/matches/1/facts/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "teamId": 1, "playerId": 1, "clockAtDate": "example", "date": "example", "data": "example", "tags": [ "example" ], "meta": "example" }'Update an existing fact for a match.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”matchId
required
Entity identifier
integer format: int32
The match identifier
factId
required
Entity identifier
integer format: int32
The fact identifier
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
teamId
integer format: int32
playerId
integer format: int32
clockAtDate
Format mm:ss
string
date
string
data
Sport-specific detail of the event. Replaces the stored value. Send null to clear it.
tags
Array<string>
meta
Free-form metadata that travels with the fact. Replaces the stored value. Send null to clear it.
Examplegenerated
{ "name": "example", "teamId": 1, "playerId": 1, "clockAtDate": "example", "date": "example", "data": "example", "tags": [ "example" ], "meta": "example"}Responses
Section titled “Responses”Ok
Media typeapplication/json
object
id
required
Entity identifier
integer format: int32
matchId
required
Entity identifier
integer format: int32
name
required
string
periodNumber
required
number format: double
createdAt
required
string
Examplegenerated
{ "id": 1, "matchId": 1, "name": "example", "periodNumber": 1, "createdAt": "example"}Request is invalid
Media typeapplication/json
object
message
required
string
details
required
object
key
additional properties
Examplegenerated
{ "message": "example", "details": { "additionalProperty": "example" }}Missing or invalid api key
Media typeapplication/json
object
message
required
string
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
Media typeapplication/json
object
message
required
string
Examplegenerated
{ "message": "example"}Match or fact not found
Media typeapplication/json
object
message
required
string
Examplegenerated
{ "message": "example"}Api key has made too many requests
Media typeapplication/json
object
message
required
string
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
Media typeapplication/json
object
message
required
string
Examplegenerated
{ "message": "example"}