> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ngapainrepot.space/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ngapainrepot.space/_mcp/server.

# Get Listing Stock Availability on Warehouses

GET {{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639

Get Listing Stock Availability on Warehouses

Reference: https://docs.ngapainrepot.space/toco/warehouses/get-listing-stock-availability-on-warehouses

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: toco
  version: 1.0.0
paths:
  /listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639:
    get:
      operationId: get-listing-stock-availability-on-warehouses
      summary: Get Listing Stock Availability on Warehouses
      description: Get Listing Stock Availability on Warehouses
      tags:
        - subpackage_warehouses
      parameters:
        - name: listing_variant_id
          in: query
          required: false
          schema:
            type: string
        - name: quantity
          in: query
          required: false
          schema:
            type: string
        - name: address_id
          in: query
          required: false
          schema:
            type: string
        - name: scope
          in: query
          description: e.g. PRIMARY_AREA, ALL
          required: false
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 200 - Scope PRIMARY_AREA / 200 - Scope ALL
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Warehouses_getListingStockAvailabilityOnWarehouses_Response_200
        '400':
          description: >-
            400 - Variant ID Required / 400 - Invalid Variant ID for Selected
            Listing
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetListingStockAvailabilityOnWarehousesRequestBadRequestError
        '404':
          description: 404 - Listing Not Found
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetListingStockAvailabilityOnWarehousesRequestNotFoundError
servers:
  - url: '{{base_url}}'
    description: '{{base_url}}'
components:
  schemas:
    ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataArea:
      type: object
      properties:
        code:
          type: string
        label:
          type: string
      title: >-
        ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataArea
    ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItemsArea:
      type: object
      properties:
        code:
          type: string
        label:
          type: string
      title: >-
        ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItemsArea
    ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItemsLocationsItems:
      type: object
      properties:
        availableQuantity:
          type: number
          format: double
        city:
          type: string
        displayName:
          type: string
        province:
          type: string
        stockStatus:
          type: string
      title: >-
        ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItemsLocationsItems
    ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItemsSummary:
      type: object
      properties:
        availableLocations:
          type: number
          format: double
        hasAnyStock:
          type: boolean
        totalLocations:
          type: number
          format: double
        unavailableLocations:
          type: number
          format: double
      title: >-
        ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItemsSummary
    ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItems:
      type: object
      properties:
        area:
          $ref: >-
            #/components/schemas/ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItemsArea
        locations:
          type: array
          items:
            $ref: >-
              #/components/schemas/ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItemsLocationsItems
        summary:
          $ref: >-
            #/components/schemas/ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItemsSummary
      title: >-
        ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItems
    ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataLocationsItems:
      type: object
      properties:
        availableQuantity:
          type: number
          format: double
        city:
          type: string
        displayName:
          type: string
        province:
          type: string
        stockStatus:
          type: string
      title: >-
        ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataLocationsItems
    ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataSummary:
      type: object
      properties:
        availableLocations:
          type: number
          format: double
        hasAnyStock:
          type: boolean
        totalLocations:
          type: number
          format: double
        unavailableLocations:
          type: number
          format: double
      title: >-
        ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataSummary
    ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        area:
          $ref: >-
            #/components/schemas/ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataArea
        areas:
          type: array
          items:
            $ref: >-
              #/components/schemas/ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataAreasItems
        listingId:
          type: string
        locations:
          type: array
          items:
            $ref: >-
              #/components/schemas/ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataLocationsItems
        quantity:
          type: number
          format: double
        scope:
          type: string
        summary:
          $ref: >-
            #/components/schemas/ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaDataSummary
        variantId:
          type: string
      title: >-
        ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaData
    Warehouses_getListingStockAvailabilityOnWarehouses_Response_200:
      type: object
      properties:
        code:
          type: number
          format: double
        data:
          $ref: >-
            #/components/schemas/ListingWarehouseAvailabilityD6D6Ab5E701E40Cc93DdA4875Ec58639GetResponsesContentApplicationJsonSchemaData
      title: Warehouses_getListingStockAvailabilityOnWarehouses_Response_200
    GetListingStockAvailabilityOnWarehousesRequestBadRequestError:
      type: object
      properties:
        code:
          type: number
          format: double
        errorCode:
          type: string
        message:
          type: string
        stack:
          type: string
      title: GetListingStockAvailabilityOnWarehousesRequestBadRequestError
    GetListingStockAvailabilityOnWarehousesRequestNotFoundError:
      type: object
      properties:
        code:
          type: number
          format: double
        message:
          type: string
        stack:
          type: string
      title: GetListingStockAvailabilityOnWarehousesRequestNotFoundError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

```

## Examples

### 200 - Scope ALL



**Response**

```json
{
  "code": 200,
  "data": {
    "areas": [
      {
        "area": {
          "code": "JABODETABEK",
          "label": "Jabodetabek"
        },
        "locations": [
          {
            "availableQuantity": 1,
            "city": "Kabupaten Tangerang",
            "displayName": "Area Kabupaten Tangerang",
            "province": "Banten",
            "stockStatus": "IN_STOCK"
          },
          {
            "availableQuantity": 0,
            "city": "Kota Jakarta Selatan",
            "displayName": "Area Kota Jakarta Selatan",
            "province": "DKI Jakarta",
            "stockStatus": "OUT_OF_STOCK"
          }
        ],
        "summary": {
          "availableLocations": 1,
          "hasAnyStock": true,
          "totalLocations": 2,
          "unavailableLocations": 1
        }
      }
    ],
    "listingId": "d6d6ab5e-701e-40cc-93dd-a4875ec58639",
    "quantity": 1,
    "scope": "ALL",
    "variantId": "6a85bf4b-eb74-40b3-a61d-ccb363e2bf76"
  }
}
```

**SDK Code**

```python 200 - Scope ALL
import requests

url = "https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript 200 - Scope ALL
const url = 'https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 200 - Scope ALL
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 200 - Scope ALL
require 'uri'
require 'net/http'

url = URI("https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java 200 - Scope ALL
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 200 - Scope ALL
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp 200 - Scope ALL
using RestSharp;

var client = new RestClient("https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 200 - Scope ALL
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### 200 - Scope PRIMARY_AREA



**Response**

```json
{
  "code": 200,
  "data": {
    "area": {
      "code": "JABODETABEK",
      "label": "Jabodetabek"
    },
    "listingId": "d6d6ab5e-701e-40cc-93dd-a4875ec58639",
    "locations": [
      {
        "availableQuantity": 1,
        "city": "Kabupaten Tangerang",
        "displayName": "Area Kabupaten Tangerang",
        "province": "Banten",
        "stockStatus": "IN_STOCK"
      },
      {
        "availableQuantity": 0,
        "city": "Kota Jakarta Selatan",
        "displayName": "Area Kota Jakarta Selatan",
        "province": "DKI Jakarta",
        "stockStatus": "OUT_OF_STOCK"
      }
    ],
    "quantity": 1,
    "scope": "PRIMARY_AREA",
    "summary": {
      "availableLocations": 1,
      "hasAnyStock": true,
      "totalLocations": 2,
      "unavailableLocations": 1
    },
    "variantId": "6a85bf4b-eb74-40b3-a61d-ccb363e2bf76"
  }
}
```

**SDK Code**

```python 200 - Scope PRIMARY_AREA
import requests

url = "https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript 200 - Scope PRIMARY_AREA
const url = 'https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go 200 - Scope PRIMARY_AREA
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby 200 - Scope PRIMARY_AREA
require 'uri'
require 'net/http'

url = URI("https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java 200 - Scope PRIMARY_AREA
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php 200 - Scope PRIMARY_AREA
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp 200 - Scope PRIMARY_AREA
using RestSharp;

var client = new RestClient("https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift 200 - Scope PRIMARY_AREA
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://{{base_url}}/listing/warehouse-availability/d6d6ab5e-701e-40cc-93dd-a4875ec58639")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```