Create a SKU
How to create a SKU via API
To create a new SKU, send a POST request to the /api/skus endpoint, passing the resource arguments in the request body.
Request
POST https://yourdomain.commercelayer.io/api/skus
Arguments
type
string
Required
attributes.code
string
Required
attributes.name
string
Required
attributes.description
string
Optional
attributes.image_url
string
Optional
attributes.pieces_per_pack
integer
Optional
attributes.weight
float
Optional
attributes.unit_of_weight
string
Optional
attributes.hs_tariff_number
string
Optional
attributes.do_not_ship
boolean
Optional
attributes.do_not_track
boolean
Optional
attributes.reference
string
Optional
attributes.reference_origin
string
Optional
attributes.metadata
object
Optional
relationships.shipping_category
object
Required
relationships.tags
array
Optional
Example
The following request creates a new SKU:
On success, the API responds with a 201 Created status code, returning the created resource object:
Last updated