AlphaAlpha Docs

Stock Site

Stock Sites API

Create a stock location

POST
/stock-sites
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-sites" \  -H "Content-Type: application/json" \  -d '{    "location": {      "name": "string"    },    "name": "string",    "type": "PHYSICAL"  }'
{
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "id": "string",
  "location": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "name": "string",
  "subsidiaryId": "string",
  "tenantId": "string",
  "type": "PHYSICAL",
  "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-sites
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-sites" \  -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-sites/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-sites/find?ids=string"
[
  {
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "id": "string",
    "location": {
      "address": {
        "city": "string",
        "country": "string",
        "houseNumber": "string",
        "id": "string",
        "latitude": 0.1,
        "longitude": 0.1,
        "postalCode": "string",
        "street": "string"
      },
      "coordinate": {
        "latitude": -90,
        "longitude": -180
      },
      "name": "string"
    },
    "name": "string",
    "subsidiaryId": "string",
    "tenantId": "string",
    "type": "PHYSICAL",
    "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-sites/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-sites/find-all"
[
  {
    "created": "2019-08-24T14:15:22Z",
    "createdBy": "string",
    "id": "string",
    "location": {
      "address": {
        "city": "string",
        "country": "string",
        "houseNumber": "string",
        "id": "string",
        "latitude": 0.1,
        "longitude": 0.1,
        "postalCode": "string",
        "street": "string"
      },
      "coordinate": {
        "latitude": -90,
        "longitude": -180
      },
      "name": "string"
    },
    "name": "string",
    "subsidiaryId": "string",
    "tenantId": "string",
    "type": "PHYSICAL",
    "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-sites/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-sites/find/string"
{
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "id": "string",
  "location": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "name": "string",
  "subsidiaryId": "string",
  "tenantId": "string",
  "type": "PHYSICAL",
  "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-sites/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-sites/page"
{
  "content": [
    {
      "created": "2019-08-24T14:15:22Z",
      "createdBy": "string",
      "id": "string",
      "location": {
        "address": {
          "city": "string",
          "country": "string",
          "houseNumber": "string",
          "id": "string",
          "latitude": 0.1,
          "longitude": 0.1,
          "postalCode": "string",
          "street": "string"
        },
        "coordinate": {
          "latitude": -90,
          "longitude": -180
        },
        "name": "string"
      },
      "name": "string",
      "subsidiaryId": "string",
      "tenantId": "string",
      "type": "PHYSICAL",
      "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-sites/{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-sites/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 a stock location

PUT
/stock-sites/{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-sites/string" \  -H "Content-Type: application/json" \  -d '{    "location": {      "name": "string"    },    "name": "string",    "type": "PHYSICAL"  }'
{
  "created": "2019-08-24T14:15:22Z",
  "createdBy": "string",
  "id": "string",
  "location": {
    "address": {
      "city": "string",
      "country": "string",
      "houseNumber": "string",
      "id": "string",
      "latitude": 0.1,
      "longitude": 0.1,
      "postalCode": "string",
      "street": "string"
    },
    "coordinate": {
      "latitude": -90,
      "longitude": -180
    },
    "name": "string"
  },
  "name": "string",
  "subsidiaryId": "string",
  "tenantId": "string",
  "type": "PHYSICAL",
  "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"
}