Skip to main content

Stock count completed format

Stock count completed export

{
"id": "hiiretail.contracts.logistics.stc.public.event.stock-count-completed.v1",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"title": "StockCountCompleted",
"description": "Contains details on the completed stock count",
"required": [
"tenantId",
"businessUnitId",
"stockCountId",
"type",
"submittedAt",
"submittedBy",
"numberOfItemsCounted",
"numberOfItemsNotCounted",
"items"
],
"properties": {
"tenantId": {
"type": "string",
"description": "Id of tenant"
},
"businessUnitId": {
"type": "string",
"description": "Id of business unit"
},
"stockCountId": {
"type": "string",
"description": "Id of the performed stock count"
},
"type": {
"enum": ["FULL", "CYCLE", "CONTROL", "TEST"],
"description": "Type of the stock count"
},
"submittedAt": {
"type": "string",
"format": "date-time",
"description": "Datetime to indicate when stock count was submitted"
},
"submittedBy": {
"type": "string",
"description": "User id for the user who submitted the stock count"
},
"comment": {
"type": "string",
"description": "Comment for the stock count"
},
"numberOfItemsCounted": {
"type": "number",
"description": "Number of items counted"
},
"numberOfItemsNotCounted": {
"type": "number",
"description": "Number of items not counted"
},
"expectedCostAmount": {
"type": ["number", "null"],
"description": "Expected cost amount of stock count"
},
"actualCostAmount": {
"type": "number",
"description": "Actual cost amount of stock count"
},
"firstCountedDateTime": {
"type": "string",
"format": "date-time",
"description": "First time entity was counted"
},
"lastCountedDateTime": {
"type": "string",
"format": "date-time",
"description": "Last time entity was counted"
},
"items": {
"type": "array",
"description": "Items being counted",
"items": {
"$ref": "StockCountItem.schema.json"
}
}
}
}

{
"id": "hiiretail.contracts.logistics.stc.StockCountItem",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "StockCountItem",
"description": "Represents an item being counted",
"unevaluatedProperties": false,
"allOf": [
{
"anyOf": [
{
"required": [
"itemId",
"itemIdentifier"
],
"properties": {
"itemId": {
"type": "string",
"description": "Id of the item being counted. At least one of `itemId` or `itemIdentifier` is present"
},
"itemIdentifier": {
"type": "null",
"description": "Id of the item being counted. At least one of `itemId` or `itemIdentifier` is present"
}
}
},
{
"required": [
"itemId",
"itemIdentifier"
],
"properties": {
"itemId": {
"type": "null",
"description": "Id of the item being counted. At least one of `itemId` or `itemIdentifier` is present"
},
"itemIdentifier": {
"type": "string",
"description": "Id of the item being counted. At least one of `itemId` or `itemIdentifier` is present"
}
}
},
{
"required": [
"itemId",
"itemIdentifier"
],
"properties": {
"itemId": {
"type": "string",
"description": "Id of the item being counted. At least one of `itemId` or `itemIdentifier` is present"
},
"itemIdentifier": {
"type": "string",
"description": "Id of the item being counted. At least one of `itemId` or `itemIdentifier` is present"
}
}
}
]
},
{
"type": "object",
"required": [
"locations"
],
"properties": {
"itemName": {
"type": "string",
"description": "Name of the item being counted"
},
"expectedQuantity": {
"type": ["number", "null"],
"description": "Expected entity stock count quantity"
},
"expectedCostAmount": {
"type": ["number", "null"],
"description": "Expected entity cost amount"
},
"locations": {
"type": "array",
"description": "Locations of the item being counted",
"items": {
"$ref": "StockCountLocation.schema.json"
}
}
}
},
{
"$ref": "StockCountData.schema.json"
}
]
}

{
"id": "hiiretail.contracts.logistics.stc.StockCountData",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "StockCountData",
"description": "Contains the data of stock count",
"type": "object",
"required": [
"firstCountedDateTime",
"lastCountedDateTime"
],
"unevaluatedProperties": false,
"properties": {
"actualCostAmount": {
"type": "number",
"description": "Actual entity cost amount"
},
"firstCountedDateTime": {
"type": "string",
"format": "date-time",
"description": "First time entity was counted"
},
"lastCountedDateTime": {
"type": "string",
"format": "date-time",
"description": "Last time entity was counted"
},
"actualQuantity": {
"type": "number",
"description": "Actual entity stock count quantity"
}
}
}

{
"id": "hiiretail.contracts.logistics.stc.StockCountLocation",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "StockCountLocation",
"description": "Represents a location for an item being counted",
"unevaluatedProperties": false,
"allOf": [
{
"type": "object",
"required": [
"location",
"lines"
],
"properties": {
"location": {
"type": "string",
"description": "Name of the location"
},
"lines": {
"type": "array",
"description": "Lines of the location",
"items": {
"$ref": "StockCountLine.schema.json"
}
}
}
},
{
"$ref": "StockCountData.schema.json"
}
]
}

{
"id": "hiiretail.contracts.logistics.stc.StockCountLine",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "StockCountLine",
"description": "Represents a line for an item being counted",
"unevaluatedProperties": false,
"allOf": [
{
"type": "object",
"required": [
"lineId",
"actualQuantity",
"countedDateTime"
],
"properties": {
"lineId": {
"type": "string",
"description": "Identifier of the line"
},
"itemIdentifier":{
"type": ["string", "null"],
"description": "Identifier of the item"
},
"businessPartnerId": {
"type": "string",
"description": "Id of the business partner"
},
"batchNumber": {
"type": "string",
"description": "Batch number of the item"
},
"serialNumber": {
"type": "string",
"description": "Serial number of the item"
},
"unitCostPrice": {
"type": "number",
"description": "Unit cost price of the item"
},
"actualQuantity": {
"type": "number",
"description": "Actual quantity of the item"
},
"countedDateTime": {
"type": "string",
"format": "date-time",
"description": "Date and time when the item was counted"
}
}
}
]
}