esi-issues
esi-issues copied to clipboard
[Feature Request] Contract detail endpoint
A endpoint to get the details of a specific contract (by id). The data would be the data returned in /contracts/public/ plus a status (outstanding/accepted/completed) field, but only for a single contract.
Could also be implemented as something like /contracts/status/{contract_id} and only return outstanding/accepted/completed.
Use case
Checking on the status of a specific contract without querying the whole region. E.x. if I know all of a character's contracts and want to check if a certain one is still open.
Authentication
A public route, no auth required.
Could have authed routes for character and corporation contracts (following the current /contracts/ structure)
Example return
The region-wide contract data with a status field (could also be done via a date_accepted and/or date_completed field).
{
"collateral": 0,
"contract_id": 135093942,
"date_expired": "2018-08-27T03:58:02Z",
"date_issued": "2018-07-30T03:58:02Z",
"days_to_complete": 0,
"end_location_id": 60003760,
"issuer_corporation_id": 98419242,
"issuer_id": 94730499,
"price": 33000000,
"reward": 0,
"start_location_id": 60003760,
"title": "10 10 20",
"type": "item_exchange",
"volume": 0.01,
"status":"outstanding"
}
Checklist
Check all boxes that apply to this issue:
- [x] Feature request description is provided
- [x] Use case exists
- [x] Feature requires a new route
- [ ] Feature adds data to existing route
- [ ] Feature requires new auth scope
- [x] Feature can reuse existing scope
- [x] Feature does not require auth
- [ ] Meta feature, applies to all routes
There is a very fine line that is going to be walked with whether or not this is authed. Much like in game, if you are not apart of the contract, for non-public contracts atleast, then you cannot view a contract details window. The same will be observed on the api. So this really should be auth and/or return a 401 when the contract is not a public contract
Yeah, the intent was for public or previously public contracts.
Think this is a duplicate. re: #890
You know what, I knew I had seen something about contract details before. Thanks @Aidansavage.
Some of the Third Party Devs think that this deserves input from one of the ccp devs. We are going to reopen it and add in a GD Feedback tag and ping the following devs.
@a-tal @ccp-zoetrope @tsuthers-ccpgames
As I intended it, #890 is about a historical list, this is about getting the status of a specific contract. They could be implemented in the same way (a historical endpoint that contains status info), but are different issues.
Lolz, this is exactly the conversation that came up in Slack, hence reopening. Sorry for the premature closure.
Definitely join up on tweetfleet, (https://www.fuzzwork.co.uk/tweetfleet-slack-invites/ channels #esi, and #sso) as this part of dealing with contracts is fast becoming the next most desired thing to get from ESI. Unironically, public contracts in the first place was the previous most desired thing :P
(and less channel spam that saeka's going to yell at me for this post ;) )
Filled out the form, just waiting for it to get processed.
I'll take this forward to Game Design and let you know what they say.
There should also be a method to resolve contracts that have been completed more than 30 days ago as well.
Currently once a contract is over 30 days old and is no longer returned in the /contracts/ endpoint. There is no way to resolve the contract_id via ESI.
Since i can use the UI endpoint to open a contract in game given its ID, it should be possible to get the details of that contract back via ESI, much like this issue wants. However it would require authed endpoints to gain access to personal corp/char contracts.
@ccp-zoetrope how did it go?
Absence of contract completion status screws with data used by price prediction algorithm on mutaplasmid.space, see https://github.com/StephenSwat/eve-abyssal-market/issues/21
Given that ms.space price estimation is the only way to guess mutated module price (besides my personal heuristics), lack of this data sounds pretty critical to me.
I figured @ccp-zoetrope is not with ESI any longer https://twitter.com/CCP_Zoetrope/status/1068632520374276098
Pinging active maintanier - @tsuthers-ccpgames
+1 Please provide a call to check the status of a contract by ID.
Auction can already by checked by polling /contracts/public/bids/{contract_id}/ and this endpoint is only cached for 5mins which is nice. The same endpoint could be used to check all other types of contracts but it generates an error no matter if the contract is alive or not which makes it not very practical.
Thank you!
Having a way to do this would also be super helpful for the public contract endpoint. If one of those contracts is completed/accepted/expired/deleted it just vanishes from the list of returned contracts. There is currently no way to access the data related to a specific contract, such as when it was accepted and by whom or the ultimate outcome of the contract.