{"id":15987792,"url":"https://github.com/sameerkumar18/newgistics","last_synced_at":"2025-04-04T22:14:05.523Z","repository":{"id":57445872,"uuid":"225010316","full_name":"sameerkumar18/newgistics","owner":"sameerkumar18","description":"Python Client for Newgistics Web APIs \u0026 Fulfillment APIs  🏭","archived":false,"fork":false,"pushed_at":"2023-05-22T22:34:35.000Z","size":24,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T22:54:43.624Z","etag":null,"topics":["3pl","3pl-integration","logistics","newgistics","newgistics-api","pip","pip-package","pitney-bowes","pypi-packages","python","python-client","xml-api"],"latest_commit_sha":null,"homepage":"https://newgistics.com/","language":"Python","has_issues":true,"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/sameerkumar18.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}},"created_at":"2019-11-30T12:40:00.000Z","updated_at":"2023-03-05T19:53:39.000Z","dependencies_parsed_at":"2022-09-26T17:30:56.409Z","dependency_job_id":null,"html_url":"https://github.com/sameerkumar18/newgistics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameerkumar18%2Fnewgistics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameerkumar18%2Fnewgistics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameerkumar18%2Fnewgistics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameerkumar18%2Fnewgistics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameerkumar18","download_url":"https://codeload.github.com/sameerkumar18/newgistics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256113,"owners_count":20909240,"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","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":["3pl","3pl-integration","logistics","newgistics","newgistics-api","pip","pip-package","pitney-bowes","pypi-packages","python","python-client","xml-api"],"created_at":"2024-10-08T03:41:45.890Z","updated_at":"2025-04-04T22:14:05.503Z","avatar_url":"https://github.com/sameerkumar18.png","language":"Python","readme":"[logo]: https://logo.clearbit.com/newgistics.com \"Newgistics Python Client Logo\"\n\n![alt text][logo] Newgistics Python Client\n==================================================== \n\n[![PyPI version](https://badge.fury.io/py/newgistics.svg)](https://badge.fury.io/py/newgistics)\n\u003c!--[![Build Status](https://travis-ci.org/sameerkumar18/newgistics.svg?branch=master)](https://travis-ci.org/sameerkumar18/newgistics)--\u003e\n[![image](https://img.shields.io/pypi/v/newgistics.svg)](https://pypi.org/project/newgistics/)\n[![image](https://img.shields.io/pypi/l/newgistics.svg)](https://pypi.org/project/newgistics/)\n[![image](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/sameerkumar18)\n[![image](https://img.shields.io/badge/Paypal-Donate-blue.svg)](https://www.paypal.me/sameerkumar18)\n\nPython Client for Newgistics Fulfillments API v2.8.2 and Newgistics Web API v2.2.\nPlease refer to the API docs before using this package.\n\nInstallation\n------------\n\nSupports Python 3+\nTo install, simply use pip\n```\n$ sudo pip install newgistics\n✨🍰✨\n```\n\nUsage\n-----\n\n###### Newgistics Fulfillments System API\n```python\n\n\u003e\u003e\u003e from newgistics import NewgisticsFulfillment\n\n\u003e\u003e\u003e ngf_client = NewgisticsFulfillment(api_key='\u003cNG-Fulfillments-API-Key\u003e', staging=False)\n\u003e\u003e\u003e ngf_client.inbound_returns.create(payload=request_payload)\n    \u003cResponse [200]\u003e\n```\n\n###### Newgistics REST Web API\n```python\n\n\u003e\u003e\u003e from newgistics import NewgisticsWeb\n\n\u003e\u003e\u003e ngw_client = NewgisticsWeb(api_key='\u003cNG-Web-API-Key\u003e', staging=False)\n\u003e\u003e\u003e ngw_client.labels.create(payload=label_payload)\n    \u003cResponse [200]\u003e\n```\n\nYou can pass the `api_key` explicitly. Alternatively, you may declare these environment variables `NG_FL_API_KEY` and/or `NG_WEB_API_KEY`.\n\nFor wrapper usage code snippets please check examples.py\n\n#### Features\nNote: Below package usages return a requests module's Response object. Append .json() to get a python dictionary response\n- Newgistics Fulfillments\n    - Shipments\n        - Create Shipment\n            ```python\n            \u003e\u003e\u003e request_payload = {'Orders': \n                    {'Order': {'AllowDuplicate': False,\n                               'CustomerInfo': {'Address1': '32142 Waverton Lane',\n                                'Address2': None,\n                                'City': 'Huntersville',\n                                'Company': None,\n                                'Country': 'US',\n                                'Email': 'yestestmail@gmail.com',\n                                'FirstName': 'John',\n                                'IsResidential': 'true',\n                                'LastName': 'Barron',\n                                'Phone': None,\n                                'State': 'NC',\n                                'Zip': '28078'},\n                               'HoldForAllInventory': False,\n                               'Items': {'Item': [{'Qty': 10, 'SKU': 'HLU'}]},\n                               'OrderDate': '04-12-2019',\n                               'RequiresSignature': False,\n                               'id': '4321'}}}\n            \u003e\u003e\u003e ngf_client.shipments.create(payload=request_payload)\n            ```\n            Submit orders to WMS system\n        - Fetch Shipment(s)\n            ```python\n            \u003e\u003e\u003e ngf_client.shipments.fetch(params={'id': '4231'})\n            ```\n            Retrieves a list of shipments based on one or more parameters    \n    - Inbound Returns\n        - Create Inbound Return\n            ```python\n            \u003e\u003e\u003e request_payload = {'Returns': {\n                                      'Return': {'id': '8732832',\n                                       'Comments': 'COMMENTS',\n                                       'Items': {'Item': [{'Qty': 10, 'Reason': 'Some_Reason', 'SKU': 'HLU'}]},\n                                       'RMA': '1234'}}}\n            \u003e\u003e\u003e ngf_client.inbound_returns.create(payload=request_payload)\n            ```\n            Submits incoming returns by RMA ID to the WMS system\n        - Fetch Inbound Return(s)\n            ```python\n            \u003e\u003e\u003e ngf_client.inbound_returns.fetch(params={'startCreatedTimestamp': '', 'endCreatedTimestamp': ''})\n            ```\n            Retrieves a list of incoming returns by RMA ID to the WMS system\n    - Returns\n        - Fetch Return(s)\n            ```python\n            \u003e\u003e\u003e ngf_client.returns.fetch(params={'Id': '1234'})\n            ```\n            Retrieves a list of returns received by Newgistics Fulfillment for a given date/time range or a specific return by order ID\n- Newgistics Web API\n    - Shipments\n        - Create Shipment Label\n            ```python\n            \u003e\u003e\u003e payload = {\n            \"clientServiceFlag\": \"Standard\",\n            \"consumer\": {\n                \"Address\": {\n                    \"Address1\": \"2700 Via Fortuna Drive\",\n                    \"Address2\": \"\",\n                    \"Address3\": \"\",\n                    \"City\": \"Austin\",\n                    \"CountryCode\": \"US\",\n                    \"State\": \"TX\",\n                    \"Zip\": \"78746\"\n                },\n                \"DaytimePhoneNumber\": \"5122256000\",\n                \"EveningPhoneNumber\": \"\",\n                \"FaxNumber\": \"\",\n                \"FirstName\": \"testname\",\n                \"Honorific\": \"\",\n                \"LastName\": \"tester\",\n                \"MiddleInitial\": \"\",\n                \"PrimaryEmailAddress\": \"croosken@newgistics.com\"\n            },\n            \"deliveryMethod\": \"SelfService\",\n            \"dispositionRuleSetId\": 99,\n            \"labelCount\": 1,\n            \"merchantID\": \"NGST\",\n            \"returnId\": \"123456789A\"\n            }\n            \u003e\u003e\u003e ngw_client.labels.create(payload=payload)\n            ```\n            Creates a SmartLabel return label\n\n\n## Default Values\n\n- Newgistics Web API endpoint: \n    - Prod: https://api.newgistics.com\n    - Staging: https://apiint.newgistics.com\n- Newgistics Fulfillments API: \n    - Prod: https://api.newgisticsfulfillment.com\n    - Staging: https://apistaging.newgisticsfulfillment.com\n\n## About Newgistics\n\nNewgistics provides services and technology to support the e-commerce operations of retailers around the world. Its offerings include software and services to build and maintain e-commerce websites, perform order fulfillment, and manage parcel delivery and returns.\nThis package reduces the shortcomings/difficulties whule integrating Newgistics's APIs. It's still not what I'd appreciate, but it should just work! Looking for your active contribution to the project (See roadmap below)\n\n## Support\n\nFor any wrapper related query/issue, please raise a GitHub issue.\n## About\n#### Why\nIntegrating with 3PL APIs like Newgistics(owned by PitneyBowes) can be pain at times. For instance, some APIs are XML only, whereas some can accept JSON as payload but return a XML response\n\n#### RoadMap/Shortcomings\n\n    1. Write Tests with a token from Newgistics(Observation: staging and production tokens are same on NG)\n    2. Cover more APIs from both Web \u0026 Fulfillment\n    3. Return better objects, eg: every function returns a python requests's Response object\n    4. Overall code and design improvements \n\n \n[Sameer Kumar](https://www.sameerkumar.website/)\n\nFind me on [Twitter](https://twitter.com/sameer_kumar018)","funding_links":["https://www.paypal.me/sameerkumar18"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameerkumar18%2Fnewgistics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameerkumar18%2Fnewgistics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameerkumar18%2Fnewgistics/lists"}