Omniplex Docs

Shop

These API endpoints are related to the IBL shop.

GET
/shop/public-coupons

Get Shop Coupons

Gets the publicly viewable shop coupons on the list

/shop/public-coupons
curl -X GET "https://spider.omniplex.gg/shop/public-coupons"

Success

{
  "items": [
    {
      "allowed_users": [
        "string"
      ],
      "applicable_items": [
        "string"
      ],
      "cents": 0.1,
      "code": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "expiry": 0,
      "id": "string",
      "last_updated": "2019-08-24T14:15:22Z",
      "max_uses": 0,
      "public": true,
      "requirements": [
        "string"
      ],
      "reuse_wait_duration": 0,
      "target_types": [
        "string"
      ],
      "updated_by": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "usable": true
    }
  ]
}

GET
/shop/items

Get Shop Items

Gets the publicly viewable shop items on the list

/shop/items
curl -X GET "https://spider.omniplex.gg/shop/items"

Success

{
  "items": [
    {
      "benefits": [
        "string"
      ],
      "cents": 0.1,
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "description": "string",
      "duration": 0,
      "id": "string",
      "last_updated": "2019-08-24T14:15:22Z",
      "name": "string",
      "target_types": [
        "string"
      ],
      "updated_by": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      }
    }
  ]
}

GET
/shop/item-benefits

Get Shop Items

Gets the publicly viewable shop items on the list

/shop/item-benefits
curl -X GET "https://spider.omniplex.gg/shop/item-benefits"

Success

{
  "items": [
    {
      "created_at": "2019-08-24T14:15:22Z",
      "created_by": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "description": "string",
      "id": "string",
      "last_updated": "2019-08-24T14:15:22Z",
      "name": "string",
      "target_types": [
        "string"
      ],
      "updated_by": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      }
    }
  ]
}

GET
/{target_type}/{target_id}/shop/purchases

Get Shop Purchases

Returns the purchase history for an entity.

/{target_type}/{target_id}/shop/purchases

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

curl -X GET "https://spider.omniplex.gg/string/string/shop/purchases"

Success

{
  "items": [
    {
      "cents": 0.1,
      "created_at": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "item_id": "string",
      "target_id": "string",
      "target_type": "string"
    }
  ]
}

POST
/{target_type}/{target_id}/shop/purchase

Purchase Shop Item

Spends an entity's earned vote credits on a shop item, optionally discounted by a coupon code. Returns a 204 on success.

/{target_type}/{target_id}/shop/purchase

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

coupon_codestring

An optional coupon code to apply to this purchase

item_idstring

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

curl -X POST "https://spider.omniplex.gg/string/string/shop/purchase" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "coupon_code": "string",
    "item_id": "string"
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}