Variants

get
Fetching Product Variants

https://yorshop.yordadev.network/v1/product/variant
This endpoint allows you to create product variants.
Request
Response
Request
Headers
Authorization
required
string
Your shop's Client Credential Token
Query Parameters
product_id
required
string
The API will do its best to find a cake matching the provided recipe.
Response
200: OK

post
Creating a Product Variant

https://yorshop.yordadev.network/v1/product/variant
Request
Response
Request
Headers
Authorization
required
string
Your shop's Client Credential Token
Form Data Parameters
product_id
required
string
The id to the product this variant belongs
name
required
string
The variant's name
has_weight
required
boolean
True or False
weight
optional
string
Weight of the variant
has_dimensions
required
boolean
True or False
dimensions
optional
string
Must be in "LxWxH" format
price
required
string
The variants price
options
optional
array
An array of additional options for the variant
Response
200: OK

put
Updating a Product Variant

https://yorshop.yordadev.network/v1/product/variant
This endpoint allows you to update a product variant.
Request
Response
Request
Headers
Authorization
required
string
Your shop's Client Credential Token
Query Parameters
product_id
required
string
The id of the product to which the variant belongs
variant_id
required
string
The id of the variant to be updated
name
required
string
Updated name
has_weight
required
boolean
True or False
weight
optional
string
The variant's weight
has_dimensions
required
boolean
True or False
dimensions
optional
string
This must be in "LxWxH" format
price
required
string
The price of the variant
options
optional
array
Array of additional product variant options
Response
200: OK

delete
Destroying a Product Variant

https://yorshop.yordadev.network/v1/product/variant
This endpoint allows you to destroy a variant to a product.
Request
Response
Request
Query Parameters
variant_id
required
string
The id of the variant to be destroyed
Response
200: OK