| ClassIT+™ |
The articleToIndex method performs a search and retrieves the Index entries that reference an Article/Item Number.
See the following for more information:
- Endpoints
- Method Definition
- Parameter Name, Description, and Data Type
- Method Result
- Method JSON Request
- Method JSON Result
- Method Result Definitions
- Validation and Error Messages
|
Please note articleToIndex returns Index entries from the current publication only. The current publication is determined by the service and is not a request parameter. See ClassIT+ API Data Mapping for more information. |
Endpoints
- Sandbox URL: https://Snbxapi-se.nmfta.org/api/v1.0/search/articleToIndex
- Production URL: https://Api-se.classitplus.com/api/v1.0/search/articleToIndex
Method Definition
- Http Method: POST
- Authorization header: Bearer JWT
Parameter Name, Description, and Data Type
| Parameter Name | Description | Data Type |
|---|---|---|
| articleNumber | Item Number to search in the Index. Leading and trailing spaces and leading zeros are removed before the search (01050 is searched as 1050). | String Min. Length = 3 Max. Length = 10 |
Method Result
Method JSON Request
| Result Status | Results JSON String |
|---|---|
| Http Method | POST |
| Body | { "articleNumber": "1050" } |
Method JSON Result
| Result Status | Result JSON String |
|---|---|
| success |
{ "success": true, "message": "", "indexes": [ { "articleNumbers": [ "1050" ], "keywords": [ "Gates" ], "heading": "Gates", "isHeading": false } ] } |
| failure | { "success": false, "message": "The article numbers must be between 3 and 10 characters long." } |
Method Result Definitions
| 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 that reference the Article/Item Number, sorted by heading. Empty when there are no matches. 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. |
|
Validation and Error Messages
| Please note that as with the other article, rule, and package methods, validation failures are returned in the result with success set to false and a message. They are not returned as a different HTTP status code. Each successful call is counted as an article lookup call. |
| Condition | Result Message | Code |
|---|---|---|
| articleNumber is missing or empty. | The article ID cannot be empty. Please provide a valid article ID to proceed with the request. | S22 |
| articleNumber is shorter than 3 or longer than 10 characters after leading zeros are removed. | The article number must be between 3 and 10 characters long. | S25 |
| The hourly API call limit has been reached. See ClassIT+ API Rate Limits. | A message with the time (UTC) when the limit resets. | |
| The access token is invalid or missing. | HTTP 401 Unauthorized | |
| An unexpected server error occurs. | A generic error message. |