Absorb Integration API (v1)
Download OpenAPI specification:Download
List all available coupons.
Authorizations:
query Parameters
limit | string (Deprecated) The maximum number of items to return in the current page of the collection. |
offset | string (Deprecated) The number of pages to offset into the collection. |
_filter | string One or more filter operations to be performed on the collection. The referenced fields must allow filtering. See the respective report's schema for which fields can be filtered. Supports most of the OData filter syntax. Supported operations: * eq, * ne, * gt, * ge, * lt, * le, * and, * or, * not, * () Supported functions: * substringof('value',fieldName), * endswith(fieldName,'value'), * startswith(fieldName,'value'), * tolower(fieldName), * toupper(fieldName) Examples:
|
_sort | string Optional list of comma-separated fields to sort the collection by. The referenced fields must allow sorting. See the respective report's schema for which fields can be sorted. If not specified, all report fields are returned. To sort in a descending manner, prefix the field name with |
_limit | string The maximum number of items to return in the current page of the collection. |
_offset | string The number of pages to offset into the collection. |
header Parameters
x-api-key | string |
x-api-version | string 1 |
Responses
Response Schema: application/json
totalItems | integer <int32> The total number of items in the unbounded collection |
returnedItems | integer <int32> The number of items in the bound collection being returned |
limit | integer <int32> The current page size for the collection |
offset | integer <int32> The current offset for the collection |
Array of objects (CouponResource) |
Response samples
- 200
- 422
{- "totalItems": 0,
- "returnedItems": 0,
- "limit": 0,
- "offset": 0,
- "coupons": [
- {
- "id": "string",
- "courseIds": [
- "string"
], - "name": "string",
- "description": "string",
- "code": "string",
- "discount": 0,
- "discountType": 0,
- "expiryDate": "2019-08-24T14:15:22Z",
- "maxUses": 0,
- "isActive": true,
- "departmentId": "string",
- "dateAdded": "2019-08-24T14:15:22Z",
- "dateEdited": "2019-08-24T14:15:22Z"
}
]
}
Get an individual coupon by ID.
Authorizations:
path Parameters
couponId required | string <guid> The coupon ID. |
header Parameters
x-api-key | string |
x-api-version | string 1 |
Responses
Response Schema: application/json
id | string <guid> The coupon ID. |
courseIds | Array of strings <guid> [ items <guid > ] The list of course IDs this coupon is for. |
name | string The coupon name. |
description | string The coupon description. |
code | string The coupon code. |
discount | number <decimal> The coupon discount. |
discountType | integer Enum: 0 1 The coupon's type of discount. Possible Enum Values: |
expiryDate | string <date-time> The coupon's expiry date. |
maxUses | integer <int32> The coupon's max number of uses. |
isActive | boolean True if the coupon is active, false otherwise. |
departmentId | string <guid> The coupon department ID. |
dateAdded | string <date-time> The date the coupon was added. |
dateEdited | string <date-time> The date the coupon was last edited. |
Response samples
- 200
- 404
{- "id": "string",
- "courseIds": [
- "string"
], - "name": "string",
- "description": "string",
- "code": "string",
- "discount": 0,
- "discountType": 0,
- "expiryDate": "2019-08-24T14:15:22Z",
- "maxUses": 0,
- "isActive": true,
- "departmentId": "string",
- "dateAdded": "2019-08-24T14:15:22Z",
- "dateEdited": "2019-08-24T14:15:22Z"
}