External Logistic Operator

The aim of the operations is to provide logistic information about external logistic operator orders


Parameters

Name In Type Required Description
orgId path string true Organization name as it is registered in Mas-Stack
body body ExternalOrder true Information needed to send a status order update

Request body - instance of ExternalOrder

  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
{
  "order_id_external": "OL-ID",
  "reexpedition": "R0",
  "order_date": "2021-03-24T13:31:16.425Z",
  "logistics_operator": "INTERBOX",
  "delivery_type": "HOME",
  "process_type": "SWAP",
  "logistic_operation": "DELIVERY",
  "portability": true,
  "business": "string",
  "status": {
    "id": "3",
    "description": "Description about status",
    "timestamp": "2021-05-24T09:00:00Z",
    "reason": {
      "code": "INCOMPLETE",
      "description": "Missing components or equipment"
    }
  },
  "journeys": [
    {
      "devices": [
        {
          "reference": "8U8474JE3748",
          "subscription": {
            "subscription_id": "SUBS-ID",
            "order_id": "CRM-ID",
            "msisdn": "666777888"
          },
          "type": {
            "action_id": "1",
            "family_id": "17",
            "id": "ROUTER"
          },
          "replacement": "Y",
          "identifier": "10C25AD5580A",
          "additional_identifier": "string",
          "active": true,
          "subscription_device_id": "XXXXXXXXX",
          "price": {
            "markup": {
              "total": 24.5,
              "currency": "EUR"
            },
            "no_markup": {
              "total": 24.5,
              "currency": "EUR"
            }
          }
        }
      ],
      "transport": {
        "delivery_details": {
          "package": {
            "weight": 2.5,
            "dimensions": 0
          },
          "coverage": true,
          "secure_delivery": false,
          "remaining_payment": {
            "total": 24.5,
            "currency": "EUR"
          },
          "recipient_verification": {
            "exclusive_delivery": false,
            "verification": {
              "required": true,
              "completed": false
            }
          }
        },
        "courier": "GLS",
        "service": "24h",
        "tracking_link": "https://www.trackinglink.com/trackinglink/38383",
        "expedition_number": "28272272722",
        "delivery_note": {
          "delivery_note_id": "111222333444",
          "link": "https://www.gls.com/deliverynotelink/38383"
        }
      }
    }
  ],
  "documentation": [
    {
      "preprinted": true,
      "total_pages": 10,
      "documents": [
        {
          "recipient": "CLIENT",
          "document_type": "WL",
          "quantity": 1
        }
      ]
    }
  ],
  "customer_delivering_info": {
    "address": {
      "building_street_type": "Calle",
      "building_street_name": "Mayor",
      "building_number": "208",
      "building_floor": "A",
      "building_others": "string",
      "city": "Leganes",
      "zipcode": "28912",
      "region": "Madrid",
      "country": "ES"
    },
    "client": {
      "identity": {
        "document_id": "00557788T",
        "document_type": "NIF"
      },
      "contact_phone": {
        "phone_number": "666777888",
        "prefix": "+34"
      },
      "name": "Juan",
      "surnames": [
        "Perez"
      ],
      "email": "example@gmail.com",
      "commercial_name": "BUSINESS SA"
    },
    "language": "ES",
    "updated": true
  }
}
Name Type Required Description
order_id_external string true External order identifier
reexpedition string true Reexpedition identifier
order_date string false Order date in ISO 8601 format and UTC
logistics_operator string false logistic operator
delivery_type string true Delivery type.
process_type string false Logistics process type.
logistic_operation string false Logistic operation.
portability boolean false order with associated portability
business string false Business name
status ExternalStatus true none
journeys [Journey] true none
documentation ExternalDocumentation false none
customer_delivering_info CustomerDeliveringInfo true none
Property Values
logistics_operator one of [INTERBOX, ANOVO]
delivery_type one of [HOME, AGENCY, SHOP]
process_type one of [SWAP, PEDIDO, BAJA, DESISTIMIENTO, CANCELACION, FIX, DOA, FINALPAYMENT, BREAKDOWN_DELIVERY, BREAKDOWN_PICKUP, MIGRATION_DELIVERY, MIGRATION_PICKUP]
logistic_operation one of [DELIVERY, PICKUP]

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
128
129
130
131
132
133

