Stock API

Operations with returns


Parameters

NameDescription

orgId*required

string

(path)

Organization name as it is registered in Mas-Stack

id

integer

(query)

returns id

from

string

(query)

Initial week to search for, in wwyyyy format

to

string

(query)

Final week to search for, in wwyyyy format

page

integer

(query)

Page number for pagination

size

integer

(query)

Page size for pagination

Request example

content_copy
1
2
3
4
5

curl -X GET https://logistics-stock.sta.masstack.com/v1/orgs/yoigo/returns?id='1'&from='012022'&to='522022'&page='1'&size='10' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Description Schema
200 success [ReturnsDto]
400 Bad Request Error400
404 Not found Error404
500 Internal Server Error Error500

200 - instance of ReturnsDto

Custom schema example

content_copy
 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
[
  {
    "returnId": 1,
    "reference": 123456,
    "product": {
      "productId": 1,
      "productBaseId": 1,
      "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,
      "name": "Smartphone",
      "purpose": 1,
      "inwarehousePrice": 50,
      "reference": "reference",
      "currency": "EUR",
      "purchasePrice": 180.5,
      "phPrice": 24.99
    },
    "vwarehouse": {
      "vwarehouseId": 4,
      "name": "Canarias Yoigo Renove",
      "receptors": {
        "receptorId": 6,
        "name": "Renove"
      }
    },
    "amount": "3",
    "tenantGroupBrand": "de",
    "returnDate": "2021-02-03",
    "returnReason": {
      "name": "tienda",
      "description": "description"
    },
    "relatedOrderId": 123654,
    "salesChannel": {
      "id": 10,
      "name": "phone",
      "masterChannel": {
        "id": 1,
        "name": "aux",
        "direct": true
      }
    },
    "salesType": "tipo"
  }
]
Name Type Required Description
returnId integer false none
reference string false none
product object false none
» productId integer false none
» productBaseId integer 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
» sapOrderingAux SapOrderingDto false none
» retrievable boolean false none
» name string false none
» purpose integer false none
» inwarehousePrice number false none
» reference string false none
» currency string false none
» purchasePrice number false none
» phPrice number false none
vwarehouse object false none
» vwarehouseId number false none
» name string false none
» receptors object false none
»» receptorId number false none
»» name string false none
amount string false none
tenantGroupBrand string false none
returnDate string false none
returnReason object false none
» name string false none
» description string false none
relatedOrderId string false none
salesChannel object false none
» id number false none
» name string false none
» masterChannel object false none
»» id number false none
»» name string false none
»» direct boolean false none
salesType string false none

Parameters

NameDescription

orgId*required

string

(path)

Organization name as it is registered in Mas-Stack

body*required

CreateReturnDto

(body)

Information needed to insert a return

Request body - instance of CreateReturnDto

content_copy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "reference": 123456,
  "productId": 4,
  "vwarehouse": 4,
  "amount": "3",
  "tenantGroupBrand": "de",
  "returnDate": "2021-02-03",
  "returnReason": "tienda",
  "relatedOrderId": "123654",
  "salesChannel": 10,
  "salesType": "tipo"
}
Name Type Required Description
reference string false none
productId number false none
vwarehouse string false none
amount string false none
tenantGroupBrand string false none
returnDate string false none
returnReason string false none
relatedOrderId string false none
salesChannel string false none
salesType string false none

Request example

content_copy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18

curl -X POST https://logistics-stock.sta.masstack.com/v1/orgs/yoigo/returns \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'reference': 123456,
  'productId': 4,
  'vwarehouse': 4,
  'amount': '3',
  'tenantGroupBrand': 'de',
  'returnDate': '2021-02-03',
  'returnReason': 'tienda',
  'relatedOrderId': '123654',
  'salesChannel': 10,
  'salesType': 'tipo'
}" 

Responses

Code Description Schema
200 Success ReturnsDto
400 Bad Request Error400
404 Not found Error404
500 Internal Server Error Error500

Parameters

NameDescription

orgId*required

string

(path)

Organization name as it is registered in Mas-Stack

page

integer

(query)

Page number for pagination

size

integer

(query)

Page size for pagination

body*required

CreateReturnDto

(body)

At least one of the next parameters in needed to search an input

Request body - instance of CreateReturnDto

