- Environments
- Production: http://dsg.com/giftlocker/api/v1/
- Staging: http://stage-origin.dsg.com/giftlocker/api/v1/
- REST semantics are not followed for POST, PUT, & DELETE in order to support JSONP clients
- All GET endpoints support the JSONP callback parameter
- Finds a Locker Campaign by slug, includes all attached curated lockers
GET http://www.dsg.com/giftlocker/api/v1/locker_campaigns/<campaign_slug>
Example:
http://www.dsg.com/giftlocker/api/v1/locker_campaigns/pittsburgh-marathon
- Finds a Curated Locker by slug.
- Includes all items by PID and model.
GET http://www.dsg.com/giftlocker/api/v1/curated_lockers/<curated_locker_slug>
Example:
http://www.dsg.com/giftlocker/api/v1/curated_lockers/2014-resolutions
- Parameters
- Name (optional)
- Returns {"id": 1234, "name": "My Locker"}
GET http://www.dsg.com/giftlocker/api/v1/anon_lockers/add
- Parameters
- Returns {"id": 1234, "name": "My Locker", "items": [ << array is as returned from {locker_id}/items >> ] }
GET http://www.dsg.com/giftlocker/api/v1/anon_lockers/<locker_id>
- Parameters
- { pid: "30237046", model: "17674248", quantity: 1 }
- Returns
- { id: 123, anon_locker_id: 1, pid: "30237046", model: "17674248", quantity: 1 }
GET http://www.dsg.com/giftlocker/api/v1/anon_lockers/<locker_id>/items/add
- Parameters
- { pid: "30237046", model: "17674248", quantity: 1 }
- Returns
- { id: 123, anon_locker_id: 1, pid: "30237046", model: "17674248", quantity: 1 }
GET http://www.dsg.com/giftlocker/api/v1/anon_lockers/<locker_id>/items/<item_id>/update
- Parameters
- Returns
- Status 200 on success
GET http://www.dsg.com/giftlocker/api/v1/anon_lockers/<locker_id>/items/<item_id>/remove
- Parameters
- Returns
- Status 200 on success
GET http://www.dsg.com/giftlocker/api/v1/anon_lockers/<locker_id>/items/clear
Generates a shortlink or QR code for buying an anonymous locker or merging into a new authenticated gift locker
- Parameters
- action_type: 'buy' or 'merge'
- link_type: 'qr' or 'kiosk'
- Returns
- Action URL
GET http://www.dsg.com/giftlocker/api/v1/anon_lockers/<locker_id>/create_link
CURRENTLY UNUSED