Developers

Search the docs

Search guides and headings.

Place an order

POST/meals/v1/order/create/document
Scope: order:write

Places a meal order for a customer who approved the connection, to be delivered to an address on a delivery date. The customer pays with their own card, so the answer carries what your page needs to take the payment:

  • Confirm the payment on your page with Stripe.js, using stripe_publishable_key and stripe_payment_intent.stripe_payment_intent_client_secret.
  • The order is paid when order_financial_status is paid or the order.paid event arrives. Do not treat the order as paid when your page says the card was accepted.
  • An order that costs nothing is paid at once and stripe_payment_intent is null.

The order carries its own field names: the three statuses order_financial_status, order_fulfillment_status and order_delivery_status, the amounts in cents, the vendor as it was when the order was placed, and the line_items. Your own reference and metadata come back as you sent them.

Before anything is placed, the order is checked against the catalog, the vendor first: a vendor that does not exist, is not live, is archived or is not enabled for your company answers 404 not_found. Then each failure answers 422 with its own code and nothing is created:

  • delivery_not_available: the vendor does not deliver to the address, or not on that date (a weekday it does not deliver on, a blackout date, a date with no menu, or a date whose order cutoff has passed).
  • product_not_available: a product is not offered on that date, is not live, or cannot be ordered.
  • order_limits_not_met: the order is below or above the vendor's limits on items or value.
  • vendor_not_allowed_for_customer: the customer's account is limited to certain vendors and this is not one of them; offer another vendor.

The delivery address, the contact email address, the contact phone number and the notes are checked against the limits the order system holds them to (the fields say which). A value that fails answers 422 validation_error naming the field. If the order system still refuses one of them, the answer is 422 validation_error too, with a fixed message and no field.

Other answers: 404 not_found for an unknown customer, or for a vendor that cannot be used (see above); 409 connection_not_active while the customer has not approved the connection or after they revoked it; 409 order_conflict when the order cannot be placed in its current state. order_limits_not_met says which limit the order breaks; the vendor's limits are on the vendor.

The order holds only the items you send. If the customer already started a cart for the same vendor, address zone and date in the Nurish'd app, that cart is emptied first, including any discount code or points on it.

Sending the same reference again returns the order already placed instead of placing a second one. The reference, metadata and the key that placed the order are kept with the order. Needs the order:write scope.

Request body

  • line_itemsarray of OrderLineItemInputrequired

    The products to order, between 1 and 50. A product can appear only once.

    Show child attributesHide child attributes
    • line_item_product_idstringrequired

      The ID of the product, as the catalog lists it.

      Min length 1 · Max length 200

    • line_quantityintegerrequired

      How many units to order, at least 1.

      Minimum 1

  • metadataobject

    Your own key-value data, at most 10 pairs with keys and values of at most 100 characters. It is kept and returned as you sent it.

  • order_contact_emailstring (email)required

    The email address the kitchen and the courier reach the customer at for this order.

  • order_contact_phonestringrequired

    The phone number for the order in international format, for example +14165550123.

    Min length 1 · Max length 20

  • order_customer_notesstringnullable

    Notes for the kitchen, up to 500 characters.

    Min length 1 · Max length 500

  • order_delivery_datestring (date)required

    The delivery day, as YYYY-MM-DD: the date part of a value of valid_delivery_dates (for 2026-11-24T05:00:00Z, send 2026-11-24). A time of day is not accepted. It must be a day the vendor's zone for the address offers. The order answers the same field as an instant, midnight of the day in the vendor's timezone, in UTC.

  • order_shipping_addressOrderShippingAddressrequired

    Where the order is delivered.

    Show child attributesHide child attributes
    • citystringrequired

      The city, up to 100 characters. $, { and } are not accepted.

      Min length 1 · Max length 100 · Pattern ^[^${}]{1,100}$

    • countrystringrequired

      The two-letter country code, in capitals.

      Pattern ^[A-Z]{2}$

    • line1stringrequired

      The first line of the street address, up to 200 characters. $, { and } are not accepted.

      Min length 1 · Max length 200 · Pattern ^[^${}]{1,200}$

    • line2stringnullable

      The second line of the street address, up to 200 characters. $, { and } are not accepted.

      Max length 200 · Pattern ^[^${}]{0,200}$

    • postal_codestringrequired

      The postal code: letters, digits, spaces and hyphens, up to 20 characters.

      Min length 1 · Max length 20 · Pattern ^[a-zA-Z0-9\s-]{1,20}$

    • statestringrequired

      The two-letter province code, in capitals.

      Pattern ^[A-Z]{2}$

  • order_vendorstringrequired

    The ID of the vendor that prepares the order: letters, digits, hyphens and underscores, up to 200 characters.

    Min length 1 · Max length 200 · Pattern ^[A-Za-z0-9_-][A-Za-z0-9._-]{0,199}$

  • referencestringnullable

    Your own reference for the order, 1 to 200 characters. Sending the same reference again returns the order already placed instead of placing a second one.

    Min length 1 · Max length 200

  • userstring (uuid)required

    The ID of the customer the order is for, as customer/create answered it.

