AlphaAlpha Docs

Stock Count Template

Stock Count Template API

Create template

POST
/stock-count-template
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/stock-count-template" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "productLocations": [      {        "locationId": "string",        "productId": "string"      }    ]  }'
{
  "counter": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "description": "string",
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "id": "string",
  "name": "string",
  "productLocations": [
    {
      "locationId": "string",
      "productId": "string"
    }
  ],
  "reason": "string",
  "siteId": "string",
  "subsidiaryId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete by list of ids in current tenant

DELETE
/stock-count-template
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/stock-count-template" \  -H "Content-Type: application/json" \  -d '[    "string"  ]'
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by list of ids in current tenant

GET
/stock-count-template/find
AuthorizationBearer <token>

In: header

Query Parameters

ids*array<>

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/stock-count-template/find?ids=string"
[
  {
    "counter": "string",
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "description": "string",
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "id": "string",
    "name": "string",
    "productLocations": [
      {
        "locationId": "string",
        "productId": "string"
      }
    ],
    "reason": "string",
    "siteId": "string",
    "subsidiaryId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find all for current tenant

GET
/stock-count-template/find-all
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/stock-count-template/find-all"
[
  {
    "counter": "string",
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "description": "string",
    "events": [
      {
        "authorId": "string",
        "date": "2019-08-24T14:15:22Z",
        "description": "string",
        "id": "string",
        "type": "CREATE"
      }
    ],
    "id": "string",
    "name": "string",
    "productLocations": [
      {
        "locationId": "string",
        "productId": "string"
      }
    ],
    "reason": "string",
    "siteId": "string",
    "subsidiaryId": "string",
    "tenantId": "string",
    "updated": "2019-08-24T14:15:22Z",
    "updatedBy": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Find by id in current tenant

GET
/stock-count-template/find/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/stock-count-template/find/string"
{
  "counter": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "description": "string",
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "id": "string",
  "name": "string",
  "productLocations": [
    {
      "locationId": "string",
      "productId": "string"
    }
  ],
  "reason": "string",
  "siteId": "string",
  "subsidiaryId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get page by page number and size with optional sorting based on field to sortBy and direction

GET
/stock-count-template/page
AuthorizationBearer <token>

In: header

Query Parameters

pageNumber?integer
Formatint32
pageSize?integer
Formatint32
sortBy?string
direction?string
Value in"ASC" | "DESC"
search?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/stock-count-template/page"
{
  "content": [
    {
      "counter": "string",
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "description": "string",
      "events": [
        {
          "authorId": "string",
          "date": "2019-08-24T14:15:22Z",
          "description": "string",
          "id": "string",
          "type": "CREATE"
        }
      ],
      "id": "string",
      "name": "string",
      "productLocations": [
        {
          "locationId": "string",
          "productId": "string"
        }
      ],
      "reason": "string",
      "siteId": "string",
      "subsidiaryId": "string",
      "tenantId": "string",
      "updated": "2019-08-24T14:15:22Z",
      "updatedBy": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Delete by id in current tenant

DELETE
/stock-count-template/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/stock-count-template/string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Update template

PUT
/stock-count-template/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "http://localhost:18080/api/v1/stock-count-template/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "productLocations": [      {        "locationId": "string",        "productId": "string"      }    ]  }'
{
  "counter": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "description": "string",
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "id": "string",
  "name": "string",
  "productLocations": [
    {
      "locationId": "string",
      "productId": "string"
    }
  ],
  "reason": "string",
  "siteId": "string",
  "subsidiaryId": "string",
  "tenantId": "string",
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Apply template

POST
/stock-count-template/{id}/apply
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/stock-count-template/string/apply"
{
  "allProductCountsApproved": true,
  "allProductCountsReviewed": true,
  "countReason": "string",
  "counter": "string",
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "events": [
    {
      "authorId": "string",
      "date": "2019-08-24T14:15:22Z",
      "description": "string",
      "id": "string",
      "type": "CREATE"
    }
  ],
  "id": "string",
  "internalReview": {
    "approved": true,
    "by": "string",
    "on": "2019-08-24T14:15:22Z",
    "reason": "string"
  },
  "products": [
    {
      "batchNumber": "string",
      "brand": "string",
      "category": "string",
      "expiration": "2019-08-24T14:15:22Z",
      "imageAssets": [
        {
          "blobId": "string",
          "created": "2019-08-24T14:15:22Z",
          "extension": "string",
          "fileSize": 0,
          "name": "string",
          "type": "IMAGE"
        }
      ],
      "lastStockDate": "2019-08-24T14:15:22Z",
      "locationId": "string",
      "mismatchReason": "string",
      "productId": "string",
      "productName": "string",
      "productionDate": "2019-08-24T14:15:22Z",
      "quantityCounted": 0.1,
      "quantityInSystem": 0.1,
      "review": {
        "approved": true,
        "by": "string",
        "on": "2019-08-24T14:15:22Z",
        "reason": "string"
      },
      "unitOfMeasurements": [
        {
          "baseUnit": true,
          "cost": 0.1,
          "decimal": true,
          "isBaseUnit": true,
          "isDecimal": true,
          "name": "string",
          "quantity": 0.1,
          "salesPrice": 0.1,
          "unit": "string"
        }
      ],
      "uomSplit": [
        {
          "productId": "string",
          "quantity": 0.1,
          "unit": "string"
        }
      ],
      "variancePercentage": 0.1
    }
  ],
  "reviewNote": "string",
  "status": "DRAFT",
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "systemAdjustedOn": "2019-08-24T14:15:22Z",
  "tenantId": "string",
  "totalVariancePercentage": 0.1,
  "totalVarianceValue": 0.1,
  "updated": "2019-08-24T14:15:22Z",
  "updatedBy": "string",
  "varianceStatus": "MINOR_VARIANCE"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}