curl -X POST https://logistics.sta.masstack.com/v2/orgs/yoigo/external/status \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'order_id_external': 'OL-ID',
  'reexpedition': 'R0',
  'order_date': '2021-03-24T13:31:16.425Z',
  'logistics_operator': 'INTERBOX',
  'delivery_type': 'HOME',
  'process_type': 'SWAP',
  'logistic_operation': 'DELIVERY',
  'portability': true,
  'business': 'string',
  'status': {
    'id': '3',
    'description': 'Description about status',
    'timestamp': '2021-05-24T09:00:00Z',
    'reason': {
      'code': 'INCOMPLETE',
      'description': 'Missing components or equipment'
    }
  },
  'journeys': [
    {
      'devices': [
        {
          'reference': '8U8474JE3748',
          'subscription': {
            'subscription_id': 'SUBS-ID',
            'order_id': 'CRM-ID',
            'msisdn': '666777888'
          },
          'type': {
            'action_id': '1',
            'family_id': '17',
            'id': 'ROUTER'
          },
          'replacement': 'Y',
          'identifier': '10C25AD5580A',
          'additional_identifier': 'string',
          'active': true,
          'subscription_device_id': 'XXXXXXXXX',
          'price': {
            'markup': {
              'total': 24.5,
              'currency': 'EUR'
            },
            'no_markup': {
              'total': 24.5,
              'currency': 'EUR'
            }
          }
        }
      ],
      'transport': {
        'delivery_details': {
          'package': {
            'weight': 2.5,
            'dimensions': 0
          },
          'coverage': true,
          'secure_delivery': false,
          'remaining_payment': {
            'total': 24.5,
            'currency': 'EUR'
          },
          'recipient_verification': {
            'exclusive_delivery': false,
            'verification': {
              'required': true,
              'completed': false
            }
          }
        },
        'courier': 'GLS',
        'service': '24h',
        'tracking_link': 'https://www.trackinglink.com/trackinglink/38383',
        'expedition_number': '28272272722',
        'delivery_note': {
          'delivery_note_id': '111222333444',
          'link': 'https://www.gls.com/deliverynotelink/38383'
        }
      }
    }
  ],
  'documentation': [
    {
      'preprinted': true,
      'total_pages': 10,
      'documents': [
        {
          'recipient': 'CLIENT',
          'document_type': 'WL',
          'quantity': 1
        }
      ]
    }
  ],
  'customer_delivering_info': {
    'address': {
      'building_street_type': 'Calle',
      'building_street_name': 'Mayor',
      'building_number': '208',
      'building_floor': 'A',
      'building_others': 'string',
      'city': 'Leganes',
      'zipcode': '28912',
      'region': 'Madrid',
      'country': 'ES'
    },
    'client': {
      'identity': {
        'document_id': '00557788T',
        'document_type': 'NIF'
      },
      'contact_phone': {
        'phone_number': '666777888',
        'prefix': '+34'
      },
      'name': 'Juan',
      'surnames': [
        'Perez'
      ],
      'email': 'example@gmail.com',
      'commercial_name': 'BUSINESS SA'
    },
    'language': 'ES',
    'updated': true
  }
}" 

Responses

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

200 - JsonObject

Custom schema example

1
2
3
4
5
{
  "code": 0,
  "subcode": 0,
  "message": "Operation executed correctly."
}
Name Type Required Description
title string false Error description
ref string false Link to error dictionary
details string false Error detail message
code string false Internal error code

4XX - instance of ExternalError

Custom schema example

1
2
3
4
5
6
7
8
[
  {
    "title": "PRODUCT_NOT_EXIST",
    "ref": "string",
    "details": "Product id doesn't exists or isn't available",
    "code": "MLOG_XXXX"
  }
]
Name Type Required Description
title string false Error description
ref string false Link to error dictionary
details string false Error detail message
code string false Internal error code

Parameters

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

Request body - JsonObject

 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
{
  "subscription": {
    "subscription_id": "SUBS-ID",
    "order_id": "CRM-ID",
    "msisdn": "666777888"
  },
  "type": {
    "action_id": "1",
    "family_id": "17",
    "id": "ROUTER"
  },
  "reference": "8U8474JE3748",
  "replacement": "Y",
  "identifier": "10C25AD5580A",
  "additional_identifier": "string",
  "active": true,
  "subscription_device_id": "XXXXXXXXX",
  "price": {
    "markup": {
      "total": 24.5,
      "currency": "EUR"
    },
    "no_markup": {
      "total": 24.5,
      "currency": "EUR"
    }
  }
}
Name Type Required Description
subscription Subscription true none

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

curl -X POST https://logistics.sta.masstack.com/v2/orgs/yoigo/external/devices \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'subscription': {
    'subscription_id': 'SUBS-ID',
    'order_id': 'CRM-ID',
    'msisdn': '666777888'
  },
  'type': {
    'action_id': '1',
    'family_id': '17',
    'id': 'ROUTER'
  },
  'reference': '8U8474JE3748',
  'replacement': 'Y',
  'identifier': '10C25AD5580A',
  'additional_identifier': 'string',
  'active': true,
  'subscription_device_id': 'XXXXXXXXX',
  'price': {
    'markup': {
      'total': 24.5,
      'currency': 'EUR'
    },
    'no_markup': {
      'total': 24.5,
      'currency': 'EUR'
    }
  }
}" 

Responses

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

200 - JsonObject

Custom schema example

1
2
3
4
5
{
  "code": 0,
  "subcode": 0,
  "message": "Operation executed correctly."
}
Name Type Required Description
title string false Error description
ref string false Link to error dictionary
details string false Error detail message
code string false Internal error code

4XX - instance of ExternalError

Custom schema example

1
2
3
4
5
6
7
8
[
  {
    "title": "PRODUCT_NOT_EXIST",
    "ref": "string",
    "details": "Product id doesn't exists or isn't available",
    "code": "MLOG_XXXX"
  }
]
Name Type Required Description
title string false Error description
ref string false Link to error dictionary
details string false Error detail message
code string false Internal error code

Endpoints

Direct Logistics

    Reverse Logistics

      External Logistic Operator