Logistics Management

Endpoints for managing logistics configurations


Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
body body Obsolescence true ‘none’

Request body - instance of Obsolescence

1
2
3
4
5
6
{
  "reference": "DEV-1234",
  "obsolete": true,
  "breakdowns_maximum": 3,
  "days_obsolescence": 365
}
Name Type Required Description
reference string true Unique reference identifier (primary key)
obsolete boolean¦null false Whether the device is considered obsolete
breakdowns_maximum integer(int32)¦null false Maximum number of breakdowns allowed before considering obsolete
days_obsolescence integer(int32)¦null false Number of days since creation to mark as obsolete

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12

curl -X POST https://logistics.sta.masstack.com/v2/orgs/yoigo/management/obsolescence \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'reference': 'DEV-1234',
  'obsolete': true,
  'breakdowns_maximum': 3,
  'days_obsolescence': 365
}" 

Responses

Code Meaning Description Schema
201 Created Obsolescence record created Obsolescence

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

Request example

1
2
3
4
5

curl -X GET https://logistics.sta.masstack.com/v2/orgs/yoigo/management/obsolescence?size='100'&page='1'?size=100&page=1 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Success ArrayOfObsolescences
4XX Unknown Response for client error when some field in the request is missing or invalid. [Error]
5XX Unknown Response when an internal or unexpected error occurs. [Error]

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
reference path string true ‘none’

Request example

1
2
3
4
5

curl -X GET https://logistics.sta.masstack.com/v2/orgs/yoigo/management/obsolescence/{reference} \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Obsolescence record found Obsolescence
4XX Unknown Response for client error when some field in the request is missing or invalid. [Error]
5XX Unknown Response when an internal or unexpected error occurs. [Error]

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
reference path string true ‘none’
body body Obsolescence true ‘none’

Request body - instance of Obsolescence

1
2
3
4
5
6
{
  "reference": "DEV-1234",
  "obsolete": true,
  "breakdowns_maximum": 3,
  "days_obsolescence": 365
}
Name Type Required Description
reference string true Unique reference identifier (primary key)
obsolete boolean¦null false Whether the device is considered obsolete
breakdowns_maximum integer(int32)¦null false Maximum number of breakdowns allowed before considering obsolete
days_obsolescence integer(int32)¦null false Number of days since creation to mark as obsolete

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12

curl -X PUT https://logistics.sta.masstack.com/v2/orgs/yoigo/management/obsolescence/{reference} \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'reference': 'DEV-1234',
  'obsolete': true,
  'breakdowns_maximum': 3,
  'days_obsolescence': 365
}" 

Responses

Code Meaning Description Schema
200 OK Obsolescence record updated Obsolescence
4XX Unknown Response for client error when some field in the request is missing or invalid. [Error]
5XX Unknown Response when an internal or unexpected error occurs. [Error]

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
reference path string true ‘none’

Request example

1
2
3
4
5

curl -X DELETE https://logistics.sta.masstack.com/v2/orgs/yoigo/management/obsolescence/{reference} \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Obsolescence record deleted successfully DeleteResponse
4XX Unknown Response for client error when some field in the request is missing or invalid. [Error]
5XX Unknown Response when an internal or unexpected error occurs. [Error]

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
body body Communication true ‘none’

