Developers

Search the docs

Search guides and headings.

Get a customer

GET/meals/v1/customer/{customer_id}/get/document
Scope: order:read

Returns a customer and their connection with your company, with the connection's status brought up to date. connect_url and connect_url_expires_at are always null here: call create again with the same external_id for a fresh link. A customer that does not exist, or belongs to another company or mode, answers not_found. Needs the order:read scope.

Path parameters

  • customer_idstring (uuid)required

    The ID of the customer, as create answered it.

Response 200

  • connect_urlstringnullable

    Send the customer to this link as a full page or a new tab, never inside a frame or a web view. It is valid for 24 hours and works once. Calling create again with the same external_id returns a fresh link. null when the customer is not asked to approve now, and always null when you read the customer.

  • connect_url_expires_atstring (date-time)nullable

    When connect_url stops working, in UTC. null whenever connect_url is null.

  • connectionMealsConnectionrequired

    The connection with your company. Nothing can be ordered for the customer until its status is active.

    Show child attributesHide child attributes
    • approved_atstring (date-time)nullable

      When the customer approved the connection, in UTC. null until then.

    • company_idstringrequired

      The ID of your company, the other side of the connection.

    • connection_idstringrequired

      The ID of the connection. Use it to read or revoke the connection and to match connection.approved, connection.declined and connection.revoked events.

    • created_atstring (date-time)required

      When the connection was created, in UTC.

    • external_idstringrequired

      Your own ID for the customer, as you sent it.

    • revoked_atstring (date-time)nullable

      When the connection ended, in UTC. null while it has not ended.

    • revoked_byenumnullable

      Who ended the connection: patient (the customer), partner (your company) or admin. null while it has not ended.

      • patient
      • partner
      • admin
    • scopesarray of enumrequired

      What the customer allowed your company to do. meals.orders places and reads meal orders.

    • statusenumrequired

      pending until the customer decides, then active, declined or revoked. Nothing can be ordered for the customer until the connection is active. Trust the connection.approved event or read the connection; never trust the status in the return URL, because anyone can edit a URL.

      • pending
      • active
      • declined
      • revoked
    • userstring (uuid)required

      The ID of the person the connection is with.

  • userstring (uuid)required

    The ID of the customer. Use it to read the customer and, later, to place orders for them.

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:read scope.
404not_foundThe requested resource was not found.
422validation_errorpath.customer_id: Input should be a valid UUID, invalid character: found n at 0
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