Partner Impersonation API
A vendor platform (VP) company is a company with company typeVP. Its
client companies are operator companies (company type CO or IO) that use the
same vendor platform.
With POST /api/token/imp, a signed-in user of a VP company gets a core
access token for one of its client companies. You do not need the client’s
password. Core decides from the company records that it stores.
Rules
Core issues the token only when all of these conditions are true. Core reads each value from its stored company records, not from your request:- Your company is active.
- Your company type is
VP. - The client company is active.
- The client company type is
COorIO. AVPcompany cannot be a target. - Both companies have a vendor platform value, and the two values are the same. Core ignores letter case and spaces at the start and end.
- The shared vendor platform is not
api.
403 response for every cause. The
response does not tell you whether the client company exists or is inactive.
Platform administrators
GRiDD platform administrators (roleADMIN) are handled separately. For an
ADMIN caller, core does not apply the vendor-platform rules above. It requires
only that the target company exists and is active. This path is for GRiDD
staff, not for integrators.
Endpoint
POST https://core.grdd.net/api/token/imp
Headers
POST /api/token as a user
of your VP company.
Request body
Core ignores other fields in the body.
Success response (200)
What the token is
- The token belongs to a service username for the client company, not to a
person. For a VP caller, the username is
<griddid>_drew_transpoapp, where<griddid>is the client GNET ID in lowercase. For anADMINcaller, it is<griddid>_support, using the target ID’s supplied casing in the current implementation. - The username has no password and no user record of its own.
- The role is always
MANAGERfor the client company. - The response does not contain a legacy token.
- Each call issues a new token. A new call does not revoke tokens that core issued before.
Use the token
Send the token on core routes asAuthorization: Bearer <token>. Core then acts
as a MANAGER of the client company.
To verify the token with
GET /api/token,
send it in the token header. In source, the Authorization: Bearer form of
GET /api/token requires an enabled user record, and the service username has
none. That form rejects the token with 401.