Create Store Listing
POST /api/v2/channel_sellables
Create a new store listing.
Note: This endpoint is only permitted for channels with the type code custom_integration
.
To link the listing to a product in Veeqo, you have three options:
-
Autolink: Set
autolink
totrue
to automatically link this listing to a product variant in Veeqo with the same SKU code, or create one if no such product variant exists. Recommended approach. -
Link to existing channel product: Specify
relationships.channel_product
to associate with an existing channel product. -
Create new channel product: Provide
channel_product_attributes
within the request body to create a new channel product.
Request Body
Section titled “Request Body ”object
ID of the existing sellable in Veeqo to link to.
ID for this listing on the remote store.
SKU code for this listing as it appears on the remote store.
Cost price of this listing on the remote store.
Barcode (UPC code) of this listing as it appears on the remote store.
ID of the store to link this listing to.
Whether to find and link to an existing sellable in Veeqo by SKU, or create a new product and product variant if none exist.
The channel product to link this listing to.
object
The title of the channel product. Can be omitted if relationships.channel_product.data.id
is provided.
Description of the channel product.
Dimensions of the product represented by this store listing.
object
object
object
object
ID of the channel product in Veeqo to link this store listing to.
channel_product
Example
{ "data": { "type": "channel_sellable", "attributes": { "sellable_id": 12345, "remote_id": "remote-123456", "remote_sku": "SKU123456", "remote_price": 19.99, "cost_price": 9.99, "remote_grams": 500, "remote_title": "Test Product", "remote_barcode": "1234567890123", "channel_id": 54321, "autolink": false, "channel_product_attributes": { "remote_title": "Product Title", "remote_description": "Product Description" }, "measurement_attributes": { "width": 10, "height": 15, "depth": 20, "dimensions_unit": "cm" } }, "relationships": { "channel_product": { "data": { "id": "9876", "type": "channel_product" } } } }}
Responses
Section titled “ Responses ”Store listing was created succesfully.
object
A listing on a remote store (aka channel sellable).
object
ID of the store listing in Veeqo.
object
The title of this store listing.
The SKU code of this store listing as it appears on the remote store.
The price of this listing as it appears on the remote store.
The unit of currency of the remote_price
.
The number of units shown for sale on the remote store.
The ID of store listing on the remote store.
Whether this listing is active on the remote store.
object
object
object
ID of the channel this store listing is linked to.
channel
object
object
ID of the user who created this store listing.
user
object
object
ID of the last user who updated this store listing.
user
object
object
ID of the product in Veeqo this store listing is linked to.
object
object
ID of the channel product this listing is linked to.
channel_product
object
object
ID of the sellable this store listing is linked to in Veeqo.
sellable
Example
{ "data": { "id": "6789", "type": "channel_sellable", "attributes": { "remote_title": "Test Product", "remote_sku": "SKU123456", "remote_price": 19.99, "currency_code": "GBP", "remote_inventory_quantity": null, "active": true }, "relationships": { "channel": { "data": { "id": "54321", "type": "channel" } }, "created_by": { "data": { "id": "101", "type": "user" } }, "updated_by": { "data": null }, "product": { "data": { "id": "2468", "type": "product" } }, "channel_product": { "data": { "id": "9876", "type": "channel_product" } }, "sellable": { "data": { "id": "12345", "type": "sellable" } }, "remote_url": { "data": null } } }}
Ensure the supplied IDs are correct.
Example
{ "errors": [ { "status": "404", "title": "Not found", "detail": "Couldn't find Channel with 'id'=54321" } ]}
Unprocessable Entity. Ensure that all required fields have been supplied and are correct.
Example
{ "errors": [ { "source": { "pointer": "/data/attributes/remote_sku" }, "detail": "can't be blank", "status": "422" } ]}