-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Introduced get multi colli service rates endpoint
- Loading branch information
Showing
3 changed files
with
196 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,190 @@ | ||
{ | ||
"post": { | ||
"tags": [ | ||
"MultiColliServiceRates" | ||
], | ||
"summary": "Get service rates for a multi-colli shipment", | ||
"description": "This endpoint retrieves service rates from the carrier based on the supplied multi-colli shipment.", | ||
"requestBody": { | ||
"description": "The virtual master shipment and colli shipments to be created as one multi-colli shipment.", | ||
"required": true, | ||
"content": { | ||
"application/vnd.api+json": { | ||
"schema": { | ||
"type": "object", | ||
"required": [ | ||
"data" | ||
], | ||
"additionalProperties": false, | ||
"properties": { | ||
"data": { | ||
"type": "object", | ||
"properties": { | ||
"master": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/components/schemas/Shipment" | ||
}, | ||
{ | ||
"required": [ | ||
"attributes" | ||
], | ||
"properties": { | ||
"id": { | ||
"readOnly": true | ||
}, | ||
"attributes": { | ||
"required": [ | ||
"myparcelcom_shipment_id", | ||
"recipient_address", | ||
"return_address", | ||
"sender_address", | ||
"service", | ||
"physical_properties" | ||
], | ||
"properties": { | ||
"recipient_address": { | ||
"required": [ | ||
"first_name", | ||
"last_name", | ||
"street_1", | ||
"city", | ||
"country_code" | ||
] | ||
}, | ||
"return_address": { | ||
"required": [ | ||
"street_1", | ||
"city", | ||
"country_code" | ||
] | ||
}, | ||
"sender_address": { | ||
"required": [ | ||
"street_1", | ||
"city", | ||
"country_code" | ||
] | ||
}, | ||
"service": { | ||
"required": [ | ||
"code" | ||
] | ||
}, | ||
"physical_properties": { | ||
"required": [ | ||
"weight" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"colli": { | ||
"type": "array", | ||
"items": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/components/schemas/Shipment" | ||
}, | ||
{ | ||
"required": [ | ||
"attributes" | ||
], | ||
"properties": { | ||
"id": { | ||
"readOnly": true | ||
}, | ||
"attributes": { | ||
"required": [ | ||
"myparcelcom_shipment_id", | ||
"physical_properties" | ||
], | ||
"properties": { | ||
"physical_properties": { | ||
"required": [ | ||
"weight" | ||
] | ||
}, | ||
"items": { | ||
"items": { | ||
"required": [ | ||
"description", | ||
"quantity" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"meta": { | ||
"type": "object", | ||
"properties": { | ||
"track_trace": { | ||
"type": "object", | ||
"properties": { | ||
"enabled": { | ||
"type": "boolean", | ||
"description": "Indicates whether or not the carrier should send track and trace emails for this shipment.", | ||
"example": false, | ||
"default": true | ||
} | ||
} | ||
}, | ||
"label": { | ||
"type": "object", | ||
"properties": { | ||
"mime_type": { | ||
"type": "string", | ||
"example": "application/pdf", | ||
"default": "application/pdf", | ||
"description": "Requested `mime-type` for the label of this shipment." | ||
}, | ||
"size": { | ||
"type": "string", | ||
"example": "A6", | ||
"default": "A6", | ||
"description": "Requested size for the label of this shipment." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"description": "Retrieved the service rates.", | ||
"content": { | ||
"application/vnd.api+json": { | ||
"schema": { | ||
"type": "object", | ||
"required": [ | ||
"data" | ||
], | ||
"properties": { | ||
"data": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/ServiceRateResponse" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,9 @@ | |
{ | ||
"name": "Manifests" | ||
}, | ||
{ | ||
"name": "MultiColliServiceRates" | ||
}, | ||
{ | ||
"name": "MultiColliShipments" | ||
}, | ||
|