Skip to content
Get started

Create External Counting Lines

counting_lines.create_external_counting_lines(CountingLineCreateExternalCountingLinesParams**kwargs) -> CountingLineCreateExternalCountingLinesResponse
POST/api/v2/public/externalcountinglines

Books counted quantities from an external counting system as stock movements. Use it instead of the stock movement endpoint when counts come from a third-party counting provider.

ParametersExpand Collapse
counting_date_time: Optional[Union[str, datetime]]

The date and time the counting was performed.

formatdate-time
lines: Optional[Iterable[Line]]

The list of counted product lines.

counted_quantity: Optional[float]

The counted quantity for this product.

formatfloat
product_barcode: Optional[str]

The product barcode that was scanned.

store_no: Optional[str]

The store number.

ReturnsExpand Collapse
class CountingLineCreateExternalCountingLinesResponse: …

Standard success response returned by mutation endpoints.

success: bool

Indicates whether the operation completed successfully.

data: Optional[str]

Optional data payload returned by the operation.

message: Optional[str]

Human-readable message describing the result.

Create External Counting Lines

import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.counting_lines.create_external_counting_lines()
print(response.success)
{
  "success": true,
  "data": "data",
  "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": "data",
  "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."
}