Skip to content
Developers
Pilot. The API is open to a small number of organisations and may change — every change is in the changelog.

Reference · Products

Create a product

POST/v1/sites/{siteId}/products

Adds a product, or a modifier, to a site. It is available to sell straight away unless created retired. The response is the product, with the code to use from then on.

Needs Catalogue: writeChanges live data

Path

  • siteIdrequired

    The site, from GET /v1/sites.

    string

Headers

  • Authorizationrequired

    An API key from Automation > Access in the Dnero portal, sent as Authorization: Bearer <key>.

    string

  • Idempotency-Key

    A value you choose, unique to what this request creates: a UUID, or your own id for it. Sending it again with the same body returns the first response and creates nothing more. Required.

    string · at most 255 characters

Body

  • namerequired

    The product's name. Unique among the site's products (a modifier, among its modifiers).

    string · 1–200 characters

  • pricerequired

    The price, in the site's currency's minor units: 450 is $4.50.

    integer · ≥ 0

  • active

    False to create it retired. Defaults to true.

    boolean

  • categoryCode

    The category to put it in, by code. It must be an active category at this site.

    string

  • costPrice

    What it costs to buy or make, in minor units. For reporting only.

    integer · ≥ 0

  • description

    A description.

    string · at most 2000 characters

  • displayName

    The name customers see. Defaults to name.

    string · 1–200 characters

  • printName

    The name printed on kitchen dockets and receipts. Defaults to name.

    string · 1–200 characters

  • reportGroupCode

    The reporting group to count it in, by code.

    string

  • sku

    Your stock-keeping unit for it.

    string · at most 100 characters

  • soldIndividually

    Whether it can be ordered on its own. Defaults to true for a product and false for a modifier.

    boolean

  • taxCodes

    The taxes to charge it with, by code. They must be active taxes at this site.

    array of string

  • type

    product, sold on its own, or modifier, an option for a modifier group. Defaults to product.

    string · one of "product", "modifier" · default "product"

Responses

201 Created

  • activerequired

    False for a retired product, which is listed only with includeInactive.

    boolean

  • availablerequired

    False while it is sold out.

    boolean

  • barcodesrequired

    Its barcodes.

    array of string

  • childrenrequired

    For a product, its modifier groups. For a modifier group, its options. Empty otherwise.

    array of objects

    4 fields in each
    • coderequired

      The child product's code.

      string

    • defaultQty

      How many of this child come by default.

      integer

    • maxQty

      The most of this child that may be chosen.

      integer

    • minQty

      The fewest of this child that may be chosen.

      integer

  • coderequired

    The product's code, the same at every site that has it.

    string

  • namerequired

    The product's name in the portal and reports.

    string

  • pricerequired

    The price, in the site's currency's minor units: 450 is $4.50.

    integer

  • soldIndividuallyrequired

    Whether it can be ordered on its own. False for a modifier or an ingredient.

    boolean

  • taxCodesrequired

    The taxes it is charged with, by code.

    array of string

  • typerequired

    What it is. product is sold on its own. A modifierGroup is a choice on a product, such as Milk; its children are the options. A modifier is one option, such as Oat milk.

    string · one of "product", "modifierGroup", "modifier", "inventory", "combo"

  • categoryCode

    The category it is in, by code.

    string

  • costPrice

    What it costs to buy or make, in minor units. For reporting; never what a customer pays.

    integer

  • courseCode

    The course it goes to the kitchen with, by code.

    string

  • description

    The product's description.

    string

  • displayName

    The name customers see, when it differs from name.

    string

  • imageUrl

    Its picture.

    string · uri

  • maxChoices

    For a modifier group: the most options a customer may choose.

    integer

  • minChoices

    For a modifier group: the fewest options a customer must choose.

    integer

  • printName

    The name printed on kitchen dockets and receipts.

    string

  • reportGroupCode

    The reporting group it is counted in, by code.

    string

  • sku

    Your stock-keeping unit for it.

    string

  • soldOutUntil

    When a sold-out product comes back on its own. Absent when it is not sold out, or is sold out until someone says otherwise.

    string · date-time

  • updatedAt

    When the product last changed.

    string · date-time