{"swagger":"2.0","info":{"title":"Inventory API","description":"The Inventory API allows authorized retailer storefronts and commerce platform integrations to manage its inventory","version":"1"},"host":"api.sandbox.esw.com","schemes":["https"],"paths":{"/inventory/v1/{identifier}/inventory-availability":{"post":{"tags":["Availability"],"summary":"Get available-to-sell quantity for a list of SKUs","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"path","name":"identifier","required":true,"type":"string"},{"in":"body","name":"body","description":"Stock availability request","schema":{"$ref":"#/definitions/StockAvailabilityRequestDto"}}],"responses":{"200":{"description":"The request is processed.","schema":{"type":"array","items":{"$ref":"#/definitions/StockAvailabilityResponseDto"}}},"401":{"description":"The request is unauthorized.","schema":{"$ref":"#/definitions/ProblemDetails"}},"403":{"description":"The request is forbidden.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"The request is invalid.","schema":{"$ref":"#/definitions/ProblemDetailsErrorsResult"}},"404":{"description":"Fulfillment group configuration not found.","schema":{"$ref":"#/definitions/ProblemDetailsErrorsResult"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ProblemDetailsErrorsResult"}},"409":{"description":"Fulfillment group conflict.","schema":{"$ref":"#/definitions/ProblemDetailsErrorsResult"}},"default":{"description":"Error","schema":{"$ref":"#/definitions/ProblemDetails"}}},"security":[{"oauth2":["logistics.inventory.cart.availability.api.read"]}]}},"/inventory/v1/{identifier}/skus/availability":{"get":{"tags":["Availability"],"summary":"Get available-to-sell quantity for all SKUs","produces":["application/json"],"parameters":[{"in":"path","name":"identifier","required":true,"type":"string"},{"name":"deliveryCountry","in":"query","description":"Optional delivery country from the query string.","type":"string"},{"name":"continuationToken","in":"query","description":"Optional continuation token from the query string.","type":"string"}],"responses":{"200":{"description":"The request is processed.","schema":{"$ref":"#/definitions/BulkSkuAvailabilityResponseDto"}},"401":{"description":"The request is unauthorized.","schema":{"$ref":"#/definitions/ProblemDetails"}},"403":{"description":"The request is forbidden.","schema":{"$ref":"#/definitions/ProblemDetails"}},"400":{"description":"The request is invalid.","schema":{"$ref":"#/definitions/ProblemDetailsErrorsResult"}},"404":{"description":"Fulfillment group configuration not found.","schema":{"$ref":"#/definitions/ProblemDetailsErrorsResult"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ProblemDetailsErrorsResult"}},"409":{"description":"Fulfillment group conflict.","schema":{"$ref":"#/definitions/ProblemDetailsErrorsResult"}},"default":{"description":"Error","schema":{"$ref":"#/definitions/ProblemDetails"}}},"security":[{"oauth2":["logistics.inventory.cart.availability.api.read"]}]}}},"definitions":{"ProblemDetails":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"format":"int32","type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"additionalProperties":{}},"ProblemDetailsErrorsResult":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/definitions/InventoryApiError"}},"type":{"type":"string"},"title":{"type":"string"},"status":{"format":"int32","type":"integer"},"detail":{"type":"string"},"instance":{"type":"string"}},"additionalProperties":{}},"StockAvailabilityRequestDto":{"description":"Request to retrieve available-to-sell quantities for a list of SKUs.","required":["skus"],"type":"object","properties":{"deliveryCountryIso":{"description":"The ISO 3166-1 alpha-2 delivery country code.","type":"string"},"skus":{"description":"List of SKUs to retrieve available-to-sell quantities for.","type":"array","items":{"type":"string"}}},"additionalProperties":false},"StockAvailabilityResponseDto":{"type":"object","required":["sku","quantity"],"properties":{"sku":{"type":"string","description":"The SKU for which the available-to-sell quantity is provided."},"quantity":{"type":"integer","description":"The available-to-sell quantity for the SKU, aggregated across all fulfillment centers serving the delivery country.\r\nAlways zero or greater (never negative).","format":"int32"}},"additionalProperties":false,"description":"Represents the available-to-sell quantity for a single SKU."},"BulkSkuAvailabilityResponseDto":{"required":["skus","pageSize","itemCount"],"type":"object","properties":{"pageSize":{"type":"integer","format":"int32"},"itemCount":{"type":"integer","format":"int32"},"continuationToken":{"type":"string"},"skus":{"type":"array","items":{"$ref":"#/definitions/StockAvailabilityResponseDto"}}},"additionalProperties":false},"InventoryApiError":{"type":"object","properties":{"message":{"type":"string"}},"additionalProperties":false}},"securityDefinitions":{"oauth2":{"type":"oauth2","flow":"application","description":"Obtain an access token from the ESW identity server using the client credentials grant, then send it as Authorization: Bearer {access_token}.","tokenUrl":"https://security-sts.sandbox.eshopworld.com/connect/token","scopes":{"logistics.inventory.cart.availability.api.read":"Read available-to-sell inventory availability"}}}}