POST
Grant accounting access
Organization space User accounts only For: Administrator · Permission: access_grants.create Conditions
  • Only members can use it, from the organization space; agent accounts cannot.
  • The actor must be an existing profile assignment (user_profile) or organization agent account.
  • targets must hold between 1 and 100 entries, with distinct identifiers.
  • Each target must be either the current organization itself or one of its companies; any other identifier is refused and the error names the target index.
  • A target already granted to the same actor in the same domain is refused, even if sent in a different call; no grant is created when any target is refused.
What else happens
  • The actor can read and use the accounting books of each granted target.
  • Grants are removed automatically when the actor’s profile assignment or the agent account is deleted.
Part of Limit access to locations and books.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, actor_type, actor_id, domain, target_type, target_id, created_at, updated_at.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .

Body

application/json
actor_type
enum<string>
required

Kind of actor receiving or losing access. Required: user_profile (a person's profile assignment in the organization) or organization_agent.

Available options:
user_profile,
organization_agent
domain
enum<string>
required

Domain of the grant. Required; only accounting exists today.

Available options:
accounting
targets
object[]
required

Targets of the grant. Required, from 1 to 100 entries, each an object with type and id and nothing else.

Required array length: 1 - 100 elements
actor_id
string

Identifier of the actor (27-character KSUID string). Required, and it must exist in the current organization.

Response

Resource (only with response=resource).

id

Identifier of the grant (27-character KSUID string).

actor_type

Kind of actor holding the grant: user_profile (a person's profile assignment in the organization) or organization_agent.

actor_id

Identifier of the actor holding the grant (27-character KSUID string).

domain

Domain the grant opens. Only accounting exists today.

target_type

Kind of target reached: organization (the organization's own books) or company.

target_id

Identifier of the target (27-character KSUID string): the organization identifier or a company identifier.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).