Reverse Logistics

The aim of the operations is to control the process for the return of products from consumption or end user points to the manufacturer or distributor for their recovery, repair, recycling or disposal.


Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
body body Pickup true Information needed to create a new Order

Request body - instance of Pickup

  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
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
  "order": {
    "subscription_id": "2203846",
    "pickup_id": "P0000001",
    "order_id_external": "YG24011009607",
    "order_id_crm": "4640528",
    "language": "ES",
    "business_process": "UNSUBSCRIPTION",
    "reason": "Unsubscription",
    "delivery_type": "AGENCY",
    "access_reused": true
  },
  "data_sales": {
    "agent": "RETEN001",
    "channel": "TELE_SALE_CARE",
    "type": "NEW_SALE",
    "group": "POS"
  },
  "client": {
    "identity": {
      "document_id": "00000000A",
      "document_type": "NIF"
    },
    "contact_phone": {
      "phone_number": "666666666",
      "prefix": "+34"
    },
    "name": "Juan",
    "surnames": [
      "Perez"
    ],
    "email": "example@gmail.com",
    "commercial_name": "Pedro",
    "address": {
      "street_type": "Calle",
      "street": "Mayor",
      "number": "208",
      "additional_details": "string",
      "city": "Leganes",
      "zip_code": "28912",
      "province": "Madrid",
      "country": "es",
      "bis": "string",
      "floor": "string",
      "block": "string",
      "stair": "string",
      "letter": "string"
    }
  },
  "shipping": {
    "address": {
      "street_type": "Calle",
      "street": "Mayor",
      "number": "208",
      "additional_details": "string",
      "city": "Leganes",
      "zip_code": "28912",
      "province": "Madrid",
      "country": "es",
      "bis": "string",
      "floor": "string",
      "block": "string",
      "stair": "string",
      "letter": "string"
    },
    "contact_data": {
      "identity": {
        "document_id": "00000000A",
        "document_type": "NIF"
      },
      "contact_phone": {
        "phone_number": "666666666",
        "prefix": "+34"
      },
      "name": "Juan",
      "surnames": [
        "Perez"
      ],
      "email": "example@gmail.com",
      "commercial_name": "Pedro",
      "address": {
        "street_type": "Calle",
        "street": "Mayor",
        "number": "208",
        "additional_details": "string",
        "city": "Leganes",
        "zip_code": "28912",
        "province": "Madrid",
        "country": "es",
        "bis": "string",
        "floor": "string",
        "block": "string",
        "stair": "string",
        "letter": "string"
      }
    },
    "transport_data": {
      "courier_id": "CORREOS",
      "delivery_service": "DELIVERY_24",
      "exclusive": true,
      "verify_identity": false,
      "retrieve_contract": false,
      "group_by": "string",
      "secure_delivery": false,
      "delivery_point_id": "SEUR-1234",
      "delivery_shop_name": "Mas Life Plaza España",
      "return_code": "A1234",
      "delivery_type": "AGENCY",
      "ol_comments": "ONT password"
    }
  },
  "products": [
    {
      "product_code": "RM58AV3N2",
      "product_description": "Caja de voz Ad Hoc v3",
      "product_type": "STB",
      "product_type_id": 16,
      "identifier": "822339400182",
      "msisdn": "666666666",
      "subscription_device_id": "40397",
      "technology": "FTTH",
      "status": "CREATED"
    }
  ]
}
Name Type Required Description
order PickupData true none
data_sales DataSales false Information related to sales associated with the order
client Client true Object with client data
shipping ShippingPickup true Shipping information for a pickup
products [PickupProductBasic] true Info about the pickup Product

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
 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
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

curl -X POST https://logistics.sta.masstack.com/v2/orgs/yoigo/core/pickups \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'order': {
    'subscription_id': '2203846',
    'order_id_crm': '4640528',
    'language': 'ES',
    'business_process': 'UNSUBSCRIPTION',
    'reason': 'Unsubscription',
    'delivery_type': 'AGENCY',
    'access_reused': true
  },
  'data_sales': {
    'agent': 'RETEN001',
    'channel': 'TELE_SALE_CARE',
    'type': 'NEW_SALE',
    'group': 'POS'
  },
  'client': {
    'identity': {
      'document_id': '00000000A',
      'document_type': 'NIF'
    },
    'contact_phone': {
      'phone_number': '666666666',
      'prefix': '+34'
    },
    'name': 'Juan',
    'surnames': [
      'Perez'
    ],
    'email': 'example@gmail.com',
    'commercial_name': 'Pedro',
    'address': {
      'street_type': 'Calle',
      'street': 'Mayor',
      'number': '208',
      'additional_details': 'string',
      'city': 'Leganes',
      'zip_code': '28912',
      'province': 'Madrid',
      'country': 'es',
      'bis': 'string',
      'floor': 'string',
      'block': 'string',
      'stair': 'string',
      'letter': 'string'
    }
  },
  'shipping': {
    'address': {
      'street_type': 'Calle',
      'street': 'Mayor',
      'number': '208',
      'additional_details': 'string',
      'city': 'Leganes',
      'zip_code': '28912',
      'province': 'Madrid',
      'country': 'es',
      'bis': 'string',
      'floor': 'string',
      'block': 'string',
      'stair': 'string',
      'letter': 'string'
    },
    'contact_data': {
      'identity': {
        'document_id': '00000000A',
        'document_type': 'NIF'
      },
      'contact_phone': {
        'phone_number': '666666666',
        'prefix': '+34'
      },
      'name': 'Juan',
      'surnames': [
        'Perez'
      ],
      'email': 'example@gmail.com',
      'commercial_name': 'Pedro',
      'address': {
        'street_type': 'Calle',
        'street': 'Mayor',
        'number': '208',
        'additional_details': 'string',
        'city': 'Leganes',
        'zip_code': '28912',
        'province': 'Madrid',
        'country': 'es',
        'bis': 'string',
        'floor': 'string',
        'block': 'string',
        'stair': 'string',
        'letter': 'string'
      }
    },
    'transport_data': {
      'courier_id': 'CORREOS',
      'delivery_service': 'DELIVERY_24',
      'exclusive': true,
      'verify_identity': false,
      'retrieve_contract': false,
      'group_by': 'string',
      'secure_delivery': false,
      'delivery_point_id': 'SEUR-1234',
      'delivery_shop_name': 'Mas Life Plaza España',
      'delivery_type': 'AGENCY',
      'ol_comments': 'ONT password'
    }
  },
  'products': [
    {
      'product_code': 'RM58AV3N2',
      'product_description': 'Caja de voz Ad Hoc v3',
      'product_type': 'STB',
      'product_type_id': 16,
      'identifier': '822339400182',
      'msisdn': '666666666',
      'subscription_device_id': '40397',
      'technology': 'FTTH'
    }
  ]
}" 

Responses

Code Meaning Description Schema
200 OK Success Pickup
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
pickup_id path string true Internal logistics pickup id

Request example

1
2
3
4
5

curl -X GET https://logistics.sta.masstack.com/v2/orgs/yoigo/core/pickups/888888-A9293 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK Success Pickup
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
pickup_id path string true Internal logistics pickup id
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/core/pickups/888888-A9293/products?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 ArrayOfProductWithExpedition
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
pickup_id path string true Internal logistics pickup id
product_id path string true Product id, usually subscription_device_id

Request example

1
2
3
4
5

curl -X GET https://logistics.sta.masstack.com/v2/orgs/yoigo/core/pickups/888888-A9293/products/888888-A9293 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

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