Skip to content

MerchantReturnPolicy

A MerchantReturnPolicy states a shop's return terms: in which country, within how many days, by which method, who pays the return and how the customer is refunded. A shop defines it once and points to it: Organization hasMerchantReturnPolicy for everything it sells, and an Offer's or Product's own hasMerchantReturnPolicy where it differs. Apps take an Offer's policy first, then its Product's, then the seller's. A JSON-LD document of an Offer, Product or Organization embeds the policies it names.

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

Example

Create one with POST /merchantreturnpolicies:

{
  "name": [
    {
      "at_language": "en",
      "at_value": "30-day free returns"
    }
  ],
  "applicableCountry": "DE",
  "returnPolicyCategory": [
    "https://schema.org/MerchantReturnFiniteReturnWindow"
  ],
  "merchantReturnDays": 30,
  "returnMethod": [
    "https://schema.org/ReturnByMail"
  ],
  "returnFees": [
    "https://schema.org/FreeReturn"
  ],
  "refundType": [
    "https://schema.org/FullRefund"
  ],
  "inStoreReturnsOffered": true,
  "merchantReturnLink": "https://shop.example.com/returns"
}

Fields

Required: name.

Field Type Required Description
at_context https://schema.org JSON-LD @context, always https://schema.org.
at_type MerchantReturnPolicy 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 Merchant Return Policy Name. See schema.org/name.
description list of LanguageTaggedString The Merchant Return Policy Description. See schema.org/description.
applicableCountry string The Merchant Return Policy applicable country
inStoreReturnsOffered boolean Whether in-store return is offered
itemCondition list of OfferItemCondition The item condition for the return policy
merchantReturnDays integer The number of days the merchant accepts returns
refundType list of RefundTypeEnumeration The type of refund offered by the merchant
returnPolicyCategory list of MerchantReturnEnumeration Whether returns are accepted, and for how long
returnMethod list of ReturnMethodEnumeration The method of return
returnFees list of ReturnFeesEnumeration The fees associated with the return
merchantReturnLink URL The page with the full return policy
returnShippingFeesAmount MonetaryAmount What the customer pays to send an item back
restockingFee MonetaryAmount A fee kept from the refund
validForMemberTier list of References to MemberProgramTier The loyalty tiers the policy 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 /merchantreturnpolicies
List and search GET /merchantreturnpolicies
Create up to 100 at once POST /merchantreturnpolicies/batch
Retrieve GET /merchantreturnpolicies/{id}
Replace PUT /merchantreturnpolicies/{id}
Update some fields PATCH /merchantreturnpolicies/{id}
Delete DELETE /merchantreturnpolicies/{id}

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

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

GraphQL

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

Operation Field
Query merchantReturnPolicy(id: ID!, version: String): MerchantReturnPolicy
Query merchantReturnPolicies(where: MerchantReturnPolicyWhereInput, orderBy: [MerchantReturnPolicyOrderByInput!], first: Int, after: String): MerchantReturnPolicyConnection!
Query merchantReturnPoliciesGroupBy(by: [MerchantReturnPolicyGroupByField!]!, where: MerchantReturnPolicyWhereInput, having: MerchantReturnPolicyHavingInput, orderBy: [MerchantReturnPolicyGroupByOrderByInput!], first: Int, after: String): MerchantReturnPolicyGroupByConnection!
Mutation createMerchantReturnPolicy(input: CreateMerchantReturnPolicyInput!): MerchantReturnPolicy!
Mutation updateMerchantReturnPolicy(input: UpdateMerchantReturnPolicyInput!, expectedVersion: String): MerchantReturnPolicy!
Mutation deleteMerchantReturnPolicy(id: ID!, expectedVersion: String): Boolean!

Webhook events

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

MerchantReturnPolicyCreated, MerchantReturnPolicyUpdated, MerchantReturnPolicyPatched, MerchantReturnPolicyDeleted.