Skip to main content
A service is something your company offers, for example “Airport Transfer”. It has a title, a description, tags, images and a display order. Services appear on your company profile. Read Connect API conventions first. It explains the base URL, authentication, Idempotency-Key, If-Match, pending operations and the error format. This page uses $CONNECT_API_BASE_URL for the base URL. Ask GRiDD support (support@grdd.net) for the Connect API base URL for your environment.

What is available

The Service routes are implemented as owner routes (your own company) and as authenticated reads of another company’s published services. The Connect API README names only Fleets and Vehicles as complete production implementations, and says not to infer completeness for other content types. This page describes the route contracts in the source and does not claim more.

Endpoints

Owner routes

These routes act on the company in your token. {serviceId} is the numeric service ID.

Read another company’s published services

These routes return a reduced record (id, slug, title, description, icon, imageUrl, tags, displayOrder, locale, resolvedLocale, updatedAt, and on the detail route extraImageUrls). They return only active services. public services are always returned. gnet services are returned to any signed-in caller. partners services are returned only if core confirms that you are a partner of the company. private and unlisted services are not returned. The list route takes the query locale (default en), cursor and limit (1 to 100, default 50). The response has items, nextCursor, and can have meta and lockedCount. If lockedCount is present, the company’s plan limits the published services that a viewer can see, and items holds only the first service.

Not for external use

These routes need the Service credential of the public website renderer or an administrator role. Do not call them.
  • GET /api/services/catalog
  • GET /api/services/published-index
  • GET /api/services/published/{griddid} and GET /api/services/published/{griddid}/{slug}
  • GET /api/services/system/{griddid} (administrators)

Authentication and access

  • Send Authorization: Bearer YOUR_ACCESS_TOKEN. See Authentication.
  • Role. Create, update, delete, reorder and tag-catalog replace need a token with the role ADMIN, MANAGER or VENDOR. Otherwise the API returns 403 forbidden. Reads need no role.
  • Subscription. The service write path in source has no subscription check. The subscription contract sets no limit for services.

Service fields

Read record

Write body

Service write bodies are flat. They have no wrapper object. They are strict: unknown keys, such as id, griddid or version, return 400 invalid_request. Create (POST /api/services): Update (PATCH /api/services/{serviceId}): the same fields, all optional, but at least one field is required. title, status and visibility are optional. locale is optional, and contentLanguage must be update_version or add_version. Send If-Match and Idempotency-Key. Delete (DELETE /api/services/{serviceId}): send If-Match. Optional query locale and languageVersion. Reorder (POST /api/services/reorderings): The response has items (the updated services), operationId, status and effects. Replace the tag catalog (PUT /api/services/tag-catalog): body { "customTags": [{ "value": "airport", "label": "Airport" }] }. At most 1000 tags. value is trimmed, lower-cased, 1 to 50 characters, and unique. label is 1 to 50 characters. Send If-Match with the catalog version from the last GET, and Idempotency-Key.

Create a service

201 Created with the header ETag: "v1". The data object is built from the fixture service-record.json:
The mutation response has data, tagCanonicalization, operationId, status and effects.
  • status is completed, pending or partial. A create or update returns 201 or 200 if completed, and 202 otherwise.
  • tagCanonicalization.status is not_needed, completed or skipped. A skipped result has a reason.
  • effects[].name is one of owner_read_model, owner_cache, document_edges, profile_facts, feed_projection, worker_event, published_projection, published_index.
The repository has no create-response fixture for services. The values of operationId and effects above are examples that follow the contract.

Read services

The query parameters are locale (default en), cursor, limit (1 to 100, default 50) and force (true or false). Use the nextCursor of one response as the cursor of the next request. nextCursor: null means the last page. The response is the fixture service-list.json:
GET /api/services/42 returns one service and an ETag. A service that does not exist for your company returns 404 not_found.

Update a service

The response is 200 (or 202 if not completed) with the mutation response shape and a new ETag. A stale If-Match returns 412 version_conflict.

Delete a service

204 No Content when the delete is complete. Otherwise the response is 202, with operationId, status (pending or partial) and effects, and no data. Resume it with POST /api/services/operations/{operationId}. The resume route returns 200 when the status is completed, and 202 otherwise.

Errors

Error bodies use the problem format. These codes come from the service routes.