Generate a new API credential for yourself
const url = 'https://api-omni-vendors.linra.net/api/v1/credentials';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"capabilities":"Offers, Cost"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-omni-vendors.linra.net/api/v1/credentials \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "capabilities": "Offers, Cost" }'Generates a new capability-scoped credential for your vendor in the environment named by the
required X-Linra-Environment header. The secret is returned once and never again. The
requested capabilities may never exceed the UNION of what your OTHER active credentials
already hold (across every environment) — a superset request is rejected
(403 FORBIDDEN_CAPABILITY_NOT_GRANTED_TO_VENDOR); if you have zero active credentials
anywhere, this is rejected too (422 BUSINESS_VENDOR_FIRST_CREDENTIAL_REQUIRES_ONBOARDING) —
your very first credential is always issued by Linra during onboarding. Requires the Account
capability.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Deliberately carries ONLY capabilities — the target vendor is always you (SCOPE-01), and the union-cap enforcement (VENDOR-04) is always on for this door.
object
A comma-separated combination of one or more granted capabilities: Offers, Stock, Cost,
Orders, Account. Account gates the Profile-update and Credentials-write endpoints on
this document; the other four gate the commercial (Offers/Cost/Stock/Orders/Webhooks)
endpoints as documented on each operation.
Example
Offers, CostResponses
Section titled “Responses”The created credential, with its one-time secret.
object
object
object
Shown EXACTLY ONCE — no other read ever returns it.
A comma-separated combination of one or more granted capabilities: Offers, Stock, Cost,
Orders, Account. Account gates the Profile-update and Credentials-write endpoints on
this document; the other four gate the commercial (Offers/Cost/Stock/Orders/Webhooks)
endpoints as documented on each operation.
Example
{ "state": "SUCCESS", "payload": { "environment": "Production", "capabilities": "Offers, Cost" }}Request validation failed.
object
object
Example
{ "state": "NOT_FOUND_VENDOR_OFFER"}Missing the Account capability, or the requested capabilities exceed the union already authorized for your vendor.
object
object
Examples
{ "state": "FORBIDDEN_CAPABILITY_NOT_GRANTED", "payload": null, "details": { "requiredCapability": "Account" }}{ "state": "FORBIDDEN_CAPABILITY_NOT_GRANTED_TO_VENDOR", "payload": null, "details": {}}You have zero active credentials in any environment — your first credential must come from Linra onboarding.
object
object
Examples
{ "state": "BUSINESS_VENDOR_FIRST_CREDENTIAL_REQUIRES_ONBOARDING", "payload": null, "details": {}}Too many requests. Retry after the Retry-After header (seconds).
object
object
Example
{ "state": "NOT_FOUND_VENDOR_OFFER"}Headers
Section titled “Headers”Seconds to wait before retrying.

