Reference

Build on the Lucra API.

Drag a sticker to move it, or use the arrow keys while focused.

Commerce

Products and samples.

Products

The brand's catalog, synced from Shopify or added by hand. Prices are in cents. Set an accessCode to let creators redeem a product with a code instead of an order.

A creator lists the products attached to the programs they're approved in; those are the ones they can request.

Samples

A creator requests one with { "product", "program" }; the brand approves or rejects it, and approving sends an order or access code. The brand can also send one directly:

JSON
{
  "creator": "crtr_026UYfiw1Y6OvUpuKWiOpeL",
  "product": "prod_04bst9MGXqblfqHhbR1iGGL",
  "method": "order"
}

Endpoints

GET/v1/products
As creatorread

List products; as a creator, the ones attached to the programs you're approved in, which you can ask a sample of

SDKlucra.products.list({ query })

Query parameters

  • limitinteger
  • cursorstring
  • createdAfterstring

    Only items created at or after this time.

  • createdBeforestring

    Only items created before this time.

Response200A page of items, 20 fields each, and nextCursorShow
  • idprod_…
  • accountacct_…

    The brand whose catalog it's in.

  • brandNamestring
  • namestring
  • vendorstringnullable
  • productTypestringnullable
  • descriptionstringnullable
  • skustringnullable
  • statusstringnullable

    active or archived; Shopify products can also be draft or unlisted.

  • urlstringnullable
  • imageUrlstringnullable
  • imagefile_…nullable
  • sampleEligibleboolean
  • accessCodestringnullable

    A masked summary of the code creators get instead of an order.

  • variantsobject[]
    Show 6 child fields
    • idstring

      The variant's ID in its store, as samples take it.

    • titlestring
    • optionstringnullable
    • priceintegernullable
    • skustringnullable
    • imageUrlstringnullable
  • currencystringnullable

    The currency of variant prices; null for manual products.

  • externalobjectnullable

    The store the product syncs from; null for products added in Lucra.

    Show 3 child fields
    • providerstring
      shopify
    • idstring
    • urlstringnullable
  • versioninteger

    Send it back on PATCH to reject edits based on a stale read.

  • createdAtstring
  • updatedAtstring
POST/v1/products
write

Add a product to the catalog

SDKlucra.products.create({ body })

Body

  • namestringrequired
  • productTypestring
  • urlstring
  • descriptionstring
  • skustring
  • imagefile_…
  • sampleEligibleboolean
  • accessCodestring
  • statusenum
    activearchived
Response20120 fieldsShow
  • idprod_…
  • accountacct_…

    The brand whose catalog it's in.

  • brandNamestring
  • namestring
  • vendorstringnullable
  • productTypestringnullable
  • descriptionstringnullable
  • skustringnullable
  • statusstringnullable

    active or archived; Shopify products can also be draft or unlisted.

  • urlstringnullable
  • imageUrlstringnullable
  • imagefile_…nullable
  • sampleEligibleboolean
  • accessCodestringnullable

    A masked summary of the code creators get instead of an order.

  • variantsobject[]
    Show 6 child fields
    • idstring

      The variant's ID in its store, as samples take it.

    • titlestring
    • optionstringnullable
    • priceintegernullable
    • skustringnullable
    • imageUrlstringnullable
  • currencystringnullable

    The currency of variant prices; null for manual products.

  • externalobjectnullable

    The store the product syncs from; null for products added in Lucra.

    Show 3 child fields
    • providerstring
      shopify
    • idstring
    • urlstringnullable
  • versioninteger

    Send it back on PATCH to reject edits based on a stale read.

  • createdAtstring
  • updatedAtstring
GET/v1/products/:id
As creatorread

Get a product

SDKlucra.products.retrieve({ path: { id } })

Path parameters

  • idstringrequired
Response20020 fieldsShow
  • idprod_…
  • accountacct_…

    The brand whose catalog it's in.

  • brandNamestring
  • namestring
  • vendorstringnullable
  • productTypestringnullable
  • descriptionstringnullable
  • skustringnullable
  • statusstringnullable

    active or archived; Shopify products can also be draft or unlisted.

  • urlstringnullable
  • imageUrlstringnullable
  • imagefile_…nullable
  • sampleEligibleboolean
  • accessCodestringnullable

    A masked summary of the code creators get instead of an order.

  • variantsobject[]
    Show 6 child fields
    • idstring

      The variant's ID in its store, as samples take it.

    • titlestring
    • optionstringnullable
    • priceintegernullable
    • skustringnullable
    • imageUrlstringnullable
  • currencystringnullable

    The currency of variant prices; null for manual products.

  • externalobjectnullable

    The store the product syncs from; null for products added in Lucra.

    Show 3 child fields
    • providerstring
      shopify
    • idstring
    • urlstringnullable
  • versioninteger

    Send it back on PATCH to reject edits based on a stale read.

  • createdAtstring
  • updatedAtstring
