Logistics Management

Endpoints for managing obsolescence records


Request example

1
2
3
4
5

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

Responses

Code Meaning Description Schema
200 OK A list of obsolescence records [Obsolescence]

200 - instance of Obsolescence

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
[
  {
    "reference": "DEV-1234",
    "obsolete": true,
    "breakdowns_maximum": 3,
    "days_obsolescence": 365,
    "create_date": "2024-06-01T12:00:00Z",
    "update_date": "2024-06-15T12:00:00Z"
  }
]
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
create_date string(date-time)¦null false Timestamp of creation, set automatically by trigger
update_date string(date-time)¦null false Timestamp of last update, set automatically by trigger

Parameters

Name In Type Required Description
body body Obsolescence true ‘none’

Request body - instance of Obsolescence

1
2
3
4
5
6
7
8
{
  "reference": "DEV-1234",
  "obsolete": true,
  "breakdowns_maximum": 3,
  "days_obsolescence": 365,
  "create_date": "2024-06-01T12:00:00Z",
  "update_date": "2024-06-15T12:00:00Z"
}
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
create_date string(date-time)¦null false Timestamp of creation, set automatically by trigger
update_date string(date-time)¦null false Timestamp of last update, set automatically by trigger

Request example

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

curl -X POST https://logistics.sta.masstack.com/v2/obsolescences \
  -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
reference path string true ‘none’

Request example

1
2
3
4
5

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

Responses

Code Meaning Description Schema
200 OK Obsolescence record found Obsolescence
404 Not Found Obsolescence record not found None

Parameters

Name In Type Required Description
reference path string true ‘none’
body body Obsolescence true ‘none’

Request body - instance of Obsolescence

1
2
3
4
5
6
7
8
{
  "reference": "DEV-1234",
  "obsolete": true,
  "breakdowns_maximum": 3,
  "days_obsolescence": 365,
  "create_date": "2024-06-01T12:00:00Z",
  "update_date": "2024-06-15T12:00:00Z"
}
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
create_date string(date-time)¦null false Timestamp of creation, set automatically by trigger
update_date string(date-time)¦null false Timestamp of last update, set automatically by trigger

Request example

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

curl -X PUT https://logistics.sta.masstack.com/v2/obsolescences/{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
404 Not Found Obsolescence record not found None

Parameters

Name In Type Required Description
reference path string true ‘none’

Request example

1
2
3
4

curl -X DELETE https://logistics.sta.masstack.com/v2/obsolescences/{reference} \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
204 No Content Obsolescence record deleted None
404 Not Found Obsolescence record not found None

Endpoints

Direct Logistics

    Reverse Logistics

      External Logistic Operator

        Logistics Management