The Grainger Extract API retrieves SKU-level product information, transformed into Grainger’s required attribute format. This API is used to supply Grainger’s required attribute template and identify any data issues before the catalog is delivered.
Query Parameters
limit (integer)
This parameter specifies the maximum number of items that should be returned in a single API response. For example, if you set the limit to 10, the API will return a maximum of 10 items in the response.
Offset (integer)
This parameter specifies the starting point from which the API should fetch the item. For example, if you set the offset to 20 and the limit to 10, the API will skip the first 20 items and return the next 10 items starting from the 21st item.
Request Parameters
responseGraingerTemplateColumnList (string)
A list of Grainger template column names to include in the response. Each column name represents a specific product attribute expected by Grainger.
Example: "Harmonized Tariff Schedule"
Note: If responseGraingerTemplateColumnList is not provided, all mapped Grainger template columns will be returned for each SKU.
queryCondition (Array<Object>)
A list of filter conditions used to retrieve SKU records matching specific Grainger template values.
Each object inside queryCondition contains:
templateColumnName (string)
The name of the Grainger Template column used for filtering.
equalsvalue (string)
The value that the column must match for a SKU to be included which is mapped with Grainger Template column.
customerSkuIds(string)
A comma-separated list of SKU IDs provided by the customer. Use this to fetch data only for the specified SKUs.
Example: "SKU_1,SKU_2"
fromDateTime (string)
Start date and time for filtering SKUs based on last update or creation time.
Format: YYYY-MM-DD HH:MM
Example: "2024-12-02 10:06”
toDateTime (string)
End date and time for filtering SKUs based on last update or creation time.
Format: YYYY-MM-DD HH:MM
Example: "2024-01-02 11:06”
validationType (string)
Specifies the severity level for validation checks applied to Grainger rules.
Common values:
"Hard"→ validation error block the SKU. Typically means strict validation rules are enforced."Soft"→ validation errors are returned as warnings. Other possible values might include "Soft" for lenient validation.
Example: "Hard”
Note
Atleast one filtering option must be provided either queryCondition or one of the following request body parameters: customerSkuIds, fromDateTime, or toDateTime. If none of these parameters are supplied, the API will return an error.
If none of these parameters are supplied, the API will return an error as mentioned below:
No query conditions or body parameters (such as customer SKU ID, from datetime, or to datetime) were provided to filter the SKU.
Successful response
Response Parameters
results Array <Object>
List of SKU records returned by the API.
customerSkuId (string)
Defines the customers SKU identifier.
Example: SKU_1
type (string)
Indicates the type of record returned. This value is always "SKU".
residentTaxonomy(Object)
Indicates the SKU’s taxonomy classification, including its path, node name, customer taxonomy ID, and associated domain.
taxonomyPath (string)
Defines full taxonomy path.
taxonomyName (string)
Describes the assigned taxonomy node name.
taxonomyCustomerId (string)
Customer’s taxonomy identifier.
domainName (string)
Domain associated to this taxonomy.
skuAttributes
Describes Grainger template attributes and values.
attributeName (string)
Grainger template column name
attributeType (string)
How the value was derived ("String", "Deduced", "Package")
skuAttributeValues (array)
Attribute values (supports multi-value).
value (String)
The actual attribute value stored in PCC.
Validation Failures (graingerValidationFailures)
Used when a Grainger rule fails.
failedPCCAttribute (string)
PCC attribute that failed validation.
Example: “Brand”
graingerFileHeader (string)
Garinger column that failed validation.
Example: “Sell Pack Length (In)”
valueInCatalog
Actual attribute value retrieved from the catalog for the SKU.
Example: “Bahamas”
failureType (string)
Reason for validation failure.
Example: “Pattern does not match.”
validationRule
Validation rule that was violated.
Example: “The value should be numeric”
validationType
Specifies the severity level for validation checks applied to Grainger rules.
Common values:
"Hard"→ validation error block the SKU. Typically means strict validation rules are enforced."Soft"→ validation errors are returned as warnings. Other possible values might include "Soft" for lenient validation."Hard"→ validation error block the SKU. Typically means strict validation rules are enforced."Soft"→ validation errors are returned as warnings. Other possible values might include "Soft" for lenient validation.
offset (number)
Starting index of the result set (pagination).
totalRecords (number)
Total number of SKUs matching the request.
limit (Number)
Maximum number of SKUs returned (0 = no limit).