From 8da9fabd36a031b0903879f812949386dce472a4 Mon Sep 17 00:00:00 2001 From: Shai Ungar Date: Wed, 24 Apr 2024 16:07:15 +0300 Subject: [PATCH] Add service to 17track to get packages (#32447) Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/seventeentrack.markdown | 24 ++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/source/_integrations/seventeentrack.markdown b/source/_integrations/seventeentrack.markdown index a4ed5831e40..8b075ff352b 100644 --- a/source/_integrations/seventeentrack.markdown +++ b/source/_integrations/seventeentrack.markdown @@ -31,10 +31,10 @@ Although the 17track.net website states that account passwords cannot be longer - Not found - In transit - Expired -- Pick up +- Ready to be picked up - Undelivered - Delivered -- Alert +- Returned ## Package-level attributes @@ -74,3 +74,23 @@ content: > ``` {% endraw %} + +## Services + +### Service `seventeentrack.get_packages` + +The `seventeentrack.get_packages` service allows you to query the 17track API for the latest package data. + + +| Service data attribute | Optional | Description | +|------------------------|----------|---------------------------------------------| +| `config_entry_id` | No | The ID of the 17Track service config entry. | +| `package_state` | yes | A list of the package states. | + +```yaml +# Example automation action to add a product to the cart by name. +- service: seventeentrack.get_packages + data: + config_entry_id: 2b4be47a1fa7c3764f14cf756dc98991 + package_state: ["Delivered", "In transit"] +```