Skip to main content

Stock Admin API (0.1.0)

Download OpenAPI specification:Download

team-order-management: team-order-management@newstore.com

This internal stock API provides access to availability values in the platform.

Get unallocated items

Retrieves the count for unallocated items for a specified set of ATP keys, where ATP keys are defined as a combination of the product ID and fulfillment location.

The number of unallocated items returned in the response payload is the number of items that are sellable on hand, after removing the number of safety stock items and allocations.

Note: This API only supports requesting for 2000 items. If more items need to be requested, use multiple requests.

Authorizations:
newStoreAccessToken
Request Body schema: application/json

A list of ATP keys

required
Array of objects [ 1 .. 2000 ] items
Array ([ 1 .. 2000 ] items)
product_id
required
string non-empty

The id of the product.

fulfillment_node_id
required
string non-empty

The id of the fulfillment node.

Responses

Request samples

Content type
application/json
{
  • "atp_keys": [
    ]
}

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get unallocated items for a product

Retrieves the count for unallocated items for the specified product ID. In this request, the ATP keys are defined as a combination of the same product ID and different fulfillment locations.

The number of unallocated items returned in the response payload is the number of items that are sellable on hand, after removing the number of safety stock items and allocations.

Note: This API only supports requesting for 2000 items. If more items need to be requested, use multiple requests.

Authorizations:
newStoreAccessToken
query Parameters
product_id
string

The product ID of the item.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get ATP by product ids

Retrieves the atp for the specified product IDs. Note: This API only supports requesting for 2000 items. If more items need to be requested fetch the next page. The boolean has_more and the number total_count indicates if there are more pages to be fetched.

Authorizations:
newStoreAccessToken
Request Body schema: application/json

A list of ATP keys

products
required
Array of strings non-empty
page_number
required
number multiple of 1 >= 1

The page number of paginated response. The page number starts at 1

page_size
required
number multiple of 1 [ 1 .. 2000 ]

The max size of the paginated response. This value should not be more than 2000.

Responses

Request samples

Content type
application/json
{
  • "products": [
    ],
  • "page_number": 1,
  • "page_size": 500
}

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "has_more": false
}

Update the store mapping.

Updates the store mapping for the provided fulfillment node in the NewStore platform. This operation will not affect any ATP values in the platform.

Authorizations:
newStoreAccessToken
path Parameters
fulfillment_node_id
required
string

The identifier of the fulfillment node.

Request Body schema: application/json
store_id
required
string

New store id for the provided fulfillment node. If value is an empty string the store id will be removed from the provided fulfillment node.

Responses

Request samples

Content type
application/json
Example
{
  • "store_id": "06d2a32a-b251-4751-83c6-81517a46e79f"
}

Response samples

Content type
application/problem+json
{
  • "messages": [
    ],
  • "request_id": "1235a3d3-1884-4e95-9926-d7253edb4f7f"
}