Skip to content

Stock availability

Use this endpoint to get information about the availability of stock-able products in different regions.

POST https://product.gelatoapis.com/v3/stock/region-availability

Request example

$ curl --location --request POST 'https://product.gelatoapis.com/v3/stock/region-availability' \
-H 'X-API-KEY: {{apiKey}}' \
-H 'Content-Type: application/json' \
-d '{
  "products": [
    "wall_hanger_product_whs_290-mm_whc_white_whm_wood_whp_w14xt20-mm",
    "frame_product_frs_279x432-mm_frc_natural-wood_frm_wood_frp_w12xt22-mm_gt_plexiglass"
  ]
}'

Response example

{
  "productsAvailability": [
    {
      "productUid": "wall_hanger_product_whs_290-mm_whc_white_whm_wood_whp_w14xt20-mm",
      "availability": [
        {
          "stockRegionUid": "US-CA",
          "status": "in-stock"
        },
        {
          "stockRegionUid": "EU",
          "status": "out-of-stock-replenishable"
        },
        {
          "stockRegionUid": "OC",
          "status": "in-stock"
        },
        {
          "stockRegionUid": "AS",
          "status": "out-of-stock"
        },
        {
          "stockRegionUid": "SA",
          "status": "out-of-stock"
        },
        {
          "stockRegionUid": "ROW",
          "status": "in-stock"
        }
      ]
    },
    {
      "productUid": "frame_product_frs_279x432-mm_frc_natural-wood_frm_wood_frp_w12xt22-mm_gt_plexiglass",
      "availability": [
        {
          "stockRegionUid": "US-CA",
          "status": "in-stock"
        },
        {
          "stockRegionUid": "EU",
          "status": "in-stock"
        },
        {
          "stockRegionUid": "OC",
          "status": "out-of-stock-replenishable"
        },
        {
          "stockRegionUid": "AS",
          "status": "in-stock"
        },
        {
          "stockRegionUid": "SA",
          "status": "out-of-stock"
        },
        {
          "stockRegionUid": "ROW",
          "status": "out-of-stock-replenishable"
        }
      ]
    }
  ]
}

Parameters

Parameter Type Description
products (required) string[] Array of product UIDs to check availability for. Product UIDs can be taken from Product Search API. Min. number of requested products is 1, max. 50.

Successful response

Response parameters

Parameter Type Description
productsAvailability (required) ProductAvailability[] Array of product's availability in region.

ProductAvailability parameters

Parameter Type Description
productUid (required) string Product UID from the request.
availability (required) Availability Availability in region.

Availability parameters

Parameter Type Description
stockRegionUid (required) string One of defined stock region UIDs.
status (required) string One of the possible availability statuses.

Parameter status can be one of 3 possible values:

  • in-stock - Product is in stock at one of Gelato Partners and can be be delivered to given region by at least one of the partners.

  • out-of-stock-replenishable - Product is temporarily out of stock at Gelato Partners but is in stock at the Gelato Hub which acts as a fallback solution, thus still can be delivered to the given region. Meantime the product is about to be replenished soon at the partners.

  • out-of-stock - Product is currently out of stock at both Gelato Partners and the Gelato Hub, thus cannot be delivered to the given region.

Products are constantly being replenished at Gelato Partners and Gelato Hub, so availability can change frequently.

Error response

Error response example:

{
  "code": "invalid_request_too_many_products",
  "message": "Too many products requested: 73 of maximum 50."
}
HTTP Status Code Code Message
400 invalid_request_too_many_products Too many products requested: N of maximum 50.
400 invalid_request_products_not_provided No products provided, at least one is required.
401 invalid_api_key_provided Access denied. Token is invalid.
404 invalid_request_not_supported_products The following products do not exist: P1, P2, ..., PN
500 internal_server_error We had a problem with our server. Problem reported. Try again later.

Regions definition

Defined list of regions with countries that are included to them is the following.

Region: US and Canada

Stock region UID: US-CA

  • United States
  • Canada

Region: South America

Stock region UID: SA

  • Brazil
  • Argentina
  • Bolivia
  • Chile
  • Colombia
  • Ecuador
  • Guyana
  • Paraguay
  • Peru
  • Suriname
  • Uruguay
  • Venezuela

Region: Oceania

Stock region UID: OC

  • Australia
  • New Zeland

Region: Asia

Stock region UID: AS

  • Singapore
  • Vietnam
  • Brunei
  • Cambodia
  • China
  • Indonesia
  • Japan
  • Laos
  • Thailand
  • Taiwan
  • South Korea
  • Myanmar
  • Philippines
  • Malaysia

Region: Europe

Stock region UID: EU

  • Albania
  • Andorra
  • Austria
  • Austria
  • Belarus
  • Belgium
  • Bosnia and Herzegovina
  • Bulgaria
  • Croatia
  • Cyprus
  • Czechia
  • Denmark
  • Estonia
  • Finland
  • France
  • Germany
  • Greece
  • Hungary
  • Iceland
  • Ireland
  • Italy
  • Kosovo
  • Latvia
  • Liechtenstein
  • Lithuania
  • Luxembourg
  • Malta
  • Moldova
  • Monaco
  • Montenegro
  • Netherlands
  • North Macedonia
  • Norway
  • Poland
  • Portugal
  • Romania
  • Russia
  • San Marino
  • Serbia
  • Slovakia
  • Slovenia
  • Spain
  • Sweden
  • Switzerland
  • Turkey
  • Ukraine
  • United Kingdom
  • Vatican City
  • Russia
  • Georgia

Region: Rest of the world

Stock region UID: ROW

  • Afghanistan
  • Armenia
  • Azerbaijan
  • Bahrain
  • Bangladesh
  • Bhutan
  • India
  • Iran
  • Iraq
  • Israel
  • Jordan
  • Kazakhstan
  • Kuwait
  • Kyrgyzstan
  • Maldives
  • Mongolia
  • Nepal
  • North Korea
  • Oman
  • Pakistan
  • Qatar
  • Saudi Arabia
  • Sri Lanka
  • Syria
  • Tajikistan
  • Fiji
  • Federated States of Micronesia
  • Kiribati
  • Marshall Islands
  • Nauru
  • Timor-Leste
  • Turkmenistan
  • United Arab Emirates (UAE)
  • Uzbekistan
  • Yemen
  • Palau
  • Papua New Guinea
  • Samoa
  • Tonga
  • Tuvalu
  • Vanuatu