1️⃣ The Competition Formats can be created or updated by using the following POST API Call:
/basketball/leagues/{leagueId}/competitions/format
The structure of the call will require the specific and distinctive League ID, this will allow to create or modify any aspects of the Competition Formats for this specific league. Those aspects will need to be described and input into the Body structure of the call.
2️⃣ When selecting multiple aspects to add in the body structure for the Competition Formats, or as in this case where the goal is just to add the Custom Efficiency Formula, it will always be required to add the Competition ID as a mandatory aspect in the Body Structure.
The following is an example of a formula that could be added in the Body structure:
(sPoints + sAssists + sBlocks + sSteals + sFoulsOn + sReboundsTotal) - (sTurnovers + sBlocksReceived + sFoulsPersonal + sFoulsTechnical + (sTwoPointersAttempted - sTwoPointersMade) + (sThreePointersAttempted - sThreePointersMade)). |
3️⃣ After knowing which Custom Efficiency Formula to use, this is how the body structure of the call should look like:
- Body Content:
{ "competitionId" : (add here the Competition ID Number), "customEfficiencyFormula": "(add here own efficiency formula)" }
- Example:
{ "competitionId": 0000, "customEfficienctFormula": "(sPoints+sAssists+sBlocks+sSteals+sFoulsOn+sReboundsTotal)-(sTurnovers+sBlocksReceived + sFoulsPersonal+sFoulsTechnical+(sTwoPointersAttempted-sTwoPointersMade)+(sThreePointersAttempted-sThreePointersMade))" }
After having all the data in place please feel free to send the call, this will provide us with your Custom Efficiency Formula for the players' Efficiency calculations.