esi-issues icon indicating copy to clipboard operation
esi-issues copied to clipboard

Alliance level contracts endpoint

Open shdwpuppet opened this issue 5 years ago • 3 comments

Feature Request

Expanding the current contract endpoints to include "to alliance" contracts.

Use case

This would be primarily used by Alliance level industrialists or officers in charge of ensuring that doctrines are well stocked, but could be used by all people who regularly browse alliance contracts, and in SEAT/similar software to help track contracts assigned to the alliance without having to make multiple pulls based on every character.

As of right now, the only way to get all contracts assigned to an alliance is to have everyone who makes those contracts authed to a service that then pulls /character/character_id/contracts, filters them by the entity they are assigned to, and collated that way. This is a huge amount of API calls for a large alliance and is also unnecessarily invasive for people who don't want the entire contract history of the entire alliance being exposed.

Additionally, the bids and items endpoints would also be added for alliance contracts.

Alternatively, could change the existing /contracts/corporation endpoints to also accept an alliance ID as the assignee and return the data that way.

Authentication

The route would require auth to the same degree that corporation contracts do. In game, anyone in an alliance is already able to see a contract that is assigned to the alliance and accept it.

Example return

The return would be fundamentally identical to both the /character/contracts and corporation/contracts returns, just with an assignee ID that could also be an alliance ID.

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
  • [x] Feature requires new auth scope
  • [ ] Feature can reuse existing scope
  • [ ] Feature does not require auth
  • [ ] Meta feature, applies to all routes

shdwpuppet avatar Jul 09 '20 07:07 shdwpuppet

Asking for corporation contracts with any corp in the alliance will return alliance contracts

curl https://esi.evetech.net/v1/corporations/667531913/contracts/ results in this one among others

{
    "acceptor_id": 0,
    "assignee_id": 1354830081,
    "availability": "personal",
    "collateral": 0.0,
    "contract_id": REDACTED,
    "date_expired": REDACTED,
    "date_issued":REDACTED,
    "days_to_complete": 0,
    "end_location_id":REDACTED,
    "for_corporation": false,
    "issuer_corporation_id": REDACTED,
    "issuer_id": REDACTED,
    "price": REDACTED,
    "reward": 0.0,
    "start_location_id": REDACTED,
    "status": "outstanding",
    "title": REDACTED,
    "type": "item_exchange",
    "volume": REDACTED
}```

Lucius-Q-User avatar Jul 09 '20 08:07 Lucius-Q-User

This is still desperately needed for tool builders. A character should be able to see all contracts via the API that they can see in game. It's not reasonable to depend a corp officer grant roles to 3rd party programs just to see contracts. This is foundational, essential functionality for seeding tools.

Is ESI officially on life-support?

TkTech avatar Dec 12 '23 06:12 TkTech

Is ESI officially on life-support?

It is so much on life support, that they don't even announce that it is on life support.

But yes, I agree a n alliance contracts endpoint would be extremely useful.

recursivetree avatar Mar 10 '24 09:03 recursivetree