Products are what a brand promotes; samples get them into creators' hands.
Products
A brand's catalog comes from its Shopify connection or is added by hand with POST /v1/products. Prices are in cents. Set an accessCode to let creators redeem a product with a code instead of an order.
Attach products to a program in its promoted.products. Acting as a creator, GET /v1/products lists the products of the programs they're approved in; those are the ones they can request.
Samples
A creator requests a sample with { "product", "program" }. The brand approves or rejects it with PATCH /v1/samples/:id, and approving it places the order or shares the access code.
A brand can also send a sample directly:
await lucra.samples.create({
body: {
creator: "crtr_026UYfiw1Y6OvUpuKWiOpeL",
product: "prod_04bst9MGXqblfqHhbR1iGGL",
method: "order",
},
})
method is order (a free Shopify order) or access_code. The creator reads the code with GET /v1/samples/:id?expand=accessCode.
Endpoints
/v1/productsList products; as a creator, the ones attached to the programs you're approved in, which you can ask a sample of
const { data } = await lucra.products.list()Query parameters
Plus paging: limit, cursor, createdAfter and createdBefore.
Response200A page of items, 20 fields each, and nextCursorShow
idprod_…accountacct_…The brand whose catalog it's in.
brandNamestringnamestringvendorstringnullableproductTypestringnullabledescriptionstringnullableskustringnullablestatusstringnullableactive or archived; Shopify products can also be draft or unlisted.
urlstringnullableimageUrlstringnullableimagefile_…nullablesampleEligiblebooleanaccessCodestringnullableA masked summary of the code creators get instead of an order.
variantsobject[]Show 6 child fieldsHide child fields
idstringThe variant's ID in its store, as samples take it.
titlestringoptionstringnullablepriceintegernullableskustringnullableimageUrlstringnullable
currencystringnullableThe currency of variant prices; null for manual products.
externalobjectnullableThe store the product syncs from; null for products added in Lucra.
Show 3 child fieldsHide child fields
providerstringshopifyidstringurlstringnullable
versionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/productsAdd a product to the catalog
const { data } = await lucra.products.create({
body: { name: "…" },
})Body
namestring· requiredproductTypestringurlstringdescriptionstringskustringimagefile_…sampleEligiblebooleanaccessCodestringstatusenumactivearchived
Response20120 fieldsShow
idprod_…accountacct_…The brand whose catalog it's in.
brandNamestringnamestringvendorstringnullableproductTypestringnullabledescriptionstringnullableskustringnullablestatusstringnullableactive or archived; Shopify products can also be draft or unlisted.
urlstringnullableimageUrlstringnullableimagefile_…nullablesampleEligiblebooleanaccessCodestringnullableA masked summary of the code creators get instead of an order.
variantsobject[]Show 6 child fieldsHide child fields
idstringThe variant's ID in its store, as samples take it.
titlestringoptionstringnullablepriceintegernullableskustringnullableimageUrlstringnullable
currencystringnullableThe currency of variant prices; null for manual products.
externalobjectnullableThe store the product syncs from; null for products added in Lucra.
Show 3 child fieldsHide child fields
providerstringshopifyidstringurlstringnullable
versionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/products/:idGet a product
const { data } = await lucra.products.retrieve({
path: { id: "prod_…" },
})Path parameters
idprod_…· required
Response20020 fieldsShow
idprod_…accountacct_…The brand whose catalog it's in.
brandNamestringnamestringvendorstringnullableproductTypestringnullabledescriptionstringnullableskustringnullablestatusstringnullableactive or archived; Shopify products can also be draft or unlisted.
urlstringnullableimageUrlstringnullableimagefile_…nullablesampleEligiblebooleanaccessCodestringnullableA masked summary of the code creators get instead of an order.
variantsobject[]Show 6 child fieldsHide child fields
idstringThe variant's ID in its store, as samples take it.
titlestringoptionstringnullablepriceintegernullableskustringnullableimageUrlstringnullable
currencystringnullableThe currency of variant prices; null for manual products.
externalobjectnullableThe store the product syncs from; null for products added in Lucra.
Show 3 child fieldsHide child fields
providerstringshopifyidstringurlstringnullable
versionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/products/:idEdit, archive or set the access code of a product
const { data } = await lucra.products.update({
path: { id: "prod_…" },
body: { version: 1000 },
})Path parameters
idprod_…· required
Body
versionintegernamestringproductTypestringurlstringnullabledescriptionstringnullableskustringnullableimagefile_…nullablesampleEligiblebooleanaccessCodestringnullablestatusenumactivearchived
Response20020 fieldsShow
idprod_…accountacct_…The brand whose catalog it's in.
brandNamestringnamestringvendorstringnullableproductTypestringnullabledescriptionstringnullableskustringnullablestatusstringnullableactive or archived; Shopify products can also be draft or unlisted.
urlstringnullableimageUrlstringnullableimagefile_…nullablesampleEligiblebooleanaccessCodestringnullableA masked summary of the code creators get instead of an order.
variantsobject[]Show 6 child fieldsHide child fields
idstringThe variant's ID in its store, as samples take it.
titlestringoptionstringnullablepriceintegernullableskustringnullableimageUrlstringnullable
currencystringnullableThe currency of variant prices; null for manual products.
externalobjectnullableThe store the product syncs from; null for products added in Lucra.
Show 3 child fieldsHide child fields
providerstringshopifyidstringurlstringnullable
versionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/samplesList samples
const { data } = await lucra.samples.list({
query: { product: "prod_…" },
})Query parameters
productprod_…creatorcrtr_…statusstringOne or more, comma-separated: requested, approved, rejected, shipping, shipped, failed.
Plus paging: limit, cursor, createdAfter and createdBefore.
Response200A page of items, 13 fields each, and nextCursorShow
idsmpl_…creatorcrtr_…nullableproductprod_…nullableproductNamestringThe product's name when the sample was made, so it reads even if the product isn't one you can see.
variantobjectnullableShow 2 child fieldsHide child fields
idstringnullableThe store's variant ID; null for products added in Lucra.
titlestring
statusenumrequested, then approved or rejected by the brand; shipping once an order or access code is being made, then shipped, or failed.
requestedapprovedrejectedshippingshippedfailedprogramprog_…nullablenotestringnullableThe creator's note with a request.
decidedAtstringnullableshipmentobjectnullableThe order or access code that went out.
Show 8 child fieldsHide child fields
statusenumThe store's own progress: pending, invoice_pending, order_created, access_code_ready or failed.
pendinginvoice_pendingorder_createdaccess_code_readyfailedmethodenumorderaccess_codequantitynumberfulfillmentStatusstringnullableaccessCodestringnullableMasked, unless the creator reads the sample with expand=accessCode.
errorstringnullableorderobjectnullableShow 4 child fieldsHide child fields
idstringnullablenamestringnullabledraftIdstringnullableshopDomainstring
trackingobjectnullableShow 3 child fieldsHide child fields
companystringnullablenumberstringurlstringnullable
versionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/samplesRequest a sample as a creator, or send one to a creator as the brand
const { data } = await lucra.samples.create({
body: { },
})Response20113 fieldsShow
idsmpl_…creatorcrtr_…nullableproductprod_…nullableproductNamestringThe product's name when the sample was made, so it reads even if the product isn't one you can see.
variantobjectnullableShow 2 child fieldsHide child fields
idstringnullableThe store's variant ID; null for products added in Lucra.
titlestring
statusenumrequested, then approved or rejected by the brand; shipping once an order or access code is being made, then shipped, or failed.
requestedapprovedrejectedshippingshippedfailedprogramprog_…nullablenotestringnullableThe creator's note with a request.
decidedAtstringnullableshipmentobjectnullableThe order or access code that went out.
Show 8 child fieldsHide child fields
statusenumThe store's own progress: pending, invoice_pending, order_created, access_code_ready or failed.
pendinginvoice_pendingorder_createdaccess_code_readyfailedmethodenumorderaccess_codequantitynumberfulfillmentStatusstringnullableaccessCodestringnullableMasked, unless the creator reads the sample with expand=accessCode.
errorstringnullableorderobjectnullableShow 4 child fieldsHide child fields
idstringnullablenamestringnullabledraftIdstringnullableshopDomainstring
trackingobjectnullableShow 3 child fieldsHide child fields
companystringnullablenumberstringurlstringnullable
versionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/samples/:idGet a sample; its creator can reveal an access code with expand=accessCode
const { data } = await lucra.samples.retrieve({
path: { id: "smpl_…" },
query: { expand: "accessCode" },
})Path parameters
idsmpl_…· required
Query parameters
expandstringAs the creator:
shipment.accessCodewhole instead of masked. Each reveal is logged.accessCode
Response20013 fieldsShow
idsmpl_…creatorcrtr_…nullableproductprod_…nullableproductNamestringThe product's name when the sample was made, so it reads even if the product isn't one you can see.
variantobjectnullableShow 2 child fieldsHide child fields
idstringnullableThe store's variant ID; null for products added in Lucra.
titlestring
statusenumrequested, then approved or rejected by the brand; shipping once an order or access code is being made, then shipped, or failed.
requestedapprovedrejectedshippingshippedfailedprogramprog_…nullablenotestringnullableThe creator's note with a request.
decidedAtstringnullableshipmentobjectnullableThe order or access code that went out.
Show 8 child fieldsHide child fields
statusenumThe store's own progress: pending, invoice_pending, order_created, access_code_ready or failed.
pendinginvoice_pendingorder_createdaccess_code_readyfailedmethodenumorderaccess_codequantitynumberfulfillmentStatusstringnullableaccessCodestringnullableMasked, unless the creator reads the sample with expand=accessCode.
errorstringnullableorderobjectnullableShow 4 child fieldsHide child fields
idstringnullablenamestringnullabledraftIdstringnullableshopDomainstring
trackingobjectnullableShow 3 child fieldsHide child fields
companystringnullablenumberstringurlstringnullable
versionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring
/v1/samples/:idApprove or reject a sample request
const { data } = await lucra.samples.update({
path: { id: "smpl_…" },
body: { status: "approved" },
})Path parameters
idsmpl_…· required
Body
statusenum· requiredapprovedrejectedversioninteger
Response20013 fieldsShow
idsmpl_…creatorcrtr_…nullableproductprod_…nullableproductNamestringThe product's name when the sample was made, so it reads even if the product isn't one you can see.
variantobjectnullableShow 2 child fieldsHide child fields
idstringnullableThe store's variant ID; null for products added in Lucra.
titlestring
statusenumrequested, then approved or rejected by the brand; shipping once an order or access code is being made, then shipped, or failed.
requestedapprovedrejectedshippingshippedfailedprogramprog_…nullablenotestringnullableThe creator's note with a request.
decidedAtstringnullableshipmentobjectnullableThe order or access code that went out.
Show 8 child fieldsHide child fields
statusenumThe store's own progress: pending, invoice_pending, order_created, access_code_ready or failed.
pendinginvoice_pendingorder_createdaccess_code_readyfailedmethodenumorderaccess_codequantitynumberfulfillmentStatusstringnullableaccessCodestringnullableMasked, unless the creator reads the sample with expand=accessCode.
errorstringnullableorderobjectnullableShow 4 child fieldsHide child fields
idstringnullablenamestringnullabledraftIdstringnullableshopDomainstring
trackingobjectnullableShow 3 child fieldsHide child fields
companystringnullablenumberstringurlstringnullable
versionintegerSend it back on PATCH to reject edits based on a stale read.
createdAtstringupdatedAtstring