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
size query integer true Page size
page query integer true Page number
order_id_crm query string false Order id in CRM domain
subscription_id query string false Subscription id
business_process query ReverseBusinessProcess false Business process
delivery_type query DeliveryTypeEnum false Delivery type
identity_document_id query string false Client identity document id
product_identifier query string false Product identifier like IMEI, ICCID, Serial Number, etc.
product_code query string false The product reference
product_subscription_device_id query string false Product subscription device id
from_order_date query string(date-time) false From order date in ISO 8601 format. Example: 2021-05-24T09:00:00Z
to_order_date query string(date-time) false To order date in ISO 8601 format. Example: 2021-05-24T09:00:00Z
sort query string false Sort value, multiple values allowed, separate with coma

Enumerated Values

Property Values
business_process one of [UNSUBSCRIPTION, WITHDRAWAL, CANCELLATION, FINALPAYMENT, BREAKDOWN_PICKUP, MIGRATION_PICKUP, CANCELLATION_SHOP]
delivery_type one of [AGENCY, SHOP, HOME]
sort one of [DATE_DESC, DATE_ASC]

Request example

1
2
3
4
5

curl -X GET https://logistics.sta.masstack.com/v2/orgs/yoigo/core/pickups?size='100'&page='1'&order_id_crm='MYSIM_103827'&subscription_id='2203846'&business_process='UNSUBSCRIPTION'&delivery_type='AGENCY'&identity_document_id='12345678Z'&product_identifier='RM58AV3N2'&product_code='P0000001'&product_subscription_device_id='1123456789'&from_order_date='2021-05-24T09:00:00Z'&to_order_date='2021-05-25T09:00:00Z'&sort='DATE_DESC'?size=100&page=1 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

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

        Logistics Management