Products

Operations to get products


Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
baseId path integer true base product id
body body CreateProductDto true Information needed to insert a product

Request body - instance of CreateProductDto

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  "name": "Smartphone",
  "status": 1,
  "isbundle": false,
  "phReference": 2,
  "upcEan": 2,
  "partnumber": 1,
  "releaseDate": "2021-09-24",
  "retireDate": "2021-09-24",
  "sapOrderingAux": {
    "sapOrderingAuxId": 1,
    "companyInvoice": "company",
    "productSapCode": 1,
    "productSapDescription": "description",
    "productSapMaterial": "material",
    "productSapFamilyCode": 1,
    "providerId": 1,
    "supplierToProviderId": 1
  },
  "retrievable": true,
  "purchasePrice": 180.5,
  "phPrice": 24.99,
  "reference": "reference",
  "inwarehousePrice": 50.5,
  "currency": "EUR",
  "purpose": 1,
  "productsInBundle": [
    {
      "productId": 1,
      "quantity": 1
    }
  ]
}
Name Type Required Description
name string true none
status integer true none
isbundle boolean true none
phReference string false none
upcEan string false none
partnumber string false none
releaseDate string(date) false none
retireDate string(date) false none
sapOrderingAux SapOrderingDto true none
retrievable boolean false none
purchasePrice number false none
phPrice number false none
reference string false none
inwarehousePrice number false none
currency string false none
purpose integer false none
productsInBundle [CreateBundleDto] false none

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

curl -X POST https://logistics-stock.sta.masstack.com/v1/orgs/yoigo/base_products/1/products \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'name': 'Smartphone',
  'status': 1,
  'isbundle': false,
  'phReference': 2,
  'upcEan': 2,
  'partnumber': 1,
  'releaseDate': '2021-09-24',
  'retireDate': '2021-09-24',
  'sapOrderingAux': {
    'sapOrderingAuxId': 1,
    'companyInvoice': 'company',
    'productSapCode': 1,
    'productSapDescription': 'description',
    'productSapMaterial': 'material',
    'productSapFamilyCode': 1,
    'providerId': 1,
    'supplierToProviderId': 1
  },
  'retrievable': true,
  'purchasePrice': 180.5,
  'phPrice': 24.99,
  'reference': 'reference',
  'inwarehousePrice': 50.5,
  'currency': 'EUR',
  'purpose': 1,
  'productsInBundle': [
    {
      'productId': 1,
      'quantity': 1
    }
  ]
}" 

Responses

Code Meaning Description Schema
201 Created Success ProductDto
400 Bad Request Bad Request Error400
404 Not Found Not found Error404
500 Internal Server Error Internal Server Error Error500

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
baseId path string true product base id

Request example

1
2
3
4
5

curl -X GET https://logistics-stock.sta.masstack.com/v1/orgs/yoigo/base_products/{baseId}/products \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Success Inline
400 Bad Request Bad Request Error400
404 Not Found Not found Error404
500 Internal Server Error Internal Server Error Error500

200 - JsonObject

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
  "products": [
    {
      "productId": 1,
      "productBase": {
        "productBaseId": 1,
        "name": "Smartphone",
        "commercialBrand": {
          "commercialBrandId": 1,
          "name": "Alcatel",
          "contactInfoId": 1
        },
        "category": {
          "categoryId": 1,
          "family": {
            "familyId": 1,
            "name": "family"
          },
          "subfamily": "subfamily"
        },
        "vatTax": 2.5,
        "digitalCanon": 1.3,
        "unitsInPalet": 1500,
        "unitsInBox": 5,
        "eolDate": "2021-09-24",
        "substitute": "mobile2",
        "swapsRate": 1.5,
        "organization": "MM",
        "billingCategory": "MM",
        "characteristics": [
          {
            "name": "Color",
            "value": "Black"
          }
        ]
      },
      "status": {
        "statusId": 1,
        "name": "status"
      },
      "isbundle": false,
      "phReference": 2,
      "upcEan": 2,
      "partnumber": 1,
      "releaseDate": "2021-09-24",
      "retireDate": "2021-09-24",
      "sapOrderingAux": {
        "sapOrderingAuxId": 1,
        "companyInvoice": "company",
        "productSapCode": 1,
        "productSapDescription": "description",
        "productSapMaterial": "material",
        "productSapFamilyCode": 1,
        "providerId": 1,
        "supplierToProviderId": 1
      },
      "retrievable": true,
      "name": "Smartphone",
      "purpose": {
        "purposeId": 1,
        "name": "purpose"
      },
      "inwarehousePrice": 0,
      "reference": "REF223",
      "currency": "EUR",
      "phPrice": 123.9,
      "purchasePrice": 12.9,
      "createdDate": "2021-09-24",
      "updatedDate": "2021-09-24",
      "bundle": [
        {
          "bundleId": 1,
          "productId": 1,
          "quantity": 1
        }
      ]
    }
  ]
}
None

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
size query integer true Page size
page query integer true Page number
sort query ProductSortEnum false Sort value, multiple values allowed, separte with coma
grouped query ProductSortEnum false Group value, multiple values allowed, separte with coma
order query SortEnum false Sorting order
body body SearchProductDto false Information needed to update a base product

Enumerated Values

Property Values
sort one of [PRODUCT_ID, PRODUCT_BASE, STATUS, BUNDLE, PH_REFERENCE, SAP_ORDERING, RETRIEVABLE, RETIRE_DATE, RELEASE_DATE, PURPOSE, REFERENCE, NAME]
grouped one of [PRODUCT_ID, PRODUCT_BASE, STATUS, BUNDLE, PH_REFERENCE, SAP_ORDERING, RETRIEVABLE, RETIRE_DATE, RELEASE_DATE, PURPOSE, REFERENCE, NAME]
order one of [ASC, DESC]

