Skip to Content
CerebrumDocs
GuidesAPI referenceTrust & security

CRA Org Set Up in Cerebrum's System

✅ [orgName] CRA – This is the parent-level account. No orders will be placed through this account; however, all CRA employees with access to our system will be linked to it. This setup enables your employees to view all orders and invitations across your CRA organization in one centralized location.
✅ [orgName] – This is the organization where orders are issued and stored. Invites will be sent from this account, and all order details will be maintained here.

This two-account structure gives you flexibility:

  • It enables CRA employees to access all necessary information associated with the CRA account.
  • It supports testing accounts or separating client organizations when needed, without affecting your main order workflow.

How the API represents these organizations

Every organization has its own id (a UUID). Organizations are connected by relationships. Each relationship has its own relationId, a type, a primary organization and an affiliate organization.

Relationship typePrimary organizationAffiliate organizationMeaning
CRAThe CRAThe organization it servicesThe CRA services this organization
PARENTThe parent organizationA direct childThe child belongs to the parent

A relationId identifies the relationship, not an organization. Use affiliate.id (or organization.id in a creation response) when a request needs an organization ID.

Worked example

This example uses three organizations:

OrganizationExample IDRole
Example Screening CRA5d7c2a8e-3f41-4b6a-9e2d-1c8f0a7b6e10The CRA
Northwind Staffinga3f1c9d2-6b4e-4c8a-b7e5-2d9f0e1a3c47A client the CRA services
Northwind Staffing Westc8e2b4f6-1a3d-4e5b-9c7a-0f2d4b6e8a19A direct child of Northwind Staffing

1. Create a client of the CRA

Send Create Affiliate to the CRA's organization ID. type defaults to CRA.

POST /v1/organizations/5d7c2a8e-3f41-4b6a-9e2d-1c8f0a7b6e10/affiliates
apikey: $CEREBRUM_API_KEY
Content-Type: application/json

{"organization": {"name": "Northwind Staffing", "shortName": "northwind-staffing"}}

The response contains the new organization, the relationId of the CRA relationship, type: "CRA" and primaryOrganizationId (the CRA). Store organization.id as the client's organization ID.

2. Create a child of the client

Send Create Affiliate to the client's organization ID with type: "PARENT":

POST /v1/organizations/a3f1c9d2-6b4e-4c8a-b7e5-2d9f0e1a3c47/affiliates
apikey: $CEREBRUM_API_KEY
Content-Type: application/json

{"type": "PARENT", "organization": {"name": "Northwind Staffing West", "shortName": "northwind-staffing-west"}}

In one transaction, Cerebrum creates the child, a PARENT relationship from the client to the child, and a CRA relationship from the client's servicing CRA to the child. The response's relationId is the PARENT relationship.

The parent must be serviced by exactly one CRA. If it has no servicing CRA, or more than one, the request fails with 400 and the message Parent must have exactly one servicing CRA, and nothing is created. A shortName that is already in use fails with 409.

3. List relationships

List Affiliates returns the direct relationships in which the path organization is the primary organization:

  • GET /v1/organizations/{CRA id}/affiliates lists the organizations the CRA services. type=CRA is the default. In this example it returns both Northwind Staffing and Northwind Staffing West.
  • GET /v1/organizations/{client id}/affiliates?type=PARENT lists the client's direct children. It does not include children of children.

Results are ordered by organization name. The default page size is 20 and the maximum is 30. Use links.next to fetch the next page.

Which organization ID goes where

RequestOrganization ID to send
Create Affiliate, List AffiliatesThe primary organization in the path: the CRA for CRA relationships, the parent for PARENT relationships
Get a direct child of an authorized parent organizationThe parent in the path and the child as childId
Grant package accessThe organization receiving access, as organizationId in the body. See CRA Package Access.
Create vID InviteOptional organizationId: the organization that will own the invite. When omitted, the package owner owns the invite.

Creating an affiliate requires an organization administrator, CRA administrator, integration administrator or processor role in the primary organization; otherwise the request fails with 403. Listing affiliates also allows a limited processor. These guides describe relationships only. Do not assume that relationships grant other permissions, propagate deactivation or route webhooks unless that behavior is documented for the feature you use.

On this page