Response 201

  • is_shipping_cost_waivedboolean

    Whether the shipping cost is waived.

    Default false

  • line_itemsarray of OrderLineItemOutputnullable

    The line items of the order. Only when you read one order; null in lists.

    Show child attributesHide child attributes
    • additional_informationstringnullable

      Additional information about the line item.

    • line_item_created_atstring (date-time)required

      When the line item was created, in UTC.

    • line_item_currencystringrequired

      The currency of the line item, for example CAD.

    • line_item_delivery_notesstringnullable

      The notes about the delivery of the line item.

    • line_item_delivery_statusenumrequired

      How far the delivery of the line item is: draft, pending payment, not yet shipped, shipped, delivered, delivery failed, cancelled or do not process.

      • draft
      • pending payment
      • not yet shipped
      • shipped
      • delivered
      • delivery failed
      • cancelled
      • do not process
    • line_item_financial_statusenumrequired

      The payment status of the line item: draft, pending, failed payment, paid, cancelled, partially refunded, refunded or chargeback.

      • draft
      • pending
      • failed payment
      • paid
      • cancelled
      • partially refunded
      • refunded
      • chargeback
    • line_item_fulfilled_quantityintegerrequired

      How many units are fulfilled.

    • line_item_fulfillment_statusenumrequired

      How far the kitchen is with the line item: draft, pending payment, not started, preparing meals, partially completed, completed, cancelled or do not process.

      • draft
      • pending payment
      • not started
      • preparing meals
      • partially completed
      • completed
      • cancelled
      • do not process
    • line_item_hashstringrequired

      The hash that identifies the line item.

    • line_item_productOrderLineItemProductrequired

      The product, as it was when the order was placed.

      Show child attributesHide child attributes
      • product_idstringrequired

        The ID of the product.

      • product_namestringrequired

        The name of the product.

      • product_priceintegerrequired

        The price of one unit, an integer number of cents, in the currency of the line item (line_item_currency).

    • line_item_quantityintegerrequired

      How many units were ordered.

    • line_item_refunded_quantityinteger

      How many units are refunded.

      Default 0

    • line_item_updated_atstring (date-time)required

      When the line item was last updated, in UTC.

  • metadataobject

    Your own key-value data, as you sent it.

  • order_admin_waived_amountinteger

    The amount an administrator waived, in cents.

    Default 0

  • order_cancellation_notesstringnullable

    The notes about the cancellation of the order.

  • order_completed_atstring (date-time)nullable

    When the kitchen completed the order, in UTC.

  • order_contact_emailstringnullable

    The email address of the customer for this order.

  • order_contact_phonestringnullable

    The phone number of the customer for this order.

  • order_created_atstring (date-time)required

    When the order was placed, in UTC.

  • order_credits_claimed_amountinteger

    The credits used, in cents.

    Default 0

  • order_currencystringrequired

    The currency of every amount, for example CAD.

  • order_customer_notesstringnullable

    The notes for the kitchen.

  • order_cutoff_datestring (date-time)nullable

    When ordering for the delivery date closes, in UTC.

  • order_delivery_datestring (date-time)nullable

    The delivery date, as midnight of the day in the vendor's timezone, in UTC.

  • order_delivery_notesstringnullable

    The notes about the delivery of the order.

  • order_delivery_statusenumrequired

    How far the delivery is: draft, pending payment, not yet shipped, shipped, delivered, delivery failed, cancelled or do not process.

    • draft
    • pending payment
    • not yet shipped
    • shipped
    • delivered
    • delivery failed
    • cancelled
    • do not process
  • order_discount_amountinteger

    The discount code amount in cents.

    Default 0

  • order_financial_statusenumrequired

    The payment status: draft, pending, failed payment, paid, cancelled, partially refunded, refunded or chargeback.

    • draft
    • pending
    • failed payment
    • paid
    • cancelled
    • partially refunded
    • refunded
    • chargeback
  • order_fulfillment_statusenumrequired

    How far the kitchen is: draft, pending payment, not started, preparing meals, partially completed, completed, cancelled or do not process.

    • draft
    • pending payment
    • not started
    • preparing meals
    • partially completed
    • completed
    • cancelled
    • do not process
  • order_idstringrequired

    The ID of the order.

  • order_insurance_claim_amountinteger

    The insurance claim amount in cents.

    Default 0

  • order_organization_discount_amountinteger

    The organization discount in cents.

    Default 0

  • order_paidintegernullable

    The amount paid, in cents.

  • order_paid_atstring (date-time)nullable

    When the order was paid, in UTC. null until then.

  • order_paid_out_of_bandintegernullable

    The amount paid outside the system, in cents.

  • order_paid_through_organizationintegernullable

    The amount paid through an organization, in cents.

  • order_paid_through_pointsintegernullable

    The amount paid with loyalty points, in cents.

  • order_points_claimed_amountinteger

    The loyalty points used, in cents.

    Default 0

  • order_production_datestring (date-time)nullable

    When the kitchen starts preparing the order, in UTC.

  • order_refund_amountintegernullable

    The amount refunded, in cents.

  • order_service_chargesarray of OrderServiceCharge

    The service charges, added after tax. The total includes them.

    Show child attributesHide child attributes
    • service_charge__centsintegerrequired

      The amount of the charge, in cents.

    • service_charge__one_word_reasonstringrequired

      The reason as one upper-case word.

    • service_charge__reasonstringrequired

      The reason for the charge, as a sentence.

  • order_shipping_addressOrderAddressnullable

    Where the order is delivered.

    Show child attributesHide child attributes
    • citystringrequired

      The city.

    • countrystringrequired

      The two-letter country code.

    • line1stringrequired

      The first line of the street address.

    • line2stringnullable

      The second line of the street address.

    • postal_codestringrequired

      The postal code.

    • statestringrequired

      The two-letter province code.

  • order_shipping_costinteger

    The shipping cost in cents.

    Default 0

  • order_tax_amountinteger

    The tax in cents.

    Default 0

  • order_total_price__AFTER_TAX_DISCOUNT_AND_SHIPPINGintegerrequired

    What the customer pays, in cents.

  • order_total_price__BEFORE_TAX_DISCOUNT_AND_SHIPPINGintegerrequired

    The value of the line items in cents.

  • order_updated_atstring (date-time)nullable

    When the order was last updated, in UTC.

  • order_vendorOrderVendorrequired

    The vendor that prepares the order.

    Show child attributesHide child attributes
    • is_archivedboolean

      Whether the vendor is archived.

      Default false

    • livemodeboolean

      Whether the vendor is live.

      Default false

    • vendor_addressOrderAddressnullable

      The address of the vendor.

      Show child attributesHide child attributes
      • citystringrequired

        The city.

      • countrystringrequired

        The two-letter country code.

      • line1stringrequired

        The first line of the street address.

      • line2stringnullable

        The second line of the street address.

      • postal_codestringrequired

        The postal code.

      • statestringrequired

        The two-letter province code.

    • vendor_customer_support_emailstringnullable

      The email of the vendor customer support.

    • vendor_customer_support_phonestringnullable

      The phone number of the vendor customer support.

    • vendor_faq_urlstringnullable

      The URL of the vendor FAQ.

    • vendor_idstringrequired

      The ID of the vendor.

    • vendor_imagesarray of string

      The URLs of the vendor images.

    • vendor_logo_imagestringnullable

      The URL of the vendor logo image.

    • vendor_long_descriptionstringnullable

      The long description of the vendor.

    • vendor_namestringrequired

      The name of the vendor.

    • vendor_short_descriptionstringnullable

      The short description of the vendor.

    • vendor_social_media_facebookstringnullable

      The URL of the vendor Facebook page.

    • vendor_social_media_instagramstringnullable

      The URL of the vendor Instagram page.

    • vendor_social_media_linkedinstringnullable

      The URL of the vendor LinkedIn page.

    • vendor_social_media_twitterstringnullable

      The URL of the vendor Twitter page.

    • vendor_timezonestringrequired

      The timezone of the vendor.

    • vendor_website_urlstringnullable

      The URL of the vendor website.

  • referencestringnullable

    Your own reference for the order, if you sent one.

  • stripe_payment_intentOrderPaymentIntentnullable

    The Stripe payment to confirm. Only while the payment is pending; null otherwise and in lists.

    Show child attributesHide child attributes
    • stripe_payment_intent_client_secretstringrequired

      The Stripe PaymentIntent client secret the page confirms the payment with.

    • stripe_payment_intent_statusstringrequired

      The status of the Stripe PaymentIntent, for example requires_payment_method.

  • stripe_publishable_keystringnullable

    The Stripe publishable key to confirm the payment with, or null when none is configured.

  • userstring (uuid)required

    The ID of the customer the order is for.