Request body - instance of Communication

 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
{
  "communicationId": 1,
  "alias": "order-confirmation",
  "description": "Send order confirmation to customer",
  "templateId": "TEMPLATE_ORDER_CONFIRMATION",
  "notifyChannels": true,
  "channels": [
    "EMAIL",
    "SMS"
  ],
  "maxDelayFromOrderCreation": "PT24H",
  "maxDelayFromStatusReport": "PT2H",
  "documentationOnly": false,
  "tenants": [
    "yoigo",
    "masmovil"
  ],
  "allowedDevices": [
    "DEVICE-123",
    "DEVICE-456"
  ],
  "arguments": {
    "key": "value"
  },
  "exclusions": {
    "courier": [
      "GLS"
    ]
  },
  "createDate": "2019-08-24T14:15:22Z",
  "updateDate": "2019-08-24T14:15:22Z",
  "triggers": [
    {
      "communicationTriggerId": 1,
      "communicationId": 1,
      "uuidStatus": "STATUS_DELIVERED",
      "deliveryTypes": [
        "HOME",
        "SHOP"
      ],
      "reminder": true,
      "reminderDelay": "PT48H",
      "arguments": {
        "key": "value"
      },
      "createDate": "2019-08-24T14:15:22Z",
      "updateDate": "2019-08-24T14:15:22Z"
    }
  ]
}
Name Type Required Description
communicationId integer(int64) false Unique communication identifier (auto-generated)
alias string true Unique alias for the communication
description string false Description of the communication
templateId string true Template identifier from mas-communications
notifyChannels boolean¦null false Whether to notify through specified channels
channels [string]¦null false Communication channels
maxDelayFromOrderCreation string¦null false Maximum delay from order creation (ISO-8601 duration format)
maxDelayFromStatusReport string¦null false Maximum delay from status report (ISO-8601 duration format)
documentationOnly boolean¦null false Whether this communication is for documentation purposes only
tenants [string]¦null false List of tenants this communication applies to
allowedDevices [string]¦null false List of device references this communication applies to
arguments object¦null false Additional arguments as JSON object
exclusions object¦null false Exclusion criteria as JSON object
createDate string(date-time) false Creation timestamp
updateDate string(date-time) false Last update timestamp
triggers [CommunicationTrigger] false List of trigger states associated with this communication

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
41
42
43
44
45
46
47
48
49
50

curl -X POST https://logistics.sta.masstack.com/v2/orgs/yoigo/management/communications \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'alias': 'order-confirmation',
  'description': 'Send order confirmation to customer',
  'templateId': 'TEMPLATE_ORDER_CONFIRMATION',
  'notifyChannels': true,
  'channels': [
    'EMAIL',
    'SMS'
  ],
  'maxDelayFromOrderCreation': 'PT24H',
  'maxDelayFromStatusReport': 'PT2H',
  'documentationOnly': false,
  'tenants': [
    'yoigo',
    'masmovil'
  ],
  'allowedDevices': [
    'DEVICE-123',
    'DEVICE-456'
  ],
  'arguments': {
    'key': 'value'
  },
  'exclusions': {
    'courier': [
      'GLS'
    ]
  },
  'triggers': [
    {
      'communicationId': 1,
      'uuidStatus': 'STATUS_DELIVERED',
      'deliveryTypes': [
        'HOME',
        'SHOP'
      ],
      'reminder': true,
      'reminderDelay': 'PT48H',
      'arguments': {
        'key': 'value'
      }
    }
  ]
}" 

Responses

Code Meaning Description Schema
201 Created Communication configuration created Communication
4XX Unknown Response for client error when some field in the request is missing or invalid. [Error]
5XX Unknown Response when an internal or unexpected error occurs. [Error]

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
uuidStatus query string false Filter by trigger uuidStatus
deliveryType query DeliveryTypeEnum false Filter by trigger deliveryType
documentationOnly query boolean false Filter by documentationOnly flag

Enumerated Values

Property Values
deliveryType one of [AGENCY, SHOP, HOME, COURIER]

Request example

1
2
3
4
5

curl -X GET https://logistics.sta.masstack.com/v2/orgs/yoigo/management/communications?size='100'&page='1'&uuidStatus='string'&deliveryType='AGENCY'&documentationOnly='true'?size=100&page=1 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Success ArrayOfCommunications
4XX Unknown Response for client error when some field in the request is missing or invalid. [Error]
5XX Unknown Response when an internal or unexpected error occurs. [Error]

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
communicationId path integer(int64) true ‘none’

Request example

1
2
3
4
5

curl -X GET https://logistics.sta.masstack.com/v2/orgs/yoigo/management/communications/{communicationId} \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Communication configuration found Communication
4XX Unknown Response for client error when some field in the request is missing or invalid. [Error]
5XX Unknown Response when an internal or unexpected error occurs. [Error]

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
communicationId path integer(int64) true ‘none’
body body Communication true ‘none’

