Skip to main content
Version: v1

Addresses

Get All Addresses

This endpoint retrieves all addresses associated to current user.

HTTP Request

GET /v1/addresses

Query Parameters

ParameterDefaultDescription
page1The current page
count30The number of items per page

Example

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

Get a Specific Address

This endpoint retrieves a specific address.

HTTP Request

GET /v1/addresses/{id}

URL Parameters

ParameterDescription
idThe id of the address to retrieve
info

You can't get a specific address that you don't own.

Example

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

Create an Address

This endpoint creates an address.

HTTP Request

POST /v1/addresses

Address parameters

NameRequiredTypeDetails
firstnamerequiredstringNot required if company is given
lastnamerequiredstringNot required if company is given
companyrequiredstringNot required if firstname and lastname are given
street1requiredstring
street2optionalstring
cityrequiredstring
zipcoderequiredstring
countryoptionalstringISO 3166-1 alpha-2
phonerequiredstring
emailoptionalstring
vat_numberoptionalstring
detailoptionalstringDetails about the address
referenceoptionalstringYour reference

Example

$ curl --request POST --url 'https://app.winesitting.com/v1/addresses' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json' \
--data '
{
"firstname": "Sherlock",
"lastname": "Holmes",
"company": "Sherlock Holmes Investigation Ltd.",
"street1": "221b Baker Street",
"city": "Londres",
"zipcode": "AB10 1",
"phone": "+44 132 456 798",
},
'

Edit an Address

This endpoint lets you edit an address.

HTTP Request

PUT /v1/addresses/{id}

Address parameters

NameRequiredTypeDetails
firstnameoptionalstring
lastnameoptionalstring
companyoptionalstring
street1optionalstring
street2optionalstring
cityoptionalstring
zipcodeoptionalstring
countryoptionalstringISO 3166-1 alpha-2
phoneoptionalstring
emailoptionalstring
vat_numberoptionalstring
detailoptionalstringDetails about the address
referenceoptionalstringYour reference
info

All fields are optional, but an address still needs (a firstname and a lastname) or a company.

Example

$ curl --request PUT --url 'https://app.winesitting.com/v1/addresses/2531' \
--header 'AccessKey: YourAccessKey' \
--header 'SecretKey: YourSecretKey' \
--header 'content-type: application/json' \
--data '
{
"zipcode": "AB10 2",
"firstname": "Sherlock"
},
'

Delete an Address

This endpoint lets you delete an Address.

HTTP Request

DELETE /v1/addresses/{id}

info

You can't delete an address that you don't own. You can't delete your billing address.

Example

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