Region Data Commodity RPC Data - Implan-Group/api GitHub Wiki

Economic Commodity RPC Data


🖽 The Commodity RPC Data Object

Property Type Details
isCustomized bool Whether or not this is a RegionCustomization.
commodityRpcEconomicData array A list of Commodity RPC Economic Data objects.

🖽 The Commodity RPC Economic Data Object

Property Type Details
commodityId int
commodityDescription str
totalCommoditySupply float
totalGrossCommodityDemand float
localUseOfLocalSupply float
localUseRatio float
averageRpc float
foreignExport float
foreignImport float
isModifiable bool

🖽 The Customized Commodity RPC Economic Data Object

Property Type Details
modelName str The name/description for the customized industry.
hashId query str❔ The HashId of the Region to filter by.
urid query int❔ The Urid of the Region to filter by.
userModelId query int❔ The UserModelId of the Region to filter by.
commodityRpcEconomicData array An array of Commodity RPC Economic Data objects.

GET /api/v1/region/EconomicCommodityRPCData/{aggregationSchemeId}

This endpoint returns region specific average commodity RPC data to use as a starting place for making RPC customizations.

Parameter Spec Type Details
aggregationSchemeId route int The Aggregation Scheme to filter by.
hashId query str❔ The HashId of the Region to filter by.
urid query int❔ The Urid of the Region to filter by.
userModelId query int❔ The UserModelId of the Region to filter by.

🧾Example

📤 Request

GET /api/v1/region/EconomicCommodityRPCData/1?hashId=yDxXX13pxJ

📥 Response

{
    "isCustomized": false,
    "commodityRpcEconomicData": [
        {
            "commodityId": 63,
            "commodityDescription": "3001 - Oilseeds",
            "totalCommoditySupply": 16267298.991451077,
            "totalGrossCommodityDemand": 115032634.26051551,
            "localUseOfLocalSupply": 1190551.75079787,
            "localUseRatio": 0.0731868118624693,
            "averageRpc": 0.0103496869253783,
            "foreignExport": 6320013.29178982,
            "foreignImport": 3818656.78860964,
            "isModifiable": true
        },
    ]
]

POST /api/v1/region/build/CustomizeAverageRPC/{aggregationSchemeId}

This endpoint initiates a new model build that incorporates user provided average commodity RPC customizations. Only the commodity RPCs being customized need to be provided in the request body customization array. All fields must be provided for each customization.

Parameter Spec Type Details
aggregationSchemeId route int The Aggregation Scheme to filter by.
body body str A list of Customized Commodity RPC Economic Data objects.

🧾Example

📤 Request

POST /api/v1/region/build/CustomizeAverageRPC/1

{
	"modelName": "Customized RPC Model Name",
    "urid": 2177236,
    "userModelId": null,
    "hashId": null,
    "customizedAverageCommodityRpcData": [
        {
            "commodityId": 1692,
            "totalCommoditySupply": 900295642.7288595,
            "totalGrossCommodityDemand": 1211386790.0792594,
            "localUseOfLocalSupply": 558183298.491892,
            "localUseRatio": 0.620000000000000,
            "averageRpc": 0.460780407268080,
            "foreignExport": 321401686.28834397,
            "foreignImport": 37396301.58874131
        }
    ]
}

📥 Response

⚠️ **GitHub.com Fallback** ⚠️