Errors

Every error has this shape. Branch on code, not on message. request_id equals the X-Request-Id response header.

jsonError response
{
  "error": {
    "code": "not_found",
    "message": "The object does not exist.",
    "request_id": "req_0123456789abcdef0123456789abcdef"
  }
}
StatusCodeMeaning
401invalid_api_keyThe API key is missing or not valid.
403company_archivedThis company is archived.
403company_not_liveThe company must be live to use prod keys.
403company_suspendedThis company is suspended.
403scope_not_grantedThis API key does not have the order:write scope.
404not_foundThe requested resource was not found.
409connection_not_activeThe connection is not active.
409order_conflictThe order could not be placed in its current state.
422delivery_not_availableThe vendor cannot deliver this order to the address on that date.
422order_limits_not_metThe order does not meet the vendor's limits.
422product_not_availableA product in the order is not available.
422validation_errorbody.user: Field required
422vendor_not_allowed_for_customerThis customer cannot order from this vendor.
429rate_limitedToo many requests. Wait before calling again.
500internal_errorSomething went wrong on our side. Please try again later.
502upstream_errorA Nurish'd service could not complete the request.
503upstream_unavailableA Nurish'd service is unavailable. Please try again later.
504upstream_timeoutA Nurish'd service did not answer in time. Please try again.

All error codes and what to do about them