One Drive

One Drive has been integrated into the shop service to utilize existing media content for product images and not need to upload all product images.

One Drive Required OAuth Scopes

To utilize the ability to access images and videos to attach to Product Variants, the following OAuth scopes are required for Yordadev API to function properly.

  • onedrive.appfolder

  • offline_access

These are to be able to go in and grab existing photo's to be selected from to attach to a Product Variant.

https://yorgate.yordadev.network/v1/oauth/odrive
This endpoint allows you to get an OAuth link to authorize a Google Drive for media.
Request
Response
Request
Headers
Authorization
required
string
Your Personal Access Token
Query Parameters
shop_id
required
string
The shop_id to which you wish to attach google drive
Response
201: Created
OAuth link successfully created.
[
"status" => 200
"payload" => array:1 [
"OAuth_URL" => "<linkremoved>"
]
"meta" => array:2 [
"from" => "127.0.0.1"
"agent" => "Symfony"
]
]

Attaching Media to Products

For detailed information on this see:

get
Fetching the One Drive Media Library

https://yorgate.yordadev.network/v1/gdrive/library
This endpoint returns the id, name, mime type, and the web URL of the items within Yorspace Root.
Request
Response
Request
Headers
Authorization
required
string
Your Shop's Client Credential Token
Query Parameters
q
optional
string
Query string for refining results.
Response
200: OK