Skip to content

Person

A Person is someone you keep data about: a customer, the author of a Review or Rating, a member of an Organization, or the person behind a UserAccount. Every UserAccount has one, created when the user first signs in.

Its personal fields (the name fields, email, telephone, address, birthDate, jobTitle, worksFor) are encrypted at rest and never appear in list results, events or webhooks: read them by id, or find a person with an exact lookup, GET /persons?email= or ?telephone=. The demographics are derived from them on every write and stay after an erasure, for marketing analysis: birth year, region, city, postal area, gender, languages.

POST /persons/{id}/erasure erases a person: their personal fields read as null in every version, and their UserAccount is disabled. What Orders need to show their customer stays readable to the accounting role for the retention period you set. See Personal data and erasure.

Modeled on schema.org/Person · JSON Schema · ABAC object type Person

Example

Create one with POST /persons:

{
  "givenName": "Ana",
  "familyName": "Pop",
  "email": "ana.pop@example.com",
  "telephone": "+4930123456",
  "birthDate": "1990-04-01",
  "address": {
    "streetAddress": "Invalidenstr. 1",
    "postalCode": "10115",
    "addressLocality": "Berlin",
    "addressCountry": "DE"
  },
  "knowsLanguage": [
    "ro",
    "de"
  ],
  "tags": []
}

Fields

Field Type Required Description
id string The object's id. Assigned by ObjectsGrid when the object is created.
at_context https://schema.org JSON-LD @context, always https://schema.org.
at_type Person JSON-LD @type, the object's type name.
at_id URL The object's ObjectsGrid URL, https://apis.objectsgrid.com/<path>/<id>, its JSON-LD @id: what References to it hold. Assigned by ObjectsGrid.
identifier string The object's id, as Schema.org identifier. Assigned by ObjectsGrid.
url URL The object's own URL, https://apis.objectsgrid.com/<path>/<id>. Assigned by ObjectsGrid.
name string The person's full name, as they want to be addressed. Personal: an order field.
givenName string Given name. Personal: an order field.
familyName string Family name. Personal: an order field.
additionalName string An additional name, such as a middle name. Personal: an order field.
email email Email address. Personal: an order field. Exact lookups: GET /persons?email=
telephone string Telephone number, in E.164 form (+4930123456). Personal: an order field. Exact lookups: GET /persons?telephone=
address PostalAddress Postal address. Personal: an order field. Its country, region, city and postal area are kept, anonymised, in demographics.
birthDate date Date of birth. Personal. Its year is kept, anonymised, in demographics.
jobTitle string Job title. Personal: at a small company it identifies its holder.
worksFor list of References to Organization URLs of the Organizations the person works for. Personal: at a small company they identify the person.
roles computed: list of EmployeeRole The Person's roles at businesses. ObjectsGrid's own field. Computed, read-only: the objects whose EmployeeRole.employee points to this object, listed from that type; never stored or written.
gender string Gender, as the person states it, e.g. Female, Male or free text.
knowsLanguage list of string Languages the person knows, as BCP 47 language codes (en, de-AT).
memberOf list of References to MemberProgramTier or Organization URLs of the programmes and tiers (schema.org MemberProgramTier) or Organizations the person is a member of, e.g. a loyalty tier.
demographics object Anonymous fields derived from the personal ones on every write, kept after erasure for marketing analysis. Assigned by the server. Marketing reports hide any group smaller than 10 people.
demographics.birthYear integer Year of birth; 90 and over is the year 90 years before this one
demographics.addressCountry string Country of the address, ISO 3166-1 alpha-2
demographics.addressRegion string Region or state of the address
demographics.addressLocality string City of the address
demographics.postalCodePrefix string Postal area only: the UK outward code, 3 digits in the US, 2 in Germany, France and the Netherlands; none elsewhere
demographics.gender string As in gender
demographics.knowsLanguage list of string As in knowsLanguage
demographics.loyaltyTiers list of References to MemberProgramTier The MemberProgramTiers of memberOf
demographics.customerSince string Year and month the Person was created, YYYY-MM
erasedAt date-time When the person was erased (GDPR Art. 17): the personal fields are then null in every version, and only accounting may still read the order fields of versions Orders point to. Assigned by the server.
meta ObjectMeta Read-only metadata: version, type, creation and last update.
tags list of Tag Tags your ABAC policy decides on. Created empty when not sent, kept by a PUT that leaves them out, cleared by null or [].

REST API

Base URL https://apis.objectsgrid.com. Every request sends the X-ObjectsGrid-AccessPoint and Authorization: Bearer <access token> headers; see the REST API guide.

Operation Request
Create POST /persons
List and search GET /persons
Create up to 100 at once POST /persons/batch
Retrieve GET /persons/{id}
Replace PUT /persons/{id}
Update some fields PATCH /persons/{id}
Delete DELETE /persons/{id}

Person objects have no JSON-LD document: asked for one (Accept: application/ld+json), GET answers 406.

The OpenAPI contract, with every parameter and response: Persons (JSON).

GraphQL

Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.

Operation Field
Query person(id: ID!, version: String): Person
Query personsByEmail(email: String!): [Person!]!
Query persons(where: PersonWhereInput, orderBy: [PersonOrderByInput!], first: Int, after: String): PersonConnection!
Query personsGroupBy(by: [PersonGroupByField!]!, where: PersonWhereInput, having: PersonHavingInput, orderBy: [PersonGroupByOrderByInput!], first: Int, after: String): PersonGroupByConnection!
Mutation createPerson(input: CreatePersonInput!): Person!
Mutation updatePerson(input: UpdatePersonInput!, expectedVersion: String): Person!
Mutation deletePerson(id: ID!, expectedVersion: String): Boolean!
Mutation erasePerson(id: ID!): String!

Webhook events

Subscribe to these events in your webhook configuration to be called when a Person changes:

PersonCreated, PersonUpdated, PersonPatched, PersonDeleted.