Skip to main content
Version: v1

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

ParameterDefaultDescription
page1The current page
count30The 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

$ curl --request GET --url 'https://app.winesitting.com/v1/get-out-requests' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'

Get a Specific Get Out Request

This endpoint retrieves a specific Get Out Request.

HTTP Request

GET /v1/get-out-requests/{id}

URL Parameters

ParameterDescription
idThe 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

info

You can't get a get out request that you don't own.

Example

$ curl --request GET --url 'https://app.winesitting.com/v1/get-out-requests/24079' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json'

Create a Get Out Request

This endpoint creates a Get Out Request.

HTTP Request

POST /v1/get-out-requests

Get Out Request parameters

NameRequiredTypeDetails
bottlesrequiredarrayJson array of requested wines
boxesoptionalarrayJson array of requested wines in specific boxes
delivery_dateoptionalstringFormat : 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_dayrequiredstringam for morning, pm for afternoon
is_pickupoptionalint1 means that the order will be picked up at warehouse. If you set the value to 0, you must provide an address.
commentoptionalstringA comment about your order
referenceoptionalstringYour order reference
firstnameoptionalstringNot required if company is given or is_pickup=0
lastnameoptionalstringNot required if company is given or is_pickup=0
companyoptionalstringNot required if firstname and lastname are given or is_pickup=0
street1optionalstringNot required is_pickup=0
street2optionalstring
cityoptionalstringNot required if is_pickup=0
zipcodeoptionalstringNot required if is_pickup=0
countryoptionalstringNot required if is_pickup=0, uses ISO 3166-1 alpha-2
phoneoptionalstring
emailoptionalstring
vat_numberoptionalstring
detailoptionalstringDetails about the address
auto_qtyoptionalintIf 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"
}
warning
We strongly advice you to let WineSitting compute the earliest delivery date. If not, you will have to follow rules bellow.

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

$ 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": ""
}
'

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

NameRequiredTypeDetails
bottlesoptionalarrayJson array of requested wines
boxesoptionalarrayJson array of requested wines in specific boxes
delivery_dateoptionalstringFormat : YYYY-MM-DD
half_dayoptionalstringam for morning, pm for afternoon
is_pickupoptionalint1 means that the order will be picked up at warehouse. If you set the value to 0, you must provide an address.
commentoptionalstringA comment about your order
referenceoptionalstringYour order reference
firstnameoptionalstringNot required if company is given or is_pickup=0
lastnameoptionalstringNot required if company is given or is_pickup=0
companyoptionalstringNot required if firstname and lastname are given or is_pickup=0
street1optionalstring
street2optionalstring
cityoptionalstring
zipcodeoptionalstring
countryoptionalstringISO 3166-1 alpha-2
phoneoptionalstring
emailoptionalstring
vat_numberoptionalstring
detailoptionalstringDetails about the address
auto_qtyoptionalintIf 1, the system will select maximum quantity of bottles even if asked quantity isn't available instead of failing for the complete getOutRequest
info

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

$ 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",
},
'

Delete a Get Out Request

This endpoint lets you delete a Get Out Request.

HTTP Request

DELETE /v1/get-out-requests/{id}

info

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

$ curl --request DELETE --url 'https://app.winesitting.com/v1/get-out-requests/24079' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json' \

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

ParameterrequiredDescription
is_pickuprequired1 means that the order will be picked up at warehouse. If you set the value to 0, you must provide an address.
zipcoderequired
countryrequiredISO 3166-1 alpha-2
bottle_quantityrequired
delivery_daterequiredFormat : YYYY-MM-DD

Example

$ 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'

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

$ 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"'