Skip to content

Generate a new API credential for yourself

POST
/api/v1/credentials
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.

Media typeapplication/json

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
capabilities
required

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.

string
Example
Offers, Cost

The created credential, with its one-time secret.

Media typeapplication/json
object
state
required
string
payload
required
details
object
payload
required
object
id
string format: uuid
environment
string
clientId
string
nullable
clientSecret

Shown EXACTLY ONCE — no other read ever returns it.

string
nullable
capabilities

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.

string
createdAt
string format: date-time
Example
{
"state": "SUCCESS",
"payload": {
"environment": "Production",
"capabilities": "Offers, Cost"
}
}

Request validation failed.

Media typeapplication/json
object
state
required
string
payload
details
object
Example
{
"state": "NOT_FOUND_VENDOR_OFFER"
}

Missing the Account capability, or the requested capabilities exceed the union already authorized for your vendor.

Media typeapplication/json
object
state
required
string
payload
details
object
Examples
{
"state": "FORBIDDEN_CAPABILITY_NOT_GRANTED",
"payload": null,
"details": {
"requiredCapability": "Account"
}
}

You have zero active credentials in any environment — your first credential must come from Linra onboarding.

Media typeapplication/json
object
state
required
string
payload
details
object
Examples
ExamplefirstCredential
{
"state": "BUSINESS_VENDOR_FIRST_CREDENTIAL_REQUIRES_ONBOARDING",
"payload": null,
"details": {}
}

Too many requests. Retry after the Retry-After header (seconds).

Media typeapplication/json
object
state
required
string
payload
details
object
Example
{
"state": "NOT_FOUND_VENDOR_OFFER"
}
Retry-After
integer

Seconds to wait before retrying.