Upload the binary content for a resource that has already been registered in Doshii. If a binary resource has already been uploaded for a given resource-id
, the existing binary resource will be replaced with the new content.
POST ~/resources/:resource-id
Headers
Field | Type | Description |
---|---|---|
Content-Type | String |
This should match the |
Parameters
Field | Type | Description |
---|---|---|
:resource-id | String |
The ID of the resource you are attaching the binary payload to. This ID can be obtained by creating the resource via POST /resources |
Response Headers
Field | Type | Description |
---|---|---|
ETag | String |
Contains the latest version of the resource. This value can then be sent on subsequent GET requests to check if the resource has changed. |
Response
Field | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
id | String |
Resource id in Doshii |
||||||
name | String |
The human-readable name of the resource |
||||||
mimeType | String |
The mime type of the resource being created |
||||||
type | String |
Indicates how the resource is stored and retrieved.
|
||||||
context | String |
A free-text string to describe the purpose of the resource, e.g logo, user manual, etc |
||||||
private | boolean |
Indicates whether or not associated Apps can access this resource. Default is |
||||||
resource | String |
This property provides the URI for how to retrieve the binary resource. This could refer to an external URI if the resource |
||||||
relations | Object |
An object describing each of the entity relationships for this resource. For example, a generic logo could be used by multiple locations, rather than each location having a duplicate image |
||||||
locations | String[] |
A list of hashed location IDs linked to this resource. See Hashed Location IDs |
||||||
apps | String[] |
A list of App IDs linked to this resource |
||||||
vendors | String[] |
A list of Vendors IDs linked to this resource |
||||||
menuProducts | Object[] |
A list of menu products linked to this resource |
||||||
locationId | String |
The hashed location ID that is associated to the menu item. See Hashed Location IDs |
||||||
posId | String |
The |
||||||
createdAt | String |
Date when the resource was created |
Examples
Response
{
"id": "lLf2X0k6",
"name": "pizza.png",
"mimeType": "image/png",
"context": "logo",
"type": "doshii-uri",
"resource": "https://sandbox.pos.doshii.co/v3/resources/lLf2X0k6",
"createdAt": "2018-08-20T03:14:39.374Z",
"relations": {
"apps": [123],
"locations": ["2X3b8q"],
"menuProducts": [{
"locationId": "2X3b8q",
"posId": "pizza"
}],
"vendors": [456]
}
}
Comments
0 comments
Please sign in to leave a comment.