Services Enrollment
STAGING_URL: https://switch-api-staging.herokuapp.com
LIVE_URL: https://switchapi.azurewebsites.netGet Vendor Products
POST https://switch-api-staging.herokuapp.com/user/enrolments/vendors/:id/products
This endpoint retrieves the list of vendor products. The list of possible response_types returned include: - text - radio - checkbox - file - date - resource - dependable
Headers
auth_token
string
The format for auth_token is Bearer token_string
Request Body
sub_category
string
product subcategory
{
"message": "Vendor products retrieved successfully",
"data":[
{
"id": 4,
"name": "Target Savings",
"category": "savings",
"sub_category": "target_savings",
"active": true,
"created_at": "2019-02-26T09:55:11.257Z",
"vendor_id": 2,
"approval_status": "approved",
"approval_comment": "okay",
"vendor_name": "piggyvest",
"vendor_logo_url": "https://storage.googleapis.com/switch/Vendor%20Logos/Piggyvest.png",
"integration_service_name": "piggyvest",
"product_requirements":[
{
"id": 12,
"name": "frequency",
"depends_on": null,
"response_type": "radio_choice",
"response_fields":[
{
"key": "daily",
"value": "daily",
"text":"Daily"
},
{
"key": "weekly",
"value": "weekly",
"text": "Weekly"
},
{
"key": "monthly",
"value": "monthly",
"text": "Monthly"
}
]
},
{
"id": 10,
"name": "name",
"depends_on": null,
"response_type": "text",
"response_fields": null
},
{
"id": 11,
"name": "target_amount",
"depends_on": null,
"response_type": "text",
"response_fields": null
},
{
"id": 14,
"name": "amount",
"depends_on": null,
"response_type": "text",
"response_fields":null
},
{
"id": 15,
"name": "withdrawal_date",
"depends_on": null,
"response_type": "date",
"response_fields": null
},
{
"id": 13,
"name": "duration_in_months",
"depends_on": null,
"response_type": "text",
"response_fields": null
}
]
}
]
}Retrieve User Enrolments
GET https://switch-api-staging.herokuapp.com/user/enrolments
Headers
auth_token
string
The format for auth_token is Bearer token_string
Enroll for Service
GET https://switch-api-staging.herokuapp.com/user/enrolments
Headers
auth_token
string
The format for auth_token is Bearer token_string
Request Body
answered_requirements
string
answered requirements
product_id
string
product ID
Get Vendor Categories
GET https://switch-api-staging.herokuapp.com/user/enrolments/categories
Get categories for vendors
Path Parameters
auth_token
string
The format for auth_token is Bearer
Get Vendors
GET https://switch-api-staging.herokuapp.com/user/enrolments/vendors
Get all vendors
Headers
auth_token
string
The format for auth_token is Bearer token_string
Last updated
Was this helpful?