Skip to content

Commit 10bb1b5

Browse files
authored
Merge pull request #1278 from MyParcelCOM/develop
2 parents a4ab01e + c576a00 commit 10bb1b5

8 files changed

Lines changed: 67 additions & 15 deletions

File tree

specification/info.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"title": "MyParcel.com API Specification",
33
"description": "**Introduction**<br>This is the technical reference for the MyParcel.com API implementing the [OpenApi 3.0 Specification](https://github.com/OAI/OpenAPI-Specification) according to [JSON API](https://jsonapi.org) conventions.<br>Check our [API documentation](https://docs.myparcel.com) for more information and code examples.<br>Check our [GitHub releases](https://github.com/MyParcelCOM/api-specification/releases) for a complete version history.<br><br>⚠ Some endpoints are marked as experimental, which means their implementation might change within this major version.<br><br>**Units**<br>Some attributes in the API have values in one of the following units: <table><tr><th>Currency</th><td>cents / pence</td></tr><tr><th>Distances</th><td>meters</td></tr><tr><th>Dimensions</th><td>millimeters</td></tr><tr><th>Timestamps</th><td>Coordinated Universal Time (UTC)</td></tr><tr><th>Volumes</th><td>liters (dm3)</td></tr><tr><th>Weights</th><td>grams</td></tr></table>",
4-
"termsOfService": "https://www.myparcel.com/legal",
4+
"termsOfService": "https://solutions.myparcel.com/legal",
55
"contact": {
66
"name": "Tech Support",
7-
"url": "https://www.myparcel.com/contact",
7+
"url": "https://solutions.myparcel.com/contact",
88
"email": "support@myparcel.com"
99
},
1010
"license": {
1111
"name": "pricing",
12-
"url": "https://www.myparcel.com/pricing"
12+
"url": "https://solutions.myparcel.com/pricing"
1313
},
1414
"version": "$RELEASE_VERSION",
1515
"x-logo": {

specification/paths/RegisteredShipments.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@
8080
"address"
8181
]
8282
},
83+
"drop_off_location": {
84+
"required": [
85+
"code",
86+
"address"
87+
]
88+
},
8389
"tracking_code": {
8490
"readOnly": true
8591
},

specification/paths/Shipments.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,12 @@
237237
"address"
238238
]
239239
},
240+
"drop_off_location": {
241+
"required": [
242+
"code",
243+
"address"
244+
]
245+
},
240246
"tracking_code": {
241247
"readOnly": true
242248
},

specification/schemas.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@
170170
"DocumentType": {
171171
"$ref": "./schemas/files/DocumentType.json"
172172
},
173+
"PickupLocation": {
174+
"$ref": "./schemas/shipments/PickupLocation.json"
175+
},
176+
"DropOffLocation": {
177+
"$ref": "./schemas/shipments/DropOffLocation.json"
178+
},
173179
"DemoOrder": {
174180
"$ref": "./schemas/return-orders/DemoOrder.json"
175181
},
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"type": "object",
3+
"additionalProperties": false,
4+
"properties": {
5+
"code": {
6+
"type": "string",
7+
"example": "205604",
8+
"description": "Code of the drop-off location, retrieved from the `pickup-dropoff-locations` endpoint."
9+
},
10+
"address": {
11+
"$ref": "#/components/schemas/BaseAddress"
12+
}
13+
},
14+
"description": "Required if the service handover method is `drop-off`."
15+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"type": "object",
3+
"additionalProperties": false,
4+
"properties": {
5+
"code": {
6+
"type": "string",
7+
"example": "205604"
8+
},
9+
"address": {
10+
"$ref": "#/components/schemas/BaseAddress"
11+
}
12+
},
13+
"description": "Required if the service delivery method is `pick-up`."
14+
}

specification/schemas/shipments/Shipment.json

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,17 @@
5252
"pickup_location": {
5353
"oneOf": [
5454
{
55-
"type": "object",
56-
"additionalProperties": false,
57-
"properties": {
58-
"code": {
59-
"type": "string",
60-
"example": "205604"
61-
},
62-
"address": {
63-
"$ref": "#/components/schemas/BaseAddress"
64-
}
65-
},
66-
"description": "Required if the service delivery method is `pick-up`."
55+
"$ref": "#/components/schemas/PickupLocation"
56+
},
57+
{
58+
"type": "null"
59+
}
60+
]
61+
},
62+
"drop_off_location": {
63+
"oneOf": [
64+
{
65+
"$ref": "#/components/schemas/DropOffLocation"
6766
},
6867
{
6968
"type": "null"

specification/schemas/shipments/ShipmentResponse.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
"address"
5252
]
5353
},
54+
"drop_off_location": {
55+
"required": [
56+
"code",
57+
"address"
58+
]
59+
},
5460
"physical_properties": {
5561
"required": [
5662
"weight"

0 commit comments

Comments
 (0)