Request body - instance of SearchProductDto

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
{
  "productId": 1,
  "productBaseId": 1,
  "name": "Smartphone",
  "status": 1,
  "isbundle": false,
  "phReference": 2,
  "upcEan": 2,
  "partNumber": 1,
  "releaseDate": "2021-09-24",
  "retireDate": "2021-09-24",
  "sapOrderingAuxId": 10,
  "retrievable": true,
  "purchasePrice": 180.5,
  "phPrice": 24.99,
  "reference": "reference",
  "inwarehousePrice": 50.5,
  "currency": "EUR",
  "purpose": 1
}
Name Type Required Description
productId integer false none
productBaseId integer false none
name string false none
status integer false none
isbundle boolean false none
phReference string false none
upcEan string false none
partNumber string false none
releaseDate string(date) false none
retireDate string(date) false none
sapOrderingAuxId integer false none
retrievable boolean false none
purchasePrice number false none
phPrice number false none
reference string false none
inwarehousePrice number false none
currency string false none
purpose integer false none

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

curl -X POST https://logistics-stock.sta.masstack.com/v1/orgs/yoigo/base_products/products/search?size='100'&page='1'&sort='STATUS'&grouped='STATUS'&order='ASC'?size=100&page=1 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'productId': 1,
  'productBaseId': 1,
  'name': 'Smartphone',
  'status': 1,
  'isbundle': false,
  'phReference': 2,
  'upcEan': 2,
  'partNumber': 1,
  'releaseDate': '2021-09-24',
  'retireDate': '2021-09-24',
  'sapOrderingAuxId': 10,
  'retrievable': true,
  'purchasePrice': 180.5,
  'phPrice': 24.99,
  'reference': 'reference',
  'inwarehousePrice': 50.5,
  'currency': 'EUR',
  'purpose': 1
}" 

Responses

Code Meaning Description Schema
200 OK Success PaginatedProductDto
400 Bad Request Bad Request Error400
404 Not Found Not found Error404
500 Internal Server Error Internal Server Error Error500

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
baseId path integer true product base id
productId path integer true product id

Request example

1
2
3
4
5

curl -X GET https://logistics-stock.sta.masstack.com/v1/orgs/yoigo/base_products/{baseId}/products/{productId} \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Success ProductDto
400 Bad Request Bad Request Error400
404 Not Found Not found Error404
500 Internal Server Error Internal Server Error Error500

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
baseId path string true Base product id to update
productId path string true Product id to update
body body UpdateProductDto true Information needed to update a product

Request body - instance of UpdateProductDto

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  "name": "Smartphone",
  "status": 1,
  "isbundle": false,
  "phReference": 2,
  "upcEan": 2,
  "partnumber": 1,
  "releaseDate": "2021-09-24",
  "retireDate": "2021-09-24",
  "sapOrderingAux": {
    "sapOrderingAuxId": 1,
    "companyInvoice": "company",
    "productSapCode": 1,
    "productSapDescription": "description",
    "productSapMaterial": "material",
    "productSapFamilyCode": 1,
    "providerId": 1,
    "supplierToProviderId": 1
  },
  "retrievable": true,
  "purchasePrice": 180.5,
  "phPrice": 24.99,
  "reference": "reference",
  "inwarehousePrice": 50.5,
  "currency": "EUR",
  "purpose": 1,
  "productsInBundle": [
    {
      "bundleId": 1,
      "productId": 1,
      "quantity": 1
    }
  ]
}
Name Type Required Description
name string true none
status integer true none
isbundle boolean true none
phReference string false none
upcEan string false none
partnumber string false none
releaseDate string(date) false none
retireDate string(date) false none
sapOrderingAux SapOrderingDto true none
retrievable boolean false none
purchasePrice number false none
phPrice number false none
reference string false none
inwarehousePrice number false none
currency string false none
purpose integer false none
productsInBundle [BundleDto] false none

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

curl -X PUT https://logistics-stock.sta.masstack.com/v1/orgs/yoigo/base_products/1/products/1 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'name': 'Smartphone',
  'status': 1,
  'isbundle': false,
  'phReference': 2,
  'upcEan': 2,
  'partnumber': 1,
  'releaseDate': '2021-09-24',
  'retireDate': '2021-09-24',
  'sapOrderingAux': {
    'sapOrderingAuxId': 1,
    'companyInvoice': 'company',
    'productSapCode': 1,
    'productSapDescription': 'description',
    'productSapMaterial': 'material',
    'productSapFamilyCode': 1,
    'providerId': 1,
    'supplierToProviderId': 1
  },
  'retrievable': true,
  'purchasePrice': 180.5,
  'phPrice': 24.99,
  'reference': 'reference',
  'inwarehousePrice': 50.5,
  'currency': 'EUR',
  'purpose': 1,
  'productsInBundle': [
    {
      'bundleId': 1,
      'productId': 1,
      'quantity': 1
    }
  ]
}" 

Responses

Code Meaning Description Schema
200 OK Success ProductDto
400 Bad Request Bad Request Error400
404 Not Found Not found Error404
500 Internal Server Error Internal Server Error Error500

Endpoints

Base products

    Products

      Characteristics

        Delivery commitment

          Inputs

            Input Types

              Outputs

                Output Types

                  Stock

                    Physical Warehouse

                      Virtual Warehouse

                        Returns

                          Devices

                            Providers

                              Logistic Operators

                                Commercial Brands

                                  Commercial Distributions

                                    Status

                                      Categories

                                        Purposes

                                          Regions

                                            Countries

                                              Receptors

                                                Characteristics Values

                                                  Sales Channel

                                                    Tenant group brand

                                                      Organizations

                                                        Sap Ordering

                                                          Report importer