Skip to main content
This page defines the conventions Commenda uses for new and updated Partner API endpoints. Some older endpoints may still differ while the API is being migrated. When a reference page conflicts with this page, the endpoint reference describes the current deployed behavior. Treat this page as the standard we are converging on.

Resource names

Use the public Partner API vocabulary consistently. Commenda may still use different internal names. Public Partner API paths, schemas, docs, and examples should use only the public names above.

ID types

Use stable ID types by resource family. Do not stringify numeric IDs. If a person id is returned as 12, requests that reference that person should also send 12, not "12". Do not expose internal implementation ids such as serviceRequestId, corporationId, or internal companyId in Partner API contracts. Rename them at the API boundary.

ID field names

Use id as the primary identifier inside a resource object.
Use {resourceName}Id when an object references a different resource or when the id appears outside its resource object.
Avoid returning duplicate names for the same value in the same object. For example, do not return both id and incorporationId on the incorporation object when they are identical. The object should use id; paths and foreign references should use incorporationId.

Polymorphic references

Avoid generic polymorphic references when the possible resources are known. Prefer this:
or this:
Avoid this for new endpoints:
If a generic reference is unavoidable, the id must preserve its native JSON type and the schema must describe each allowed shape with oneOf.

Paths and path parameters

Path segments use kebab-case for multi-word collection names.
Path parameters use camelCase and end in Id. Use nested paths only when the parent is needed for authorization, scoping, or disambiguation. The path should reflect the ownership model partners need to understand:

JSON field casing

JSON property names use camelCase.
Do not use snake_case JSON property names in Partner API request or response bodies.

Enum and machine value casing

Commenda-defined enum values use SCREAMING_SNAKE_CASE.
Exceptions are allowed only for values that are externally standardized or legally meaningful codes, such as ISO country codes, jurisdiction codes, and third-party registration identifiers.

Response wrappers

Responses are wrapped by resource name. Single-resource responses:
List responses:
Mutation responses that also return derived state should keep the primary resource first, then derived objects.
Avoid bare primitive responses such as { "id": 12 } or { "customerId": 77 }. Wrap them as { "person": { "id": 12 } } or { "customer": { "id": 77 } }. Create endpoints may return adjacent data needed for the next step, but the page must say what is included and whether clients need another GET before continuing.

Validation naming

Use incorporationValidation for validation that evaluates the full incorporation state. Do not put full-incorporation validation under intakeState.validation; intake is only one part of the incorporation. Validation issues should include: Validation should dedupe issues by the field a partner must fix. If one missing file satisfies both a director and shareholder role, return one actionable issue rather than one issue per role.

Files and documents

A file stores bytes and returns a reusable fileId. A document is a typed attachment or requirement-specific use of a file. Uploading a file should not require document metadata, person metadata, or business-entity metadata. Attach endpoints should layer that meaning onto the file.

Error shape

Partner API errors use one consistent shape.
Use HTTP status codes consistently: When an endpoint returns validation details, include the same incorporationValidation shape used by successful write responses.

Backward-compatibility not a requirement

Since this application doesn’t have any customers yet, you can just clean things up without worrying about backwards-compatibility.