Products – Check Stock Availability per SKU
This API request allows you to check if a SKU is Out of Stock by sending a POST request to the variantstatus endpoint. This can be useful in case you need to check if the SKU is available for ordering prior to submitting orders to our system.
To utilize this option, just send a POST API request to the following URL below:
Each API request to the Gooten API must have the RecipeID parameter included in the URL. This is typically used to authenticate to the Gooten API. Please be sure to replace the YourRecipeID in the example with your proper RecipeID from the Gooten Admin.
In the body of the request, you'll need to include the information listed below:
Skus
- required - an array of SKU names to check the availability for.CountryCode
- required - the 2 character (ISO 3166-1 alpha-2) country code that the user is interested in shipping to.State
- required - shipping state (if applicable).PostalCode
- required - shipping postal code.
You can check an example payload below:
{
"Skus": [
"Apparel-Sublimation-Sweatshirt-M-AOP",
"Apparel-DTG-TShirt-TSC-2168-L-Natural-Unisex-CF",
"Apparel-DTG-Hanes-TShirt-5180-M-DeepForest-Mens-CF",
"Apparel-DTG-Tshirt-Gildan-5000-2XL-Black-Mens-CF"],
"CountryCode": "US",
"State": "NY",
"PostalCode": "10019"
}
The response will return an array of SKUs that are validated to be Out of Stock, like in the example below:
[
"Apparel-Sublimation-Sweatshirt-M-AOP",
"apparel-dtg-hanes-tshirt-5180-m-deepforest-mens-cf"
]
In case all the SKUs you listed under the Skus array are available, the response will return an empty array.