Returns

Operations with returns


Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
id query integer false returns id
from query string false Initial week to search for, in wwyyyy format
to query string false Final week to search for, in wwyyyy format
page query integer false Page number for pagination
size query integer false Page size for pagination

Request example

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 Meaning Description Schema
200 OK success [ReturnsDto]
400 Bad Request Bad Request Error400
404 Not Found Not found Error404
500 Internal Server Error Internal Server Error Error500

200 - instance of ReturnsDto

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
[
  {
    "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

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
body body CreateReturnDto true Information needed to insert a return

Request body - instance of CreateReturnDto

 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

 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 Meaning Description Schema
200 OK Success ReturnsDto
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
page query integer false Page number for pagination
size query integer false Page size for pagination
body body CreateReturnDto true At least one of the next parameters in needed to search an input

Request body - instance of CreateReturnDto

 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

 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 Meaning Description Schema
200 OK Success [ReturnsDto]
400 Bad Request Bad Request Error400
404 Not Found Not found Error404
500 Internal Server Error Internal Server Error Error500

200 - instance of ReturnsDto

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
[
  {
    "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

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
returnId path integer true Return id

Request example

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 Meaning Description Schema
200 OK Success ReturnsDto
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
returnId path integer true Return id
body body CreateReturnDto true Information needed to update a return

Request body - instance of CreateReturnDto

 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

 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 Meaning Description Schema
200 OK Success ReturnsDto
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