Skip to main content
Version: v2

Addresses

Get All Addresses

This endpoint retrieves all addresses associated to current user.

HTTP Request

GET /addresses

Query Parameters

See pagination

Example

$ curl --request GET --url 'https://app.winesitting.com/api/v2/addresses' \
--header 'Authorization: Bearer YourBearerToken' \
--header 'content-type: application/json'

Get a Specific Address

HTTP Request

GET /addresses/{id}

Query Parameters

ParameterDescription
idThe id of the address to retrieve

Example

$ curl --request GET --url 'https://app.winesitting.com/api/v2/addresses/2531' \
--header 'Authorization: Bearer YourBearerToken' \
--header 'content-type: application/json'

Create an Address

HTTP Request

POST /addresses

Address parameters

NameRequiredTypeDetails
firstnamerequiredstringRequired unless company is provided
lastnamerequiredstringRequired unless company is provided
companyrequiredstringRequired unless both firstname and lastname are provided
street1requiredstring
street2optionalstring
cityrequiredstring
zipcoderequiredstring
countryoptionalstringISO 3166-1 alpha-2
phonerequiredstringE164
emailoptionalstring
vat_numberoptionalstring
detailoptionalstringDetails about the address (don't put delivery time slots)
referenceoptionalstringYour reference

Example

$ curl --request POST --url 'https://app.winesitting.com/api/v2/addresses' \
--header 'Authorization: Bearer YourBearerToken' \
--header 'content-type: application/json' \
--data '
{
"firstname": "Sherlock",
"lastname": "Holmes",
"company": "Sherlock Holmes Investigation Ltd.",
"street1": "221b Baker Street",
"street2": null,
"city": "Londres",
"zipcode": "AB10 1",
"country": "GB",
"phone": "+44132456798",
"email": "email@domain.tld",
"vat_number": null,
"detail": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"reference": "My new reference"
},
'

Edit an Address

HTTP Request

PUT /addresses/{id}

info

The PUT verb means that you have to send all the parameters, even the ones that don't change. The parameters are the same as the Create an Address endpoint.

Example

$ curl --request PUT --url 'https://app.winesitting.com/api/v2/addresses/2531' \
--header 'Authorization: Bearer YourBearerToken' \
--header 'content-type: application/json' \
--data '
{
"id": 2531,
"firstname": "Sherlock",
"lastname": "Holmes",
"company": "Sherlock Holmes Investigation Ltd.",
"street1": "221b Baker Street",
"street2": null,
"city": "Londres",
"zipcode": "AB10 1",
"country": "GB",
"phone": "+44132456798",
"email": "email@domain.tld",
"vat_number": null,
"detail": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"reference": "My reference"
},
'

Delete an Address

HTTP Request

DELETE /addresses/{id}

info

You can't delete your billing address.

Example

$ curl --request DELETE --url 'https://app.winesitting.com/api/v2/address/2531' \
--header 'Authorization: Bearer YourBearerToken' \
--header 'content-type: application/json' \