Ordergroove Offers API

Offers, incentives, discounts, and entitlements.

OpenAPI Specification

ordergroove-offers-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Ordergroove REST Customers Offers API
  description: 'The Ordergroove REST API operates an enterprise subscription and relationship-commerce program on top of a merchant''s eCommerce store. It is organized around a four-object data model - Customer, Subscription, Item, and Order - plus supporting resources for Products, Offers and Incentives, Payments, Addresses, and Entitlements. Two authentication scopes exist: an Application API scope for server-to-server calls using an x-api-key header (one of ten keys per store), and a Storefront API scope using an HMAC-SHA256-signed request scoped to a single customer. All traffic is HTTPS only. This document models the publicly documented REST surface at restapi.ordergroove.com; endpoint paths are drawn from the public API reference. Ordergroove is an enterprise platform sold through sales, so an account and API keys are required to call the API, but the reference is publicly readable.'
  version: '1.0'
  contact:
    name: Ordergroove Developer
    url: https://developer.ordergroove.com
servers:
- url: https://restapi.ordergroove.com
  description: Production
- url: https://staging.restapi.ordergroove.com
  description: Staging
security:
- apiKeyAuth: []
tags:
- name: Offers
  description: Offers, incentives, discounts, and entitlements.
paths:
  /offer_profiles/:
    get:
      operationId: listOfferProfiles
      tags:
      - Offers
      summary: List offer profiles
      description: Lists the offer profiles (incentive logic) that can be applied to recurring purchases.
      responses:
        '200':
          description: A list of offer profiles.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/OfferProfile'
  /otd/:
    get:
      operationId: listOneTimeDiscounts
      tags:
      - Offers
      summary: List one-time discounts
      responses:
        '200':
          description: A list of one-time discounts.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/OneTimeDiscount'
    post:
      operationId: createOneTimeDiscount
      tags:
      - Offers
      summary: Create a one-time discount
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OneTimeDiscount'
      responses:
        '201':
          description: The created one-time discount.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OneTimeDiscount'
  /entitlements/:
    get:
      operationId: listEntitlements
      tags:
      - Offers
      summary: List entitlements
      parameters:
      - name: customer
        in: query
        schema:
          type: string
      responses:
        '200':
          description: A list of entitlements.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Entitlement'
components:
  schemas:
    OneTimeDiscount:
      type: object
      properties:
        id:
          type: string
        customer_id:
          type: string
        amount:
          type: string
        type:
          type: string
    Entitlement:
      type: object
      properties:
        id:
          type: string
        customer_id:
          type: string
        status:
          type: string
    OfferProfile:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Application API scope. Send one of the ten store API keys in the x-api-key header for server-to-server requests. Storefront requests use an HMAC-SHA256 signature scoped to a single customer instead (out of band of this scheme).