{"id":21976786,"url":"https://github.com/stuartapp/stuart-client-elixir","last_synced_at":"2025-08-31T01:33:19.795Z","repository":{"id":54908053,"uuid":"142880770","full_name":"StuartApp/stuart-client-elixir","owner":"StuartApp","description":"Stuart Elixir client","archived":false,"fork":false,"pushed_at":"2023-04-20T09:57:04.000Z","size":67,"stargazers_count":4,"open_issues_count":2,"forks_count":4,"subscribers_count":49,"default_branch":"develop","last_synced_at":"2025-08-09T01:47:59.228Z","etag":null,"topics":["delivery","elixir-library","stuart"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StuartApp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-30T13:40:03.000Z","updated_at":"2023-09-11T15:34:51.000Z","dependencies_parsed_at":"2025-04-28T16:45:34.258Z","dependency_job_id":"9511bcc8-9fe2-4271-a8b9-12e1f276dc9c","html_url":"https://github.com/StuartApp/stuart-client-elixir","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/StuartApp/stuart-client-elixir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartApp%2Fstuart-client-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartApp%2Fstuart-client-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartApp%2Fstuart-client-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartApp%2Fstuart-client-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StuartApp","download_url":"https://codeload.github.com/StuartApp/stuart-client-elixir/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StuartApp%2Fstuart-client-elixir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272929991,"owners_count":25017057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["delivery","elixir-library","stuart"],"created_at":"2024-11-29T16:12:17.508Z","updated_at":"2025-08-31T01:33:19.777Z","avatar_url":"https://github.com/StuartApp.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Codeship Status for StuartApp/stuart-client-elixir](https://app.codeship.com/projects/f9859ab0-b145-0137-da11-3e6824a8821c/status?branch=develop)](https://app.codeship.com/projects/363007)\n\n# Stuart Elixir Client\n\nFor a complete documentation of all endpoints offered by the Stuart API, you can read the [Stuart API documentation](https://api-docs.stuart.com/).\n\n## Install\n\n```elixir\n# mix.exs\n\ndef deps do\n  [\n    {:stuart_client_elixir, \"~\u003e 1.3.1\"}\n  ]\nend\n```\n\n## Usage\n\n#### Custom requests\n\n#### Send a GET request to the Stuart API\n\n```elixir\nalias StuartClientElixir.{Environment, Credentials}\n\ncredentials = %Credentials{client_id: \"...\", client_secret: \"...\"}\n\nStuartClientElixir.get(\n  \"/v2/jobs/95896\", %{environment: Environment.sandbox(), credentials: credentials})\n```\n\n#### Send a POST request to the Stuart API\n\n```elixir\nalias StuartClientElixir.{Environment, Credentials}\n\njob = %{\n  job: %{\n    transport_type: \"bike\",\n    pickups: [\n      %{\n        address: \"46 Boulevard Barbès, 75018 Paris\",\n        comment: \"Wait outside for an employee to come.\",\n        contact: %{\n          firstname: \"Martin\",\n          lastname: \"Pont\",\n          phone: \"+33698348756\",\n          company: \"KFC Paris Barbès\"\n        }\n      }\n    ],\n    dropoffs: [\n      %{\n        address: \"156 rue de Charonne, 75011 Paris\",\n        package_description: \"Red packet.\",\n        comment: \"code: 3492B. 3e étage droite. Sonner à Durand.\",\n        contact: %{\n          firstname: \"Alex\",\n          lastname: \"Durand\",\n          phone: \"+33634981209\",\n          company: \"Durand associates.\"\n        }\n      }\n    ]\n  }\n}\n\ncredentials = %Credentials{client_id: \"...\", client_secret: \"...\"}\nStuartClientElixir.post(\"/v2/jobs\", Jason.encode!(job), %{environment: Environment.sandbox(), credentials: credentials})\n```\n\n#### Send a PATCH request to the Stuart API\n\n```elixir\nalias StuartClientElixir.{Environment, Credentials}\n\njob = %{\n  job: %{\n    deliveries: [\n      %{\n        id: \"43035\",\n        client_reference: \"new_client_reference\",\n        package_description: \"new_package_description\",\n        pickup: %{\n          comment: \"new_comment\",\n          contact: %{\n            firstname: \"new_firstname\",\n            lastname: \"new_lastname\",\n            phone: \"+33628046091\",\n            email: \"sd@df.com\",\n            company: \"new_company\"\n          }\n        },\n        dropoff: %{\n          comment: \"new_comment\",\n          contact: %{\n            firstname: \"new_firstname\",\n            lastname: \"new_lastname\",\n            phone: \"+33628046095\",\n            email: \"new_email@mymail.com\",\n            company: \"new_company\"\n          }\n        }\n      }\n    ]\n  }\n}\n\ncredentials = %Credentials{client_id: \"...\", client_secret: \"...\"}\nStuartClientElixir.patch(\"/v2/jobs/1234\", Jason.encode!(job), %{environment: Environment.sandbox(), credentials: credentials})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartapp%2Fstuart-client-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuartapp%2Fstuart-client-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartapp%2Fstuart-client-elixir/lists"}