Add shipments to collection =========================== The ``POST /add-shipments-to-collection`` endpoint allows you to add multiple shipments to an already existing collection. .. seealso:: https://api-specification.myparcel.com/#tag/RPC/paths/~1add-shipments-to-collection/post Registered shipments -------------------- Already registered shipments can be added to a concept collection via this endpoint if the carrier allows this. To see if a carrier supports adding registered shipments to a collection, make a request to the carrier resource. .. seealso:: https://api-specification.myparcel.com/#tag/Carriers Request ------- **Required Scopes:** ``shipments.manage, collections.manage`` Minimum request requirements ---------------------------- In order to successfully add shipments to a collection, make sure the collection still has the concept status. If the collection was created with a contract, make sure all of the shipments are created via the same contract. Attributes __________ The following attributes should always be included in a request: =================== =========== Attribute Description =================== =========== collection_id id of :doc:`Collection ` the collection to which the shipments should be added. shipment_ids array of :doc:`Shipment ` ids that should be added to the collection. =================== =========== Request _______ .. code-block:: http POST /add-shipments-to-collection HTTP/1.1 Content-Type: application/vnd.api+json Example: https://api.sandbox.myparcel.com/track-external-shipment { "data": { "collection_id": "e26d781b-6c56-4be5-ae72-505db793d2bd", "shipment_ids": ["7b808eee-bf1c-40cd-98f2-3c335a06417e", "54ba51ed-dcce-4ce3-8be1-a51b29d03f4e"], } } Response -------- The API will respond with status ``204 No Content`` indicating that no content is returned, but the shipment has been imported.