Update an unlinked Order by it's Doshii id.
This endpoint is for associating an unlinked order (created by a Partner) with a POS id. It can simultaneously accept or reject the Partner initiated Order.
PUT ~/unlinked_orders/:doshii-id
Headers
Field | Type | Description |
---|---|---|
Authorization | String |
Bearer authentication token prefixed with |
Content-Type | String |
Request content type, must be 'application/json' |
vendor | String |
The POS vendor name retrieved from Doshii dashboard |
doshii-terminal-id | String |
The hashed Id of a POS Terminal registered within Doshii via the Create POS Terminal endpoint |
Parameters
Field | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
:doshii-id | String |
The Doshii id of the Unlinked Order to update |
||||||||||
idoptional | String |
The POS id of the Order. This property is optional, unless the |
||||||||||
status | String |
The status of the order. "accepted" or "cancelled" permitted from "pending" state. See Status and the Order State Machine for more information. |
||||||||||
version | String |
The order version hash. See Order Version Hash |
||||||||||
manuallyProcessedoptional | Boolean |
The order has been verified by a human, pass through |
||||||||||
rejectionCodeoptional | String |
The rejection code applicable. List of codes can be found at GET /rejection-codes/:rejectionCode. Do not set unless updating to |
||||||||||
rejectionReasonoptional | String |
The reason for rejecting the order. Do not set unless updating to |
||||||||||
notesoptional | String |
Free-text entry for additional order details |
||||||||||
phaseoptional | String |
Free-text representation of where the Order is in it's lifecycle at the venue. Eg: 'preparing', 'mains served', 'ready for delivery', etc... |
||||||||||
typeoptional | String |
The type of order should be one of the following
|
||||||||||
requiredAtoptional | String |
A |
||||||||||
availableEtaoptional | String |
An estimated |
||||||||||
items | Object[] |
Array of Product objects. |
||||||||||
uuidoptional | String |
A UUID for the item. Automatically generated by Doshii. |
||||||||||
posIdoptional | String |
The POS id of the Product. When not provided, is treated as a custom/open/generic item by the POS. |
||||||||||
nameoptional | String |
The display name of the Product |
||||||||||
quantityoptional | String |
The quantity ordered |
||||||||||
descriptionoptional | String |
A short description of the Product |
||||||||||
unitPriceoptional | String |
The price of the Product in cents |
||||||||||
totalBeforeSurcountsoptional | String |
The price of the line item before the Surcounts are applied |
||||||||||
totalAfterSurcountsoptional | String |
The price of the line item after the Surcounts are applied |
||||||||||
tagsoptional | String[] |
Array of strings to help group Products together |
||||||||||
surcountsoptional | Object[] |
Array of Surcount objects. |
||||||||||
posIdoptional | String |
Id of the item in the POS. Providing this will allow the POS to correctly print and report sales. |
||||||||||
nameoptional | String |
Name of item. |
||||||||||
descriptionoptional | String |
Description of item. |
||||||||||
typeoptional | String |
Whether this is an 'absolute' or 'percentage' Surcount |
||||||||||
amountoptional | String |
The amount to surcharge/discount (positive/negative integer) |
||||||||||
valueoptional | String |
The value of the surcounts in cents. Accepts integer or string of integers. This value should be calculated if the Surcount is % based. |
||||||||||
optionsoptional | Object[] |
Array of options that can be added to the Product |
||||||||||
posIdoptional | String |
The POS id of the option |
||||||||||
nameoptional | String |
The display name of the option |
||||||||||
variantsoptional | Object[] |
The available Variants for the option |
||||||||||
posIdoptional | String |
The POS id of the Variant |
||||||||||
nameoptional | String |
The display name of the Variant |
||||||||||
priceoptional | String |
The price of the Variant in cents |
||||||||||
unapprovedItems | Object[] |
Array of Product objects that have a status that is NOT |
||||||||||
uuidoptional | String |
A UUID for the item. Automatically generated by Doshii. |
||||||||||
posIdoptional | String |
The POS id of the Product. When not provided, is treated as a custom/open/generic item by the POS. |
||||||||||
nameoptional | String |
The display name of the Product |
||||||||||
statusoptional | String |
The status of the unapproved item. Must be one of ['pending', 'cancelled', 'voided'] |
||||||||||
quantityoptional | String |
The quantity ordered |
||||||||||
descriptionoptional | String |
A short description of the Product |
||||||||||
unitPriceoptional | String |
The price of the Product in cents |
||||||||||
totalBeforeSurcountsoptional | String |
The price of the line item before the Surcounts are applied |
||||||||||
totalAfterSurcountsoptional | String |
The price of the line item after the Surcounts are applied |
||||||||||
tagsoptional | String[] |
Array of strings to help group Products together |
||||||||||
surcountsoptional | Object[] |
Array of Surcount objects. |
||||||||||
posIdoptional | String |
Id of the item in the POS. Providing this will allow the POS to correctly print and report sales. |
||||||||||
nameoptional | String |
Name of item. |
||||||||||
descriptionoptional | String |
Description of item. |
||||||||||
typeoptional | String |
Whether this is an 'absolute' or 'percentage' Surcount |
||||||||||
amountoptional | String |
The amount to surcharge/discount (positive/negative integer) |
||||||||||
valueoptional | String |
The value of the surcounts in cents. Accepts integer or string of integers. This value should be calculated if the Surcount is % based. |
||||||||||
optionsoptional | Object[] |
Array of options that can be added to the Product |
||||||||||
posIdoptional | String |
The POS id of the option |
||||||||||
nameoptional | String |
The display name of the option |
||||||||||
variantsoptional | Object[] |
The available Variants for the option |
||||||||||
posIdoptional | String |
The POS id of the Variant |
||||||||||
nameoptional | String |
The display name of the Variant |
||||||||||
priceoptional | String |
The price of the Variant in cents |
||||||||||
surcounts | Object[] |
Array of Surcount objects. |
||||||||||
posIdoptional | String |
Id of the item in the POS |
||||||||||
nameoptional | String |
Name of item. |
||||||||||
descriptionoptional | String |
Description of item. |
||||||||||
typeoptional | String |
Whether this is an 'absolute' or 'percentage' Surcount |
||||||||||
amountoptional | String |
The amount to surcharge/discount (positive/negative integer) |
||||||||||
valueoptional | String |
The value of the surcounts in cents. Accepts integer or string of integers. This value should be calculated if the Surcount is % based. |
||||||||||
consumeroptional | Object |
An object containing Consumer details. Required when |
||||||||||
nameoptional | String |
The name of the Consumer |
||||||||||
phoneoptional | String |
The phone number of the Consumer |
||||||||||
addressoptional | String |
An object containing Consumer Address details. |
||||||||||
line1optional | String |
The street number and name. |
||||||||||
cityoptional | String |
City. |
||||||||||
stateoptional | String |
State. |
||||||||||
postalCodeoptional | String |
Postal code. |
||||||||||
countryoptional | String |
2-character Country Code. |
||||||||||
notesoptional | String |
Free-text entry for notes about the Consumer's address such as "leave at back door". |
Response
Field | Type | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | String |
Unique number identifying this resource |
||||||||||||||
locationId | String |
Id of the Location resource |
||||||||||||||
checkinId | String |
Id of the Checkin resource |
||||||||||||||
manuallyProcessed | Boolean |
The order has been verified by a human, pass through |
||||||||||||||
phase | String |
Free text representation of where the Order is in it's lifecycle at the venue. Eg: 'preparing', 'mains served', 'ready for delivery', etc... |
||||||||||||||
status | String |
The current state of the Order. Can be one of the following:
See Status and the Order State Machine for more information. |
||||||||||||||
type | String |
The type of order should be one of the following
|
||||||||||||||
notes | String |
Free-text entry for order or delivery notes such as "deliver to back door". |
||||||||||||||
requiredAt | String |
A |
||||||||||||||
availableEta | String |
An estimated |
||||||||||||||
items | Object[] |
Array of Product objects. |
||||||||||||||
posId | String |
The POS id of the Product |
||||||||||||||
name | String |
The display name of the Product |
||||||||||||||
quantity | String |
The quantity ordered |
||||||||||||||
description | String |
A short description of the Product |
||||||||||||||
unitPrice | String |
The price of the Product in cents |
||||||||||||||
totalBeforeSurcounts | String |
The price of the line item before the Surcounts are applied |
||||||||||||||
totalAfterSurcounts | String |
The price of the line item after the Surcounts are applied |
||||||||||||||
tags | String[] |
Array of strings to help group Products together |
||||||||||||||
type | String |
Either a type of 'single' or 'bundle'. Defaults to 'single' |
||||||||||||||
includedItems | Object[] |
Array of items that are included in a bundle |
||||||||||||||
name | String |
The name of the included item |
||||||||||||||
posId | String |
The posId of the included item |
||||||||||||||
quantity | String |
The quantity of the included item |
||||||||||||||
unitPrice | String |
The unitPrice of the included item |
||||||||||||||
options | Object[] |
Array of options that can be added to the Product |
||||||||||||||
posId | String |
The POS id of the option |
||||||||||||||
name | String |
The display name of the option |
||||||||||||||
min | String |
The minimum number that can be selected (0 for no min) |
||||||||||||||
max | String |
The maximum number that can be selected (0 for no max) |
||||||||||||||
variants | Object[] |
The available Variants for the option |
||||||||||||||
posId | String |
The POS id of the Variant |
||||||||||||||
name | String |
The display name of the Variant |
||||||||||||||
price | String |
The price of the Variant in cents |
||||||||||||||
surcounts | Object[] |
Array of Surcount objects. |
||||||||||||||
posId | String |
Id of the item in the POS. Providing this will allow the POS to correctly print and report sales. |
||||||||||||||
rewardId | String |
Id of the Reward that created this Surcount |
||||||||||||||
name | String |
Name of item. |
||||||||||||||
description | String |
Description of item. |
||||||||||||||
amount | String |
The amount to surcharge/discount (positive/negative integer) |
||||||||||||||
value | String |
The value of the surcounts in cents. Accepts integer or string of integers. This value should be calculated if the Surcount is % based. |
||||||||||||||
options | Object[] |
Array of options that can be added to the Product |
||||||||||||||
posId | String |
The POS id of the option |
||||||||||||||
name | String |
The display name of the option |
||||||||||||||
variants | Object[] |
The available Variants for the option |
||||||||||||||
posId | String |
The POS id of the Variant |
||||||||||||||
name | String |
The display name of the Variant |
||||||||||||||
price | String |
The price of the Variant in cents |
||||||||||||||
unapprovedItems | Object[] |
Array of Product objects that have a status that is NOT |
||||||||||||||
posId | String |
The POS id of the Product |
||||||||||||||
name | String |
The display name of the Product |
||||||||||||||
quantity | String |
The quantity ordered |
||||||||||||||
description | String |
A short description of the Product |
||||||||||||||
unitPrice | String |
The price of the Product in cents |
||||||||||||||
totalBeforeSurcounts | String |
The price of the line item before the Surcounts are applied |
||||||||||||||
totalAfterSurcounts | String |
The price of the line item after the Surcounts are applied |
||||||||||||||
tags | String[] |
Array of strings to help group Products together |
||||||||||||||
type | String |
Either a type of 'single' or 'bundle'. Defaults to 'single' |
||||||||||||||
includedItems | Object[] |
Array of items that are included in a bundle |
||||||||||||||
name | String |
The name of the included item |
||||||||||||||
posId | String |
The posId of the included item |
||||||||||||||
quantity | String |
The quantity of the included item |
||||||||||||||
unitPrice | String |
The unitPrice of the included item |
||||||||||||||
options | Object[] |
Array of options that can be added to the Product |
||||||||||||||
posId | String |
The POS id of the option |
||||||||||||||
name | String |
The display name of the option |
||||||||||||||
min | String |
The minimum number that can be selected (0 for no min) |
||||||||||||||
max | String |
The maximum number that can be selected (0 for no max) |
||||||||||||||
variants | Object[] |
The available Variants for the option |
||||||||||||||
posId | String |
The POS id of the Variant |
||||||||||||||
name | String |
The display name of the Variant |
||||||||||||||
price | String |
The price of the Variant in cents |
||||||||||||||
surcounts | Object[] |
Array of Surcount objects. |
||||||||||||||
posId | String |
Id of the item in the POS. Providing this will allow the POS to correctly print and report sales. |
||||||||||||||
rewardId | String |
Id of the Reward that created this Surcount |
||||||||||||||
name | String |
Name of item. |
||||||||||||||
description | String |
Description of item. |
||||||||||||||
amount | String |
The amount to surcharge/discount (positive/negative integer) |
||||||||||||||
value | String |
The value of the surcounts in cents. Accepts integer or string of integers. This value should be calculated if the Surcount is % based. |
||||||||||||||
options | Object[] |
Array of options that can be added to the Product |
||||||||||||||
posId | String |
The POS id of the option |
||||||||||||||
name | String |
The display name of the option |
||||||||||||||
variants | Object[] |
The available Variants for the option |
||||||||||||||
posId | String |
The POS id of the Variant |
||||||||||||||
name | String |
The display name of the Variant |
||||||||||||||
price | String |
The price of the Variant in cents |
||||||||||||||
consumer | String |
An object containing Consumer details. |
||||||||||||||
name | String |
The name of the consumer |
||||||||||||||
phone | String |
The phone of the consumer |
||||||||||||||
String |
The email of the consumer |
|||||||||||||||
address | String |
An object containing Consumer Address details. |
||||||||||||||
line1 | String |
The street number and name. |
||||||||||||||
city | String |
City. |
||||||||||||||
state | String |
State. |
||||||||||||||
postalCode | String |
Postal code. |
||||||||||||||
country | String |
2-character Country Code. |
||||||||||||||
notes | String |
Free-text entry for consumer's address such as "Leave at back door". |
||||||||||||||
surcounts | Object[] |
Array of Surcount objects. |
||||||||||||||
posId | String |
Id of the item in the POS |
||||||||||||||
rewardId | String |
Id of the Reward that created this Surcount |
||||||||||||||
name | String |
Name of item. |
||||||||||||||
description | String |
Description of item. |
||||||||||||||
amount | String |
The amount to surcharge/discount (positive/negative integer) |
||||||||||||||
value | String |
The value of the surcounts in cents. Accepts integer or string of integers. This value should be calculated if the Surcount is % based. |
||||||||||||||
checkin | Object |
An object containing Checkin details. |
||||||||||||||
id | String |
The checkin ID |
||||||||||||||
tableNames | String |
Array of table names used in the checkin. |
||||||||||||||
covers | String |
Number of covers |
||||||||||||||
updatedAt | String |
Checkin last update date |
||||||||||||||
createdAt | String |
Checkin creation date |
||||||||||||||
uri | String |
URI of the Checkin |
||||||||||||||
rejectionCode | String |
The code for a rejection. More information can be found by a GET on /rejection-codes/:rejectionCode. Will not return if not set. |
||||||||||||||
rejectionReason | String |
The reason defined by the POS as why the order was rejected. Will not return if not set. |
||||||||||||||
posTerminalId | String |
A hashed ID of the POS terminal that is associated to this order. Will not return if not set. |
||||||||||||||
updatedAt | String |
Order last update date |
||||||||||||||
createdAt | String |
Order creation date |
||||||||||||||
version | String |
An obfuscated string representation of the version |
||||||||||||||
uri | String |
URI of the order |
||||||||||||||
transactionsUri | String |
URI of the Transactions associated with the order |
Examples
Request: Linking an order
{
"id": "AB123",
"status": "accepted",
"surcounts": [],
"items": [
{
"uuid": "32f342f3-f34f23f34f34-f3432g23g32",
"posId": "toasted_bread",
"name": "Toasted Sourdough Bread & Eggs",
"quantity": "1",
"description": "Just ye old classic",
"unitPrice": "1100",
"totalBeforeSurcounts": "1100",
"totalAfterSurcounts": "1100",
"surcounts": [],
"options": []
}
],
"version": "uhhgbh4FE"
}
Response
{
"id": "1634",
"status": "accepted",
"phase": "ordered",
"manuallyProcessed": false,
"checkinId": "3",
"locationId": "Xuy8K3a0",
"notes":"Well done toast",
"requiredAt":null,
"availableEta":null,
"surcounts": [],
"items": [
{
"uuid":"43g25532h235-f34f23f34f34-f3432g23g32",
"posId":"lol12",
"name":"Toasted Sourdough Bread & Eggs",
"quantity":1,
"description":"Just ye old classic",
"unitPrice":"1100",
"totalBeforeSurcounts":"1100",
"totalAfterSurcounts":"1100",
"type": "single",
"includedItems": [],
"surcounts": [],
"options": []
}
],
"unapprovedItems": [
{
"uuid":"32f342f3-f34f23f34f34-f3432g23g32",
"name":"Coke",
"status":"pending",
"description":"classic cola",
"unitPrice":"450",
"posId":"rwqed1",
"quantity":1,
"type": "single",
"includedItems": [],
"surcounts": [],
"options": []
}
],
"consumer":{
"name": "Tony Tamplin",
"phone":"0121211212",
"email":"t@mail.com",
"address":{
"line1":"St Kilda Rd",
"line2":"Level 6, 616 St Kilda Rd"
"city":"Melbourne"
"state":"VIC"
"postalCode":"3180"
"country":"AU"
}
},
"updatedAt": "2016-08-18T04:58:38.485Z",
"createdAt": "2016-08-18T04:58:38.485Z",
"version":"iwgjr2NJ014",
"uri": "https://sandbox.doshii.co/pos/v3/orders/1634",
"transactionsUri": "https://sandbox.doshii.co/pos/v3/orders/1634/transactions"
}
Comments
0 comments
Please sign in to leave a comment.