content_copy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "reference": 123456,
  "productId": 4,
  "vwarehouse": 4,
  "amount": "3",
  "tenantGroupBrand": "de",
  "returnDate": "2021-02-03",
  "returnReason": "tienda",
  "relatedOrderId": "123654",
  "salesChannel": 10,
  "salesType": "tipo"
}
Name Type Required Description
reference string false none
productId number false none
vwarehouse string false none
amount string false none
tenantGroupBrand string false none
returnDate string false none
returnReason string false none
relatedOrderId string false none
salesChannel string false none
salesType string false none

Request example

content_copy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18

curl -X POST https://logistics-stock.sta.masstack.com/v1/orgs/yoigo/returns/search?page='1'&size='10' \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'reference': 123456,
  'productId': 4,
  'vwarehouse': 4,
  'amount': '3',
  'tenantGroupBrand': 'de',
  'returnDate': '2021-02-03',
  'returnReason': 'tienda',
  'relatedOrderId': '123654',
  'salesChannel': 10,
  'salesType': 'tipo'
}" 

Responses

Code Description Schema
200 Success [ReturnsDto]
400 Bad Request Error400
404 Not found Error404
500 Internal Server Error Error500

200 - instance of ReturnsDto

Custom schema example

content_copy
 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
[
  {
    "returnId": 1,
    "reference": 123456,
    "product": {
      "productId": 1,
      "productBaseId": 1,
      "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,
      "name": "Smartphone",
      "purpose": 1,
      "inwarehousePrice": 50,
      "reference": "reference",
      "currency": "EUR",
      "purchasePrice": 180.5,
      "phPrice": 24.99
    },
    "vwarehouse": {
      "vwarehouseId": 4,
      "name": "Canarias Yoigo Renove",
      "receptors": {
        "receptorId": 6,
        "name": "Renove"
      }
    },
    "amount": "3",
    "tenantGroupBrand": "de",
    "returnDate": "2021-02-03",
    "returnReason": {
      "name": "tienda",
      "description": "description"
    },
    "relatedOrderId": 123654,
    "salesChannel": {
      "id": 10,
      "name": "phone",
      "masterChannel": {
        "id": 1,
        "name": "aux",
        "direct": true
      }
    },
    "salesType": "tipo"
  }
]
Name Type Required Description
returnId integer false none
reference string false none
product object false none
» productId integer false none
» productBaseId integer 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
» sapOrderingAux SapOrderingDto false none
» retrievable boolean false none
» name string false none
» purpose integer false none
» inwarehousePrice number false none
» reference string false none
» currency string false none
» purchasePrice number false none
» phPrice number false none
vwarehouse object false none
» vwarehouseId number false none
» name string false none
» receptors object false none
»» receptorId number false none
»» name string false none
amount string false none
tenantGroupBrand string false none
returnDate string false none
returnReason object false none
» name string false none
» description string false none
relatedOrderId string false none
salesChannel object false none
» id number false none
» name string false none
» masterChannel object false none
»» id number false none
»» name string false none
»» direct boolean false none
salesType string false none

Parameters

NameDescription

orgId*required

string

(path)

Organization name as it is registered in Mas-Stack

returnId*required

integer

(path)

Return id

Request example

content_copy
1
2
3
4
5

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

Responses

Code Description Schema
200 Success ReturnsDto
400 Bad Request Error400
404 Not found Error404
500 Internal Server Error Error500

Parameters

NameDescription

orgId*required

string

(path)

Organization name as it is registered in Mas-Stack

returnId*required

integer

(path)

Return id

body*required

CreateReturnDto

(body)

Information needed to update a return

Request body - instance of CreateReturnDto

content_copy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "reference": 123456,
  "productId": 4,
  "vwarehouse": 4,
  "amount": "3",
  "tenantGroupBrand": "de",
  "returnDate": "2021-02-03",
  "returnReason": "tienda",
  "relatedOrderId": "123654",
  "salesChannel": 10,
  "salesType": "tipo"
}
Name Type Required Description
reference string false none
productId number false none
vwarehouse string false none
amount string false none
tenantGroupBrand string false none
returnDate string false none
returnReason string false none
relatedOrderId string false none
salesChannel string false none
salesType string false none

Request example

content_copy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18

curl -X PUT https://logistics-stock.sta.masstack.com/v1/orgs/yoigo/returns/123 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'reference': 123456,
  'productId': 4,
  'vwarehouse': 4,
  'amount': '3',
  'tenantGroupBrand': 'de',
  'returnDate': '2021-02-03',
  'returnReason': 'tienda',
  'relatedOrderId': '123654',
  'salesChannel': 10,
  'salesType': 'tipo'
}" 

Responses

Code Description Schema
200 Success ReturnsDto
400 Bad Request Error400
404 Not found Error404
500 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