ICE 2.3.0

{
  "swagger": "2.0",
  "info": {
    "version": "2.3.0",
    "title": "Inmar Consumer Extension (ICE) Offers API",
    "description": "A RESTful JSON API providing customers access to the Inmar Digital Promotions Network (DPN) and Analytics data."
  },
  "host": "icev2api-test.parseapp.com",
  "basePath": "/v2",
  "schemes": [
    "http"
  ],
  "consumes": [
    "text/plain",
    "application/x-www-form-urlencoded"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/offers": {
      "get": {
        "summary": "Get Offers",
        "description": "General offer query useful for sorting offers on their attributes, popularity etc or retrieving specific offers with `ids`.",
        "tags": [
          "Offers"
        ],
        "operationId": "getGroupOffers",
        "parameters": [
          {
            "name": "if-modified-since",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash. See [User - Login](#api-User-Login)",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Comma separated list of keys to sort by. \n\n**Offer Attribute Sorting:**\nKeys include: `brand`, `clipStartDate`, `clipEndDate`, `value` and `type`. \n\nThese keys sort ascending by default. To sort descending, place a `-` (dash/minus sign) before the attribute, like: `sort=value,-type`. This would sort offers by value ascending and type descending.\n\n*Note when using `value`, the offers are sorted on the `offerSortValue` property not the `value` property.*\n\n**Special Sorting:** \nThese provide shortcuts or advanced sorting capabilities. Keys include:\n\n`popular` sort offers by popularity descending (most popular offers first) \n`relevant` sort offers by relevancy (requires authenticated user) \n`asc` sort offers oldest to newest \n`desc` sort offers newest to oldest \n\n*Note: These keys sort in a fixed direction. No flags (descending dashes, etc) are needed.*",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "brand",
                "clipStartDate",
                "clipEndDate",
                "expirationDate",
                "mdid",
                "value",
                "type",
                "-brand",
                "-clipStartDate",
                "-clipEndDate",
                "-expirationDate",
                "-mdid",
                "-value",
                "-type",
                "popular",
                "relevant",
                "asc",
                "desc"
              ]
            },
            "default": "relevant,desc",
            "x-when": {
              "authenticated": false,
              "set": {
                "items": {
                  "type": "string",
                  "enum": [
                    "brand",
                    "clipStartDate",
                    "clipEndDate",
                    "expirationDate",
                    "mdid",
                    "value",
                    "type",
                    "-brand",
                    "-clipStartDate",
                    "-clipEndDate",
                    "-expirationDate",
                    "-mdid",
                    "-value",
                    "-type",
                    "popular",
                    "asc",
                    "desc"
                  ]
                },
                "default": "desc"
              }
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "Comma separated list of offer ids to limit results to",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "categories",
            "in": "query",
            "description": "Comma separated list of category keys to filter offers by. \nTo get available category keys, see [Offers - Get Categories](#api-Offers-Get_Categories).",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "keywords",
            "in": "query",
            "description": "Comma separated list of keywords to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "Comma separated list of tags to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "groups",
            "in": "query",
            "description": "Comma separated list of offer states to group offers by. \nNote: Authenticated users only. Anonymous users will default to `available`.",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "available",
                "clipped",
                "redeemed",
                "expired"
              ]
            },
            "default": "available,clipped",
            "x-when": {
              "authenticated": false,
              "set": {
                "items": {
                  "type": "string",
                  "enum": [
                    "available"
                  ]
                },
                "default": "available"
              }
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit the number of returned results",
            "required": false,
            "type": "integer",
            "default": 12
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Skip specific number of offers to return. Used with limit to provide pagination.",
            "required": false,
            "type": "integer"
          },
          {
            "name": "mediaPropertyId",
            "description": "Media Property Id",
            "type": "integer",
            "in": "query",
            "required": false,
            "x-docs": false
          },
          {
            "name": "pluck",
            "x-docs": false,
            "in": "query",
            "description": "Returns results by plucking the same named property off all offers (only mdid currently supported)",
            "required": false,
            "type": "string",
            "enum": [
              "mdid"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Offers",
              "type": "array",
              "items": {
                "title": "Offer",
                "type": "object",
                "properties": {
                  "mdid": {
                    "description": "offer unique identifier",
                    "type": "integer"
                  },
                  "type": {
                    "description": "`store` or `mfg`",
                    "type": "string",
                    "enum": [
                      "store",
                      "mfg"
                    ]
                  },
                  "badge": {
                    "description": "`empty`, `new` or `expiring`",
                    "type": "string"
                  },
                  "brand": {
                    "description": "offer brand name",
                    "type": "string"
                  },
                  "contextType": {
                    "type": "string",
                    "description": "The context type the offer is currently being returned as (to this user)",
                    "enum": [
                      "campaign",
                      "targeted",
                      "relevant",
                      "unranked"
                    ]
                  },
                  "contextTypes": {
                    "type": "array",
                    "description": "All the possible context types this offer could be returned as (to this user)",
                    "items": {
                      "type": "string",
                      "enum": [
                        "campaign",
                        "targeted",
                        "relevant",
                        "unranked"
                      ]
                    }
                  },
                  "description": {
                    "description": "full offer description",
                    "type": "string"
                  },
                  "shortDescription": {
                    "description": "short offer description",
                    "type": "string"
                  },
                  "imageUrl": {
                    "description": "url for offer image",
                    "type": "string"
                  },
                  "value": {
                    "description": "the value of the offer",
                    "type": "integer"
                  },
                  "valueText": {
                    "description": "value description",
                    "type": "string"
                  },
                  "valueSort": {
                    "description": "integer version of offerSortValue",
                    "type": "string"
                  },
                  "terms": {
                    "description": "offer terms and conditions",
                    "type": "string"
                  },
                  "minPurchase": {
                    "description": "offer minimum purchase requirements",
                    "type": "string"
                  },
                  "offerSortValue": {
                    "description": "value used to sort offer",
                    "type": "string"
                  },
                  "offerType": {
                    "description": "key defining how the offer savings are applied. Values: `cents off`, `compound cents off`, `bogo` (buy one get one), `order total`, `fixed price` or `percent off`",
                    "type": "string",
                    "enum": [
                      "cents off",
                      "compound cents off",
                      "bogo",
                      "order total",
                      "fixed price",
                      "percent off"
                    ]
                  },
                  "category": {
                    "title": "Category",
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "unique id",
                        "type": "string"
                      },
                      "name": {
                        "description": "friendly name",
                        "type": "string"
                      },
                      "active": {
                        "description": "total active offers in category",
                        "type": "integer"
                      },
                      "value": {
                        "description": "total value in cents of offers in category",
                        "type": "integer"
                      },
                      "key": {
                        "description": "fixed key for category, used to map category to images and filtering offers",
                        "type": "string"
                      }
                    }
                  },
                  "clipStartDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipEndDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "redeemedDate": {
                    "description": "redemption date by user (if applicable)",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  "expirationDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipped": {
                    "description": "true if user has clipped this offer",
                    "type": "boolean"
                  },
                  "redemptionsPerTransaction": {
                    "description": "Identifies offer that may be redeemed more than once (if > 1)",
                    "type": "integer"
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "type": "string",
                "default": "public, max-age=3600, must-revalidate"
              },
              "Last-Modified": {
                "type": "string"
              }
            },
            "examples": {
              "application/json": [
                {
                  "mdid": 40633,
                  "badge": "",
                  "brand": "Shop Foods",
                  "contextType": "targeted",
                  "contextTypes": [
                    "relevant",
                    "targeted"
                  ],
                  "description": "Save $0.75 on Tools Ketchup. Offer redeemed with valid in-store purchase.",
                  "shortDescription": "Save $0.75 on Tools Ketchup",
                  "imageUrl": "http://d17o.cloudfront.net/imageserver/cecd82efed312f421b019730f.jpg",
                  "value": 75,
                  "valueText": "save $0.75",
                  "terms": "LIMIT ONE COUPON REDEMPTION PER IN-STORE PURCHASE. ANY OTHER USE CONSTITUTES FRAUD.",
                  "minPurchase": "1",
                  "offerSortValue": "75",
                  "type": "mfg",
                  "category": {
                    "id": "c2ztS9Kuoz",
                    "name": "Grocery",
                    "active": 5,
                    "value": 300,
                    "key": "grocery"
                  },
                  "clipStartDate": {
                    "__type": "Date",
                    "iso": "2014-06-05T00:00:00.000Z"
                  },
                  "clipEndDate": {
                    "__type": "Date",
                    "iso": "2014-06-30T00:00:00.000Z"
                  },
                  "expirationDate": {
                    "__type": "Date",
                    "iso": "2014-07-31T00:00:00.000Z"
                  },
                  "redeemedDate": null,
                  "clipped": true,
                  "redeemed": false,
                  "expired": true
                }
              ]
            }
          }
        }
      }
    },
    "/offers/clipped": {
      "get": {
        "summary": "Get Clipped Offers",
        "description": "Get the clipped offers for a user. Essentially the user's digital coupon 'wallet'.",
        "tags": [
          "Offers"
        ],
        "operationId": "getGroupOffers",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Comma separated list of keys to sort by. \n\n**Offer Attribute Sorting:**\nKeys include: `brand`, `clipStartDate`, `clipEndDate`, `value` and `type`. \n\nThese keys sort ascending by default. To sort descending, place a `-` (dash/minus sign) before the attribute, like: `sort=value,-type`. This would sort offers by value ascending and type descending.\n\n*Note when using `value`, the offers are sorted on the `offerSortValue` property not the `value` property.*\n\n**Special Sorting:** \nThese provide shortcuts or advanced sorting capabilities. Keys include:\n\n`popular` sort offers by popularity descending (most popular offers first) \n`relevant` sort offers by relevancy (requires authenticated user) \n`asc` sort offers oldest to newest \n`desc` sort offers newest to oldest \n\n*Note: These keys sort in a fixed direction. No flags (descending dashes, etc) are needed.*",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "brand",
                "clipStartDate",
                "clipEndDate",
                "expirationDate",
                "mdid",
                "value",
                "type",
                "-brand",
                "-clipStartDate",
                "-clipEndDate",
                "-expirationDate",
                "-mdid",
                "-value",
                "-type",
                "popular",
                "asc",
                "desc"
              ]
            },
            "default": "desc"
          },
          {
            "name": "categories",
            "in": "query",
            "description": "Comma separated list of category keys to filter offers by. \nTo get available category keys, see [Offers - Get Categories](#api-Offers-Get_Categories).",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "keywords",
            "in": "query",
            "description": "Comma separated list of keywords to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "Comma separated list of tags to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit the number of returned results",
            "required": false,
            "type": "integer",
            "default": 12
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Skip specific number of offers to return. Used with limit to provide pagination.",
            "required": false,
            "type": "integer"
          },
          {
            "name": "pluck",
            "x-docs": false,
            "in": "query",
            "description": "Returns results by plucking the same named property off all offers (only mdid currently supported)",
            "required": false,
            "type": "string",
            "enum": [
              "mdid"
            ]
          },
          {
            "name": "groups",
            "in": "query",
            "x-docs": false,
            "x-write": false,
            "required": true,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "clipped"
              ]
            },
            "default": "clipped"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Offers",
              "type": "array",
              "items": {
                "title": "Offer",
                "type": "object",
                "properties": {
                  "mdid": {
                    "description": "offer unique identifier",
                    "type": "integer"
                  },
                  "type": {
                    "description": "`store` or `mfg`",
                    "type": "string",
                    "enum": [
                      "store",
                      "mfg"
                    ]
                  },
                  "badge": {
                    "description": "`empty`, `new` or `expiring`",
                    "type": "string"
                  },
                  "brand": {
                    "description": "offer brand name",
                    "type": "string"
                  },
                  "contextType": {
                    "type": "string",
                    "description": "The context type the offer is currently being returned as (to this user)",
                    "enum": [
                      "campaign",
                      "targeted",
                      "relevant",
                      "unranked"
                    ]
                  },
                  "contextTypes": {
                    "type": "array",
                    "description": "All the possible context types this offer could be returned as (to this user)",
                    "items": {
                      "type": "string",
                      "enum": [
                        "campaign",
                        "targeted",
                        "relevant",
                        "unranked"
                      ]
                    }
                  },
                  "description": {
                    "description": "full offer description",
                    "type": "string"
                  },
                  "shortDescription": {
                    "description": "short offer description",
                    "type": "string"
                  },
                  "imageUrl": {
                    "description": "url for offer image",
                    "type": "string"
                  },
                  "value": {
                    "description": "the value of the offer",
                    "type": "integer"
                  },
                  "valueText": {
                    "description": "value description",
                    "type": "string"
                  },
                  "valueSort": {
                    "description": "integer version of offerSortValue",
                    "type": "string"
                  },
                  "terms": {
                    "description": "offer terms and conditions",
                    "type": "string"
                  },
                  "minPurchase": {
                    "description": "offer minimum purchase requirements",
                    "type": "string"
                  },
                  "offerSortValue": {
                    "description": "value used to sort offer",
                    "type": "string"
                  },
                  "offerType": {
                    "description": "key defining how the offer savings are applied. Values: `cents off`, `compound cents off`, `bogo` (buy one get one), `order total`, `fixed price` or `percent off`",
                    "type": "string",
                    "enum": [
                      "cents off",
                      "compound cents off",
                      "bogo",
                      "order total",
                      "fixed price",
                      "percent off"
                    ]
                  },
                  "category": {
                    "title": "Category",
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "unique id",
                        "type": "string"
                      },
                      "name": {
                        "description": "friendly name",
                        "type": "string"
                      },
                      "active": {
                        "description": "total active offers in category",
                        "type": "integer"
                      },
                      "value": {
                        "description": "total value in cents of offers in category",
                        "type": "integer"
                      },
                      "key": {
                        "description": "fixed key for category, used to map category to images and filtering offers",
                        "type": "string"
                      }
                    }
                  },
                  "clipStartDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipEndDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "redeemedDate": {
                    "description": "redemption date by user (if applicable)",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  "expirationDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipped": {
                    "description": "true if user has clipped this offer",
                    "type": "boolean"
                  },
                  "redemptionsPerTransaction": {
                    "description": "Identifies offer that may be redeemed more than once (if > 1)",
                    "type": "integer"
                  }
                }
              }
            },
            "headers": {
              "Last-Modified": {
                "type": "string"
              }
            },
            "examples": {
              "application/json": [
                {
                  "mdid": 40633,
                  "badge": "",
                  "brand": "Shop Foods",
                  "contextType": "targeted",
                  "contextTypes": [
                    "relevant",
                    "targeted"
                  ],
                  "description": "Save $0.75 on Tools Ketchup. Offer redeemed with valid in-store purchase.",
                  "shortDescription": "Save $0.75 on Tools Ketchup",
                  "imageUrl": "http://d17o.cloudfront.net/imageserver/cecd82efed312f421b019730f.jpg",
                  "value": 75,
                  "valueText": "save $0.75",
                  "terms": "LIMIT ONE COUPON REDEMPTION PER IN-STORE PURCHASE. ANY OTHER USE CONSTITUTES FRAUD.",
                  "minPurchase": "1",
                  "offerSortValue": "75",
                  "type": "mfg",
                  "category": {
                    "id": "c2ztS9Kuoz",
                    "name": "Grocery",
                    "active": 5,
                    "value": 300,
                    "key": "grocery"
                  },
                  "clipStartDate": {
                    "__type": "Date",
                    "iso": "2014-06-05T00:00:00.000Z"
                  },
                  "clipEndDate": {
                    "__type": "Date",
                    "iso": "2014-06-30T00:00:00.000Z"
                  },
                  "expirationDate": {
                    "__type": "Date",
                    "iso": "2014-07-31T00:00:00.000Z"
                  },
                  "redeemedDate": null,
                  "clipped": true,
                  "redeemed": false,
                  "expired": true
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/offers/ranked": {
      "get": {
        "summary": "Get Ranked Offers",
        "description": "Get analytic ranked offers segmented/ordered by analytic `contextTypes`",
        "tags": [
          "Offers"
        ],
        "operationId": "getGroupOffers",
        "parameters": [
          {
            "name": "if-modified-since",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "groups",
            "in": "query",
            "description": "Comma separated list of offer states to group offers by.",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "available",
                "clipped",
                "redeemed",
                "expired"
              ]
            },
            "default": "available"
          },
          {
            "name": "contextTypes",
            "in": "query",
            "description": "Comma separated list of analytic types to segment offers by (within each type in `groups`)",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "campaign",
                "targeted",
                "relevant",
                "unranked"
              ]
            },
            "default": "relevant"
          },
          {
            "name": "categories",
            "in": "query",
            "description": "Comma separated list of category keys to filter offers by. \nTo get available category keys, see [Offers - Get Categories](#api-Offers-Get_Categories).",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "keywords",
            "in": "query",
            "description": "Comma separated list of keywords to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "Comma separated list of tags to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit the number of returned results",
            "required": false,
            "type": "integer",
            "default": 12
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Skip specific number of offers to return. Used with limit to provide pagination.",
            "required": false,
            "type": "integer"
          },
          {
            "name": "pluck",
            "x-docs": false,
            "in": "query",
            "description": "Returns results by plucking the same named property off all offers (only mdid currently supported)",
            "required": false,
            "type": "string",
            "enum": [
              "mdid"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Offers",
              "type": "array",
              "items": {
                "title": "Offer",
                "type": "object",
                "properties": {
                  "mdid": {
                    "description": "offer unique identifier",
                    "type": "integer"
                  },
                  "type": {
                    "description": "`store` or `mfg`",
                    "type": "string",
                    "enum": [
                      "store",
                      "mfg"
                    ]
                  },
                  "badge": {
                    "description": "`empty`, `new` or `expiring`",
                    "type": "string"
                  },
                  "brand": {
                    "description": "offer brand name",
                    "type": "string"
                  },
                  "contextType": {
                    "type": "string",
                    "description": "The context type the offer is currently being returned as (to this user)",
                    "enum": [
                      "campaign",
                      "targeted",
                      "relevant",
                      "unranked"
                    ]
                  },
                  "contextTypes": {
                    "type": "array",
                    "description": "All the possible context types this offer could be returned as (to this user)",
                    "items": {
                      "type": "string",
                      "enum": [
                        "campaign",
                        "targeted",
                        "relevant",
                        "unranked"
                      ]
                    }
                  },
                  "description": {
                    "description": "full offer description",
                    "type": "string"
                  },
                  "shortDescription": {
                    "description": "short offer description",
                    "type": "string"
                  },
                  "imageUrl": {
                    "description": "url for offer image",
                    "type": "string"
                  },
                  "value": {
                    "description": "the value of the offer",
                    "type": "integer"
                  },
                  "valueText": {
                    "description": "value description",
                    "type": "string"
                  },
                  "valueSort": {
                    "description": "integer version of offerSortValue",
                    "type": "string"
                  },
                  "terms": {
                    "description": "offer terms and conditions",
                    "type": "string"
                  },
                  "minPurchase": {
                    "description": "offer minimum purchase requirements",
                    "type": "string"
                  },
                  "offerSortValue": {
                    "description": "value used to sort offer",
                    "type": "string"
                  },
                  "offerType": {
                    "description": "key defining how the offer savings are applied. Values: `cents off`, `compound cents off`, `bogo` (buy one get one), `order total`, `fixed price` or `percent off`",
                    "type": "string",
                    "enum": [
                      "cents off",
                      "compound cents off",
                      "bogo",
                      "order total",
                      "fixed price",
                      "percent off"
                    ]
                  },
                  "category": {
                    "title": "Category",
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "unique id",
                        "type": "string"
                      },
                      "name": {
                        "description": "friendly name",
                        "type": "string"
                      },
                      "active": {
                        "description": "total active offers in category",
                        "type": "integer"
                      },
                      "value": {
                        "description": "total value in cents of offers in category",
                        "type": "integer"
                      },
                      "key": {
                        "description": "fixed key for category, used to map category to images and filtering offers",
                        "type": "string"
                      }
                    }
                  },
                  "clipStartDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipEndDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "redeemedDate": {
                    "description": "redemption date by user (if applicable)",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  "expirationDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipped": {
                    "description": "true if user has clipped this offer",
                    "type": "boolean"
                  },
                  "redemptionsPerTransaction": {
                    "description": "Identifies offer that may be redeemed more than once (if > 1)",
                    "type": "integer"
                  }
                }
              }
            },
            "headers": {
              "Last-Modified": {
                "type": "string"
              }
            },
            "examples": {
              "application/json": [
                {
                  "mdid": 40633,
                  "badge": "",
                  "brand": "Shop Foods",
                  "contextType": "targeted",
                  "contextTypes": [
                    "relevant",
                    "targeted"
                  ],
                  "description": "Save $0.75 on Tools Ketchup. Offer redeemed with valid in-store purchase.",
                  "shortDescription": "Save $0.75 on Tools Ketchup",
                  "imageUrl": "http://d17o.cloudfront.net/imageserver/cecd82efed312f421b019730f.jpg",
                  "value": 75,
                  "valueText": "save $0.75",
                  "terms": "LIMIT ONE COUPON REDEMPTION PER IN-STORE PURCHASE. ANY OTHER USE CONSTITUTES FRAUD.",
                  "minPurchase": "1",
                  "offerSortValue": "75",
                  "type": "mfg",
                  "category": {
                    "id": "c2ztS9Kuoz",
                    "name": "Grocery",
                    "active": 5,
                    "value": 300,
                    "key": "grocery"
                  },
                  "clipStartDate": {
                    "__type": "Date",
                    "iso": "2014-06-05T00:00:00.000Z"
                  },
                  "clipEndDate": {
                    "__type": "Date",
                    "iso": "2014-06-30T00:00:00.000Z"
                  },
                  "expirationDate": {
                    "__type": "Date",
                    "iso": "2014-07-31T00:00:00.000Z"
                  },
                  "redeemedDate": null,
                  "clipped": true,
                  "redeemed": false,
                  "expired": true
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/offers/campaign": {
      "get": {
        "summary": "Get Campaign Offers",
        "operationId": "getGroupOffers",
        "tags": [
          "Offers"
        ],
        "description": "Specialized query for campaign context analytic ranked offers.",
        "parameters": [
          {
            "name": "if-modified-since",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "campaignId",
            "in": "query",
            "description": "Filter campaign offers by a specific campaign",
            "required": false,
            "type": "integer"
          },
          {
            "name": "groups",
            "in": "query",
            "description": "Comma separated list of offer states to group offers by.",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "available",
                "clipped",
                "redeemed",
                "expired"
              ]
            },
            "default": "available"
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Comma separated list of keys to sort by. \n\n**Offer Attribute Sorting:**\nKeys include: `brand`, `clipStartDate`, `clipEndDate`, `value` and `type`. \n\nThese keys sort ascending by default. To sort descending, place a `-` (dash/minus sign) before the attribute, like: `sort=value,-type`. This would sort offers by value ascending and type descending.\n\n*Note when using `value`, the offers are sorted on the `offerSortValue` property not the `value` property.*\n\n**Special Sorting:** \nThese provide shortcuts or advanced sorting capabilities. Keys include:\n\n`popular` sort offers by popularity descending (most popular offers first) \n`relevant` sort offers by relevancy (requires authenticated user) \n`asc` sort offers oldest to newest \n`desc` sort offers newest to oldest \n\n*Note: These keys sort in a fixed direction. No flags (descending dashes, etc) are needed.*",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "brand",
                "clipStartDate",
                "clipEndDate",
                "expirationDate",
                "mdid",
                "value",
                "type",
                "-brand",
                "-clipStartDate",
                "-clipEndDate",
                "-expirationDate",
                "-mdid",
                "-value",
                "-type",
                "popular",
                "asc",
                "desc"
              ]
            },
            "default": "desc"
          },
          {
            "name": "categories",
            "in": "query",
            "description": "Comma separated list of category keys to filter offers by. \nTo get available category keys, see [Offers - Get Categories](#api-Offers-Get_Categories).",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "keywords",
            "in": "query",
            "description": "Comma separated list of keywords to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "Comma separated list of tags to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit the number of returned results",
            "required": false,
            "type": "integer",
            "default": 12
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Skip specific number of offers to return. Used with limit to provide pagination.",
            "required": false,
            "type": "integer"
          },
          {
            "name": "pluck",
            "x-docs": false,
            "in": "query",
            "description": "Returns results by plucking the same named property off all offers (only mdid currently supported)",
            "required": false,
            "type": "string",
            "enum": [
              "mdid"
            ]
          },
          {
            "name": "contextTypes",
            "in": "query",
            "required": true,
            "x-docs": false,
            "x-write": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "campaign"
              ]
            },
            "default": "campaign"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Offers",
              "type": "array",
              "items": {
                "title": "Offer",
                "type": "object",
                "properties": {
                  "mdid": {
                    "description": "offer unique identifier",
                    "type": "integer"
                  },
                  "type": {
                    "description": "`store` or `mfg`",
                    "type": "string",
                    "enum": [
                      "store",
                      "mfg"
                    ]
                  },
                  "badge": {
                    "description": "`empty`, `new` or `expiring`",
                    "type": "string"
                  },
                  "brand": {
                    "description": "offer brand name",
                    "type": "string"
                  },
                  "contextType": {
                    "type": "string",
                    "description": "The context type the offer is currently being returned as (to this user)",
                    "enum": [
                      "campaign",
                      "targeted",
                      "relevant",
                      "unranked"
                    ]
                  },
                  "contextTypes": {
                    "type": "array",
                    "description": "All the possible context types this offer could be returned as (to this user)",
                    "items": {
                      "type": "string",
                      "enum": [
                        "campaign",
                        "targeted",
                        "relevant",
                        "unranked"
                      ]
                    }
                  },
                  "description": {
                    "description": "full offer description",
                    "type": "string"
                  },
                  "shortDescription": {
                    "description": "short offer description",
                    "type": "string"
                  },
                  "imageUrl": {
                    "description": "url for offer image",
                    "type": "string"
                  },
                  "value": {
                    "description": "the value of the offer",
                    "type": "integer"
                  },
                  "valueText": {
                    "description": "value description",
                    "type": "string"
                  },
                  "valueSort": {
                    "description": "integer version of offerSortValue",
                    "type": "string"
                  },
                  "terms": {
                    "description": "offer terms and conditions",
                    "type": "string"
                  },
                  "minPurchase": {
                    "description": "offer minimum purchase requirements",
                    "type": "string"
                  },
                  "offerSortValue": {
                    "description": "value used to sort offer",
                    "type": "string"
                  },
                  "offerType": {
                    "description": "key defining how the offer savings are applied. Values: `cents off`, `compound cents off`, `bogo` (buy one get one), `order total`, `fixed price` or `percent off`",
                    "type": "string",
                    "enum": [
                      "cents off",
                      "compound cents off",
                      "bogo",
                      "order total",
                      "fixed price",
                      "percent off"
                    ]
                  },
                  "category": {
                    "title": "Category",
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "unique id",
                        "type": "string"
                      },
                      "name": {
                        "description": "friendly name",
                        "type": "string"
                      },
                      "active": {
                        "description": "total active offers in category",
                        "type": "integer"
                      },
                      "value": {
                        "description": "total value in cents of offers in category",
                        "type": "integer"
                      },
                      "key": {
                        "description": "fixed key for category, used to map category to images and filtering offers",
                        "type": "string"
                      }
                    }
                  },
                  "clipStartDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipEndDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "redeemedDate": {
                    "description": "redemption date by user (if applicable)",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  "expirationDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipped": {
                    "description": "true if user has clipped this offer",
                    "type": "boolean"
                  },
                  "redemptionsPerTransaction": {
                    "description": "Identifies offer that may be redeemed more than once (if > 1)",
                    "type": "integer"
                  }
                }
              }
            },
            "headers": {
              "Last-Modified": {
                "type": "string"
              }
            },
            "examples": {
              "application/json": [
                {
                  "mdid": 40633,
                  "badge": "",
                  "brand": "Shop Foods",
                  "contextType": "targeted",
                  "contextTypes": [
                    "relevant",
                    "targeted"
                  ],
                  "description": "Save $0.75 on Tools Ketchup. Offer redeemed with valid in-store purchase.",
                  "shortDescription": "Save $0.75 on Tools Ketchup",
                  "imageUrl": "http://d17o.cloudfront.net/imageserver/cecd82efed312f421b019730f.jpg",
                  "value": 75,
                  "valueText": "save $0.75",
                  "terms": "LIMIT ONE COUPON REDEMPTION PER IN-STORE PURCHASE. ANY OTHER USE CONSTITUTES FRAUD.",
                  "minPurchase": "1",
                  "offerSortValue": "75",
                  "type": "mfg",
                  "category": {
                    "id": "c2ztS9Kuoz",
                    "name": "Grocery",
                    "active": 5,
                    "value": 300,
                    "key": "grocery"
                  },
                  "clipStartDate": {
                    "__type": "Date",
                    "iso": "2014-06-05T00:00:00.000Z"
                  },
                  "clipEndDate": {
                    "__type": "Date",
                    "iso": "2014-06-30T00:00:00.000Z"
                  },
                  "expirationDate": {
                    "__type": "Date",
                    "iso": "2014-07-31T00:00:00.000Z"
                  },
                  "redeemedDate": null,
                  "clipped": true,
                  "redeemed": false,
                  "expired": true
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/offers/campaigns": {
      "get": {
        "summary": "Get Campaigns",
        "operationId": "getCampaigns",
        "tags": [
          "Offers"
        ],
        "description": "Return all campaigns",
        "parameters": [
          {
            "name": "if-modified-since",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "types",
            "in": "query",
            "required": true,
            "x-docs": false,
            "x-write": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "campaign"
              ]
            },
            "default": "campaign"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Campaigns",
              "type": "array",
              "items": {
                "title": "Campaign",
                "type": "object",
                "properties": {
                  "campaignId": {
                    "description": "Campaign unique identifier",
                    "type": "integer"
                  },
                  "context": {
                    "type": "array",
                    "description": "Campaign contexts",
                    "items": {
                      "title": "Context",
                      "type": "object",
                      "properties": {
                        "id": {
                          "description": "Context unique identifier",
                          "type": "integer"
                        },
                        "name": {
                          "description": "Context name",
                          "type": "string"
                        },
                        "type": {
                          "description": "Context type",
                          "type": "string"
                        },
                        "targetedTime": {
                          "description": "Context targeted time",
                          "type": "string"
                        }
                      }
                    }
                  },
                  "name": {
                    "description": "Campaign name",
                    "type": "string"
                  },
                  "offerId": {
                    "description": "Campaign Offer unique identifier",
                    "type": "integer"
                  },
                  "targetedTime": {
                    "description": "Campaign targeted time",
                    "type": "string"
                  },
                  "type": {
                    "description": "Campaign type",
                    "type": "string"
                  },
                  "createdAt": {
                    "description": "Campaign created time",
                    "type": "string"
                  },
                  "updatedAt": {
                    "description": "Campaign updated time",
                    "type": "string"
                  }
                }
              }
            },
            "headers": {
              "Last-Modified": {
                "type": "string"
              }
            },
            "examples": {
              "application/json": [
                {
                  "campaignId": 85580,
                  "context": [
                    {
                      "id": 11361,
                      "name": "service-desk matrix channels",
                      "targetedTime": "2016-01-11T16:47:08.000Z",
                      "type": "envisioneer"
                    }
                  ],
                  "name": "Inverse systematic paradigm",
                  "offerId": 40756,
                  "targetedTime": "2016-01-11T16:47:08.000Z",
                  "type": "campaign",
                  "createdAt": "2016-01-15T08:55:34.187Z",
                  "updatedAt": "2016-01-15T08:55:34.187Z"
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/offers/targeted": {
      "get": {
        "summary": "Get Targeted Offers",
        "operationId": "getGroupOffers",
        "tags": [
          "Offers"
        ],
        "description": "Specialized query for 'targeted' context analytic ranked offers.",
        "parameters": [
          {
            "name": "if-modified-since",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "matchRunId",
            "in": "query",
            "description": "The unique id of the specific set of targeted offers you want returned. The format is a date/time (yyyy-MM-ddTHH-mm-ss). If no value is provided then the most recent results will be returned.",
            "required": false,
            "type": "string"
          },
          {
            "name": "groups",
            "in": "query",
            "description": "Comma separated list of offer states to group offers by.",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "available",
                "clipped",
                "redeemed",
                "expired"
              ]
            },
            "default": "available"
          },
          {
            "name": "categories",
            "in": "query",
            "description": "Comma separated list of category keys to filter offers by. \nTo get available category keys, see [Offers - Get Categories](#api-Offers-Get_Categories).",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "keywords",
            "in": "query",
            "description": "Comma separated list of keywords to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "Comma separated list of tags to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit the number of returned results",
            "required": false,
            "type": "integer",
            "default": 12
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Skip specific number of offers to return. Used with limit to provide pagination.",
            "required": false,
            "type": "integer"
          },
          {
            "name": "pluck",
            "x-docs": false,
            "in": "query",
            "description": "Returns results by plucking the same named property off all offers (only mdid currently supported)",
            "required": false,
            "type": "string",
            "enum": [
              "mdid"
            ]
          },
          {
            "name": "contextTypes",
            "in": "query",
            "required": true,
            "x-docs": false,
            "x-write": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "targeted"
              ]
            },
            "default": "targeted"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Offers",
              "type": "array",
              "items": {
                "title": "Offer",
                "type": "object",
                "properties": {
                  "mdid": {
                    "description": "offer unique identifier",
                    "type": "integer"
                  },
                  "type": {
                    "description": "`store` or `mfg`",
                    "type": "string",
                    "enum": [
                      "store",
                      "mfg"
                    ]
                  },
                  "badge": {
                    "description": "`empty`, `new` or `expiring`",
                    "type": "string"
                  },
                  "brand": {
                    "description": "offer brand name",
                    "type": "string"
                  },
                  "contextType": {
                    "type": "string",
                    "description": "The context type the offer is currently being returned as (to this user)",
                    "enum": [
                      "campaign",
                      "targeted",
                      "relevant",
                      "unranked"
                    ]
                  },
                  "contextTypes": {
                    "type": "array",
                    "description": "All the possible context types this offer could be returned as (to this user)",
                    "items": {
                      "type": "string",
                      "enum": [
                        "campaign",
                        "targeted",
                        "relevant",
                        "unranked"
                      ]
                    }
                  },
                  "description": {
                    "description": "full offer description",
                    "type": "string"
                  },
                  "shortDescription": {
                    "description": "short offer description",
                    "type": "string"
                  },
                  "imageUrl": {
                    "description": "url for offer image",
                    "type": "string"
                  },
                  "value": {
                    "description": "the value of the offer",
                    "type": "integer"
                  },
                  "valueText": {
                    "description": "value description",
                    "type": "string"
                  },
                  "valueSort": {
                    "description": "integer version of offerSortValue",
                    "type": "string"
                  },
                  "terms": {
                    "description": "offer terms and conditions",
                    "type": "string"
                  },
                  "minPurchase": {
                    "description": "offer minimum purchase requirements",
                    "type": "string"
                  },
                  "offerSortValue": {
                    "description": "value used to sort offer",
                    "type": "string"
                  },
                  "offerType": {
                    "description": "key defining how the offer savings are applied. Values: `cents off`, `compound cents off`, `bogo` (buy one get one), `order total`, `fixed price` or `percent off`",
                    "type": "string",
                    "enum": [
                      "cents off",
                      "compound cents off",
                      "bogo",
                      "order total",
                      "fixed price",
                      "percent off"
                    ]
                  },
                  "category": {
                    "title": "Category",
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "unique id",
                        "type": "string"
                      },
                      "name": {
                        "description": "friendly name",
                        "type": "string"
                      },
                      "active": {
                        "description": "total active offers in category",
                        "type": "integer"
                      },
                      "value": {
                        "description": "total value in cents of offers in category",
                        "type": "integer"
                      },
                      "key": {
                        "description": "fixed key for category, used to map category to images and filtering offers",
                        "type": "string"
                      }
                    }
                  },
                  "clipStartDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipEndDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "redeemedDate": {
                    "description": "redemption date by user (if applicable)",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  "expirationDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipped": {
                    "description": "true if user has clipped this offer",
                    "type": "boolean"
                  },
                  "redemptionsPerTransaction": {
                    "description": "Identifies offer that may be redeemed more than once (if > 1)",
                    "type": "integer"
                  }
                }
              }
            },
            "headers": {
              "Last-Modified": {
                "type": "string"
              }
            },
            "examples": {
              "application/json": [
                {
                  "mdid": 40633,
                  "badge": "",
                  "brand": "Shop Foods",
                  "contextType": "targeted",
                  "contextTypes": [
                    "relevant",
                    "targeted"
                  ],
                  "description": "Save $0.75 on Tools Ketchup. Offer redeemed with valid in-store purchase.",
                  "shortDescription": "Save $0.75 on Tools Ketchup",
                  "imageUrl": "http://d17o.cloudfront.net/imageserver/cecd82efed312f421b019730f.jpg",
                  "value": 75,
                  "valueText": "save $0.75",
                  "terms": "LIMIT ONE COUPON REDEMPTION PER IN-STORE PURCHASE. ANY OTHER USE CONSTITUTES FRAUD.",
                  "minPurchase": "1",
                  "offerSortValue": "75",
                  "type": "mfg",
                  "category": {
                    "id": "c2ztS9Kuoz",
                    "name": "Grocery",
                    "active": 5,
                    "value": 300,
                    "key": "grocery"
                  },
                  "clipStartDate": {
                    "__type": "Date",
                    "iso": "2014-06-05T00:00:00.000Z"
                  },
                  "clipEndDate": {
                    "__type": "Date",
                    "iso": "2014-06-30T00:00:00.000Z"
                  },
                  "expirationDate": {
                    "__type": "Date",
                    "iso": "2014-07-31T00:00:00.000Z"
                  },
                  "redeemedDate": null,
                  "clipped": true,
                  "redeemed": false,
                  "expired": true
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/offers/relevant": {
      "get": {
        "summary": "Get Relevant Offers",
        "operationId": "getGroupOffers",
        "tags": [
          "Offers"
        ],
        "description": "Specialized query for 'relevant' context analytic ranked offers.",
        "parameters": [
          {
            "name": "if-modified-since",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "groups",
            "in": "query",
            "description": "Comma separated list of offer states to group offers by.",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "available",
                "clipped",
                "redeemed",
                "expired"
              ]
            },
            "default": "available"
          },
          {
            "name": "categories",
            "in": "query",
            "description": "Comma separated list of category keys to filter offers by. \nTo get available category keys, see [Offers - Get Categories](#api-Offers-Get_Categories).",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "keywords",
            "in": "query",
            "description": "Comma separated list of keywords to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "Comma separated list of tags to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit the number of returned results",
            "required": false,
            "type": "integer",
            "default": 12
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Skip specific number of offers to return. Used with limit to provide pagination.",
            "required": false,
            "type": "integer"
          },
          {
            "name": "pluck",
            "x-docs": false,
            "in": "query",
            "description": "Returns results by plucking the same named property off all offers (only mdid currently supported)",
            "required": false,
            "type": "string",
            "enum": [
              "mdid"
            ]
          },
          {
            "name": "contextTypes",
            "in": "query",
            "required": true,
            "x-docs": false,
            "x-write": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "relevant"
              ]
            },
            "default": "relevant"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Offers",
              "type": "array",
              "items": {
                "title": "Offer",
                "type": "object",
                "properties": {
                  "mdid": {
                    "description": "offer unique identifier",
                    "type": "integer"
                  },
                  "type": {
                    "description": "`store` or `mfg`",
                    "type": "string",
                    "enum": [
                      "store",
                      "mfg"
                    ]
                  },
                  "badge": {
                    "description": "`empty`, `new` or `expiring`",
                    "type": "string"
                  },
                  "brand": {
                    "description": "offer brand name",
                    "type": "string"
                  },
                  "contextType": {
                    "type": "string",
                    "description": "The context type the offer is currently being returned as (to this user)",
                    "enum": [
                      "campaign",
                      "targeted",
                      "relevant",
                      "unranked"
                    ]
                  },
                  "contextTypes": {
                    "type": "array",
                    "description": "All the possible context types this offer could be returned as (to this user)",
                    "items": {
                      "type": "string",
                      "enum": [
                        "campaign",
                        "targeted",
                        "relevant",
                        "unranked"
                      ]
                    }
                  },
                  "description": {
                    "description": "full offer description",
                    "type": "string"
                  },
                  "shortDescription": {
                    "description": "short offer description",
                    "type": "string"
                  },
                  "imageUrl": {
                    "description": "url for offer image",
                    "type": "string"
                  },
                  "value": {
                    "description": "the value of the offer",
                    "type": "integer"
                  },
                  "valueText": {
                    "description": "value description",
                    "type": "string"
                  },
                  "valueSort": {
                    "description": "integer version of offerSortValue",
                    "type": "string"
                  },
                  "terms": {
                    "description": "offer terms and conditions",
                    "type": "string"
                  },
                  "minPurchase": {
                    "description": "offer minimum purchase requirements",
                    "type": "string"
                  },
                  "offerSortValue": {
                    "description": "value used to sort offer",
                    "type": "string"
                  },
                  "offerType": {
                    "description": "key defining how the offer savings are applied. Values: `cents off`, `compound cents off`, `bogo` (buy one get one), `order total`, `fixed price` or `percent off`",
                    "type": "string",
                    "enum": [
                      "cents off",
                      "compound cents off",
                      "bogo",
                      "order total",
                      "fixed price",
                      "percent off"
                    ]
                  },
                  "category": {
                    "title": "Category",
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "unique id",
                        "type": "string"
                      },
                      "name": {
                        "description": "friendly name",
                        "type": "string"
                      },
                      "active": {
                        "description": "total active offers in category",
                        "type": "integer"
                      },
                      "value": {
                        "description": "total value in cents of offers in category",
                        "type": "integer"
                      },
                      "key": {
                        "description": "fixed key for category, used to map category to images and filtering offers",
                        "type": "string"
                      }
                    }
                  },
                  "clipStartDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipEndDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "redeemedDate": {
                    "description": "redemption date by user (if applicable)",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  "expirationDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipped": {
                    "description": "true if user has clipped this offer",
                    "type": "boolean"
                  },
                  "redemptionsPerTransaction": {
                    "description": "Identifies offer that may be redeemed more than once (if > 1)",
                    "type": "integer"
                  }
                }
              }
            },
            "headers": {
              "Last-Modified": {
                "type": "string"
              }
            },
            "examples": {
              "application/json": [
                {
                  "mdid": 40633,
                  "badge": "",
                  "brand": "Shop Foods",
                  "contextType": "targeted",
                  "contextTypes": [
                    "relevant",
                    "targeted"
                  ],
                  "description": "Save $0.75 on Tools Ketchup. Offer redeemed with valid in-store purchase.",
                  "shortDescription": "Save $0.75 on Tools Ketchup",
                  "imageUrl": "http://d17o.cloudfront.net/imageserver/cecd82efed312f421b019730f.jpg",
                  "value": 75,
                  "valueText": "save $0.75",
                  "terms": "LIMIT ONE COUPON REDEMPTION PER IN-STORE PURCHASE. ANY OTHER USE CONSTITUTES FRAUD.",
                  "minPurchase": "1",
                  "offerSortValue": "75",
                  "type": "mfg",
                  "category": {
                    "id": "c2ztS9Kuoz",
                    "name": "Grocery",
                    "active": 5,
                    "value": 300,
                    "key": "grocery"
                  },
                  "clipStartDate": {
                    "__type": "Date",
                    "iso": "2014-06-05T00:00:00.000Z"
                  },
                  "clipEndDate": {
                    "__type": "Date",
                    "iso": "2014-06-30T00:00:00.000Z"
                  },
                  "expirationDate": {
                    "__type": "Date",
                    "iso": "2014-07-31T00:00:00.000Z"
                  },
                  "redeemedDate": null,
                  "clipped": true,
                  "redeemed": false,
                  "expired": true
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/offers/categories": {
      "get": {
        "summary": "Get Categories",
        "description": "Get categories for available offers.",
        "tags": [
          "Offers"
        ],
        "operationId": "getOfferCategories",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash. See [User - Login](#api-User-Login)",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "types",
            "in": "query",
            "required": true,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "available",
                "clipped"
              ]
            },
            "default": "available,clipped",
            "x-when": {
              "authenticated": false,
              "set": {
                "items": {
                  "type": "string",
                  "enum": [
                    "available"
                  ]
                },
                "default": "available"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Categories",
              "type": "array",
              "items": {
                "title": "Category",
                "type": "object",
                "properties": {
                  "id": {
                    "description": "unique id",
                    "type": "string"
                  },
                  "name": {
                    "description": "friendly name",
                    "type": "string"
                  },
                  "active": {
                    "description": "total active offers in category",
                    "type": "integer"
                  },
                  "value": {
                    "description": "total value in cents of offers in category",
                    "type": "integer"
                  },
                  "key": {
                    "description": "fixed key for category, used to map category to images and filtering offers",
                    "type": "string"
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "type": "string",
                "default": "public, max-age=3600, must-revalidate"
              }
            },
            "examples": {
              "application/json": [
                {
                  "id": "c2ztS9Kuoz",
                  "name": "Grocery",
                  "active": 5,
                  "value": 300,
                  "key": "grocery"
                }
              ]
            }
          }
        }
      }
    },
    "/offers/clip": {
      "post": {
        "summary": "Clip Offer",
        "description": "Clip an offer.",
        "operationId": "clipOffer",
        "tags": [
          "Offers"
        ],
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "id",
            "description": "Offer Id",
            "type": "integer",
            "in": "formData",
            "required": true
          },
          {
            "name": "mediaPropertyId",
            "description": "Media Property Id",
            "type": "integer",
            "in": "formData",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Clip Offer Result",
              "type": "object",
              "properties": {
                "clippedCount": {
                  "description": "number of items user has clipped",
                  "type": "integer"
                },
                "clippedValue": {
                  "description": "total value in cents of items user has clipped",
                  "type": "integer"
                },
                "clipped": {
                  "description": "true if clip was successful, false otherwise",
                  "type": "boolean"
                },
                "nextOffer": {
                  "description": "will not always be returned, but when it is, this is an related offer to one that is already clipped which can be used to display a 'if you liked this offer, how about this...' type of scenario in a UI",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "clippedCount": 78,
                "clippedValue": 65,
                "clipped": true
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 400,
                "message": "Invalid or missing parameters"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 404,
                "message": "Either the offer or user cannot be found"
              }
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 409,
                "message": "Conflicting parameters sent"
              }
            }
          },
          "410": {
            "description": "Gone",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 410,
                "message": "Offer or resource no longer exists"
              }
            }
          }
        }
      },
      "delete": {
        "x-docs": false,
        "summary": "Un-clip Offer",
        "description": "Un-clip an offer.",
        "operationId": "unClipOffer",
        "tags": [
          "Offers"
        ],
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "id",
            "description": "Offer Id",
            "type": "integer",
            "in": "formData",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Success",
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "message": "Success"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 404,
                "message": "Either the offer or user cannot be found"
              }
            }
          }
        }
      }
    },
    "/offers/keywords": {
      "get": {
        "summary": "Get Keywords",
        "description": "Get offer keywords.",
        "tags": [
          "Offers"
        ],
        "operationId": "getOfferKeywords",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash. See [User - Login](#api-User-Login)",
            "in": "header",
            "required": false,
            "type": "string"
          },
          {
            "name": "types",
            "in": "query",
            "x-docs": false,
            "x-write": false,
            "required": true,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "available"
              ]
            },
            "default": "available"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Keywords",
              "description": "List of keywords",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "headers": {
              "Cache-Control": {
                "type": "string",
                "default": "public, max-age=3600, must-revalidate"
              }
            },
            "examples": {
              "application/json": [
                "nature",
                "valley",
                "granola",
                "bars",
                "betty",
                "crocker",
                "cookie"
              ]
            }
          }
        }
      }
    },
    "/offers/load": {
      "get": {
        "summary": "Load Availability",
        "operationId": "canLoadOffer",
        "x-config-access": "allowPublicClips",
        "tags": [
          "Offers"
        ],
        "description": "Checks availability of loading offer to user account. This endpoint is not enabled by default.",
        "parameters": [
          {
            "name": "id",
            "description": "Offer Id",
            "type": "integer",
            "in": "query",
            "required": true
          },
          {
            "name": "username",
            "description": "Loyalty id, phone number or email",
            "in": "query",
            "required": true,
            "type": "string",
            "minLength": 4
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Load Offer Result",
              "type": "object",
              "properties": {
                "result": {
                  "description": "Whether or not offer can be loaded for user",
                  "type": "boolean"
                }
              }
            },
            "examples": {
              "application/json": {
                "result": true
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Offer loading is not enabled (default)"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 404,
                "message": "Either the offer or user cannot be found"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Load Offer",
        "operationId": "loadOffer",
        "x-config-access": "allowPublicClips",
        "tags": [
          "Offers"
        ],
        "description": "Load offer into user's account (essentially same as 'clip'). This endpoint is not enabled by default.",
        "parameters": [
          {
            "name": "id",
            "description": "Offer Id",
            "type": "integer",
            "in": "formData",
            "required": true
          },
          {
            "name": "username",
            "description": "Loyalty id, phone number or email",
            "in": "formData",
            "required": true,
            "type": "string",
            "minLength": 4
          },
          {
            "name": "mediaPropertyId",
            "description": "Media Property Id",
            "type": "integer",
            "in": "formData",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Success",
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "message": "Success"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Offer loading is not enabled (default)"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 404,
                "message": "Either the offer or user cannot be found"
              }
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 409,
                "message": "Offer cannot be loaded to user"
              }
            }
          }
        }
      }
    },
    "/user/login": {
      "post": {
        "summary": "Login",
        "description": "User authentication",
        "tags": [
          "User"
        ],
        "operationId": "login",
        "parameters": [
          {
            "name": "username",
            "description": "Loyalty id, phone number or email",
            "in": "formData",
            "required": true,
            "type": "string",
            "minLength": 4
          },
          {
            "name": "password",
            "description": "clear-text password",
            "in": "formData",
            "type": "string"
          },
          {
            "name": "masterKeySecret",
            "description": "used instead of password parameter with Loyalty id or phone number - allows retrieving token of any user (must not be embedded into any client-facing application)",
            "in": "formData",
            "type": "string",
            "minLength": 4
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Token",
              "type": "object",
              "properties": {
                "token": {
                  "type": "string",
                  "description": "Authenticated session hash"
                }
              }
            },
            "examples": {
              "application/json": {
                "token": "j24g57a67s8df6a787a6da7d6a"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 400,
                "message": "Invalid or missing parameters"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/user/register": {
      "post": {
        "summary": "Register",
        "description": "User registration",
        "tags": [
          "User"
        ],
        "operationId": "register",
        "parameters": [
          {
            "name": "Origin",
            "description": "a URI indicating the server from which the request initiated",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "username",
            "description": "Loyalty id, phone number or email",
            "in": "formData",
            "required": true,
            "type": "string",
            "minLength": 4
          },
          {
            "name": "password",
            "description": "clear-text password",
            "in": "formData",
            "required": true,
            "type": "string"
          },
          {
            "name": "email",
            "description": "User email address",
            "in": "formData",
            "required": true,
            "type": "string",
            "format": "email"
          },
          {
            "name": "firstName",
            "description": "First name of the Customer",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "lastName",
            "description": "Last name of the Customer",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "phone",
            "description": "telephone number",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "address1",
            "description": "address line one",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "address2",
            "description": "address line two",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "city",
            "description": "address city",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "state",
            "description": "address state",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "zip",
            "description": "postal code",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "emailoptin",
            "description": "Customer Email preference (accepted values: 'specific', 'none')",
            "type": "string",
            "in": "formData",
            "enum": [
              "specific",
              "none"
            ]
          },
          {
            "name": "altId",
            "description": "Alternate identifier",
            "type": "string",
            "in": "formData"
          },
          {
            "name": "homeStoreIds",
            "in": "formData",
            "description": "Comma separated list of location retailerStoreNumbers associated with user",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Token",
              "type": "object",
              "properties": {
                "token": {
                  "type": "string",
                  "description": "Authenticated session hash"
                }
              }
            },
            "examples": {
              "application/json": {
                "token": "j24g57a67s8df6a787a6da7d6a"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 400,
                "message": "Invalid or missing parameters"
              }
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 409,
                "message": "Conflicting parameters sent"
              }
            }
          }
        }
      }
    },
    "/user": {
      "get": {
        "summary": "Get User Info",
        "description": "Access the information concerning the user account",
        "tags": [
          "User"
        ],
        "operationId": "getUserInfo",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "User",
              "type": "object",
              "properties": {
                "zip": {
                  "description": "postal code",
                  "type": "string"
                },
                "firstName": {
                  "description": "first name",
                  "type": "string"
                },
                "lastName": {
                  "description": "last name",
                  "type": "string"
                },
                "email": {
                  "description": "email address",
                  "type": "string"
                },
                "phone": {
                  "description": "telephone number",
                  "type": "string"
                },
                "address1": {
                  "description": "address line one",
                  "type": "string"
                },
                "address2": {
                  "description": "address line two",
                  "type": "string"
                },
                "city": {
                  "description": "city",
                  "type": "string"
                },
                "state": {
                  "description": "two letter state",
                  "type": "string"
                },
                "loyaltyId": {
                  "description": "card id",
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "properties": {
                    "emailoptin": {
                      "description": "receive email communication",
                      "type": "string"
                    }
                  }
                },
                "profileComplete": {
                  "description": "true if all fields filled in, false otherwise",
                  "type": "boolean"
                },
                "altId": {
                  "description": "Alternate identifier",
                  "type": "string"
                },
                "homeStoreIds": {
                  "description": "Location retailerStoreNumbers associated with user",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "examples": {
              "application/json": {
                "zip": "43402",
                "firstName": "John",
                "lastName": "Customer",
                "email": "john.q@customer.com",
                "phone": "555-555-1212",
                "address1": "4000 Park Ave.",
                "address2": "Apt. 1b",
                "city": "Cleveland",
                "state": "OH",
                "loyaltyId": "1234323456",
                "metadata": {
                  "emailoptin": "none"
                },
                "profileComplete": true,
                "altId": "",
                "homeStoreIds": [
                  "1",
                  "2"
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Update User Info",
        "description": "Update user information",
        "tags": [
          "User"
        ],
        "operationId": "saveUserInfo",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "email",
            "description": "User email address",
            "in": "formData",
            "required": false,
            "type": "string",
            "format": "email"
          },
          {
            "name": "firstName",
            "description": "First name of the Customer",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "lastName",
            "description": "Last name of the Customer",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "phone",
            "description": "telephone number",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "address1",
            "description": "address line one",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "address2",
            "description": "address line two",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "city",
            "description": "address city",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "state",
            "description": "address state",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "zip",
            "description": "postal code",
            "type": "string",
            "in": "formData",
            "required": false
          },
          {
            "name": "emailoptin",
            "description": "Customer Email preference (accepted values: 'specific', 'none')",
            "type": "string",
            "in": "formData",
            "enum": [
              "specific",
              "none"
            ]
          },
          {
            "name": "altId",
            "description": "Alternate identifier",
            "type": "string",
            "in": "formData"
          },
          {
            "name": "homeStoreIds",
            "in": "formData",
            "description": "Comma separated list of location retailerStoreNumbers associated with user",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "User",
              "type": "object",
              "properties": {
                "zip": {
                  "description": "postal code",
                  "type": "string"
                },
                "firstName": {
                  "description": "first name",
                  "type": "string"
                },
                "lastName": {
                  "description": "last name",
                  "type": "string"
                },
                "email": {
                  "description": "email address",
                  "type": "string"
                },
                "phone": {
                  "description": "telephone number",
                  "type": "string"
                },
                "address1": {
                  "description": "address line one",
                  "type": "string"
                },
                "address2": {
                  "description": "address line two",
                  "type": "string"
                },
                "city": {
                  "description": "city",
                  "type": "string"
                },
                "state": {
                  "description": "two letter state",
                  "type": "string"
                },
                "loyaltyId": {
                  "description": "card id",
                  "type": "string"
                },
                "metadata": {
                  "type": "object",
                  "properties": {
                    "emailoptin": {
                      "description": "receive email communication",
                      "type": "string"
                    }
                  }
                },
                "profileComplete": {
                  "description": "true if all fields filled in, false otherwise",
                  "type": "boolean"
                },
                "altId": {
                  "description": "Alternate identifier",
                  "type": "string"
                },
                "homeStoreIds": {
                  "description": "Location retailerStoreNumbers associated with user",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "examples": {
              "application/json": {
                "zip": "43402",
                "firstName": "John",
                "lastName": "Customer",
                "email": "john.q@customer.com",
                "phone": "555-555-1212",
                "address1": "4000 Park Ave.",
                "address2": "Apt. 1b",
                "city": "Cleveland",
                "state": "OH",
                "loyaltyId": "1234323456",
                "metadata": {
                  "emailoptin": "none"
                },
                "profileComplete": true,
                "altId": "",
                "homeStoreIds": [
                  "1",
                  "2"
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 400,
                "message": "Invalid or missing parameters"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 409,
                "message": "Conflicting parameters sent"
              }
            }
          }
        }
      }
    },
    "/user/username": {
      "get": {
        "summary": "Get Username",
        "description": "Access the username (type and value) - returns object with key `loyaltyId` or `phone` and value",
        "tags": [
          "User"
        ],
        "operationId": "getUserId",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Username",
              "type": "object",
              "properties": {
                "loyaltyId": {
                  "type": "string",
                  "description": "Loyalty id"
                },
                "phone": {
                  "description": "telephone number",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "phone": "555-555-1212"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 400,
                "message": "Invalid or missing parameters"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 409,
                "message": "Conflicting parameters sent"
              }
            }
          }
        }
      },
      "post": {
        "summary": "Update Username",
        "description": "Update Username",
        "tags": [
          "User"
        ],
        "operationId": "updateUserId",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "username",
            "description": "Loyalty id, phone number or email",
            "in": "formData",
            "required": true,
            "type": "string",
            "minLength": 4
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Token",
              "type": "object",
              "properties": {
                "token": {
                  "type": "string",
                  "description": "Authenticated session hash"
                }
              }
            },
            "examples": {
              "application/json": {
                "token": "j24g57a67s8df6a787a6da7d6a"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 400,
                "message": "Invalid or missing parameters"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          },
          "409": {
            "description": "Conflict",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 409,
                "message": "Conflicting parameters sent"
              }
            }
          }
        }
      }
    },
    "/user/password": {
      "post": {
        "summary": "Update Password",
        "description": "Update Password",
        "tags": [
          "User"
        ],
        "operationId": "updateUserPassword",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "current",
            "description": "Current password of the customer",
            "in": "formData",
            "type": "string",
            "minLength": 4,
            "required": true
          },
          {
            "name": "updated",
            "description": "New password for the customer",
            "in": "formData",
            "type": "string",
            "minLength": 4,
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Token",
              "type": "object",
              "properties": {
                "token": {
                  "type": "string",
                  "description": "Authenticated session hash"
                }
              }
            },
            "examples": {
              "application/json": {
                "token": "j24g57a67s8df6a787a6da7d6a"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/user/password/forgot": {
      "post": {
        "summary": "Forgot Password",
        "description": "Forgot Password",
        "tags": [
          "User"
        ],
        "x-module": "user/user-data",
        "operationId": "forgotUserPassword",
        "parameters": [
          {
            "name": "Origin",
            "description": "a URI indicating the server from which the request initiated",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "email",
            "description": "User email address",
            "in": "formData",
            "required": true,
            "type": "string",
            "format": "email"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Success",
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "message": "Success"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 400,
                "message": "Invalid or missing parameters"
              }
            }
          }
        }
      }
    },
    "/user/password/reset": {
      "post": {
        "summary": "Reset Password",
        "description": "Reset Password",
        "tags": [
          "User"
        ],
        "operationId": "resetUserPassword",
        "parameters": [
          {
            "name": "Origin",
            "description": "a URI indicating the server from which the request initiated",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "resetToken",
            "description": "Valid reset token",
            "in": "formData",
            "required": true,
            "type": "string"
          },
          {
            "name": "updated",
            "description": "New password for the customer",
            "in": "formData",
            "type": "string",
            "minLength": 4,
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Token",
              "type": "object",
              "properties": {
                "token": {
                  "type": "string",
                  "description": "Authenticated session hash"
                }
              }
            },
            "examples": {
              "application/json": {
                "token": "j24g57a67s8df6a787a6da7d6a"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 400,
                "message": "Invalid or missing parameters"
              }
            }
          }
        }
      }
    },
    "/user/clipped": {
      "get": {
        "summary": "Get Clipped Offers",
        "description": "Get the clipped offers for a user. Essentially the user's digital coupon 'wallet'.",
        "tags": [
          "Offers"
        ],
        "operationId": "getGroupOffers",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Comma separated list of keys to sort by. \n\n**Offer Attribute Sorting:**\nKeys include: `brand`, `clipStartDate`, `clipEndDate`, `value` and `type`. \n\nThese keys sort ascending by default. To sort descending, place a `-` (dash/minus sign) before the attribute, like: `sort=value,-type`. This would sort offers by value ascending and type descending.\n\n*Note when using `value`, the offers are sorted on the `offerSortValue` property not the `value` property.*\n\n**Special Sorting:** \nThese provide shortcuts or advanced sorting capabilities. Keys include:\n\n`popular` sort offers by popularity descending (most popular offers first) \n`relevant` sort offers by relevancy (requires authenticated user) \n`asc` sort offers oldest to newest \n`desc` sort offers newest to oldest \n\n*Note: These keys sort in a fixed direction. No flags (descending dashes, etc) are needed.*",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "brand",
                "clipStartDate",
                "clipEndDate",
                "expirationDate",
                "mdid",
                "value",
                "type",
                "-brand",
                "-clipStartDate",
                "-clipEndDate",
                "-expirationDate",
                "-mdid",
                "-value",
                "-type",
                "popular",
                "asc",
                "desc"
              ]
            },
            "default": "desc"
          },
          {
            "name": "categories",
            "in": "query",
            "description": "Comma separated list of category keys to filter offers by. \nTo get available category keys, see [Offers - Get Categories](#api-Offers-Get_Categories).",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "keywords",
            "in": "query",
            "description": "Comma separated list of keywords to filter offers by",
            "required": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Limit the number of returned results",
            "required": false,
            "type": "integer",
            "default": 12
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Skip specific number of offers to return. Used with limit to provide pagination.",
            "required": false,
            "type": "integer"
          },
          {
            "name": "pluck",
            "x-docs": false,
            "in": "query",
            "description": "Returns results by plucking the same named property off all offers (only mdid currently supported)",
            "required": false,
            "type": "string",
            "enum": [
              "mdid"
            ]
          },
          {
            "name": "groups",
            "in": "query",
            "x-docs": false,
            "x-write": false,
            "required": true,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "clipped"
              ]
            },
            "default": "clipped"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Offers",
              "type": "array",
              "items": {
                "title": "Offer",
                "type": "object",
                "properties": {
                  "mdid": {
                    "description": "offer unique identifier",
                    "type": "integer"
                  },
                  "type": {
                    "description": "`store` or `mfg`",
                    "type": "string",
                    "enum": [
                      "store",
                      "mfg"
                    ]
                  },
                  "badge": {
                    "description": "`empty`, `new` or `expiring`",
                    "type": "string"
                  },
                  "brand": {
                    "description": "offer brand name",
                    "type": "string"
                  },
                  "contextType": {
                    "type": "string",
                    "description": "The context type the offer is currently being returned as (to this user)",
                    "enum": [
                      "campaign",
                      "targeted",
                      "relevant",
                      "unranked"
                    ]
                  },
                  "contextTypes": {
                    "type": "array",
                    "description": "All the possible context types this offer could be returned as (to this user)",
                    "items": {
                      "type": "string",
                      "enum": [
                        "campaign",
                        "targeted",
                        "relevant",
                        "unranked"
                      ]
                    }
                  },
                  "description": {
                    "description": "full offer description",
                    "type": "string"
                  },
                  "shortDescription": {
                    "description": "short offer description",
                    "type": "string"
                  },
                  "imageUrl": {
                    "description": "url for offer image",
                    "type": "string"
                  },
                  "value": {
                    "description": "the value of the offer",
                    "type": "integer"
                  },
                  "valueText": {
                    "description": "value description",
                    "type": "string"
                  },
                  "valueSort": {
                    "description": "integer version of offerSortValue",
                    "type": "string"
                  },
                  "terms": {
                    "description": "offer terms and conditions",
                    "type": "string"
                  },
                  "minPurchase": {
                    "description": "offer minimum purchase requirements",
                    "type": "string"
                  },
                  "offerSortValue": {
                    "description": "value used to sort offer",
                    "type": "string"
                  },
                  "offerType": {
                    "description": "key defining how the offer savings are applied. Values: `cents off`, `compound cents off`, `bogo` (buy one get one), `order total`, `fixed price` or `percent off`",
                    "type": "string",
                    "enum": [
                      "cents off",
                      "compound cents off",
                      "bogo",
                      "order total",
                      "fixed price",
                      "percent off"
                    ]
                  },
                  "category": {
                    "title": "Category",
                    "type": "object",
                    "properties": {
                      "id": {
                        "description": "unique id",
                        "type": "string"
                      },
                      "name": {
                        "description": "friendly name",
                        "type": "string"
                      },
                      "active": {
                        "description": "total active offers in category",
                        "type": "integer"
                      },
                      "value": {
                        "description": "total value in cents of offers in category",
                        "type": "integer"
                      },
                      "key": {
                        "description": "fixed key for category, used to map category to images and filtering offers",
                        "type": "string"
                      }
                    }
                  },
                  "clipStartDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipEndDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "redeemedDate": {
                    "description": "redemption date by user (if applicable)",
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  "expirationDate": {
                    "title": "Date",
                    "type": "object",
                    "properties": {
                      "__type": {
                        "type": "string"
                      },
                      "iso": {
                        "type": "string"
                      }
                    }
                  },
                  "clipped": {
                    "description": "true if user has clipped this offer",
                    "type": "boolean"
                  },
                  "redemptionsPerTransaction": {
                    "description": "Identifies offer that may be redeemed more than once (if > 1)",
                    "type": "integer"
                  }
                }
              }
            },
            "headers": {
              "Last-Modified": {
                "type": "string"
              }
            },
            "examples": {
              "application/json": [
                {
                  "mdid": 40633,
                  "badge": "",
                  "brand": "Shop Foods",
                  "contextType": "targeted",
                  "contextTypes": [
                    "relevant",
                    "targeted"
                  ],
                  "description": "Save $0.75 on Tools Ketchup. Offer redeemed with valid in-store purchase.",
                  "shortDescription": "Save $0.75 on Tools Ketchup",
                  "imageUrl": "http://d17o.cloudfront.net/imageserver/cecd82efed312f421b019730f.jpg",
                  "value": 75,
                  "valueText": "save $0.75",
                  "terms": "LIMIT ONE COUPON REDEMPTION PER IN-STORE PURCHASE. ANY OTHER USE CONSTITUTES FRAUD.",
                  "minPurchase": "1",
                  "offerSortValue": "75",
                  "type": "mfg",
                  "category": {
                    "id": "c2ztS9Kuoz",
                    "name": "Grocery",
                    "active": 5,
                    "value": 300,
                    "key": "grocery"
                  },
                  "clipStartDate": {
                    "__type": "Date",
                    "iso": "2014-06-05T00:00:00.000Z"
                  },
                  "clipEndDate": {
                    "__type": "Date",
                    "iso": "2014-06-30T00:00:00.000Z"
                  },
                  "expirationDate": {
                    "__type": "Date",
                    "iso": "2014-07-31T00:00:00.000Z"
                  },
                  "redeemedDate": null,
                  "clipped": true,
                  "redeemed": false,
                  "expired": true
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/user/clipped/email": {
      "post": {
        "summary": "Send Clipped Email",
        "description": "Send email",
        "tags": [
          "User"
        ],
        "x-api-tags": [
          "Offers"
        ],
        "operationId": "sendClippedOffers",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "types",
            "in": "formData",
            "required": true,
            "x-docs": false,
            "x-write": false,
            "type": "array",
            "collectionFormat": "csv",
            "items": {
              "type": "string",
              "enum": [
                "clipped"
              ]
            },
            "default": "clipped"
          },
          {
            "name": "limit",
            "in": "formData",
            "x-docs": false,
            "x-write": false,
            "required": true,
            "type": "integer",
            "default": 1000
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "UserClippedEmail",
              "type": "object",
              "properties": {
                "email": {
                  "description": "email address of the user",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "email": "john.q@customer.com"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/user/clipped/summary": {
      "get": {
        "summary": "Get Clipped Summary",
        "description": "User clip summary",
        "tags": [
          "User"
        ],
        "operationId": "getUserClippedSummary",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "User Clipped Summary",
              "type": "object",
              "properties": {
                "clippedCount": {
                  "description": "number of items user has clipped",
                  "type": "integer"
                },
                "clippedValue": {
                  "description": "total value of items user has clipped",
                  "type": "integer"
                },
                "profileComplete": {
                  "description": "true if user has completed profile",
                  "type": "boolean"
                }
              }
            },
            "examples": {
              "application/json": {
                "clippedCount": 78,
                "clippedValue": 65,
                "profileComplete": true
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/user/history": {
      "get": {
        "summary": "Get History",
        "description": "User activity history",
        "tags": [
          "User"
        ],
        "operationId": "getUserHistory",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "User History",
              "type": "object",
              "properties": {
                "savingsThisYear": {
                  "description": "yearly redeemed value",
                  "type": "integer"
                },
                "savingsLastTwelveMonths": {
                  "description": "redeemed value in last 12 months",
                  "type": "integer"
                },
                "lifetimeSavings": {
                  "description": "total lifetime redeemed value",
                  "type": "integer"
                },
                "averageMonthlySavings": {
                  "description": "average monthly redeemed value",
                  "type": "integer"
                },
                "rank": {
                  "description": "user rank",
                  "type": "integer"
                },
                "saverType": {
                  "description": "user saver type",
                  "type": "string"
                },
                "recommended": {
                  "type": "object",
                  "properties": {
                    "missed": {
                      "description": "number of offers missed",
                      "type": "integer"
                    },
                    "expired": {
                      "description": "number of offers expired",
                      "type": "integer"
                    }
                  }
                },
                "monthlySavings": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "month": {
                        "description": "month",
                        "type": "integer"
                      },
                      "value": {
                        "type": "integer",
                        "description": "monthly redeemed value"
                      },
                      "year": {
                        "description": "year",
                        "type": "integer"
                      }
                    }
                  }
                },
                "updatedDate": {
                  "title": "Date",
                  "type": "object",
                  "properties": {
                    "__type": {
                      "type": "string"
                    },
                    "iso": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "type": "string",
                "default": "public, max-age=3600, must-revalidate"
              }
            },
            "examples": {
              "application/json": {
                "savingsThisYear": 10050,
                "savingsLastTwelveMonths": 40200,
                "lifetimeSavings": 76525,
                "averageMonthlySavings": 3375,
                "rank": 15,
                "saverType": "bottom",
                "recommended": {
                  "missed": 65,
                  "expired": 65
                },
                "monthlySavings": [
                  {
                    "month": 1,
                    "value": 3375,
                    "year": 2014
                  },
                  {
                    "month": 2,
                    "value": 2433,
                    "year": 2014
                  },
                  {
                    "month": 3,
                    "value": 4100,
                    "year": 2014
                  },
                  {
                    "month": 4,
                    "value": 4673,
                    "year": 2014
                  },
                  {
                    "month": 5,
                    "value": 3375,
                    "year": 2014
                  }
                ],
                "updatedDate": {
                  "__type": "Date",
                  "iso": "2014-06-26T16:41:00.007Z"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/locations": {
      "get": {
        "summary": "Retail Locations",
        "description": "Returns store locations, filtered by postal code or active status",
        "tags": [
          "User"
        ],
        "x-module": "user/user-data",
        "operationId": "getRetailerLocations",
        "parameters": [
          {
            "name": "live",
            "description": "flag to return active or non-active stores",
            "type": "boolean",
            "in": "query",
            "required": false
          },
          {
            "name": "postalCode",
            "description": "postal code",
            "type": "integer",
            "in": "query",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Locations",
              "type": "array",
              "items": {
                "title": "Location",
                "type": "object",
                "properties": {
                  "RetailerStoreNumber": {
                    "description": "Retailer-provided store identifier",
                    "type": "string"
                  },
                  "InmarStoreNumber": {
                    "description": "Unique Inmar ID for this location",
                    "type": "string"
                  },
                  "StoreDetail": {
                    "title": "StoreDetail",
                    "type": "object",
                    "properties": {
                      "Name": {
                        "description": "Store contact's full name",
                        "type": "string"
                      },
                      "Address1": {
                        "description": "Address of store, line 1",
                        "type": "string"
                      },
                      "Address2": {
                        "description": "Address of store, line 2",
                        "type": "string"
                      },
                      "City": {
                        "description": "Location's city",
                        "type": "string"
                      },
                      "State": {
                        "description": "Location's state, Two-digit abbreviation.",
                        "type": "string"
                      },
                      "PostalCode": {
                        "description": "Location's zip code, 5-digits",
                        "type": "string"
                      },
                      "PostalExtension": {
                        "description": "Location's zip code route number, 4 digits",
                        "type": "string"
                      },
                      "CountryID": {
                        "description": "Location's Inmar country ID",
                        "type": "string"
                      },
                      "CountryCode": {
                        "description": "Location's ISO country code, 2-digits",
                        "type": "string"
                      },
                      "Phone1": {
                        "description": "Primary phone number",
                        "type": "string"
                      },
                      "Phone2": {
                        "description": "Secondary phone number",
                        "type": "string"
                      },
                      "Fax": {
                        "description": "Fax number",
                        "type": "string"
                      },
                      "Latitude": {
                        "description": "Location's latitude",
                        "type": "string"
                      },
                      "Longitude": {
                        "description": "Location's longitude",
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "examples": {
              "application/json": [
                {
                  "RetailerStoreNumber": "11618",
                  "InmarStoreNumber": "21203",
                  "StoreDetail": {
                    "Name": "Store #11618",
                    "Address1": "415 Soundview Avenue",
                    "City": "Bronx",
                    "State": "NY",
                    "PostalCode": "10473-3021",
                    "CountryID": "1",
                    "CountryCode": "US"
                  }
                }
              ]
            }
          }
        }
      }
    },
    "/receipts/email": {
      "post": {
        "summary": "Email E-Receipt",
        "description": "Takes formatted HTML from POS (DPN) and creates an email to send to the user",
        "tags": [
          "Receipts"
        ],
        "operationId": "emailReceipt",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "email-receipt",
            "description": "required information to send an E-Receipt",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "required": true,
                  "type": "string"
                },
                "receiptHtml": {
                  "required": true,
                  "type": "string"
                }
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Success",
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "message": "Success"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/receipts": {
      "get": {
        "summary": "Get E-Receipts",
        "description": "Retrieves all receipts available for a user",
        "tags": [
          "Receipts"
        ],
        "operationId": "getReceipts",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "title": "Receipts",
              "type": "array",
              "items": {
                "title": "Receipt",
                "type": "object",
                "properties": {
                  "basketId": {
                    "type": "string",
                    "description": "Identifier for Basket"
                  },
                  "date": {
                    "type": "string",
                    "description": "ISO formatted date string"
                  },
                  "amount": {
                    "type": "string",
                    "description": "Receipt Value"
                  }
                }
              }
            },
            "examples": {
              "application/json": [
                {
                  "basketId": "160105-144208-07872-0001-2571",
                  "date": "2016-01-05",
                  "amount": "0.69"
                },
                {
                  "basketId": "160105-162323-07872-0001-2577",
                  "date": "2016-01-05",
                  "amount": "0.69"
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          }
        }
      }
    },
    "/receipts/link": {
      "get": {
        "summary": "Get E-Receipt Link",
        "description": "Given an ID, returns a one time use URL to retrieve a specific receipt",
        "tags": [
          "Receipts"
        ],
        "operationId": "getReceiptLink",
        "parameters": [
          {
            "name": "x-auth-token",
            "description": "Authenticated session hash (Required). See [User - Login](#api-User-Login)",
            "in": "header",
            "required": true,
            "type": "string"
          },
          {
            "name": "basketId",
            "in": "query",
            "description": "ID of the basket for the eReceipt that the user is requesting.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Receipt Link Response",
            "schema": {
              "title": "Receipt Link",
              "type": "string",
              "items": {
                "title": "ReceiptLink",
                "type": "object",
                "properties": {
                  "html": {
                    "type": "string",
                    "description": "HTML formatted EReceipt response"
                  }
                }
              }
            },
            "examples": {
              "application/json": {
                "html": "    <div class=\"e-receipt-snippet\" style=\"width: 400px\">\n        <div align=\"center\">\n            <img class=\"e-receipt-org-logo\" src=\"http://www.myorg.com/Logo.gif\"/>\n        </div>\n        <address align=\"center\">\n            STORE #050505 9384 S. Morlow Street<br/>\n            New York, NY, <a href=\"tel:555-555-5555\">555-555-5555</a>\n        </address>\n        <br/>\n        <table width=\"90%\">\n            <tr><td>1 07047042024</td><td>$0.72</td></tr>\n            <tr><td>1 07047042024</td><td>$0.72</td></tr>\n            <tr><td>1 01780012087</td><td>$2.65</td></tr>\n            </table>\n        <div align=\"center\">\n            <img class=\"e-receipt-barcode\"<br/>4938\n        </div>\n        <div align=\"center\">\n            For more details, go to Inmart.com\n        </div>\n    </div>"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "title": "Response",
              "type": "object",
              "properties": {
                "status": {
                  "description": "status code",
                  "type": "string"
                },
                "message": {
                  "description": "status message",
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "status": 401,
                "message": "Unauthorized"
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "title": "Receipt Not Found",
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            },
            "examples": {
              "application/json": {
                "message": "Receipt Not Found"
              }
            }
          }
        }
      }
    }
  }
}