PATCH/v1/products/:id
write

Edit, archive or set the access code of a product

SDKlucra.products.update({ path: { id }, body })

Path parameters

  • idstringrequired

Body

  • versioninteger
  • namestring
  • productTypestring
  • urlstringnullable
  • descriptionstringnullable
  • skustringnullable
  • imagefile_…nullable
  • sampleEligibleboolean
  • accessCodestringnullable
  • statusenum
    activearchived
Response20020 fieldsShow
  • idprod_…
  • accountacct_…

    The brand whose catalog it's in.

  • brandNamestring
  • namestring
  • vendorstringnullable
  • productTypestringnullable
  • descriptionstringnullable
  • skustringnullable
  • statusstringnullable

    active or archived; Shopify products can also be draft or unlisted.

  • urlstringnullable
  • imageUrlstringnullable
  • imagefile_…nullable
  • sampleEligibleboolean
  • accessCodestringnullable

    A masked summary of the code creators get instead of an order.

  • variantsobject[]
    Show 6 child fields
    • idstring

      The variant's ID in its store, as samples take it.

    • titlestring
    • optionstringnullable
    • priceintegernullable
    • skustringnullable
    • imageUrlstringnullable
  • currencystringnullable

    The currency of variant prices; null for manual products.

  • externalobjectnullable

    The store the product syncs from; null for products added in Lucra.

    Show 3 child fields
    • providerstring
      shopify
    • idstring
    • urlstringnullable
  • versioninteger

    Send it back on PATCH to reject edits based on a stale read.

  • createdAtstring
  • updatedAtstring
GET/v1/samples
As creatorread

List samples

SDKlucra.samples.list({ query })

Query parameters

  • limitinteger
  • cursorstring
  • createdAfterstring

    Only items created at or after this time.

  • createdBeforestring

    Only items created before this time.

  • productprod_…
  • creatorcrtr_…
  • statusstring

    One or more, comma-separated: requested, approved, rejected, shipping, shipped, failed.

Response200A page of items, 13 fields each, and nextCursorShow
  • idsmpl_…
  • creatorcrtr_…nullable
  • productprod_…nullable
  • productNamestring

    The product's name when the sample was made, so it reads even if the product isn't one you can see.

  • variantobjectnullable
    Show 2 child fields
    • idstringnullable

      The store's variant ID; null for products added in Lucra.

    • titlestring
  • statusenum

    requested, then approved or rejected by the brand; shipping once an order or access code is being made, then shipped, or failed.

    requestedapprovedrejectedshippingshippedfailed
  • programprog_…nullable
  • notestringnullable

    The creator's note with a request.

  • decidedAtstringnullable
  • shipmentobjectnullable

    The order or access code that went out.

    Show 8 child fields
    • statusenum

      The store's own progress: pending, invoice_pending, order_created, access_code_ready or failed.

      pendinginvoice_pendingorder_createdaccess_code_readyfailed
    • methodenum
      orderaccess_code
    • quantitynumber
    • fulfillmentStatusstringnullable
    • accessCodestringnullable

      Masked, unless the creator reads the sample with expand=accessCode.

    • errorstringnullable
    • orderobjectnullable
      Show 4 child fields
      • idstringnullable
      • namestringnullable
      • draftIdstringnullable
      • shopDomainstring
    • trackingobjectnullable
      Show 3 child fields
      • companystringnullable
      • numberstring
      • urlstringnullable
  • versioninteger

    Send it back on PATCH to reject edits based on a stale read.

  • createdAtstring
  • updatedAtstring
POST/v1/samples
As creatorwrite

Request a sample as a creator, or send one to a creator as the brand

