Skip to content
Get started

Create Store Product Logs

POST/api/v2/public/stores/{store_number}/products/stock/storeproductlogs

Books stock movements for a store, such as a loss, gain, correction or count. Each entry needs a reason code, which decides whether a comment, image or order number is required. The response returns the ids of the created movements in the order they were sent.

Path ParametersExpand Collapse
store_number: string
Query ParametersExpand Collapse
appUserName: optional string

The name of the app user performing the action.

is_counted_quantity: optional boolean

Whether the quantities represent counted values.

is_from_receipt: optional boolean

Whether the log entries originate from a receipt.

Body ParametersJSONExpand Collapse
storeproductlog: optional array of object { app_user_name, counted_quantity, customer_order_line_number, 25 more }

The list of store product log entries.

app_user_name: optional string

Name of the user the movement should be attributed to.

counted_quantity: optional number

Quantity actually counted, when the movement comes from a count.

formatdouble
customer_order_line_number: optional number
formatint32
customer_order_number: optional string
expected_quantity: optional number

Quantity the system expected, when the movement comes from a count.

formatdouble
location_code: optional string

Location code, as an alternative to the numeric location.

loss_comment: optional string
loss_image: optional string
loss_order_number: optional string
modification_datetime: optional string

When the movement happened. Use this when booking a movement after the fact.

formatdate-time
order_after_date: optional string
formatdate-time
pool_location: optional number
formatint32
product_number: optional string

The product number.

quantity: optional number

Quantity moved. Negative for stock leaving, positive for stock arriving. Required, and it may not be zero.

formatdouble
reason_code: optional number

Reason code for the movement. The code decides whether a comment, image or order number is also required.

formatint32
reference: optional string

Your own reference for this movement, returned again when you read the log back.

scanned_datetime: optional string
formatdate-time
source: optional string

Where the movement came from, so it can be attributed to your integration.

stock_pool_1: optional number

Quantity to book into stock pool 1.

formatdouble
stock_pool_10: optional number

Quantity to book into stock pool 10.

formatdouble
stock_pool_2: optional number

Quantity to book into stock pool 2.

formatdouble
stock_pool_3: optional number

Quantity to book into stock pool 3.

formatdouble
stock_pool_4: optional number

Quantity to book into stock pool 4.

formatdouble
stock_pool_5: optional number

Quantity to book into stock pool 5.

formatdouble
stock_pool_6: optional number

Quantity to book into stock pool 6.

formatdouble
stock_pool_7: optional number

Quantity to book into stock pool 7.

formatdouble
stock_pool_8: optional number

Quantity to book into stock pool 8.

formatdouble
stock_pool_9: optional number

Quantity to book into stock pool 9.

formatdouble
ReturnsExpand Collapse
success: boolean

Indicates whether the operation completed successfully.

data: optional array of number

Array of items returned by the operation.

message: optional string

Human-readable message describing the result.

Create Store Product Logs

curl https://api.colleqtive.net/api/v2/public/stores/$STORE_NUMBER/products/stock/storeproductlogs \
    -X POST \
    -H "Authorization: $COLLEQTIVE_BEARER_TOKEN"
{
  "success": true,
  "data": [
    0
  ],
  "message": "message"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}
Returns Examples
{
  "success": true,
  "data": [
    0
  ],
  "message": "message"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}