Request body - instance of Communication

 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
{
  "communicationId": 1,
  "alias": "order-confirmation",
  "description": "Send order confirmation to customer",
  "templateId": "TEMPLATE_ORDER_CONFIRMATION",
  "notifyChannels": true,
  "channels": [
    "EMAIL",
    "SMS"
  ],
  "maxDelayFromOrderCreation": "PT24H",
  "maxDelayFromStatusReport": "PT2H",
  "documentationOnly": false,
  "tenants": [
    "yoigo",
    "masmovil"
  ],
  "allowedDevices": [
    "DEVICE-123",
    "DEVICE-456"
  ],
  "arguments": {
    "key": "value"
  },
  "exclusions": {
    "courier": [
      "GLS"
    ]
  },
  "createDate": "2019-08-24T14:15:22Z",
  "updateDate": "2019-08-24T14:15:22Z",
  "triggers": [
    {
      "communicationTriggerId": 1,
      "communicationId": 1,
      "uuidStatus": "STATUS_DELIVERED",
      "deliveryTypes": [
        "HOME",
        "SHOP"
      ],
      "reminder": true,
      "reminderDelay": "PT48H",
      "arguments": {
        "key": "value"
      },
      "createDate": "2019-08-24T14:15:22Z",
      "updateDate": "2019-08-24T14:15:22Z"
    }
  ]
}
Name Type Required Description
communicationId integer(int64) false Unique communication identifier (auto-generated)
alias string true Unique alias for the communication
description string false Description of the communication
templateId string true Template identifier from mas-communications
notifyChannels boolean¦null false Whether to notify through specified channels
channels [string]¦null false Communication channels
maxDelayFromOrderCreation string¦null false Maximum delay from order creation (ISO-8601 duration format)
maxDelayFromStatusReport string¦null false Maximum delay from status report (ISO-8601 duration format)
documentationOnly boolean¦null false Whether this communication is for documentation purposes only
tenants [string]¦null false List of tenants this communication applies to
allowedDevices [string]¦null false List of device references this communication applies to
arguments object¦null false Additional arguments as JSON object
exclusions object¦null false Exclusion criteria as JSON object
createDate string(date-time) false Creation timestamp
updateDate string(date-time) false Last update timestamp
triggers [CommunicationTrigger] false List of trigger states associated with this communication

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
41
42
43
44
45
46
47
48
49
50

curl -X PUT https://logistics.sta.masstack.com/v2/orgs/yoigo/management/communications/{communicationId} \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'alias': 'order-confirmation',
  'description': 'Send order confirmation to customer',
  'templateId': 'TEMPLATE_ORDER_CONFIRMATION',
  'notifyChannels': true,
  'channels': [
    'EMAIL',
    'SMS'
  ],
  'maxDelayFromOrderCreation': 'PT24H',
  'maxDelayFromStatusReport': 'PT2H',
  'documentationOnly': false,
  'tenants': [
    'yoigo',
    'masmovil'
  ],
  'allowedDevices': [
    'DEVICE-123',
    'DEVICE-456'
  ],
  'arguments': {
    'key': 'value'
  },
  'exclusions': {
    'courier': [
      'GLS'
    ]
  },
  'triggers': [
    {
      'communicationId': 1,
      'uuidStatus': 'STATUS_DELIVERED',
      'deliveryTypes': [
        'HOME',
        'SHOP'
      ],
      'reminder': true,
      'reminderDelay': 'PT48H',
      'arguments': {
        'key': 'value'
      }
    }
  ]
}" 

Responses

Code Meaning Description Schema
200 OK Communication configuration updated Communication
4XX Unknown Response for client error when some field in the request is missing or invalid. [Error]
5XX Unknown Response when an internal or unexpected error occurs. [Error]

Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
communicationId path integer(int64) true ‘none’

Request example

1
2
3
4
5

curl -X DELETE https://logistics.sta.masstack.com/v2/orgs/yoigo/management/communications/{communicationId} \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Communication configuration deleted successfully DeleteResponse
4XX Unknown Response for client error when some field in the request is missing or invalid. [Error]
5XX Unknown Response when an internal or unexpected error occurs. [Error]

Endpoints

Direct Logistics

    Reverse Logistics

      External Logistic Operator

        Logistics Management