Skip to content

ShippingService

A ShippingService is a way a shop ships or hands over orders: delivery, pickup in store, a collection point (fulfillmentType), how long until the order leaves (handlingTime), and its conditions with their rates. The shop's Organization lists its services in hasShippingService, and an Offer's shippingDetails can name the one it ships with.

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

Example

Create one with POST /shippingservices:

{
  "name": [
    {
      "at_language": "en",
      "at_value": "Standard delivery"
    }
  ],
  "fulfillmentType": "https://schema.org/FulfillmentTypeDelivery",
  "handlingTime": {
    "minValue": 0,
    "maxValue": 1,
    "value": 1,
    "unitCode": "DAY"
  },
  "shippingConditions": [
    {
      "shippingDestination": [
        {
          "addressCountry": "DE"
        }
      ],
      "orderValue": {
        "currency": "EUR",
        "value": 0,
        "maxValue": 49.99
      },
      "shippingRate": {
        "currency": "EUR",
        "value": 4.9
      }
    },
    {
      "shippingDestination": [
        {
          "addressCountry": "DE"
        }
      ],
      "orderValue": {
        "currency": "EUR",
        "value": 50,
        "minValue": 50
      },
      "shippingRate": {
        "currency": "EUR",
        "value": 0
      }
    }
  ]
}

Fields

Required: name.

Field Type Required Description
at_context https://schema.org JSON-LD @context, always https://schema.org.
at_type ShippingService 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.
url URL The object's own URL, https://apis.objectsgrid.com/<path>/<id>. Assigned by ObjectsGrid.
name list of LanguageTaggedString Yes The service's name, e.g. Standard delivery
description list of LanguageTaggedString What the service is
fulfillmentType FulfillmentTypeEnumeration Delivery, pickup in store, a collection point, scheduled delivery
handlingTime QuantitativeValue How long until the order leaves, e.g. 0 to 1 days
shippingConditions list of ShippingConditions The conditions and their rates
validForMemberTier list of References to MemberProgramTier The loyalty tiers the service is for; everyone when not given
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 /shippingservices
List and search GET /shippingservices
Create up to 100 at once POST /shippingservices/batch
Retrieve GET /shippingservices/{id}
Replace PUT /shippingservices/{id}
Update some fields PATCH /shippingservices/{id}
Delete DELETE /shippingservices/{id}

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

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

GraphQL

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

Operation Field
Query shippingService(id: ID!, version: String): ShippingService
Query shippingServices(where: ShippingServiceWhereInput, orderBy: [ShippingServiceOrderByInput!], first: Int, after: String): ShippingServiceConnection!
Query shippingServicesGroupBy(by: [ShippingServiceGroupByField!]!, where: ShippingServiceWhereInput, having: ShippingServiceHavingInput, orderBy: [ShippingServiceGroupByOrderByInput!], first: Int, after: String): ShippingServiceGroupByConnection!
Mutation createShippingService(input: CreateShippingServiceInput!): ShippingService!
Mutation updateShippingService(input: UpdateShippingServiceInput!, expectedVersion: String): ShippingService!
Mutation deleteShippingService(id: ID!, expectedVersion: String): Boolean!

Webhook events

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

ShippingServiceCreated, ShippingServiceUpdated, ShippingServicePatched, ShippingServiceDeleted.