ServiceChannel¶
A ServiceChannel is a way to reach a Service: a website, a hotline, an SMS number, a postal address or an office Place, with its languages and processing time. One channel can serve several services.
Modeled on schema.org/ServiceChannel · JSON Schema · ABAC object type ServiceChannel
Example¶
Create one with POST /servicechannels:
{
"name": [
{
"at_language": "en",
"at_value": "Repair hotline"
}
],
"availableLanguage": [
"en",
"de"
],
"processingTime": "P3D",
"serviceUrl": "https://northpeak.example/repairs",
"providesService": {
"at_id": "https://apis.objectsgrid.com/services/6f7a8b9c-0d1e-4f2a-b3c4-d5e6f7a8b9c0"
}
}
Fields¶
Required: name.
At least one of: serviceUrl, servicePhone, serviceSmsNumber, servicePostalAddress, serviceLocation.
| Field | Type | Required | Description |
|---|---|---|---|
at_context |
https://schema.org |
JSON-LD @context, always https://schema.org. |
|
at_type |
ServiceChannel |
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. |
|
id |
string | The object's id. Assigned by ObjectsGrid when the object is created. | |
identifier |
string | The object's id, as Schema.org identifier. Assigned by ObjectsGrid. |
|
name |
list of LanguageTaggedString | Yes | The ServiceChannel name, e.g. 'Online portal', 'Customer hotline' |
description |
list of LanguageTaggedString | The ServiceChannel description. See schema.org/description. | |
url |
URL | The object's own URL, https://apis.objectsgrid.com/<path>/<id>. Assigned by ObjectsGrid. |
|
availableLanguage |
list of string | Languages that may be used with this ServiceChannel, as IETF BCP 47 language codes, e.g. 'en', 'de-AT' | |
processingTime |
string | Estimated processing time for the Service using this ServiceChannel, as an ISO 8601 duration, e.g. 'P3D', 'PT2H' | |
providesService |
Reference to Service | URL of the Service provided by this ServiceChannel | |
serviceLocation |
Reference to Place | URL of the Place (e.g. civic structure, local business, etc.) where a person can go to access the Service | |
servicePhone |
ContactPoint | The phone number to use to access the Service | |
servicePostalAddress |
PostalAddress | The address for accessing the Service by mail | |
serviceSmsNumber |
ContactPoint | The number to access the Service by text message | |
serviceUrl |
URL | The website to access the Service | |
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 []. |
|
meta |
ObjectMeta | Read-only metadata: version, type, creation and last update. |
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 /servicechannels |
| List and search | GET /servicechannels |
| Create up to 100 at once | POST /servicechannels/batch |
| Retrieve | GET /servicechannels/{id} |
| Retrieve as a JSON-LD document for your pages | GET /servicechannels/{id} with Accept: application/ld+json; see JSON-LD for your pages |
| Replace | PUT /servicechannels/{id} |
| Update some fields | PATCH /servicechannels/{id} |
| Delete | DELETE /servicechannels/{id} |
The OpenAPI contract, with every parameter and response: ServiceChannels (JSON).
GraphQL¶
Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.
| Operation | Field |
|---|---|
| Query | serviceChannel(id: ID!, version: String): ServiceChannel |
| Query | serviceChannels(where: ServiceChannelWhereInput, orderBy: [ServiceChannelOrderByInput!], first: Int, after: String): ServiceChannelConnection! |
| Query | serviceChannelsGroupBy(by: [ServiceChannelGroupByField!]!, where: ServiceChannelWhereInput, having: ServiceChannelHavingInput, orderBy: [ServiceChannelGroupByOrderByInput!], first: Int, after: String): ServiceChannelGroupByConnection! |
| Mutation | createServiceChannel(input: CreateServiceChannelInput!): ServiceChannel! |
| Mutation | updateServiceChannel(input: UpdateServiceChannelInput!, expectedVersion: String): ServiceChannel! |
| Mutation | deleteServiceChannel(id: ID!, expectedVersion: String): Boolean! |
Webhook events¶
Subscribe to these events in your webhook configuration to be called when a ServiceChannel changes:
ServiceChannelCreated, ServiceChannelUpdated, ServiceChannelPatched, ServiceChannelDeleted.