Get Out Requests
Get All Get Out Requests
This endpoint retrieves all get out requests associated to current user.
HTTP Request
GET /v1/get-out-requests
Query Parameters
Parameter | Default | Description |
---|---|---|
page | 1 | The current page |
count | 30 | The number of items per page |
Response informations
Status name list :
- STATUS_NEW : Preparation waiting
- STATUS_PROCESSING : Preparation in progress
- STATUS_READY : Ready
- STATUS_SHIPPED : Shipped
- STATUS_DELIVERED : Delivered
- STATUS_WITHDRAWED : Withdrawn from warehouse
Construct tracking url page :
https://winesitting.aftership.com/{myTrackingNumber}?lang=fr
Example
- Request
- Response
$ curl --request GET --url 'https://app.winesitting.com/v1/get-out-requests' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'
[
{
"id": 51246,
"parent": null,
"children": {},
"comment": null,
"firstname": null,
"lastname": null,
"company": null,
"street1": null,
"street2": null,
"city": null,
"zipcode": null,
"country": null,
"phone": null,
"email": null,
"is_pickup": true,
"attachments": [],
"delivery_slip": null,
"delivery_date": "2023-08-01T00:00:00+02:00",
"preparation_date": "2023-07-31T00:00:00+02:00",
"half_day": "am",
"tracking_url": null,
"tracking_numbers": [],
"warehouse": {
"id": 3,
"name": "Wissous A",
"public_name": "WineSitting Wissous A",
"street1": "14/16 bd Arago",
"street2": "",
"city": "Wissous",
"zipcode": "91320",
"country": "FR"
},
"is_pickup_warehouse": {
"id": 3,
"name": "Wissous A",
"public_name": "WineSitting Wissous A",
"street1": "14/16 bd Arago",
"street2": "",
"city": "Wissous",
"zipcode": "91320",
"country": "FR"
},
"status": 0,
"status-name": "STATUS_NEW",
"additional_status": null,
"reference": null,
"origin": "WEB",
"delivery_warehouse": null,
"delivery_start": null,
"delivery_hours": null,
"created_by": "jeanphilippe.haut@winesitting.com",
"updated_by": "jeanphilippe.haut@winesitting.com",
"created_at": "2023-07-28T14:25:52+02:00",
"updated_at": "2023-07-28T14:25:52+02:00",
"content": [
{
"id": 9965,
"wine": "Domaine Anne Claude Leflaive",
"color": "Blanc",
"country": "France",
"region": "Bourgogne",
"appelation": "Bienvenues Batard Montrachet",
"description": null,
"ranking": "Grand Cru",
"millesime": 2012,
"alcohol": 13,
"format": "0.75",
"wine-price": "-",
"wine-comment": "",
"quantity": 2,
"box": ""
}
],
"format-quantity": {
"0.75": 2
},
"bottle-quantity": 2
}
]
Get a Specific Get Out Request
This endpoint retrieves a specific Get Out Request.
HTTP Request
GET /v1/get-out-requests/{id}
URL Parameters
Parameter | Description |
---|---|
id | The id of the Get Out Request to retrieve |
Response informations
Status name list :
- STATUS_NEW : Preparation waiting
- STATUS_PROCESSING : Preparation in progress
- STATUS_READY : Ready
- STATUS_SHIPPED : Shipped
- STATUS_DELIVERED : Delivered
- STATUS_WITHDRAWED : Withdrawn from warehouse
Construct tracking url page :
https://winesitting.aftership.com/{myTrackingNumber}?lang=fr
You can't get a get out request that you don't own.
Example
- Request
- Response
$ curl --request GET --url 'https://app.winesitting.com/v1/get-out-requests/24079' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'
{
"id": 51246,
"parent": null,
"children": {},
"comment": null,
"firstname": null,
"lastname": null,
"company": null,
"street1": null,
"street2": null,
"city": null,
"zipcode": null,
"country": null,
"phone": null,
"email": null,
"is_pickup": true,
"attachments": [],
"delivery_slip": null,
"delivery_date": "2023-08-01T00:00:00+02:00",
"preparation_date": "2023-07-31T00:00:00+02:00",
"half_day": "am",
"tracking_url": null,
"tracking_numbers": [],
"warehouse": {
"id": 3,
"name": "Wissous A",
"public_name": "WineSitting Wissous A",
"street1": "14/16 bd Arago",
"street2": "",
"city": "Wissous",
"zipcode": "91320",
"country": "FR"
},
"is_pickup_warehouse": {
"id": 3,
"name": "Wissous A",
"public_name": "WineSitting Wissous A",
"street1": "14/16 bd Arago",
"street2": "",
"city": "Wissous",
"zipcode": "91320",
"country": "FR"
},
"status": 0,
"status-name": "STATUS_NEW",
"additional_status": null,
"reference": null,
"origin": "WEB",
"delivery_warehouse": null,
"delivery_start": null,
"delivery_hours": null,
"created_by": "jeanphilippe.haut@winesitting.com",
"updated_by": "jeanphilippe.haut@winesitting.com",
"created_at": "2023-07-28T14:25:52+02:00",
"updated_at": "2023-07-28T14:25:52+02:00",
"content": [
{
"id": 9965,
"wine": "Domaine Anne Claude Leflaive",
"color": "Blanc",
"country": "France",
"region": "Bourgogne",
"appelation": "Bienvenues Batard Montrachet",
"description": null,
"ranking": "Grand Cru",
"millesime": 2012,
"alcohol": 13,
"format": "0.75",
"wine-price": "-",
"wine-comment": "",
"quantity": 2,
"box": ""
}
],
"format-quantity": {
"0.75": 2
},
"bottle-quantity": 2
}
}
Create a Get Out Request
This endpoint creates a Get Out Request.
HTTP Request
POST /v1/get-out-requests
Get Out Request parameters
Name | Required | Type | Details |
---|---|---|---|
bottles | required | array | Json array of requested wines |
boxes | optional | array | Json array of requested wines in specific boxes |
delivery_date | optional | string | Format : YYYY-MM-DD . If delivery_date is missing, the system will choose the best delivery date for you. If you set the delivery_date , you must follow some rules (see below) |
half_day | required | string | am for morning, pm for afternoon |
is_pickup | optional | int | 1 means that the order will be picked up at warehouse. If you set the value to 0 , you must provide an address. |
comment | optional | string | A comment about your order |
reference | optional | string | Your order reference |
firstname | optional | string | Not required if company is given or is_pickup=0 |
lastname | optional | string | Not required if company is given or is_pickup=0 |
company | optional | string | Not required if firstname and lastname are given or is_pickup=0 |
street1 | optional | string | Not required is_pickup=0 |
street2 | optional | string | |
city | optional | string | Not required if is_pickup=0 |
zipcode | optional | string | Not required if is_pickup=0 |
country | optional | string | Not required if is_pickup=0 , uses ISO 3166-1 alpha-2 |
phone | optional | string | |
optional | string | ||
vat_number | optional | string | |
detail | optional | string | Details about the address |
auto_qty | optional | int | If 1 the system will select maximum quantity of bottles even if asked quantity isn't available instead of failing for the complete getOutRequest |
Important notes
If there are more than one format for a wine, the bottles
parameter will look like below :
{
...
"bottles": {
"14126": {
"0.75": 1,
"0.33": 2,
"1": 8
},
"16243": {"0.75" : 4}
},
...
}
You can only ask for bottles that are in your cellar. Please check the quantity available before creating the Get Out Request. If not, you will get an error like :
{
"result": "error",
"message": "No bottle exist for wine 14126 and format 12"
}
{
"result": "error",
"message": "Vous ne pouvez pas sortir plus de X bouteille(s) de Y"
}
The shortest delay between delivery and getOutRequest creation is computed with the following algorithm :
- Preparation
- If the getOutRequest is created before 1pm, the preparation will start the same day.
- If the getOutRequest is created after 1pm the preparation will start the next day.
- The preparation start only on working day. If the previous rules lead to a start on saturday, we will start on monday.
- Shipping will add days to the delay thanks to the following rules :
- 1 day for Paris and 92, 93, 94 departments
- 3 days for France (up to 24 bottles)
- 4 days for France (above 24 bottles)
- 6 days or the rest of the world
- The delivery can be done only on working day. If the previous delay leads to a delivery on saturday, we will add some delay for a monday delivery.
You can't ask for a delivery on an invalid date. If you do it, you will get the following error :
{
"result": "error",
"message": "The delivery date is not valid (weekend or public day)"
}
Example
- Request
- Response
$ curl --request POST --url 'https://app.winesitting.com/v1/get-out-requests' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json' \
--data '
{
"bottles": {
"14126": {"0.75": 1},
"16243": {"0.75": 4}
},
"boxes": {
"cbo6": {
"16243": {"0.75" : 1}
},
"cbo12": {
"16243": {"0.75" : 1}
}
},
"delivery_date": "2030-01-31",
"half_day": "pm",
"is_pickup": 1,
"comment": ""
}
'
{
"id": 51246,
"parent": null,
"children": {},
"comment": null,
"firstname": null,
"lastname": null,
"company": null,
"street1": null,
"street2": null,
"city": null,
"zipcode": null,
"country": null,
"phone": null,
"email": null,
"is_pickup": true,
"attachments": [],
"delivery_slip": null,
"delivery_date": "2023-08-01T00:00:00+02:00",
"preparation_date": "2023-07-31T00:00:00+02:00",
"half_day": "am",
"tracking_url": null,
"tracking_numbers": [],
"warehouse": {
"id": 3,
"name": "Wissous A",
"public_name": "WineSitting Wissous A",
"street1": "14/16 bd Arago",
"street2": "",
"city": "Wissous",
"zipcode": "91320",
"country": "FR"
},
"is_pickup_warehouse": {
"id": 3,
"name": "Wissous A",
"public_name": "WineSitting Wissous A",
"street1": "14/16 bd Arago",
"street2": "",
"city": "Wissous",
"zipcode": "91320",
"country": "FR"
},
"status": 0,
"status-name": "STATUS_NEW",
"additional_status": null,
"reference": null,
"origin": "WEB",
"delivery_warehouse": null,
"delivery_start": null,
"delivery_hours": null,
"created_by": "jeanphilippe.haut@winesitting.com",
"updated_by": "jeanphilippe.haut@winesitting.com",
"created_at": "2023-07-28T14:25:52+02:00",
"updated_at": "2023-07-28T14:25:52+02:00",
"content": [
{
"id": 14126,
"wine": "Chateau Montluc",
"color": "Rouge",
"country": "France",
"region": "Bordeaux",
"appelation": "Saint Julien",
"description": "",
"ranking": "12",
"millesime": 2005,
"alcohol": 12.5,
"format": "0.75",
"wine-price": "-",
"wine-comment": "",
"quantity": 4,
"box": ""
},
{
"id": 16243,
"wine": "A. Chopin Et Fils",
"color": "Rouge",
"country": "France",
"region": "Bourgogne",
"appelation": "Nuits Saint Georges",
"description": "-",
"ranking": "-",
"millesime": 1999,
"alcohol": 13,
"format": "0.75",
"wine-price": "-",
"wine-comment": "",
"quantity": 1,
"box": ""
},
{
"id": 16243,
"wine": "Chateau Montluc",
"color": "Rouge",
"country": "France",
"region": "Bordeaux",
"appelation": "Saint Julien",
"description": "",
"ranking": "12",
"millesime": 2005,
"alcohol": 11.5,
"format": "0.75",
"wine-price": "-",
"wine-comment": "",
"quantity": 1,
"box": "CBO6"
},
{
"id": 16243,
"wine": "Chateau Montluc",
"color": "Rouge",
"country": "France",
"region": "Bordeaux",
"appelation": "Saint Julien",
"description": "",
"ranking": "12",
"millesime": 2005,
"alcohol": 12.5,
"format": "0.75",
"wine-price": "-",
"wine-comment": "",
"quantity": 1,
"box": "CBO12"
}
],
"format-quantity": {
"0.75": 5
},
"bottle-quantity": 5,
"errors": [
{
"id": 764,
"format": "0.75",
"box": null,
"asked": 5,
"found": 3,
"diff": 2
}
]
}
Edit a Get Out Request
This endpoint lets you edit a Get Out Request.
HTTP Request
PUT /v1/get-out-requests/{id}
Get Out Request parameters
Name | Required | Type | Details |
---|---|---|---|
bottles | optional | array | Json array of requested wines |
boxes | optional | array | Json array of requested wines in specific boxes |
delivery_date | optional | string | Format : YYYY-MM-DD |
half_day | optional | string | am for morning, pm for afternoon |
is_pickup | optional | int | 1 means that the order will be picked up at warehouse. If you set the value to 0 , you must provide an address. |
comment | optional | string | A comment about your order |
reference | optional | string | Your order reference |
firstname | optional | string | Not required if company is given or is_pickup=0 |
lastname | optional | string | Not required if company is given or is_pickup=0 |
company | optional | string | Not required if firstname and lastname are given or is_pickup=0 |
street1 | optional | string | |
street2 | optional | string | |
city | optional | string | |
zipcode | optional | string | |
country | optional | string | ISO 3166-1 alpha-2 |
phone | optional | string | |
optional | string | ||
vat_number | optional | string | |
detail | optional | string | Details about the address |
auto_qty | optional | int | If 1 , the system will select maximum quantity of bottles even if asked quantity isn't available instead of failing for the complete getOutRequest |
All fields are optional, but an address still needs (a firstname
and a lastname
) or a company
.
You can't edit a get out request that you don't own. You can't edit a get out request that is already in preparation.
Example
- Request
- Response
$ curl --request PUT --url 'https://app.winesitting.com/v1/get-out-requests/24079' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json' \
--data '
{
"bottles" : {
"14126": {"0.75" : 1},
"16243": {"0.75" : 4}
},
"half_day": "am",
},
'
The modified Get Out Request
Delete a Get Out Request
This endpoint lets you delete a Get Out Request.
HTTP Request
DELETE /v1/get-out-requests/{id}
You can't delete a get out request that you don't own. You can't delete a get out request that is already in preparation.
Example
- Request
- Response
$ curl --request DELETE --url 'https://app.winesitting.com/v1/get-out-requests/24079' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json' \
The deleted Get Out Request
Get delivery cost
This endpoint retrieves delivery cost for a location and bottle quantity.
HTTP Request
GET /v1/get-out-requests/delivery-cost
Query Parameters
Parameter | required | Description |
---|---|---|
is_pickup | required | 1 means that the order will be picked up at warehouse. If you set the value to 0 , you must provide an address. |
zipcode | required | |
country | required | ISO 3166-1 alpha-2 |
bottle_quantity | required | |
delivery_date | required | Format : YYYY-MM-DD |
Example
- Request
- Response
$ curl --request GET --url 'https://app.winesitting.com/v1/get-out-requests/delivery-cost?is_pickup=0&zipcode=95300&bottle_quantity=24&country=FR&delivery_date=2023-12-23' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'
{
"cost": 10
}
Send attachement
This endpoint add documents in a Get Out Request.
HTTP Request
POST /v1/get-out-requests/{id}/files
Query Parameters
You must use multipart/form-data and send files, the parameter name must be "files"
Important notes
File formats allowed :
- text/csv
- application/msword
- image/gif
- text/html
- image/jpeg
- application/vnd.oasis.opendocument.spreadsheet
- application/vnd.oasis.opendocument.text
- application/vnd.oasis.opendocument.text
- application/pdfapplication/pdf
- application/pdf
- application/vnd.ms-powerpoint
- application/rtf
- application/vnd.ms-excel
- image/bmp
- image/png
- application/mspowerpoint
Example
- Request
- Response
$ curl --request POST --url 'https://app.winesitting.com/v1/get-out-requests/24079/files' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'\
--form 'files=@"my-attachment-original-name-1.pdf"'
{
"id": 51246,
"parent": null,
"children": {},
"comment": null,
"firstname": null,
"lastname": null,
"company": null,
"street1": null,
"street2": null,
"city": null,
"zipcode": null,
"country": null,
"phone": null,
"email": null,
"is_pickup": true,
"attachments": [
"my-attachment-original-name-1.pdf",
"my-attachment-original-name-2.pdf"
],
"delivery_slip": null,
"delivery_date": "2023-08-01T00:00:00+02:00",
"preparation_date": "2023-07-31T00:00:00+02:00",
"half_day": "am",
"tracking_url": null,
"tracking_numbers": [],
"warehouse": {
"id": 3,
"name": "Wissous A",
"public_name": "WineSitting Wissous A",
"street1": "14/16 bd Arago",
"street2": "",
"city": "Wissous",
"zipcode": "91320",
"country": "FR"
},
"is_pickup_warehouse": {
"id": 3,
"name": "Wissous A",
"public_name": "WineSitting Wissous A",
"street1": "14/16 bd Arago",
"street2": "",
"city": "Wissous",
"zipcode": "91320",
"country": "FR"
},
"status": 0,
"status-name": "STATUS_NEW",
"additional_status": null,
"reference": null,
"origin": "WEB",
"delivery_warehouse": null,
"delivery_start": null,
"delivery_hours": null,
"created_by": "jeanphilippe.haut@winesitting.com",
"updated_by": "jeanphilippe.haut@winesitting.com",
"created_at": "2023-07-28T14:25:52+02:00",
"updated_at": "2023-07-28T14:25:52+02:00",
"content": [
{
"id": 568495,
"wine": "Clos Saint Jean",
"color": "Rouge",
"country": "France",
"region": "Rhône",
"appelation": "Chateauneuf du Pape",
"description": "Deus Ex Machina",
"ranking": null,
"millesime": 2012,
"alcohol": 12.5,
"format": "0.75",
"wine-price": "-",
"wine-comment": "",
"quantity": 300,
"box": ""
}
],
"format-quantity": {
"0.75": 300
},
"bottle-quantity": 300,
}