AlphaAlpha Docs

Stock Transactions

Stock Transaction API

Delete by list of ids in current tenant

DELETE
/stock-transactions
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-transactions" \  -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-transactions/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-transactions/find?ids=string"
[
  {
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "groupedTransactionId": "string",
    "id": "string",
    "locationId": "string",
    "note": "string",
    "productId": "string",
    "quantity": 0.1,
    "stockSiteId": "string",
    "subsidiaryId": "string",
    "tenantId": "string",
    "transactionType": "IN",
    "unitPrice": 0.1,
    "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-transactions/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-transactions/find-all"
[
  {
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "groupedTransactionId": "string",
    "id": "string",
    "locationId": "string",
    "note": "string",
    "productId": "string",
    "quantity": 0.1,
    "stockSiteId": "string",
    "subsidiaryId": "string",
    "tenantId": "string",
    "transactionType": "IN",
    "unitPrice": 0.1,
    "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-transactions/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-transactions/find/string"
{
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "groupedTransactionId": "string",
  "id": "string",
  "locationId": "string",
  "note": "string",
  "productId": "string",
  "quantity": 0.1,
  "stockSiteId": "string",
  "subsidiaryId": "string",
  "tenantId": "string",
  "transactionType": "IN",
  "unitPrice": 0.1,
  "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 stock transactions by date range

GET
/stock-transactions/movement/{startDate}/{endDate}
AuthorizationBearer <token>

In: header

Path Parameters

startDate*string
endDate*string

Query Parameters

stockSiteId?string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/stock-transactions/movement/string/string"
{
  "incoming": 0.1,
  "outgoing": 0.1
}
{
  "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-transactions/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-transactions/page"
{
  "content": [
    {
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "groupedTransactionId": "string",
      "id": "string",
      "locationId": "string",
      "note": "string",
      "productId": "string",
      "quantity": 0.1,
      "stockSiteId": "string",
      "subsidiaryId": "string",
      "tenantId": "string",
      "transactionType": "IN",
      "unitPrice": 0.1,
      "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"
}

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

GET
/stock-transactions/search
AuthorizationBearer <token>

In: header

Query Parameters

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

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/stock-transactions/search?pageNumber=0"
{
  "content": [
    {
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "groupedTransactionId": "string",
      "id": "string",
      "locationId": "string",
      "note": "string",
      "product": {
        "assets": [
          {
            "blobId": "string",
            "created": "2019-08-24T14:15:22Z",
            "extension": "string",
            "fileSize": 0,
            "name": "string",
            "type": "IMAGE"
          }
        ],
        "brand": "string",
        "c02": 0.1,
        "category": "string",
        "cost": 0.1,
        "created": "2019-08-24T14:15:22Z",
        "createdBy": "string",
        "currency": "string",
        "description": "string",
        "dimensions": {
          "height": 0.1,
          "length": 0.1,
          "width": 0.1
        },
        "discounts": [
          {
            "active": true,
            "clientTypes": [
              "PERSON"
            ],
            "name": "string",
            "regions": [
              "string"
            ],
            "volumeThresholds": [
              {
                "discountPercentage": 1,
                "minAmount": 1
              }
            ]
          }
        ],
        "events": [
          {
            "authorId": "string",
            "date": "2019-08-24T14:15:22Z",
            "description": "string",
            "id": "string",
            "type": "CREATE"
          }
        ],
        "gtin": {
          "gtin": "string",
          "type": "GTIN8"
        },
        "id": "string",
        "lifetime": 0.1,
        "metaData": [
          {
            "key": "string",
            "value": "string"
          }
        ],
        "name": "string",
        "partCosts": 0.1,
        "parts": [
          {
            "amount": 0.1,
            "product": {},
            "unit": "string"
          }
        ],
        "price": 0.1,
        "reference": "string",
        "reorderPoint": 0.1,
        "revision": 0,
        "revisionCode": "string",
        "safetyStock": 0.1,
        "subsidiaryId": "string",
        "supplierId": "string",
        "taxRate": 0.1,
        "tenantId": "string",
        "totalCosts": 0.1,
        "type": "RAW_MATERIAL",
        "unitsOfMeasurement": [
          {
            "baseUnit": true,
            "cost": 0.1,
            "decimal": true,
            "isBaseUnit": true,
            "isDecimal": true,
            "name": "string",
            "quantity": 0.1,
            "salesPrice": 0.1,
            "unit": "string"
          }
        ],
        "updated": "2019-08-24T14:15:22Z",
        "updatedBy": "string",
        "variant": "string",
        "visibility": "PUBLIC",
        "volume": 0.1,
        "weight": 0.1
      },
      "quantity": 0.1,
      "stockSiteId": "string",
      "subsidiaryId": "string",
      "tenantId": "string",
      "transactionType": "IN",
      "unitPrice": 0.1,
      "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-transactions/{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-transactions/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"
}

Get stock transactions by product id

GET
/stock-transactions/{productId}
AuthorizationBearer <token>

In: header

Path Parameters

productId*string

Query Parameters

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

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/stock-transactions/string?pageNumber=0"
{
  "content": [
    {
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "groupedTransactionId": "string",
      "id": "string",
      "locationId": "string",
      "note": "string",
      "productId": "string",
      "quantity": 0.1,
      "stockSiteId": "string",
      "subsidiaryId": "string",
      "tenantId": "string",
      "transactionType": "IN",
      "unitPrice": 0.1,
      "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"
}