| ClassIT+™ |
The SupplementIndexBatch method retrieves the Supplement Index data, one page at a time.
See the following for more information:
|
Please note that SupplementIndexBatch is only available during the batch availability window. The batch can contain thousands of Index entries, so the result is returned in pages. See ClassIT+ API Data Mapping for more information. |
Method Definition
- Http Method: POST
- Authorization header: Bearer JWT
- Sandbox URL: https://snbxapi-se.nmfta.org/api/v1.0/search/SupplementIndexBatch
- Production URL: https://Api-se.classitplus.com/api/v1.0/search/SupplementIndexBatch
The SupplementIndexBatch API method takes two optional paging parameters, passed in the query string. No request body is required.
| Parameter Name | Description | Data Type |
|---|---|---|
| pageNumber (optional) | The page of results to return. If omitted, assumes 1. Values lower than 1 are treated as 1. | Integer Min. Value = 1 Default = 1 |
| pageSize (optional) | The number of Index entries per page. If omitted, or if the value is 0 or lower, assumes 1000. Values above the maximum are reduced to the maximum. The result returns the page size actually applied. | Integer Default = 1000 Max. Value = 5000 |
Method Request
Method JSON Request
| Result Status | Result JSON String |
|---|---|
| Http Method | POST |
| Query String | ?pageNumber=1&pageSize=1000 |
| BODY | None required |
Method Result
Method JSON Result
| Result Status | Result JSON String |
|---|---|
| success | { "success": true, "message": "", "indexes": [ { "articleNumbers": [ "1050" ], "keywords": [ "Gates" ], "heading": "Gates", "isHeading": false } ], "totalCount": 12840, "pageNumber": 1, "pageSize": 1000, "totalPages": 13 } |
| failure | { "success": false, "message": "The batch is not currently available. Please try again between <start date> and <end date> (UTC)." } |
Result Definition
| JSON Properties | Description | Data Type |
|---|---|---|
| success | Identifies if the method call completed successfully. |
|
| message | Result message. Contains the validation or error message when success is false. |
|
| indexes | List of Index entries on the requested page. Empty when the page is beyond the last page. Each record includes the following properties: articleNumbers–Article/Item Numbers referenced by the Index entry. keywords–Index keywords. heading–Heading text of the Index entry. isHeading–Denotes if the entry is a heading. |
|
| totalCount | Total number of Index entries in the batch across all pages. |
|
| pageNumber | The page number this result represents. |
|
| pageSize | The page size applied to this result. |
|
| totalPages | Total number of pages available for the applied page size. |
|
Retrieving the Full Batch
To retrieve every Index entry in the batch, do the following:
- Call SupplementIndexBatch with pageNumber=1 and the pageSize you want to use.
- Read totalPages from the result.
- Call the method again for each page from 2 through totalPages, using the same pageSize.
Entries are returned in a stable order, so consecutive pages do not overlap. A pageNumber beyond totalPages returns success = true with an empty indexes list.
Validation and Error Messages
| Please note the current Supplement batch publication is determined by the service and is not a request parameter. |
| Condition | Result |
|---|---|
| The request is made outside the batch availability window. | success = false, with a message giving the availability dates (UTC). |
| pageNumber or pageSize is not an integer. | HTTP 400 Bad Request |
| The access token is invalid or missing. | HTTP 401 Unauthorized |
| An unexpected server error occurs. | success = false, with a generic error message. |