Przejdź do głównej zawartości

List a product's storage location placements

POST
/products.listPlacements
curl --request POST \
--url https://api.sancho-wms.pl/v1/products.listPlacements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "integrationId": 1, "product": 1, "warehouseId": 1 }'

Returns the storage locations where Sancho has a product placed, with the quantity in each; locations holding none are left out. product is the product’s ERP id (product.id in the product list) in integrationId, and warehouseId limits the answer to stock booked under one warehouse. Not paged; each line’s storageLocationId is the id the storage location lookup takes.

Media typeapplication/json
object
integrationId
required
number
product
required
number | string
warehouseId
number | string

Example generated

{
"integrationId": 1,
"product": 1,
"warehouseId": 1
}

Successful response

Media typeapplication/json
ProductLocationStock
Array<object>
ProductLocationStockLine
object
storageLocationId
required
number
name
required
string
chainLabel
required
string | null
externalWarehouseId
required
number | null
externalWarehouseKey
required
string | null
quantity
required
number

Example generated

[
{
"storageLocationId": 1,
"name": "example",
"chainLabel": "example",
"externalWarehouseId": 1,
"externalWarehouseKey": "example",
"quantity": 1
}
]

Bad request

Media typeapplication/json
error.BAD_REQUEST

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "BAD_REQUEST",
"message": "Bad request",
"issues": []
}

Unauthorized

Media typeapplication/json
error.UNAUTHORIZED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"issues": []
}

Payment required

Media typeapplication/json
error.PAYMENT_REQUIRED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "PAYMENT_REQUIRED",
"message": "Payment required",
"issues": []
}

Forbidden

Media typeapplication/json
error.FORBIDDEN

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "FORBIDDEN",
"message": "Forbidden",
"issues": []
}

Not found

Media typeapplication/json
error.NOT_FOUND

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}

Unprocessable content

Media typeapplication/json
error.UNPROCESSABLE_CONTENT

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNPROCESSABLE_CONTENT",
"message": "Unprocessable content",
"issues": []
}

Too many requests

Media typeapplication/json
error.TOO_MANY_REQUESTS

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests",
"issues": []
}

Internal server error

Media typeapplication/json
error.INTERNAL_SERVER_ERROR

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}

Service unavailable

Media typeapplication/json
error.SERVICE_UNAVAILABLE

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "SERVICE_UNAVAILABLE",
"message": "Service unavailable",
"issues": []
}