Get a customer
/meals/v1/customer/{customer_id}/get/documentorder:readReturns 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)requiredThe ID of the customer, as
createanswered it.
Response 200
connect_urlstringnullableSend 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_idreturns a fresh link.nullwhen the customer is not asked to approve now, and alwaysnullwhen you read the customer.connect_url_expires_atstring (date-time)nullableWhen
connect_urlstops working, in UTC.nullwheneverconnect_urlisnull.connectionMealsConnectionrequiredThe 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)nullableWhen the customer approved the connection, in UTC.
nulluntil then.company_idstringrequiredThe ID of your company, the other side of the connection.
connection_idstringrequiredThe ID of the connection. Use it to read or revoke the connection and to match
connection.approved,connection.declinedandconnection.revokedevents.created_atstring (date-time)requiredWhen the connection was created, in UTC.
external_idstringrequiredYour own ID for the customer, as you sent it.
revoked_atstring (date-time)nullableWhen the connection ended, in UTC.
nullwhile it has not ended.revoked_byenumnullableWho ended the connection:
patient(the customer),partner(your company) oradmin.nullwhile it has not ended.patientpartneradmin
scopesarray of enumrequiredWhat the customer allowed your company to do.
meals.ordersplaces and reads meal orders.statusenumrequiredpendinguntil the customer decides, thenactive,declinedorrevoked. Nothing can be ordered for the customer until the connection isactive. Trust theconnection.approvedevent or read the connection; never trust the status in the return URL, because anyone can edit a URL.pendingactivedeclinedrevoked
userstring (uuid)requiredThe ID of the person the connection is with.
userstring (uuid)requiredThe 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.
{
"error": {
"code": "not_found",
"message": "The object does not exist.",
"request_id": "req_0123456789abcdef0123456789abcdef"
}
}| Status | Code | Meaning |
|---|---|---|
401 | invalid_api_key | The API key is missing or not valid. |
403 | company_archived | This company is archived. |
403 | company_not_live | The company must be live to use prod keys. |
403 | company_suspended | This company is suspended. |
403 | scope_not_granted | This API key does not have the order:read scope. |
404 | not_found | The requested resource was not found. |
422 | validation_error | path.customer_id: Input should be a valid UUID, invalid character: found n at 0 |
429 | rate_limited | Too many requests. Wait before calling again. |
500 | internal_error | Something went wrong on our side. Please try again later. |
502 | upstream_error | A Nurish'd service could not complete the request. |
503 | upstream_unavailable | A Nurish'd service is unavailable. Please try again later. |
504 | upstream_timeout | A Nurish'd service did not answer in time. Please try again. |