SDKlucra.samples.create({ body })
Response20113 fieldsShow
  • idsmpl_…
  • creatorcrtr_…nullable
  • productprod_…nullable
  • productNamestring

    The product's name when the sample was made, so it reads even if the product isn't one you can see.

  • variantobjectnullable
    Show 2 child fields
    • idstringnullable

      The store's variant ID; null for products added in Lucra.

    • titlestring
  • statusenum

    requested, then approved or rejected by the brand; shipping once an order or access code is being made, then shipped, or failed.

    requestedapprovedrejectedshippingshippedfailed
  • programprog_…nullable
  • notestringnullable

    The creator's note with a request.

  • decidedAtstringnullable
  • shipmentobjectnullable

    The order or access code that went out.

    Show 8 child fields
    • statusenum

      The store's own progress: pending, invoice_pending, order_created, access_code_ready or failed.

      pendinginvoice_pendingorder_createdaccess_code_readyfailed
    • methodenum
      orderaccess_code
    • quantitynumber
    • fulfillmentStatusstringnullable
    • accessCodestringnullable

      Masked, unless the creator reads the sample with expand=accessCode.

    • errorstringnullable
    • orderobjectnullable
      Show 4 child fields
      • idstringnullable
      • namestringnullable
      • draftIdstringnullable
      • shopDomainstring
    • trackingobjectnullable
      Show 3 child fields
      • companystringnullable
      • numberstring
      • urlstringnullable
  • versioninteger

    Send it back on PATCH to reject edits based on a stale read.

  • createdAtstring
  • updatedAtstring
GET/v1/samples/:id
As creatorread

Get a sample; its creator can reveal an access code with expand=accessCode

SDKlucra.samples.retrieve({ path: { id }, query })

Path parameters

  • idstringrequired

Query parameters

  • expandstring

    As the creator: `shipment.accessCode` whole instead of masked. Each reveal is logged.

    accessCode
Response20013 fieldsShow
  • idsmpl_…
  • creatorcrtr_…nullable
  • productprod_…nullable
  • productNamestring

    The product's name when the sample was made, so it reads even if the product isn't one you can see.

  • variantobjectnullable
    Show 2 child fields
    • idstringnullable

      The store's variant ID; null for products added in Lucra.

    • titlestring
  • statusenum

    requested, then approved or rejected by the brand; shipping once an order or access code is being made, then shipped, or failed.

    requestedapprovedrejectedshippingshippedfailed
  • programprog_…nullable
  • notestringnullable

    The creator's note with a request.

  • decidedAtstringnullable
  • shipmentobjectnullable

    The order or access code that went out.

    Show 8 child fields
    • statusenum

      The store's own progress: pending, invoice_pending, order_created, access_code_ready or failed.

      pendinginvoice_pendingorder_createdaccess_code_readyfailed
    • methodenum
      orderaccess_code
    • quantitynumber
    • fulfillmentStatusstringnullable
    • accessCodestringnullable

      Masked, unless the creator reads the sample with expand=accessCode.

    • errorstringnullable
    • orderobjectnullable
      Show 4 child fields
      • idstringnullable
      • namestringnullable
      • draftIdstringnullable
      • shopDomainstring
    • trackingobjectnullable
      Show 3 child fields
      • companystringnullable
      • numberstring
      • urlstringnullable
  • versioninteger

    Send it back on PATCH to reject edits based on a stale read.

  • createdAtstring
  • updatedAtstring
PATCH/v1/samples/:id
write

Approve or reject a sample request

SDKlucra.samples.update({ path: { id }, body })

Path parameters

  • idstringrequired

Body

  • statusenumrequired
    approvedrejected
  • versioninteger
Response20013 fieldsShow
  • idsmpl_…
  • creatorcrtr_…nullable
  • productprod_…nullable
  • productNamestring

    The product's name when the sample was made, so it reads even if the product isn't one you can see.

  • variantobjectnullable
    Show 2 child fields
    • idstringnullable

      The store's variant ID; null for products added in Lucra.

    • titlestring
  • statusenum

    requested, then approved or rejected by the brand; shipping once an order or access code is being made, then shipped, or failed.

    requestedapprovedrejectedshippingshippedfailed
  • programprog_…nullable
  • notestringnullable

    The creator's note with a request.

  • decidedAtstringnullable
  • shipmentobjectnullable

    The order or access code that went out.

    Show 8 child fields
    • statusenum

      The store's own progress: pending, invoice_pending, order_created, access_code_ready or failed.

      pendinginvoice_pendingorder_createdaccess_code_readyfailed
    • methodenum
      orderaccess_code
    • quantitynumber
    • fulfillmentStatusstringnullable
    • accessCodestringnullable

      Masked, unless the creator reads the sample with expand=accessCode.

    • errorstringnullable
    • orderobjectnullable
      Show 4 child fields
      • idstringnullable
      • namestringnullable
      • draftIdstringnullable
      • shopDomainstring
    • trackingobjectnullable
      Show 3 child fields
      • companystringnullable
      • numberstring
      • urlstringnullable
  • versioninteger

    Send it back on PATCH to reject edits based on a stale read.

  • createdAtstring
  • updatedAtstring