TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | Custom |
ReleasedLast Release | Mar 2015 |
Maintained by Ellen Shapiro, Sean Wolter, Carl Hill-Popper.
The Parche Partner URL Scheme is intended to facilitate generating valet discounts for members of partner applications.
Any partner application will need to take the following steps to integrate:
Convenience classes will also include methods to determine if the user has the Parche application with a version supporting this URL scheme installed, and to launch the platform-appropriate App Store directly to the Parche application.
When you sign up for a partnership with Parche, you will receive an API Key and an API Secret.
To increase security and prevent rewind attacks, we strongly recommend calling the Parche Discount API from your server rather than directly from your application. This has several security benefits:
While it is possible to call the discount API from your application, if you do so, you assume the risk of any compromise of your API secret.
All calls to the Discount API are relative to the base URL:
https://api-staging.goparche.com
https://api.goparche.com
Anything being tested against a version of the application downloaded directly from the iOS App Store or Google Play store should use the Production base URL.
If you are using a beta version of the application to test, Parche will let you know which API base URL you should be using.
POST: /v1/partner/:api_key/create_discount``
Body:
{
"partner_user_id": "[email protected]",
"api_secret": "[your API secret]"
}
Notes:
partner_user_id
: The user ID used by your system to refer to the current user (string)api_key
: The API key provided to you by Parche (string)api_secret
: The API secret provided to you by Parche (string)Response:
{
"discount_code": "UYGgYtg76GUIHIUHiuhIUhi7y8d120dkasd0mnjv"
}
Notes:
discount_code
: The discount code to pass along to the application. (string)Status Codes:
201
if discount code was created400
if the fields in your request were incorrect403
if the wrong API key or API secret is providedThere are helper classes for each platform to facilitate calling the Parche URL scheme from your application. Each of these classes will require you to pass:
Instructions on how to integrate with your applications and helper classes to facilitate this process can be found through the iOS and Android READMEs.
The iOS and Android folders contain sample applications which show how this can be integrated.