Entities in Filevine are referenced by their unique identifiers. Most entities in the Filevine API use a compound key object composed of a native ID and a partner ID. For example, here is JSON referencing a project:
{
projectId: {
"native" : "{Filevine ID}"
"partner" : "{Partner ID}"
}
}The native ID houses a key assigned by Filevine when the entity is created and it cannot be set or edited via API. The partner ID can be assigned when the entity is created by including the compound key object with a partner component to the POST. Alternativevly, the partner ID can be assigned or edited later later using Update Partner Id.
Like any key in a relational database, the partner ID must be unique within its scope. For example, a note and a document may both have identical partner IDs, but two notes cannot have the same partner ID.
Partner IDs Main use:
- Partner IDs eliminate the need to store and reference Filevine's IDs. Instead, entities can be created, referenced and updated using pre-existing IDs.
NOTE: Attempting to create an entity using a nonunique partner ID will return the pre-existing entity rather than an error. This behavior can be exploited to effectively turn any Create call into aCreate OR Get call.