Skip to main content

Partner Impersonation API

A vendor platform (VP) company is a company with company type VP. 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.
The token that core issues is a full MANAGER token for the client company. It is not limited to a scope, and its claims do not identify the VP user who asked for it. Store it as carefully as a client password. Ask for it only when you must act for that client.

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:
  1. Your company is active.
  2. Your company type is VP.
  3. The client company is active.
  4. The client company type is CO or IO. A VP company cannot be a target.
  5. 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.
  6. The shared vendor platform is not api.
Any signed-in user of a VP company that meets these rules can use the route. Core does not require a specific role. If a rule fails, core returns the same 403 response for every cause. The response does not tell you whether the client company exists or is inactive.

Platform administrators

GRiDD platform administrators (role ADMIN) 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

Get your access token with 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 an ADMIN caller, 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 MANAGER for 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 as Authorization: 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.

Error responses