peec / bring-api
Bring API wrapper for PHP.
Installs: 1 695
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: ~5.5.0|~5.6.0|~7.0.0
- guzzlehttp/guzzle: >=5.0
Requires (Dev)
- phpunit/phpunit: 4.3.*
This package is not auto-updated.
Last update: 2018-01-03 13:15:30 UTC
README
Use this API with any PHP application ( Magento, Wordpress, Drupal, etc. ).
Features:
- Forces request format to comply with Bring API
- Forces strict data types
- Validation before API request
- PSR-4 compliant
- Supports My bring authorization for API's that supports it ( meaning no rate limiting ).
See example folder for usage.
See Bring Developer Section for info about the API and response array description.
Install
Install using composer is the best way.
composer require peec/bring-api@^1.0
Supporting the following APIs:
- Booking API (EDI)
- Book shipments. https://api.bring.com/booking/api
- Get Mybring customers. https://api.bring.com/booking/api/customers
- Shipping Guide API
- Get estimated prices for packages.
- Tracking API
- Track consignments
- Easy Return Service API
** API's marked with [x] is implemented**
Test (cli)
See example
folder for example scripts.
Testing My bring booking API
Since the booking API requires authentication with My Bring, set some environment variables before running the test script.
UID / API key and Bring customer number is accessible in the mybring web interface.
cd example/
export BRING_UID="me@myemail.com" && export BRING_API_KEY="xxxxxx-xxxxx-xxx-xxxx" && export BRING_CUSTOMER="BRING__CUSTOMER_NUMBER" && php booking-api.php
Contribute
Contributions are welcome.
License
MIT